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

项目: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;
}
项目: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    文件: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    文件: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    文件: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    文件: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    文件: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    文件: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    文件:BatchUpdatePatientListsImpl.java   
public void saveOutPatientEpisodes(OutPatientAttendanceVoCollection collOutPatientAttendanceVo, MemberOfStaffShortVo mos) throws DomainInterfaceException, StaleObjectException {
    for(int i=0; i<collOutPatientAttendanceVo.size(); i++){
        if (!collOutPatientAttendanceVo.get(i).isValidated())
        {
            throw new DomainRuntimeException("Episode VO has not been validated!");
        }

        DomainFactory factory = getDomainFactory();     
        OutpatientAttendance ouDo = OutPatientAttendanceVoAssembler.extractOutpatientAttendance(factory, collOutPatientAttendanceVo.get(i));

        factory.save(ouDo);
        saveDocumentStatus(collOutPatientAttendanceVo.get(i).getPasEvent().getCspDocumentStatus(), collOutPatientAttendanceVo.get(i).getPasEvent(), mos);
    }               
}
项目:AvoinApotti    文件:ADTImpl.java   
public OutPatientAttendanceVo getOutpatientAppointment(PasEventVo pasEventVo)
{
    DomainFactory factory = getDomainFactory();

    PASEvent domEvent = PASEvent.getPASEventFrompasevent_unq1(factory, (Patient)factory.getDomainObject(Patient.class, pasEventVo.getPatient().getID_Patient()), pasEventVo.getPasEventId());
    if (domEvent != null)
    {
        String hql = " from OutpatientAttendance o where o.pasEvent.id = :pasEvent";
        List<?> lst = factory.find(hql, new String[]{"pasEvent"}, new Object[]{domEvent.getId()});
        if (lst != null && lst.size() == 1)
            return OutPatientAttendanceVoAssembler.create((OutpatientAttendance) lst.get(0));
    }

    return null;
}
项目:openMAXIMS    文件:BatchUpdatePatientListsImpl.java   
public void saveOutPatientEpisodes(OutPatientAttendanceVoCollection collOutPatientAttendanceVo, MemberOfStaffShortVo mos) throws DomainInterfaceException, StaleObjectException {
    for(int i=0; i<collOutPatientAttendanceVo.size(); i++){
        if (!collOutPatientAttendanceVo.get(i).isValidated())
        {
            throw new DomainRuntimeException("Episode VO has not been validated!");
        }

        DomainFactory factory = getDomainFactory();     
        OutpatientAttendance ouDo = OutPatientAttendanceVoAssembler.extractOutpatientAttendance(factory, collOutPatientAttendanceVo.get(i));

        factory.save(ouDo);
        saveDocumentStatus(collOutPatientAttendanceVo.get(i).getPasEvent().getCspDocumentStatus(), collOutPatientAttendanceVo.get(i).getPasEvent(), mos);
    }               
}
项目:openMAXIMS    文件:ADTImpl.java   
public OutPatientAttendanceVo getOutpatientAppointment(PasEventVo pasEventVo)
{
    DomainFactory factory = getDomainFactory();

    PASEvent domEvent = PASEvent.getPASEventFrompasevent_unq1(factory, (Patient)factory.getDomainObject(Patient.class, pasEventVo.getPatient().getID_Patient()), pasEventVo.getPasEventId());
    if (domEvent != null)
    {
        String hql = " from OutpatientAttendance o where o.pasEvent.id = :pasEvent";
        List<?> lst = factory.find(hql, new String[]{"pasEvent"}, new Object[]{domEvent.getId()});
        if (lst != null && lst.size() == 1)
            return OutPatientAttendanceVoAssembler.create((OutpatientAttendance) lst.get(0));
    }

    return null;
}
项目:openMAXIMS    文件:BatchUpdatePatientListsImpl.java   
public void saveOutPatientEpisodes(OutPatientAttendanceVoCollection collOutPatientAttendanceVo, MemberOfStaffShortVo mos) throws DomainInterfaceException, StaleObjectException {
    for(int i=0; i<collOutPatientAttendanceVo.size(); i++){
        if (!collOutPatientAttendanceVo.get(i).isValidated())
        {
            throw new DomainRuntimeException("Episode VO has not been validated!");
        }

        DomainFactory factory = getDomainFactory();     
        OutpatientAttendance ouDo = OutPatientAttendanceVoAssembler.extractOutpatientAttendance(factory, collOutPatientAttendanceVo.get(i));

        factory.save(ouDo);
        saveDocumentStatus(collOutPatientAttendanceVo.get(i).getPasEvent().getCspDocumentStatus(), collOutPatientAttendanceVo.get(i).getPasEvent(), mos);
    }               
}
项目:openMAXIMS    文件:ADTImpl.java   
public OutPatientAttendanceVo getOutpatientAppointment(PasEventVo pasEventVo)
{
    DomainFactory factory = getDomainFactory();

    PASEvent domEvent = PASEvent.getPASEventFrompasevent_unq1(factory, (Patient)factory.getDomainObject(Patient.class, pasEventVo.getPatient().getID_Patient()), pasEventVo.getPasEventId());
    if (domEvent != null)
    {
        String hql = " from OutpatientAttendance o where o.pasEvent.id = :pasEvent";
        List<?> lst = factory.find(hql, new String[]{"pasEvent"}, new Object[]{domEvent.getId()});
        if (lst != null && lst.size() == 1)
            return OutPatientAttendanceVoAssembler.create((OutpatientAttendance) lst.get(0));
    }

    return null;
}
项目:openmaxims-linux    文件:BatchUpdatePatientListsImpl.java   
public void saveOutPatientEpisodes(OutPatientAttendanceVoCollection collOutPatientAttendanceVo, MemberOfStaffShortVo mos) throws DomainInterfaceException, StaleObjectException {
    for(int i=0; i<collOutPatientAttendanceVo.size(); i++){
        if (!collOutPatientAttendanceVo.get(i).isValidated())
        {
            throw new DomainRuntimeException("Episode VO has not been validated!");
        }

        DomainFactory factory = getDomainFactory();     
        OutpatientAttendance ouDo = OutPatientAttendanceVoAssembler.extractOutpatientAttendance(factory, collOutPatientAttendanceVo.get(i));

        factory.save(ouDo);
        saveDocumentStatus(collOutPatientAttendanceVo.get(i).getPasEvent().getCspDocumentStatus(), collOutPatientAttendanceVo.get(i).getPasEvent(), mos);
    }               
}
项目:openmaxims-linux    文件:ADTImpl.java   
public OutPatientAttendanceVo getOutpatientAppointment(PasEventVo pasEventVo)
{
    DomainFactory factory = getDomainFactory();

    PASEvent domEvent = PASEvent.getPASEventFrompasevent_unq1(factory, (Patient)factory.getDomainObject(Patient.class, pasEventVo.getPatient().getID_Patient()), pasEventVo.getPasEventId());
    if (domEvent != null)
    {
        String hql = " from OutpatientAttendance o where o.pasEvent.id = :pasEvent";
        List<?> lst = factory.find(hql, new String[]{"pasEvent"}, new Object[]{domEvent.getId()});
        if (lst != null && lst.size() == 1)
            return OutPatientAttendanceVoAssembler.create((OutpatientAttendance) lst.get(0));
    }

    return null;
}
项目: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    文件:PASOutPatientAppointmentListImpl.java   
public ims.core.vo.OutPatientAttendanceVoCollection listOutpatients(ims.core.vo.OutPatientListSearchCriteriaVo filter, Boolean listByReqAndNotReqStatus)
{
    DomainFactory factory = getDomainFactory();
    String hql;
    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    hql = " from OutpatientAttendance op "; 
    StringBuffer condStr = new StringBuffer();
    String andStr = " and ";

    condStr.append(" op.isActive = :isActive");
    markers.add("isActive");
    values.add(Boolean.TRUE);

    if (filter.getClinic() != null)
    {
        condStr.append(andStr + " op.clinic.id = :clinic");
        markers.add("clinic");
        values.add(filter.getClinic().getID_Clinic());
    }
    if(filter.getDateFromIsNotNull())
    {
        condStr.append(andStr + " op.appointmentDateTime >= :dateFrom");
            markers.add("dateFrom");
        values.add(filter.getDateFrom().getDate());
        andStr = " and ";   
    }
    if(filter.getDateToIsNotNull())
    {
        condStr.append(andStr + " op.appointmentDateTime < :dateTo");
            markers.add("dateTo");
        values.add(filter.getDateTo().copy().addDay(1).getDate());
        andStr = " and ";   
    }

    hql += " where ";

    hql += condStr.toString();
    List ops = factory.find(hql, markers, values);

    return OutPatientAttendanceVoAssembler.createOutPatientAttendanceVoCollectionFromOutpatientAttendance(ops).sort();
}
项目: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);
}