Java 类ims.core.vo.domain.PasEventVoAssembler 实例源码

项目:AvoinApotti    文件:CorrespondenceOutpatientListImpl.java   
private CorrespondencePatientListsVoCollection createOutPatientListVoCollection(List list) {

    CorrespondencePatientListsVoCollection collOutPatientListVo = new CorrespondencePatientListsVoCollection();

    for (int i = 0; i<list.size(); i++)
    {
        Object obj[] = (Object[]) list.get(i);
        CorrespondencePatientListsVo voOutPatientList = new CorrespondencePatientListsVo();

        if(obj[0]==null)
            ;
        else    
            voOutPatientList.setOutpatientAttendanceVo(OutPatientAttendanceVoAssembler.create((OutpatientAttendance) obj[0]));
        if(obj[1]==null)
            ;
        else    
            voOutPatientList.setPASEventVo(PasEventVoAssembler.create((PASEvent) obj[1]));

        collOutPatientListVo.add(voOutPatientList);
    }

    return collOutPatientListVo;
}
项目:openMAXIMS    文件:CorrespondenceOutpatientListImpl.java   
private CorrespondencePatientListsVoCollection createOutPatientListVoCollection(List list) {

    CorrespondencePatientListsVoCollection collOutPatientListVo = new CorrespondencePatientListsVoCollection();

    for (int i = 0; i<list.size(); i++)
    {
        Object obj[] = (Object[]) list.get(i);
        CorrespondencePatientListsVo voOutPatientList = new CorrespondencePatientListsVo();

        if(obj[0]==null)
            ;
        else    
            voOutPatientList.setOutpatientAttendanceVo(OutPatientAttendanceVoAssembler.create((OutpatientAttendance) obj[0]));
        if(obj[1]==null)
            ;
        else    
            voOutPatientList.setPASEventVo(PasEventVoAssembler.create((PASEvent) obj[1]));

        collOutPatientListVo.add(voOutPatientList);
    }

    return collOutPatientListVo;
}
项目:openMAXIMS    文件:CorrespondenceOutpatientListImpl.java   
private CorrespondencePatientListsVoCollection createOutPatientListVoCollection(List list) {

    CorrespondencePatientListsVoCollection collOutPatientListVo = new CorrespondencePatientListsVoCollection();

    for (int i = 0; i<list.size(); i++)
    {
        Object obj[] = (Object[]) list.get(i);
        CorrespondencePatientListsVo voOutPatientList = new CorrespondencePatientListsVo();

        if(obj[0]==null)
            ;
        else    
            voOutPatientList.setOutpatientAttendanceVo(OutPatientAttendanceVoAssembler.create((OutpatientAttendance) obj[0]));
        if(obj[1]==null)
            ;
        else    
            voOutPatientList.setPASEventVo(PasEventVoAssembler.create((PASEvent) obj[1]));

        collOutPatientListVo.add(voOutPatientList);
    }

    return collOutPatientListVo;
}
项目:openmaxims-linux    文件:CorrespondenceOutpatientListImpl.java   
private CorrespondencePatientListsVoCollection createOutPatientListVoCollection(List list) {

    CorrespondencePatientListsVoCollection collOutPatientListVo = new CorrespondencePatientListsVoCollection();

    for (int i = 0; i<list.size(); i++)
    {
        Object obj[] = (Object[]) list.get(i);
        CorrespondencePatientListsVo voOutPatientList = new CorrespondencePatientListsVo();

        if(obj[0]==null)
            ;
        else    
            voOutPatientList.setOutpatientAttendanceVo(OutPatientAttendanceVoAssembler.create((OutpatientAttendance) obj[0]));
        if(obj[1]==null)
            ;
        else    
            voOutPatientList.setPASEventVo(PasEventVoAssembler.create((PASEvent) obj[1]));

        collOutPatientListVo.add(voOutPatientList);
    }

    return collOutPatientListVo;
}
项目:AvoinApotti    文件:PatientListsImpl.java   
public PasEventVo savePasEvent(PasEventVo voPasEvent) throws DomainInterfaceException, StaleObjectException 
{
    if (!voPasEvent.isValidated())
    {
        throw new DomainRuntimeException("PasEventVo VO not validated.");
    }

    DomainFactory factory = getDomainFactory(); 
    PASEvent domPasEvent = PasEventVoAssembler.extractPASEvent(factory,voPasEvent);

    factory.save(domPasEvent);

    return PasEventVoAssembler.create(domPasEvent);
}
项目:AvoinApotti    文件:PatientListsImpl.java   
public PasEventVo getPasEvent(DateTime eventDateTime, PatientRefVo voPatienRef, String pasEventId) throws DomainInterfaceException
{
    //ADT impl =  (ADT) getDomainImpl(ADTImpl.class);
    //return impl.getPasEventByUnqIdx(voPatienRef, pasEventId);
    if (pasEventId == null)
        throw new CodingRuntimeException("Mandatory Argument: IdPasEvent");

    DomainFactory factory = getDomainFactory();

    PASEvent pasEvent = (PASEvent) factory.getDomainObject(PASEvent.class,new Integer(pasEventId));
    return PasEventVoAssembler.create(pasEvent);

}
项目:AvoinApotti    文件:CorrespondenceDetailImpl.java   
private void savePasEventDocumentStatus(CorrespondenceDetailsVo voDocDetail) throws StaleObjectException
{
    if (voDocDetail != null && voDocDetail.getCurrentStatusIsNotNull())
    {
        DomainFactory factory = getDomainFactory();
        PASEvent domPas = (PASEvent) factory.getDomainObject(PASEvent.class, voDocDetail.getPasEvent().getID_PASEvent());
        PasEventVo voPasEvent = PasEventVoAssembler.create(domPas);

        voPasEvent.setCspDocumentStatus(voDocDetail.getCurrentStatus());

        domPas = PasEventVoAssembler.extractPASEvent(factory,voPasEvent);

        factory.save(domPas);                       
    }       
}
项目:AvoinApotti    文件:CorrespondenceDetailsImpl.java   
private void savePasEventDocumentStatus(CorrespondenceDetailsVo voDocDetail) throws StaleObjectException
{
    if (voDocDetail != null && voDocDetail.getCurrentStatusIsNotNull())
    {
        DomainFactory factory = getDomainFactory();
        PASEvent domPas = (PASEvent) factory.getDomainObject(PASEvent.class, voDocDetail.getPasEvent().getID_PASEvent());
        PasEventVo voPasEvent = PasEventVoAssembler.create(domPas);

        voPasEvent.setCspDocumentStatus(voDocDetail.getCurrentStatus());

        domPas = PasEventVoAssembler.extractPASEvent(factory,voPasEvent);

        factory.save(domPas);                       
    }       
}
项目:AvoinApotti    文件:CareSpellDialogImpl.java   
public PasEventVo savePASEvent(PasEventShortVo pasEvent) throws ims.domain.exceptions.StaleObjectException
{
    if(pasEvent == null)
        throw new DomainRuntimeException("Invalid PAS event");
    if(!pasEvent.isValidated())
        throw new DomainRuntimeException("PAS event was not validated");

    DomainFactory factory = getDomainFactory();
    PASEvent domainObject = PasEventShortVoAssembler.extractPASEvent(factory, pasEvent); 
    factory.save(domainObject);
    return PasEventVoAssembler.create(domainObject);
}
项目:AvoinApotti    文件:CareContextSelectDialogImpl.java   
public PasEventVo updatePasEventWithNewWard(PasEventVo pasEvent) throws DomainInterfaceException, StaleObjectException, UniqueKeyViolationException 
{
    if(pasEvent == null)
        throw new CodingRuntimeException("Can not save a null PasEventVo.");

    if(!pasEvent.isValidated())
        throw new CodingRuntimeException("PasEventVo is not validated.");

    DomainFactory factory = getDomainFactory();
    PASEvent doPasEvent = PasEventVoAssembler.extractPASEvent(factory, pasEvent);

    factory.save(doPasEvent);

    return PasEventVoAssembler.create(doPasEvent);
}
项目:AvoinApotti    文件:PatientSearchImpl.java   
public PasEventVo getPasEvent(String pasEpisodeId,ims.core.vo.Patient patient, String visitID)
{
    if(pasEpisodeId == null || patient == null)
        throw new CodingRuntimeException("pasEpisodeId and/or patient parameters are null in method existsPasEvent");

    DomainFactory factory=getDomainFactory();

    IMSCriteria imsc=new IMSCriteria(PASEvent.class, factory);
    ArrayList <String> objects = new ArrayList <String>();
    objects.add("patient");
    imsc.equal("patient.id", patient.getID_Patient());
    imsc.equal("this.pasEpisodeId", pasEpisodeId);
    List pasEvents=imsc.find();

    if (pasEvents.size()==0)
        return null;
    else
    {
        for (int i=0;i<pasEvents.size();i++)
        {
            PASEvent pas=(PASEvent)pasEvents.get(i);
            if (pas.getPasEventId().equals(visitID))
                return PasEventVoAssembler.create((PASEvent)pasEvents.get(i));
        }
    }
    return PasEventVoAssembler.create((PASEvent)pasEvents.get(0));
}
项目:AvoinApotti    文件:PatientSearchComponentImpl.java   
public PasEventVo getPasEvent(String pasEpisodeId,ims.core.vo.Patient patient, String visitID)
{
    if(pasEpisodeId == null || patient == null)
        throw new CodingRuntimeException("pasEpisodeId and/or patient parameters are null in method existsPasEvent");

    DomainFactory factory=getDomainFactory();

    IMSCriteria imsc=new IMSCriteria(PASEvent.class, factory);
    ArrayList <String> objects = new ArrayList <String>();
    objects.add("patient");
    imsc.equal("patient.id", patient.getID_Patient());
    imsc.equal("this.pasEpisodeId", pasEpisodeId);
    List pasEvents=imsc.find();

    if (pasEvents.size()==0)
        return null;
    else
    {
        for (int i=0;i<pasEvents.size();i++)
        {
            PASEvent pas=(PASEvent)pasEvents.get(i);
            if (pas.getPasEventId().equals(visitID))
                return PasEventVoAssembler.create((PASEvent)pasEvents.get(i));
        }
    }
    return PasEventVoAssembler.create((PASEvent)pasEvents.get(0));
}
项目:AvoinApotti    文件:ADTImpl.java   
public PasEventVo getPasEvent(PASEventRefVo voPasEventRef) 
{
    if (voPasEventRef == null)
        throw new CodingRuntimeException("Mandatory Argument: Pas Event");

    DomainFactory factory = getDomainFactory();
    PASEvent domPas = (PASEvent) factory.getDomainObject(PASEvent.class, voPasEventRef.getID_PASEvent());
    return PasEventVoAssembler.create(domPas);

}
项目:AvoinApotti    文件:ADTImpl.java   
public PendingEmergencyAdmissionVo recordPendingEmergencyAdmission(
            PasEventVo pasEventVo,
            PendingEmergencyAdmissionVo pendingEmergencyAdmission) throws StaleObjectException{
        if (!pasEventVo.isValidated())
        {
            throw new DomainRuntimeException("Pas Event VO has not been validated!");
        }
//      pendingEmergencyAdmission.setAdmissionStatus(EmergencyAdmissionStatus.DTA );
        DomainFactory factory = getDomainFactory();             
        PendingEmergencyAdmission PEADomain = PendingEmergencyAdmissionVoAssembler.extractPendingEmergencyAdmission(factory, pendingEmergencyAdmission);
        PASEvent pasEventDomain=PasEventVoAssembler.extractPASEvent(factory, pasEventVo);
        factory.save(pasEventDomain);
        factory.save(PEADomain);
        return PendingEmergencyAdmissionVoAssembler.create(PEADomain);
    }
