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

项目:AvoinApotti    文件:CareSpellDialogImpl.java   
public CareContextInterfaceVo getCareContextFromPasEpisodeId(String pasEpisodeId, String visitId)
{
    DomainFactory factory=getDomainFactory();

    ArrayList<String> objects=new ArrayList<String>();
    objects.add("pasEvent");
    IMSCriteria imsc=new IMSCriteria(CareContext.class,objects,factory);
    imsc.equal("pasEvent.pasEpisodeId", pasEpisodeId);
    imsc.equal("pasEvent.pasEventId", visitId);

    List careContexts=imsc.find();

    if (careContexts.size()>0)
    {
        CareContext careContext=(CareContext)careContexts.get(careContexts.size()-1);
        return CareContextInterfaceVoAssembler.create(careContext);
    }

    return null;

}
项目:AvoinApotti    文件:ADTImpl.java   
public void cancelAppointment(OutPatientAttendanceVo attendance, CareContextInterfaceVo voCareContext) throws StaleObjectException
{
    DomainFactory factory = getDomainFactory();

    OutpatientAttendance domAtt = OutPatientAttendanceVoAssembler.extractOutpatientAttendance(factory, attendance);

    if(ConfigFlag.HL7.INSTANTIATE_EPISODE_FROM_ADT.getValue())
    {
        if(voCareContext != null)
            factory.save(CareContextInterfaceVoAssembler.extractCareContext(factory, voCareContext));
    }

    // WDEV-13455
    // We may want to record this appointment within the Patient Diary
    if (ConfigFlag.DOM.RECORD_INTO_PATIENT_DIARY.getValue())
    {
        PatientApptDiary diary = createDiaryEntry(domAtt,attendance.getApptType(),attendance.getRecordingUser());
        factory.save(diary);
    }
    factory.save(domAtt);
}
项目:openMAXIMS    文件:CareSpellDialogImpl.java   
public CareContextInterfaceVo getCareContextFromPasEpisodeId(String pasEpisodeId, String visitId)
{
    DomainFactory factory=getDomainFactory();

    ArrayList<String> objects=new ArrayList<String>();
    objects.add("pasEvent");
    IMSCriteria imsc=new IMSCriteria(CareContext.class,objects,factory);
    imsc.equal("pasEvent.pasEpisodeId", pasEpisodeId);
    imsc.equal("pasEvent.pasEventId", visitId);

    List careContexts=imsc.find();

    if (careContexts.size()>0)
    {
        CareContext careContext=(CareContext)careContexts.get(careContexts.size()-1);
        return CareContextInterfaceVoAssembler.create(careContext);
    }

    return null;

}
项目:openMAXIMS    文件:ADTImpl.java   
public void cancelAppointment(OutPatientAttendanceVo attendance, CareContextInterfaceVo voCareContext) throws StaleObjectException
{
    DomainFactory factory = getDomainFactory();

    OutpatientAttendance domAtt = OutPatientAttendanceVoAssembler.extractOutpatientAttendance(factory, attendance);

    if(ConfigFlag.HL7.INSTANTIATE_EPISODE_FROM_ADT.getValue())
    {
        if(voCareContext != null)
            factory.save(CareContextInterfaceVoAssembler.extractCareContext(factory, voCareContext));
    }

    // WDEV-13455
    // We may want to record this appointment within the Patient Diary
    if (ConfigFlag.DOM.RECORD_INTO_PATIENT_DIARY.getValue())
    {
        PatientApptDiary diary = createDiaryEntry(domAtt,attendance.getApptType(),attendance.getRecordingUser());
        factory.save(diary);
    }
    factory.save(domAtt);
}
项目:openMAXIMS    文件:CareSpellDialogImpl.java   
public CareContextInterfaceVo getCareContextFromPasEpisodeId(String pasEpisodeId, String visitId)
{
    DomainFactory factory=getDomainFactory();

    ArrayList<String> objects=new ArrayList<String>();
    objects.add("pasEvent");
    IMSCriteria imsc=new IMSCriteria(CareContext.class,objects,factory);
    imsc.equal("pasEvent.pasEpisodeId", pasEpisodeId);
    imsc.equal("pasEvent.pasEventId", visitId);

    List careContexts=imsc.find();

    if (careContexts.size()>0)
    {
        CareContext careContext=(CareContext)careContexts.get(careContexts.size()-1);
        return CareContextInterfaceVoAssembler.create(careContext);
    }

    return null;

}
项目:openMAXIMS    文件:ADTImpl.java   
public void cancelAppointment(OutPatientAttendanceVo attendance, CareContextInterfaceVo voCareContext) throws StaleObjectException
{
    DomainFactory factory = getDomainFactory();

    OutpatientAttendance domAtt = OutPatientAttendanceVoAssembler.extractOutpatientAttendance(factory, attendance);

    if(ConfigFlag.HL7.INSTANTIATE_EPISODE_FROM_ADT.getValue())
    {
        if(voCareContext != null)
            factory.save(CareContextInterfaceVoAssembler.extractCareContext(factory, voCareContext));
    }

    // WDEV-13455
    // We may want to record this appointment within the Patient Diary
    if (ConfigFlag.DOM.RECORD_INTO_PATIENT_DIARY.getValue())
    {
        PatientApptDiary diary = createDiaryEntry(domAtt,attendance.getApptType(),attendance.getRecordingUser());
        factory.save(diary);
    }
    factory.save(domAtt);
}
项目:openmaxims-linux    文件:CareSpellDialogImpl.java   
public CareContextInterfaceVo getCareContextFromPasEpisodeId(String pasEpisodeId, String visitId)
{
    DomainFactory factory=getDomainFactory();

    ArrayList<String> objects=new ArrayList<String>();
    objects.add("pasEvent");
    IMSCriteria imsc=new IMSCriteria(CareContext.class,objects,factory);
    imsc.equal("pasEvent.pasEpisodeId", pasEpisodeId);
    imsc.equal("pasEvent.pasEventId", visitId);

    List careContexts=imsc.find();

    if (careContexts.size()>0)
    {
        CareContext careContext=(CareContext)careContexts.get(careContexts.size()-1);
        return CareContextInterfaceVoAssembler.create(careContext);
    }

    return null;

}
项目:openmaxims-linux    文件:ADTImpl.java   
public void cancelAppointment(OutPatientAttendanceVo attendance, CareContextInterfaceVo voCareContext) throws StaleObjectException
{
    DomainFactory factory = getDomainFactory();

    OutpatientAttendance domAtt = OutPatientAttendanceVoAssembler.extractOutpatientAttendance(factory, attendance);

    if(ConfigFlag.HL7.INSTANTIATE_EPISODE_FROM_ADT.getValue())
    {
        if(voCareContext != null)
            factory.save(CareContextInterfaceVoAssembler.extractCareContext(factory, voCareContext));
    }

    // WDEV-13455
    // We may want to record this appointment within the Patient Diary
    if (ConfigFlag.DOM.RECORD_INTO_PATIENT_DIARY.getValue())
    {
        PatientApptDiary diary = createDiaryEntry(domAtt,attendance.getApptType(),attendance.getRecordingUser());
        factory.save(diary);
    }
    factory.save(domAtt);
}
项目:AvoinApotti    文件:CareSpellDialogImpl.java   
public CareContextInterfaceVo saveCareContext(CareContextInterfaceVo careContext) throws StaleObjectException
{
    if (careContext == null  || !careContext.isValidated())
        throw new CodingRuntimeException("Care Spell is null or has not been validated");
    DomainFactory factory=getDomainFactory();

    CareContext doCareContext = CareContextInterfaceVoAssembler.extractCareContext(factory, careContext);

    //WDEV-10231 - add any new status record to history
    if(doCareContext.getCurrentStatus() != null && doCareContext.getCurrentStatus().getId() == null)    
        doCareContext.getStatusHistory().add(doCareContext.getCurrentStatus());

    factory.save(doCareContext);
    return CareContextInterfaceVoAssembler.create(doCareContext);
}
项目:AvoinApotti    文件:ADTImpl.java   
public CareContextInterfaceVo getCareContextByPasEvent(PASEventRefVo pasEvent)
{
    if (pasEvent == null || pasEvent.getID_PASEvent() == null)
        throw new CodingRuntimeException("pasEvent is null or id not provided in method getCareContextByPasEvent");

    CareContext doCareContext = (CareContext) getDomainFactory().findFirst("from CareContext cc where cc.pasEvent.id = " + pasEvent.getID_PASEvent());
    return CareContextInterfaceVoAssembler.create(doCareContext);
}
项目:AvoinApotti    文件:ADTDischargeDetailsComponentImpl.java   
public ims.core.vo.CareContextInterfaceVo getCareContextById(ims.core.admin.vo.CareContextRefVo careContextRef)
{
    if( careContextRef == null)
        throw new CodingRuntimeException("This CareContextRefVo is null");

    DomainFactory factory = getDomainFactory();
    CareContext doCareContext = (CareContext) factory.getDomainObject(CareContext.class, careContextRef.getID_CareContext());

    return CareContextInterfaceVoAssembler.create(doCareContext);
}
项目:openMAXIMS    文件:CareSpellDialogImpl.java   
public CareContextInterfaceVo saveCareContext(CareContextInterfaceVo careContext) throws StaleObjectException
{
    if (careContext == null  || !careContext.isValidated())
        throw new CodingRuntimeException("Care Spell is null or has not been validated");
    DomainFactory factory=getDomainFactory();

    CareContext doCareContext = CareContextInterfaceVoAssembler.extractCareContext(factory, careContext);

    //WDEV-10231 - add any new status record to history
    if(doCareContext.getCurrentStatus() != null && doCareContext.getCurrentStatus().getId() == null)    
        doCareContext.getStatusHistory().add(doCareContext.getCurrentStatus());

    factory.save(doCareContext);
    return CareContextInterfaceVoAssembler.create(doCareContext);
}
项目:openMAXIMS    文件:ADTImpl.java   
private CareContextInterfaceVoCollection getCareContextsForPasEvent(PasEventVo pasEvent, DateTime admDateTime)
{
    if (pasEvent == null)
        return null;
    List ret = getDomainFactory().find("select cc from CareContext as cc left join cc.pasEvent as pevent where pevent.id = :PEVENT_ID and cc.startDateTime = :START_DATE", new String[]{"PEVENT_ID", "START_DATE"}, new Object[]{pasEvent.getID_PASEvent(),admDateTime.getJavaDate()});
    if (ret == null || ret.isEmpty())
        return null;
    return CareContextInterfaceVoAssembler.createCareContextInterfaceVoCollectionFromCareContext(ret);
}
项目:openMAXIMS    文件:ADTImpl.java   
public CareContextInterfaceVo getCareContextByPasEvent(PASEventRefVo pasEvent)
{
    if (pasEvent == null || pasEvent.getID_PASEvent() == null)
        throw new CodingRuntimeException("pasEvent is null or id not provided in method getCareContextByPasEvent");

    CareContext doCareContext = (CareContext) getDomainFactory().findFirst("from CareContext cc where cc.pasEvent.id = " + pasEvent.getID_PASEvent());
    return CareContextInterfaceVoAssembler.create(doCareContext);
}
项目:openMAXIMS    文件:ADTDischargeDetailsComponentImpl.java   
public ims.core.vo.CareContextInterfaceVo getCareContextById(ims.core.admin.vo.CareContextRefVo careContextRef)
{
    if( careContextRef == null)
        throw new CodingRuntimeException("This CareContextRefVo is null");

    DomainFactory factory = getDomainFactory();
    CareContext doCareContext = (CareContext) factory.getDomainObject(CareContext.class, careContextRef.getID_CareContext());

    return CareContextInterfaceVoAssembler.create(doCareContext);
}
项目:openMAXIMS    文件:CareSpellDialogImpl.java   
public CareContextInterfaceVo saveCareContext(CareContextInterfaceVo careContext) throws StaleObjectException
{
    if (careContext == null  || !careContext.isValidated())
        throw new CodingRuntimeException("Care Spell is null or has not been validated");
    DomainFactory factory=getDomainFactory();

    CareContext doCareContext = CareContextInterfaceVoAssembler.extractCareContext(factory, careContext);

    //WDEV-10231 - add any new status record to history
    if(doCareContext.getCurrentStatus() != null && doCareContext.getCurrentStatus().getId() == null)    
        doCareContext.getStatusHistory().add(doCareContext.getCurrentStatus());

    factory.save(doCareContext);
    return CareContextInterfaceVoAssembler.create(doCareContext);
}
项目:openMAXIMS    文件:ADTImpl.java   
public CareContextInterfaceVo getCareContextByPasEvent(PASEventRefVo pasEvent)
{
    if (pasEvent == null || pasEvent.getID_PASEvent() == null)
        throw new CodingRuntimeException("pasEvent is null or id not provided in method getCareContextByPasEvent");

    CareContext doCareContext = (CareContext) getDomainFactory().findFirst("from CareContext cc where cc.pasEvent.id = " + pasEvent.getID_PASEvent());
    return CareContextInterfaceVoAssembler.create(doCareContext);
}
项目:openMAXIMS    文件:ADTDischargeDetailsComponentImpl.java   
public ims.core.vo.CareContextInterfaceVo getCareContextById(ims.core.admin.vo.CareContextRefVo careContextRef)
{
    if( careContextRef == null)
        throw new CodingRuntimeException("This CareContextRefVo is null");

    DomainFactory factory = getDomainFactory();
    CareContext doCareContext = (CareContext) factory.getDomainObject(CareContext.class, careContextRef.getID_CareContext());

    return CareContextInterfaceVoAssembler.create(doCareContext);
}
项目:openmaxims-linux    文件:CareSpellDialogImpl.java   
public CareContextInterfaceVo saveCareContext(CareContextInterfaceVo careContext) throws StaleObjectException
{
    if (careContext == null  || !careContext.isValidated())
        throw new CodingRuntimeException("Care Spell is null or has not been validated");
    DomainFactory factory=getDomainFactory();

    CareContext doCareContext = CareContextInterfaceVoAssembler.extractCareContext(factory, careContext);

    //WDEV-10231 - add any new status record to history
    if(doCareContext.getCurrentStatus() != null && doCareContext.getCurrentStatus().getId() == null)    
        doCareContext.getStatusHistory().add(doCareContext.getCurrentStatus());

    factory.save(doCareContext);
    return CareContextInterfaceVoAssembler.create(doCareContext);
}
项目:openmaxims-linux    文件:ADTImpl.java   
public CareContextInterfaceVo getCareContextByPasEvent(PASEventRefVo pasEvent)
{
    if (pasEvent == null || pasEvent.getID_PASEvent() == null)
        throw new CodingRuntimeException("pasEvent is null or id not provided in method getCareContextByPasEvent");

    CareContext doCareContext = (CareContext) getDomainFactory().findFirst("from CareContext cc where cc.pasEvent.id = " + pasEvent.getID_PASEvent());
    return CareContextInterfaceVoAssembler.create(doCareContext);
}
项目:openmaxims-linux    文件:ADTDischargeDetailsComponentImpl.java   
public ims.core.vo.CareContextInterfaceVo getCareContextById(ims.core.admin.vo.CareContextRefVo careContextRef)
{
    if( careContextRef == null)
        throw new CodingRuntimeException("This CareContextRefVo is null");

    DomainFactory factory = getDomainFactory();
    CareContext doCareContext = (CareContext) factory.getDomainObject(CareContext.class, careContextRef.getID_CareContext());

    return CareContextInterfaceVoAssembler.create(doCareContext);
}
项目:AvoinApotti    文件:ADTImpl.java   
public OutPatientAttendanceVo recordOPAttendance(PatientShort patVo, OutPatientAttendanceVo attVo, CareContextInterfaceVo ccVo) throws StaleObjectException 
{
    if (!patVo.isValidated())
    {
        throw new DomainRuntimeException("Patient VO has not been validated!");
    }
    if (!attVo.isValidated())
    {
        throw new DomainRuntimeException("Attendance VO has not been validated!");
    }
    if(patVo.getID_Patient() == null)
    {
        throw new DomainRuntimeException("Internal Patient ID must be valued.");
    }
    DomainFactory factory = getDomainFactory();             
    OutpatientAttendance attDo = OutPatientAttendanceVoAssembler.extractOutpatientAttendance(factory, attVo);

    if(ConfigFlag.HL7.INSTANTIATE_EPISODE_FROM_ADT.getValue())
    {
        if(ccVo != null)
            factory.save(CareContextInterfaceVoAssembler.extractCareContext(factory, ccVo));
    }

    try 
    {
        factory.save(attDo);

        // WDEV-13455
        // We may want to record this appointment within the Patient Diary
        if (ConfigFlag.DOM.RECORD_INTO_PATIENT_DIARY.getValue())
        {
            PatientApptDiary diary = createDiaryEntry(attDo,attVo.getApptType(),attVo.getRecordingUser());
            factory.save(diary);
        }

    }
    catch (DomainException e) 
    {
        throw new DomainRuntimeException(e);
    }
    return OutPatientAttendanceVoAssembler.create(attDo);
}
项目:openMAXIMS    文件:ADTImpl.java   
public OutPatientAttendanceVo recordOPAttendance(PatientShort patVo, OutPatientAttendanceVo attVo, CareContextInterfaceVo ccVo) throws StaleObjectException 
{
    if (!patVo.isValidated())
    {
        throw new DomainRuntimeException("Patient VO has not been validated!");
    }
    if (!attVo.isValidated())
    {
        throw new DomainRuntimeException("Attendance VO has not been validated!");
    }
    if(patVo.getID_Patient() == null)
    {
        throw new DomainRuntimeException("Internal Patient ID must be valued.");
    }
    DomainFactory factory = getDomainFactory();             
    OutpatientAttendance attDo = OutPatientAttendanceVoAssembler.extractOutpatientAttendance(factory, attVo);

    if(ConfigFlag.HL7.INSTANTIATE_EPISODE_FROM_ADT.getValue())
    {
        if(ccVo != null)
            factory.save(CareContextInterfaceVoAssembler.extractCareContext(factory, ccVo));
    }

    try 
    {
        factory.save(attDo);

        // WDEV-13455
        // We may want to record this appointment within the Patient Diary
        if (ConfigFlag.DOM.RECORD_INTO_PATIENT_DIARY.getValue())
        {
            PatientApptDiary diary = createDiaryEntry(attDo,attVo.getApptType(),attVo.getRecordingUser());
            factory.save(diary);
        }

    }
    catch (DomainException e) 
    {
        throw new DomainRuntimeException(e);
    }
    return OutPatientAttendanceVoAssembler.create(attDo);
}
项目:openMAXIMS    文件:ADTImpl.java   
public OutPatientAttendanceVo recordOPAttendance(PatientShort patVo, OutPatientAttendanceVo attVo, CareContextInterfaceVo ccVo) throws StaleObjectException 
{
    if (!patVo.isValidated())
    {
        throw new DomainRuntimeException("Patient VO has not been validated!");
    }
    if (!attVo.isValidated())
    {
        throw new DomainRuntimeException("Attendance VO has not been validated!");
    }
    if(patVo.getID_Patient() == null)
    {
        throw new DomainRuntimeException("Internal Patient ID must be valued.");
    }
    DomainFactory factory = getDomainFactory();             
    OutpatientAttendance attDo = OutPatientAttendanceVoAssembler.extractOutpatientAttendance(factory, attVo);

    if(ConfigFlag.HL7.INSTANTIATE_EPISODE_FROM_ADT.getValue())
    {
        if(ccVo != null)
            factory.save(CareContextInterfaceVoAssembler.extractCareContext(factory, ccVo));
    }

    try 
    {
        factory.save(attDo);

        // WDEV-13455
        // We may want to record this appointment within the Patient Diary
        if (ConfigFlag.DOM.RECORD_INTO_PATIENT_DIARY.getValue())
        {
            PatientApptDiary diary = createDiaryEntry(attDo,attVo.getApptType(),attVo.getRecordingUser());
            factory.save(diary);
        }

    }
    catch (DomainException e) 
    {
        throw new DomainRuntimeException(e);
    }
    return OutPatientAttendanceVoAssembler.create(attDo);
}
项目:openmaxims-linux    文件:ADTImpl.java   
public OutPatientAttendanceVo recordOPAttendance(PatientShort patVo, OutPatientAttendanceVo attVo, CareContextInterfaceVo ccVo) throws StaleObjectException 
{
    if (!patVo.isValidated())
    {
        throw new DomainRuntimeException("Patient VO has not been validated!");
    }
    if (!attVo.isValidated())
    {
        throw new DomainRuntimeException("Attendance VO has not been validated!");
    }
    if(patVo.getID_Patient() == null)
    {
        throw new DomainRuntimeException("Internal Patient ID must be valued.");
    }
    DomainFactory factory = getDomainFactory();             
    OutpatientAttendance attDo = OutPatientAttendanceVoAssembler.extractOutpatientAttendance(factory, attVo);

    if(ConfigFlag.HL7.INSTANTIATE_EPISODE_FROM_ADT.getValue())
    {
        if(ccVo != null)
            factory.save(CareContextInterfaceVoAssembler.extractCareContext(factory, ccVo));
    }

    try 
    {
        factory.save(attDo);

        // WDEV-13455
        // We may want to record this appointment within the Patient Diary
        if (ConfigFlag.DOM.RECORD_INTO_PATIENT_DIARY.getValue())
        {
            PatientApptDiary diary = createDiaryEntry(attDo,attVo.getApptType(),attVo.getRecordingUser());
            factory.save(diary);
        }

    }
    catch (DomainException e) 
    {
        throw new DomainRuntimeException(e);
    }
    return OutPatientAttendanceVoAssembler.create(attDo);
}