项目:AvoinApotti    文件:ADTDischargeDetailsComponentImpl.java   
public PasEventVo getPasEventVo(PASEventRefVo pasEventRef)
{
    if( pasEventRef == null)
        throw new CodingRuntimeException("This PASEventRefVo is null");

    DomainFactory factory = getDomainFactory();
    PASEvent doPASEvent = (PASEvent) factory.getDomainObject(PASEvent.class, pasEventRef.getID_PASEvent());

    return PasEventVoAssembler.create(doPASEvent);
}
项目:AvoinApotti    文件:ICPPatientSelectImpl.java   
private PASEventRefVo getPasEventFromCareContext(CareContextRefVo voCarecontext)
{
    if (voCarecontext == null || voCarecontext.getID_CareContext() == null)
        throw new CodingRuntimeException("voCarecontext is null or id not provide for voCarecontext");

    DomainFactory factory = getDomainFactory();

    return PasEventVoAssembler.create((PASEvent) factory.findFirst("select pasEvent from CareContext as cc where cc.isRIE is not null and cc.id = '" + voCarecontext.getID_CareContext() + "'"));
}
项目:openMAXIMS    文件:PatientListsImpl.java   
public PasEventVo savePasEvent(PasEventVo voPasEvent) throws DomainInterfaceException, StaleObjectException 
{
    if (!voPasEvent.isValidated())
    {
        throw new DomainRuntimeException("PasEventVo VO not validated.");
    }

    DomainFactory factory = getDomainFactory(); 
    PASEvent domPasEvent = PasEventVoAssembler.extractPASEvent(factory,voPasEvent);

    factory.save(domPasEvent);

    return PasEventVoAssembler.create(domPasEvent);
}
项目:openMAXIMS    文件:PatientListsImpl.java   
public PasEventVo getPasEvent(DateTime eventDateTime, PatientRefVo voPatienRef, String pasEventId) throws DomainInterfaceException
{
    //ADT impl =  (ADT) getDomainImpl(ADTImpl.class);
    //return impl.getPasEventByUnqIdx(voPatienRef, pasEventId);
    if (pasEventId == null)
        throw new CodingRuntimeException("Mandatory Argument: IdPasEvent");

    DomainFactory factory = getDomainFactory();

    PASEvent pasEvent = (PASEvent) factory.getDomainObject(PASEvent.class,new Integer(pasEventId));
    return PasEventVoAssembler.create(pasEvent);

}
项目:openMAXIMS    文件:CorrespondenceDetailImpl.java   
private void savePasEventDocumentStatus(CorrespondenceDetailsVo voDocDetail) throws StaleObjectException
{
    if (voDocDetail != null && voDocDetail.getCurrentStatusIsNotNull())
    {
        DomainFactory factory = getDomainFactory();
        PASEvent domPas = (PASEvent) factory.getDomainObject(PASEvent.class, voDocDetail.getPasEvent().getID_PASEvent());
        PasEventVo voPasEvent = PasEventVoAssembler.create(domPas);

        voPasEvent.setCspDocumentStatus(voDocDetail.getCurrentStatus());

        domPas = PasEventVoAssembler.extractPASEvent(factory,voPasEvent);

        factory.save(domPas);                       
    }       
}
项目:openMAXIMS    文件:CorrespondenceDetailsImpl.java   
private void savePasEventDocumentStatus(CorrespondenceDetailsVo voDocDetail) throws StaleObjectException
{
    if (voDocDetail != null && voDocDetail.getCurrentStatusIsNotNull())
    {
        DomainFactory factory = getDomainFactory();
        PASEvent domPas = (PASEvent) factory.getDomainObject(PASEvent.class, voDocDetail.getPasEvent().getID_PASEvent());
        PasEventVo voPasEvent = PasEventVoAssembler.create(domPas);

        voPasEvent.setCspDocumentStatus(voDocDetail.getCurrentStatus());

        domPas = PasEventVoAssembler.extractPASEvent(factory,voPasEvent);

        factory.save(domPas);                       
    }       
}
项目:openMAXIMS    文件:CareSpellDialogImpl.java   
public PasEventVo savePASEvent(PasEventShortVo pasEvent) throws ims.domain.exceptions.StaleObjectException
{
    if(pasEvent == null)
        throw new DomainRuntimeException("Invalid PAS event");
    if(!pasEvent.isValidated())
        throw new DomainRuntimeException("PAS event was not validated");

    DomainFactory factory = getDomainFactory();
    PASEvent domainObject = PasEventShortVoAssembler.extractPASEvent(factory, pasEvent); 
    factory.save(domainObject);
    return PasEventVoAssembler.create(domainObject);
}
项目:openMAXIMS    文件:CareContextSelectDialogImpl.java   
public PasEventVo updatePasEventWithNewWard(PasEventVo pasEvent) throws DomainInterfaceException, StaleObjectException, UniqueKeyViolationException 
{
    if(pasEvent == null)
        throw new CodingRuntimeException("Can not save a null PasEventVo.");

    if(!pasEvent.isValidated())
        throw new CodingRuntimeException("PasEventVo is not validated.");

    DomainFactory factory = getDomainFactory();
    PASEvent doPasEvent = PasEventVoAssembler.extractPASEvent(factory, pasEvent);

    factory.save(doPasEvent);

    return PasEventVoAssembler.create(doPasEvent);
}
项目:openMAXIMS    文件:PatientSearchImpl.java   
public PasEventVo getPasEvent(String pasEpisodeId,ims.core.vo.Patient patient, String visitID)
{
    if(pasEpisodeId == null || patient == null)
        throw new CodingRuntimeException("pasEpisodeId and/or patient parameters are null in method existsPasEvent");

    DomainFactory factory=getDomainFactory();

    IMSCriteria imsc=new IMSCriteria(PASEvent.class, factory);
    ArrayList <String> objects = new ArrayList <String>();
    objects.add("patient");
    imsc.equal("patient.id", patient.getID_Patient());
    imsc.equal("this.pasEpisodeId", pasEpisodeId);
    List pasEvents=imsc.find();

    if (pasEvents.size()==0)
        return null;
    else
    {
        for (int i=0;i<pasEvents.size();i++)
        {
            PASEvent pas=(PASEvent)pasEvents.get(i);
            if (pas.getPasEventId().equals(visitID))
                return PasEventVoAssembler.create((PASEvent)pasEvents.get(i));
        }
    }
    return PasEventVoAssembler.create((PASEvent)pasEvents.get(0));
}
项目:openMAXIMS    文件:PatientSearchComponentImpl.java   
public PasEventVo getPasEvent(String pasEpisodeId,ims.core.vo.Patient patient, String visitID)
{
    if(pasEpisodeId == null || patient == null)
        throw new CodingRuntimeException("pasEpisodeId and/or patient parameters are null in method existsPasEvent");

    DomainFactory factory=getDomainFactory();

    IMSCriteria imsc=new IMSCriteria(PASEvent.class, factory);
    ArrayList <String> objects = new ArrayList <String>();
    objects.add("patient");
    imsc.equal("patient.id", patient.getID_Patient());
    imsc.equal("this.pasEpisodeId", pasEpisodeId);
    List pasEvents=imsc.find();

    if (pasEvents.size()==0)
        return null;
    else
    {
        for (int i=0;i<pasEvents.size();i++)
        {
            PASEvent pas=(PASEvent)pasEvents.get(i);
            if (pas.getPasEventId().equals(visitID))
                return PasEventVoAssembler.create((PASEvent)pasEvents.get(i));
        }
    }
    return PasEventVoAssembler.create((PASEvent)pasEvents.get(0));
}
项目:openMAXIMS    文件:ADTImpl.java   
public PasEventVo getPasEvent(PASEventRefVo voPasEventRef) 
{
    if (voPasEventRef == null)
        throw new CodingRuntimeException("Mandatory Argument: Pas Event");

    DomainFactory factory = getDomainFactory();
    PASEvent domPas = (PASEvent) factory.getDomainObject(PASEvent.class, voPasEventRef.getID_PASEvent());
    return PasEventVoAssembler.create(domPas);

}
项目:openMAXIMS    文件:ADTImpl.java   
public PendingEmergencyAdmissionVo recordPendingEmergencyAdmission(
            PasEventVo pasEventVo,
            PendingEmergencyAdmissionVo pendingEmergencyAdmission) throws StaleObjectException{
        if (!pasEventVo.isValidated())
        {
            throw new DomainRuntimeException("Pas Event VO has not been validated!");
        }
//      pendingEmergencyAdmission.setAdmissionStatus(EmergencyAdmissionStatus.DTA );
        DomainFactory factory = getDomainFactory();             
        PendingEmergencyAdmission PEADomain = PendingEmergencyAdmissionVoAssembler.extractPendingEmergencyAdmission(factory, pendingEmergencyAdmission);
        PASEvent pasEventDomain=PasEventVoAssembler.extractPASEvent(factory, pasEventVo);
        factory.save(pasEventDomain);
        factory.save(PEADomain);
        return PendingEmergencyAdmissionVoAssembler.create(PEADomain);
    }
项目:openMAXIMS    文件:ADTDischargeDetailsComponentImpl.java   
public PasEventVo getPasEventVo(PASEventRefVo pasEventRef)
{
    if( pasEventRef == null)
        throw new CodingRuntimeException("This PASEventRefVo is null");

    DomainFactory factory = getDomainFactory();
    PASEvent doPASEvent = (PASEvent) factory.getDomainObject(PASEvent.class, pasEventRef.getID_PASEvent());

    return PasEventVoAssembler.create(doPASEvent);
}
项目:openMAXIMS    文件:ICPPatientSelectImpl.java   
private PASEventRefVo getPasEventFromCareContext(CareContextRefVo voCarecontext)
{
    if (voCarecontext == null || voCarecontext.getID_CareContext() == null)
        throw new CodingRuntimeException("voCarecontext is null or id not provide for voCarecontext");

    DomainFactory factory = getDomainFactory();

    return PasEventVoAssembler.create((PASEvent) factory.findFirst("select pasEvent from CareContext as cc where cc.isRIE is not null and cc.id = '" + voCarecontext.getID_CareContext() + "'"));
}
项目:openMAXIMS    文件:PatientListsImpl.java   
public PasEventVo savePasEvent(PasEventVo voPasEvent) throws DomainInterfaceException, StaleObjectException 
{
    if (!voPasEvent.isValidated())
    {
        throw new DomainRuntimeException("PasEventVo VO not validated.");
    }

    DomainFactory factory = getDomainFactory(); 
    PASEvent domPasEvent = PasEventVoAssembler.extractPASEvent(factory,voPasEvent);

    factory.save(domPasEvent);

    return PasEventVoAssembler.create(domPasEvent);
}
项目:openMAXIMS    文件:PatientListsImpl.java   
public PasEventVo getPasEvent(DateTime eventDateTime, PatientRefVo voPatienRef, String pasEventId) throws DomainInterfaceException
{
    //ADT impl =  (ADT) getDomainImpl(ADTImpl.class);
    //return impl.getPasEventByUnqIdx(voPatienRef, pasEventId);
    if (pasEventId == null)
        throw new CodingRuntimeException("Mandatory Argument: IdPasEvent");

    DomainFactory factory = getDomainFactory();

    PASEvent pasEvent = (PASEvent) factory.getDomainObject(PASEvent.class,new Integer(pasEventId));
    return PasEventVoAssembler.create(pasEvent);

}
项目:openMAXIMS    文件:CorrespondenceDetailImpl.java   
private void savePasEventDocumentStatus(CorrespondenceDetailsVo voDocDetail) throws StaleObjectException
{
    if (voDocDetail != null && voDocDetail.getCurrentStatusIsNotNull())
    {
        DomainFactory factory = getDomainFactory();
        PASEvent domPas = (PASEvent) factory.getDomainObject(PASEvent.class, voDocDetail.getPasEvent().getID_PASEvent());
        PasEventVo voPasEvent = PasEventVoAssembler.create(domPas);

        voPasEvent.setCspDocumentStatus(voDocDetail.getCurrentStatus());

        domPas = PasEventVoAssembler.extractPASEvent(factory,voPasEvent);

        factory.save(domPas);                       
    }       
}
项目:openMAXIMS    文件:CorrespondenceDetailsImpl.java   
private void savePasEventDocumentStatus(CorrespondenceDetailsVo voDocDetail) throws StaleObjectException
{
    if (voDocDetail != null && voDocDetail.getCurrentStatusIsNotNull())
    {
        DomainFactory factory = getDomainFactory();
        PASEvent domPas = (PASEvent) factory.getDomainObject(PASEvent.class, voDocDetail.getPasEvent().getID_PASEvent());
        PasEventVo voPasEvent = PasEventVoAssembler.create(domPas);

        voPasEvent.setCspDocumentStatus(voDocDetail.getCurrentStatus());

        domPas = PasEventVoAssembler.extractPASEvent(factory,voPasEvent);

        factory.save(domPas);                       
    }       
}
项目:openMAXIMS    文件:CareSpellDialogImpl.java   
public PasEventVo savePASEvent(PasEventShortVo pasEvent) throws ims.domain.exceptions.StaleObjectException
{
    if(pasEvent == null)
        throw new DomainRuntimeException("Invalid PAS event");
    if(!pasEvent.isValidated())
        throw new DomainRuntimeException("PAS event was not validated");

    DomainFactory factory = getDomainFactory();
    PASEvent domainObject = PasEventShortVoAssembler.extractPASEvent(factory, pasEvent); 
    factory.save(domainObject);
    return PasEventVoAssembler.create(domainObject);
}
项目:openMAXIMS    文件:CareContextSelectDialogImpl.java   
public PasEventVo updatePasEventWithNewWard(PasEventVo pasEvent) throws DomainInterfaceException, StaleObjectException, UniqueKeyViolationException 
{
    if(pasEvent == null)
        throw new CodingRuntimeException("Can not save a null PasEventVo.");

    if(!pasEvent.isValidated())
        throw new CodingRuntimeException("PasEventVo is not validated.");

    DomainFactory factory = getDomainFactory();
    PASEvent doPasEvent = PasEventVoAssembler.extractPASEvent(factory, pasEvent);

    factory.save(doPasEvent);

    return PasEventVoAssembler.create(doPasEvent);
}
项目:openMAXIMS    文件:PatientSearchImpl.java   
public PasEventVo getPasEvent(String pasEpisodeId,ims.core.vo.Patient patient, String visitID)
{
    if(pasEpisodeId == null || patient == null)
        throw new CodingRuntimeException("pasEpisodeId and/or patient parameters are null in method existsPasEvent");

    DomainFactory factory=getDomainFactory();

    IMSCriteria imsc=new IMSCriteria(PASEvent.class, factory);
    ArrayList <String> objects = new ArrayList <String>();
    objects.add("patient");
    imsc.equal("patient.id", patient.getID_Patient());
    imsc.equal("this.pasEpisodeId", pasEpisodeId);
    List pasEvents=imsc.find();

    if (pasEvents.size()==0)
        return null;
    else
    {
        for (int i=0;i<pasEvents.size();i++)
        {
            PASEvent pas=(PASEvent)pasEvents.get(i);
            if (pas.getPasEventId().equals(visitID))
                return PasEventVoAssembler.create((PASEvent)pasEvents.get(i));
        }
    }
    return PasEventVoAssembler.create((PASEvent)pasEvents.get(0));
}
项目:openMAXIMS    文件:PatientSearchComponentImpl.java   
public PasEventVo getPasEvent(String pasEpisodeId,ims.core.vo.Patient patient, String visitID)
{
    if(pasEpisodeId == null || patient == null)
        throw new CodingRuntimeException("pasEpisodeId and/or patient parameters are null in method existsPasEvent");

    DomainFactory factory=getDomainFactory();

    IMSCriteria imsc=new IMSCriteria(PASEvent.class, factory);
    ArrayList <String> objects = new ArrayList <String>();
    objects.add("patient");
    imsc.equal("patient.id", patient.getID_Patient());
    imsc.equal("this.pasEpisodeId", pasEpisodeId);
    List pasEvents=imsc.find();

    if (pasEvents.size()==0)
        return null;
    else
    {
        for (int i=0;i<pasEvents.size();i++)
        {
            PASEvent pas=(PASEvent)pasEvents.get(i);
            if (pas.getPasEventId().equals(visitID))
                return PasEventVoAssembler.create((PASEvent)pasEvents.get(i));
        }
    }
    return PasEventVoAssembler.create((PASEvent)pasEvents.get(0));
}
项目:openMAXIMS    文件:ADTImpl.java   
public PasEventVo getPasEvent(PASEventRefVo voPasEventRef) 
{
    if (voPasEventRef == null)
        throw new CodingRuntimeException("Mandatory Argument: Pas Event");

    DomainFactory factory = getDomainFactory();
    PASEvent domPas = (PASEvent) factory.getDomainObject(PASEvent.class, voPasEventRef.getID_PASEvent());
    return PasEventVoAssembler.create(domPas);

}
项目:openMAXIMS    文件:ADTImpl.java   
public PendingEmergencyAdmissionVo recordPendingEmergencyAdmission(
            PasEventVo pasEventVo,
            PendingEmergencyAdmissionVo pendingEmergencyAdmission) throws StaleObjectException{
        if (!pasEventVo.isValidated())
        {
            throw new DomainRuntimeException("Pas Event VO has not been validated!");
        }
//      pendingEmergencyAdmission.setAdmissionStatus(EmergencyAdmissionStatus.DTA );
        DomainFactory factory = getDomainFactory();             
        PendingEmergencyAdmission PEADomain = PendingEmergencyAdmissionVoAssembler.extractPendingEmergencyAdmission(factory, pendingEmergencyAdmission);
        PASEvent pasEventDomain=PasEventVoAssembler.extractPASEvent(factory, pasEventVo);
        factory.save(pasEventDomain);
        factory.save(PEADomain);
        return PendingEmergencyAdmissionVoAssembler.create(PEADomain);
    }
项目:openMAXIMS    文件:ADTDischargeDetailsComponentImpl.java   
public PasEventVo getPasEventVo(PASEventRefVo pasEventRef)
{
    if( pasEventRef == null)
        throw new CodingRuntimeException("This PASEventRefVo is null");

    DomainFactory factory = getDomainFactory();
    PASEvent doPASEvent = (PASEvent) factory.getDomainObject(PASEvent.class, pasEventRef.getID_PASEvent());

    return PasEventVoAssembler.create(doPASEvent);
}
项目:openMAXIMS    文件:ICPPatientSelectImpl.java   
private PASEventRefVo getPasEventFromCareContext(CareContextRefVo voCarecontext)
{
    if (voCarecontext == null || voCarecontext.getID_CareContext() == null)
        throw new CodingRuntimeException("voCarecontext is null or id not provide for voCarecontext");

    DomainFactory factory = getDomainFactory();

    return PasEventVoAssembler.create((PASEvent) factory.findFirst("select pasEvent from CareContext as cc where cc.isRIE is not null and cc.id = '" + voCarecontext.getID_CareContext() + "'"));
}