Java 类ims.core.vo.OutPatientAttendanceVo 实例源码

项目:AvoinApotti    文件:Logic.java   
private void enableBatchUpdateMenuItems() {

    boolean enableDictatedItem = false;
    boolean enableNoLetterRequiredItem = false;
    boolean enableSignedItem = false;
    OutPatientAttendanceVo voOutPatientListVo = null;
    PasEventVo voPasEvent = null;

    for(int i=0; i< form.grdOutPatient().getRows().size(); i++){
        voOutPatientListVo = form.grdOutPatient().getRows().get(i).getValue();
        voPasEvent = voOutPatientListVo.getPasEvent();
        if(voPasEvent.getCspDocumentStatusIsNotNull())
            if(voPasEvent.getCspDocumentStatus().equals(DocumentStatus.LETTERREQUIRED)){
                enableNoLetterRequiredItem = true;
                enableDictatedItem = true;
            }
            else if(voPasEvent.getCspDocumentStatus().equals(DocumentStatus.NOLETTERREQUIRED))
                enableDictatedItem = true;
            else if(voPasEvent.getCspDocumentStatus().equals(DocumentStatus.PRINTEDNOSIGNATURE))
                enableSignedItem = true;
    }

    form.getContextMenus().getADTMenuBatchupdateofstatustoDictatedItem().setVisible(enableDictatedItem);
    form.getContextMenus().getADTMenuBatchupdateofstatustoNoLetterRequiredItem().setVisible(enableNoLetterRequiredItem);
    form.getContextMenus().getADTMenuBatchupdateofstatustoSignedItem().setVisible(enableSignedItem);
}
项目:AvoinApotti    文件:Logic.java   
private void setContextVariablesForSelection() {
    clearContextVariables();
    OutPatientAttendanceVo voOutPatientAttendance = null;
    PasEventVo voPasEvent = null;

    if (form.grdOutPatient().getSelectedRowIndex() >= 0 && form.grdOutPatient().getRows().get(form.grdOutPatient().getSelectedRowIndex()).getValue() != null)                   
    {
        voOutPatientAttendance = form.grdOutPatient().getSelectedRow().getValue();
        voPasEvent = voOutPatientAttendance.getPasEvent();

        form.getGlobalContext().Core.setPatientShort(voPasEvent.getPatient());

        form.getGlobalContext().Core.setPasEvent(voPasEvent);                       
        form.getLocalContext().setSelectedCorrespondenceInstance(domain.getCorrespondenceDetailsByPasEvent(voPasEvent));
        form.getGlobalContext().Correspondence.setCorrespondenceDetails(form.getLocalContext().getSelectedCorrespondenceInstance());
    }

}
项目: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    文件:Logic.java   
private void enableBatchUpdateMenuItems() {

    boolean enableDictatedItem = false;
    boolean enableNoLetterRequiredItem = false;
    boolean enableSignedItem = false;
    OutPatientAttendanceVo voOutPatientListVo = null;
    PasEventVo voPasEvent = null;

    for(int i=0; i< form.grdOutPatient().getRows().size(); i++){
        voOutPatientListVo = form.grdOutPatient().getRows().get(i).getValue();
        voPasEvent = voOutPatientListVo.getPasEvent();
        if(voPasEvent.getCspDocumentStatusIsNotNull())
            if(voPasEvent.getCspDocumentStatus().equals(DocumentStatus.LETTERREQUIRED)){
                enableNoLetterRequiredItem = true;
                enableDictatedItem = true;
            }
            else if(voPasEvent.getCspDocumentStatus().equals(DocumentStatus.NOLETTERREQUIRED))
                enableDictatedItem = true;
            else if(voPasEvent.getCspDocumentStatus().equals(DocumentStatus.PRINTEDNOSIGNATURE))
                enableSignedItem = true;
    }

    form.getContextMenus().getADTMenuBatchupdateofstatustoDictatedItem().setVisible(enableDictatedItem);
    form.getContextMenus().getADTMenuBatchupdateofstatustoNoLetterRequiredItem().setVisible(enableNoLetterRequiredItem);
    form.getContextMenus().getADTMenuBatchupdateofstatustoSignedItem().setVisible(enableSignedItem);
}
项目:openMAXIMS    文件:Logic.java   
private void setContextVariablesForSelection() {
    clearContextVariables();
    OutPatientAttendanceVo voOutPatientAttendance = null;
    PasEventVo voPasEvent = null;

    if (form.grdOutPatient().getSelectedRowIndex() >= 0 && form.grdOutPatient().getRows().get(form.grdOutPatient().getSelectedRowIndex()).getValue() != null)                   
    {
        voOutPatientAttendance = form.grdOutPatient().getSelectedRow().getValue();
        voPasEvent = voOutPatientAttendance.getPasEvent();

        form.getGlobalContext().Core.setPatientShort(voPasEvent.getPatient());

        form.getGlobalContext().Core.setPasEvent(voPasEvent);                       
        form.getLocalContext().setSelectedCorrespondenceInstance(domain.getCorrespondenceDetailsByPasEvent(voPasEvent));
        form.getGlobalContext().Correspondence.setCorrespondenceDetails(form.getLocalContext().getSelectedCorrespondenceInstance());
    }

}
项目: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    文件:Logic.java   
private void enableBatchUpdateMenuItems() {

    boolean enableDictatedItem = false;
    boolean enableNoLetterRequiredItem = false;
    boolean enableSignedItem = false;
    OutPatientAttendanceVo voOutPatientListVo = null;
    PasEventVo voPasEvent = null;

    for(int i=0; i< form.grdOutPatient().getRows().size(); i++){
        voOutPatientListVo = form.grdOutPatient().getRows().get(i).getValue();
        voPasEvent = voOutPatientListVo.getPasEvent();
        if(voPasEvent.getCspDocumentStatusIsNotNull())
            if(voPasEvent.getCspDocumentStatus().equals(DocumentStatus.LETTERREQUIRED)){
                enableNoLetterRequiredItem = true;
                enableDictatedItem = true;
            }
            else if(voPasEvent.getCspDocumentStatus().equals(DocumentStatus.NOLETTERREQUIRED))
                enableDictatedItem = true;
            else if(voPasEvent.getCspDocumentStatus().equals(DocumentStatus.PRINTEDNOSIGNATURE))
                enableSignedItem = true;
    }

    form.getContextMenus().getADTMenuBatchupdateofstatustoDictatedItem().setVisible(enableDictatedItem);
    form.getContextMenus().getADTMenuBatchupdateofstatustoNoLetterRequiredItem().setVisible(enableNoLetterRequiredItem);
    form.getContextMenus().getADTMenuBatchupdateofstatustoSignedItem().setVisible(enableSignedItem);
}
项目:openMAXIMS    文件:Logic.java   
private void setContextVariablesForSelection() {
    clearContextVariables();
    OutPatientAttendanceVo voOutPatientAttendance = null;
    PasEventVo voPasEvent = null;

    if (form.grdOutPatient().getSelectedRowIndex() >= 0 && form.grdOutPatient().getRows().get(form.grdOutPatient().getSelectedRowIndex()).getValue() != null)                   
    {
        voOutPatientAttendance = form.grdOutPatient().getSelectedRow().getValue();
        voPasEvent = voOutPatientAttendance.getPasEvent();

        form.getGlobalContext().Core.setPatientShort(voPasEvent.getPatient());

        form.getGlobalContext().Core.setPasEvent(voPasEvent);                       
        form.getLocalContext().setSelectedCorrespondenceInstance(domain.getCorrespondenceDetailsByPasEvent(voPasEvent));
        form.getGlobalContext().Correspondence.setCorrespondenceDetails(form.getLocalContext().getSelectedCorrespondenceInstance());
    }

}
项目: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    文件:Logic.java   
private void enableBatchUpdateMenuItems() {

    boolean enableDictatedItem = false;
    boolean enableNoLetterRequiredItem = false;
    boolean enableSignedItem = false;
    OutPatientAttendanceVo voOutPatientListVo = null;
    PasEventVo voPasEvent = null;

    for(int i=0; i< form.grdOutPatient().getRows().size(); i++){
        voOutPatientListVo = form.grdOutPatient().getRows().get(i).getValue();
        voPasEvent = voOutPatientListVo.getPasEvent();
        if(voPasEvent.getCspDocumentStatusIsNotNull())
            if(voPasEvent.getCspDocumentStatus().equals(DocumentStatus.LETTERREQUIRED)){
                enableNoLetterRequiredItem = true;
                enableDictatedItem = true;
            }
            else if(voPasEvent.getCspDocumentStatus().equals(DocumentStatus.NOLETTERREQUIRED))
                enableDictatedItem = true;
            else if(voPasEvent.getCspDocumentStatus().equals(DocumentStatus.PRINTEDNOSIGNATURE))
                enableSignedItem = true;
    }

    form.getContextMenus().getADTMenuBatchupdateofstatustoDictatedItem().setVisible(enableDictatedItem);
    form.getContextMenus().getADTMenuBatchupdateofstatustoNoLetterRequiredItem().setVisible(enableNoLetterRequiredItem);
    form.getContextMenus().getADTMenuBatchupdateofstatustoSignedItem().setVisible(enableSignedItem);
}
项目:openmaxims-linux    文件:Logic.java   
private void setContextVariablesForSelection() {
    clearContextVariables();
    OutPatientAttendanceVo voOutPatientAttendance = null;
    PasEventVo voPasEvent = null;

    if (form.grdOutPatient().getSelectedRowIndex() >= 0 && form.grdOutPatient().getRows().get(form.grdOutPatient().getSelectedRowIndex()).getValue() != null)                   
    {
        voOutPatientAttendance = form.grdOutPatient().getSelectedRow().getValue();
        voPasEvent = voOutPatientAttendance.getPasEvent();

        form.getGlobalContext().Core.setPatientShort(voPasEvent.getPatient());

        form.getGlobalContext().Core.setPasEvent(voPasEvent);                       
        form.getLocalContext().setSelectedCorrespondenceInstance(domain.getCorrespondenceDetailsByPasEvent(voPasEvent));
        form.getGlobalContext().Correspondence.setCorrespondenceDetails(form.getLocalContext().getSelectedCorrespondenceInstance());
    }

}
项目: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    文件: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    文件: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    文件: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    文件: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    文件:Logic.java   
private void populateOutPatientList(CorrespondencePatientListsVoCollection voOutPatColl)
{
    if (voOutPatColl != null)
    {
        if (voOutPatColl.size() == 0)
        {
            engine.showMessage("No matching patients found.");
            return;
        }
        storeSearchCriteria();
        GenForm.grdOutPatientRow row = null;
        for (int i = 0; i < voOutPatColl.size(); i++)
        {
            OutPatientAttendanceVo voOutPatient = voOutPatColl.get(i).getOutpatientAttendanceVo();
            if(form.cmbConsultant().getValue()==null && form.getLocalContext().getUserAccessVoIsNotNull()){
                boolean bIsUserAccessConsultant = false;
                UserAccessVo voUserAccess = form.getLocalContext().getUserAccessVo();
                ConsultantAccessVoCollection  collConsultantAccessVo = voUserAccess.getConsultantAccess();
                MedicLiteVo med = null;

                if (collConsultantAccessVo != null)
                {
                    for (int j = 0; j < collConsultantAccessVo.size(); j++)
                    {
                        med = collConsultantAccessVo.get(j).getConsultant();
                        if(med.getID_Hcp().equals(voOutPatient.getPasEvent().getConsultant().getID_Hcp()))
                            bIsUserAccessConsultant=true;
                    }
                }
                if(!bIsUserAccessConsultant)
                    continue;
            }
            if (voOutPatient != null && voOutPatient.getPasEventIsNotNull() && voOutPatient.getPasEvent().getPatientIsNotNull())
            {
                row = form.grdOutPatient().getRows().newRow();
                if (voOutPatient.getPasEvent().getPatient().getNameIsNotNull())
                {
                    row.setcolForename(voOutPatient.getPasEvent().getPatient().getName().getForename());
                    row.setcolSurname(voOutPatient.getPasEvent().getPatient().getName().getSurname());
                }

                ims.core.vo.PatientId voPatId = voOutPatient.getPasEvent().getPatient().getDisplayId();
                if (voPatId != null)
                    row.setcolHospnum(voPatId.getValue());

                if (voOutPatient.getPasEvent().getPatient().getDobIsNotNull())
                    row.setcolDob(voOutPatient.getPasEvent().getPatient().getDob().toString());

                if (voOutPatient.getPasEvent().getPatient().getAgeIsNotNull())
                    row.setColAge(voOutPatient.getPasEvent().getPatient().getAge().toString());
                else
                    row.setColAge(voOutPatient.getPasEvent().getPatient().calculateAge().toString());

                if (voOutPatient.getPasEvent().getPatient().getSexIsNotNull())
                    row.setcolSex(voOutPatient.getPasEvent().getPatient().getSex().getText());

                if (voOutPatient.getClinicIsNotNull())
                    row.setcolClinic(voOutPatient.getClinic().getClinicName());

                if (voOutPatient.getPasEvent() != null && voOutPatient.getPasEvent().getSpecialty() != null)
                    row.setcolSpecialty(voOutPatient.getPasEvent().getSpecialty().getText());

                if (voOutPatient.getAppointmentDateTimeIsNotNull())
                    row.setcolClinicDate(voOutPatient.getAppointmentDateTime().toString());

                if (voOutPatient.getPasEvent().getPatient().getIsDead() != null && voOutPatient.getPasEvent().getPatient().getIsDead().booleanValue())
                    row.setBackColor(ConfigFlag.UI.RIP_COLOUR.getValue());

                if(voOutPatient.getPasEvent().getCspDocumentStatusIsNotNull()){
                    row.setcolDocStatus(voOutPatient.getPasEvent().getCspDocumentStatus().getImage());
                    row.setTooltipForcolDocStatus(voOutPatient.getPasEvent().getCspDocumentStatus().getText());
                }

                row.setValue(voOutPatient);
            }

        }
    }

}
项目: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);
}
项目:AvoinApotti    文件:VoMapper.java   
public OutPatientAttendanceVo fillAttFromMsg(Message msg, OrganisationAndLocation orgLoc, HcpAdmin hcpAdmin,ProviderSystemVo providerSystem) throws Exception
{
    return this.fillAttFromMsg(new OutPatientAttendanceVo(), msg, orgLoc, hcpAdmin,providerSystem);
}
项目:AvoinApotti    文件:VoMapper.java   
public OutPatientAttendanceVo fillAttFromMsg(OutPatientAttendanceVo attVo, Message msg, OrganisationAndLocation orgLoc, HcpAdmin hcpAdmin,ProviderSystemVo providerSystem) throws Exception
{
    PV1 pv1 = (PV1) msg.get("PV1");
    PasEventVo pe=new PasEventVo();

    if(attVo.getPasEvent()!=null)
        pe = attVo.getPasEvent();

        EVN evn = (EVN) msg.get("EVN");
        fillPasEventFromEVN(evn, pe, null);
        fillPasEventFromPV1(pv1, pe, orgLoc, hcpAdmin,providerSystem);
        attVo.setPasEvent(pe);


        attVo.setIsActive(Boolean.TRUE);
        //if (attVo.getAppointmentDateTime() != null)

        if (pv1.getAdmitDateTime().getTimeOfAnEvent() != null && pv1.getAdmitDateTime().getTimeOfAnEvent().getValue() != null)
        {
            attVo.setAppointmentDateTime(new DateTime(pv1.getAdmitDateTime().getTimeOfAnEvent().getValue()));                   
        }               


    String patClass = pv1.getPatientClass().getValue();
    if (patClass != null && patClass.equals(OUTPATIENT_APP))
    {
        attVo.setClinic(orgLoc.getClinicByTaxonomyCode(providerSystem.getCodeSystem(),pv1.getAssignedPatientLocation().getPointOfCare().getValue()));//.getClinicByCode(pv1.getAssignedPatientLocation().getPointOfCare().getValue()));

        // wdev-3104 Reject message if clinic not found
        if (!attVo.getClinicIsNotNull())
        {
            throw new HL7Exception("Clinic not found within application (" + pv1.getAssignedPatientLocation().getPointOfCare().getValue() + ") PV1-3. Message Rejected");           
        }

        // WDEV-13455
        // Set the appointment type from PV1-4 - admission type (specifics set for Patient Diary)
        if (pv1.getAdmissionType() != null)
            attVo.setApptType(pv1.getAdmissionType().getValue());
    }


    return attVo;
}
项目:openMAXIMS    文件:Logic.java   
private void populateOutPatientList(CorrespondencePatientListsVoCollection voOutPatColl)
{
    if (voOutPatColl != null)
    {
        if (voOutPatColl.size() == 0)
        {
            engine.showMessage("No matching patients found.");
            return;
        }
        storeSearchCriteria();
        GenForm.grdOutPatientRow row = null;
        for (int i = 0; i < voOutPatColl.size(); i++)
        {
            OutPatientAttendanceVo voOutPatient = voOutPatColl.get(i).getOutpatientAttendanceVo();
            if(form.cmbConsultant().getValue()==null && form.getLocalContext().getUserAccessVoIsNotNull()){
                boolean bIsUserAccessConsultant = false;
                UserAccessVo voUserAccess = form.getLocalContext().getUserAccessVo();
                ConsultantAccessVoCollection  collConsultantAccessVo = voUserAccess.getConsultantAccess();
                MedicLiteVo med = null;

                if (collConsultantAccessVo != null)
                {
                    for (int j = 0; j < collConsultantAccessVo.size(); j++)
                    {
                        med = collConsultantAccessVo.get(j).getConsultant();
                        if(med.getID_Hcp().equals(voOutPatient.getPasEvent().getConsultant().getID_Hcp()))
                            bIsUserAccessConsultant=true;
                    }
                }
                if(!bIsUserAccessConsultant)
                    continue;
            }
            if (voOutPatient != null && voOutPatient.getPasEventIsNotNull() && voOutPatient.getPasEvent().getPatientIsNotNull())
            {
                row = form.grdOutPatient().getRows().newRow();
                if (voOutPatient.getPasEvent().getPatient().getNameIsNotNull())
                {
                    row.setcolForename(voOutPatient.getPasEvent().getPatient().getName().getForename());
                    row.setcolSurname(voOutPatient.getPasEvent().getPatient().getName().getSurname());
                }

                ims.core.vo.PatientId voPatId = voOutPatient.getPasEvent().getPatient().getDisplayId();
                if (voPatId != null)
                    row.setcolHospnum(voPatId.getValue());

                if (voOutPatient.getPasEvent().getPatient().getDobIsNotNull())
                    row.setcolDob(voOutPatient.getPasEvent().getPatient().getDob().toString());

                if (voOutPatient.getPasEvent().getPatient().getAgeIsNotNull())
                    row.setColAge(voOutPatient.getPasEvent().getPatient().getAge().toString());
                else
                    row.setColAge(voOutPatient.getPasEvent().getPatient().calculateAge().toString());

                if (voOutPatient.getPasEvent().getPatient().getSexIsNotNull())
                    row.setcolSex(voOutPatient.getPasEvent().getPatient().getSex().getText());

                if (voOutPatient.getClinicIsNotNull())
                    row.setcolClinic(voOutPatient.getClinic().getClinicName());

                if (voOutPatient.getPasEvent() != null && voOutPatient.getPasEvent().getSpecialty() != null)
                    row.setcolSpecialty(voOutPatient.getPasEvent().getSpecialty().getText());

                if (voOutPatient.getAppointmentDateTimeIsNotNull())
                    row.setcolClinicDate(voOutPatient.getAppointmentDateTime().toString());

                if (voOutPatient.getPasEvent().getPatient().getIsDead() != null && voOutPatient.getPasEvent().getPatient().getIsDead().booleanValue())
                    row.setBackColor(ConfigFlag.UI.RIP_COLOUR.getValue());

                if(voOutPatient.getPasEvent().getCspDocumentStatusIsNotNull()){
                    row.setcolDocStatus(voOutPatient.getPasEvent().getCspDocumentStatus().getImage());
                    row.setTooltipForcolDocStatus(voOutPatient.getPasEvent().getCspDocumentStatus().getText());
                }

                row.setValue(voOutPatient);
            }

        }
    }

}
项目:openMAXIMS    文件:Logic.java   
private void populateOutPatientList(OutPatientAttendanceVoCollection voOutPatColl)
{
    if (voOutPatColl != null)
    {
        if (voOutPatColl.size() == 0)
        {
            engine.showMessage("No matching patients found.");
            return;
        }
        storeSearchCriteria();
        grdOPAttendencesRow row = null;
        for (int i = 0; i < voOutPatColl.size(); i++)
        {
            OutPatientAttendanceVo voOutPatient = voOutPatColl.get(i);
            if (voOutPatient != null 
                && voOutPatient.getPasEventIsNotNull() 
                && voOutPatient.getPasEvent().getPatientIsNotNull())
            {
                row = form.grdOPAttendences().getRows().newRow();

                if (voOutPatient.getPasEvent().getPatient().getNameIsNotNull())
                {
                    row.setcolForename(voOutPatient.getPasEvent().getPatient().getName().getForename());
                    row.setcolSurname(voOutPatient.getPasEvent().getPatient().getName().getSurname());
                }

                ims.core.vo.PatientId voPatId = voOutPatient.getPasEvent().getPatient().getDisplayId();
                if (voPatId != null)
                    row.setcolHospnum(voPatId.getValue());

                if (voOutPatient.getPasEvent().getPatient().getDobIsNotNull())
                    row.setcolDob(voOutPatient.getPasEvent().getPatient().getDob().toString());

                if (voOutPatient.getPasEvent().getPatient().getAgeIsNotNull())
                    row.setColAge(voOutPatient.getPasEvent().getPatient().getAge().toString());
                else
                    row.setColAge(voOutPatient.getPasEvent().getPatient().calculateAge()!=null ? voOutPatient.getPasEvent().getPatient().calculateAge().toString():null);//WDEV-17541

                if (voOutPatient.getPasEvent().getPatient().getSexIsNotNull())
                    row.setcolSex(voOutPatient.getPasEvent().getPatient().getSex().getText());

                if (voOutPatient.getClinicIsNotNull())
                    row.setcolClinic(voOutPatient.getClinic().getClinicName());

                if (voOutPatient.getPasEvent() != null && voOutPatient.getPasEvent().getSpecialty() != null)
                    row.setcolSpecialty(voOutPatient.getPasEvent().getSpecialty().getText());

                if (voOutPatient.getAppointmentDateTimeIsNotNull())
                    row.setcolClinicDate(voOutPatient.getAppointmentDateTime().toString());

                if (voOutPatient.getPasEvent().getPatient().getIsDead() != null && voOutPatient.getPasEvent().getPatient().getIsDead().booleanValue())
                    row.setBackColor(ConfigFlag.UI.RIP_COLOUR.getValue());

                row.setValue(voOutPatient.getPasEvent().getPatient());
            }

        }
    }

}
项目: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    文件:VoMapper.java   
public OutPatientAttendanceVo fillAttFromMsg(Message msg, OrganisationAndLocation orgLoc, HcpAdmin hcpAdmin,ProviderSystemVo providerSystem) throws Exception
{
    return this.fillAttFromMsg(new OutPatientAttendanceVo(), msg, orgLoc, hcpAdmin,providerSystem);
}
项目:openMAXIMS    文件:VoMapper.java   
public OutPatientAttendanceVo fillAttFromMsg(OutPatientAttendanceVo attVo, Message msg, OrganisationAndLocation orgLoc, HcpAdmin hcpAdmin,ProviderSystemVo providerSystem) throws Exception
{
    PV1 pv1 = (PV1) msg.get("PV1");
    PasEventVo pe=new PasEventVo();

    if(attVo.getPasEvent()!=null)
        pe = attVo.getPasEvent();

        EVN evn = (EVN) msg.get("EVN");
        fillPasEventFromEVN(evn, pe, null);
        fillPasEventFromPV1(pv1, pe, orgLoc, hcpAdmin,providerSystem);
        attVo.setPasEvent(pe);


        attVo.setIsActive(Boolean.TRUE);
        //if (attVo.getAppointmentDateTime() != null)

        if (pv1.getAdmitDateTime().getTimeOfAnEvent() != null && pv1.getAdmitDateTime().getTimeOfAnEvent().getValue() != null)
        {
            attVo.setAppointmentDateTime(new DateTime(pv1.getAdmitDateTime().getTimeOfAnEvent().getValue()));                   
        }               


    String patClass = pv1.getPatientClass().getValue();
    if (patClass != null && patClass.equals(OUTPATIENT_APP))
    {
        attVo.setClinic(orgLoc.getClinicByTaxonomyCode(providerSystem.getCodeSystem(),pv1.getAssignedPatientLocation().getPointOfCare().getValue()));//.getClinicByCode(pv1.getAssignedPatientLocation().getPointOfCare().getValue()));

        // wdev-3104 Reject message if clinic not found
        if (!attVo.getClinicIsNotNull())
        {
            throw new HL7Exception("Clinic not found within application (" + pv1.getAssignedPatientLocation().getPointOfCare().getValue() + ") PV1-3. Message Rejected");           
        }

        // WDEV-13455
        // Set the appointment type from PV1-4 - admission type (specifics set for Patient Diary)
        if (pv1.getAdmissionType() != null)
            attVo.setApptType(pv1.getAdmissionType().getValue());
    }


    return attVo;
}
项目:openMAXIMS    文件:Logic.java   
private void populateOutPatientList(CorrespondencePatientListsVoCollection voOutPatColl)
{
    if (voOutPatColl != null)
    {
        if (voOutPatColl.size() == 0)
        {
            engine.showMessage("No matching patients found.");
            return;
        }
        storeSearchCriteria();
        GenForm.grdOutPatientRow row = null;
        for (int i = 0; i < voOutPatColl.size(); i++)
        {
            OutPatientAttendanceVo voOutPatient = voOutPatColl.get(i).getOutpatientAttendanceVo();
            if(form.cmbConsultant().getValue()==null && form.getLocalContext().getUserAccessVoIsNotNull()){
                boolean bIsUserAccessConsultant = false;
                UserAccessVo voUserAccess = form.getLocalContext().getUserAccessVo();
                ConsultantAccessVoCollection  collConsultantAccessVo = voUserAccess.getConsultantAccess();
                MedicLiteVo med = null;

                if (collConsultantAccessVo != null)
                {
                    for (int j = 0; j < collConsultantAccessVo.size(); j++)
                    {
                        med = collConsultantAccessVo.get(j).getConsultant();
                        if(med.getID_Hcp().equals(voOutPatient.getPasEvent().getConsultant().getID_Hcp()))
                            bIsUserAccessConsultant=true;
                    }
                }
                if(!bIsUserAccessConsultant)
                    continue;
            }
            if (voOutPatient != null && voOutPatient.getPasEventIsNotNull() && voOutPatient.getPasEvent().getPatientIsNotNull())
            {
                row = form.grdOutPatient().getRows().newRow();
                if (voOutPatient.getPasEvent().getPatient().getNameIsNotNull())
                {
                    row.setcolForename(voOutPatient.getPasEvent().getPatient().getName().getForename());
                    row.setcolSurname(voOutPatient.getPasEvent().getPatient().getName().getSurname());
                }

                ims.core.vo.PatientId voPatId = voOutPatient.getPasEvent().getPatient().getDisplayId();
                if (voPatId != null)
                    row.setcolHospnum(voPatId.getValue());

                if (voOutPatient.getPasEvent().getPatient().getDobIsNotNull())
                    row.setcolDob(voOutPatient.getPasEvent().getPatient().getDob().toString());

                if (voOutPatient.getPasEvent().getPatient().getAgeIsNotNull())
                    row.setColAge(voOutPatient.getPasEvent().getPatient().getAge().toString());
                else
                    row.setColAge(voOutPatient.getPasEvent().getPatient().calculateAge().toString());

                if (voOutPatient.getPasEvent().getPatient().getSexIsNotNull())
                    row.setcolSex(voOutPatient.getPasEvent().getPatient().getSex().getText());

                if (voOutPatient.getClinicIsNotNull())
                    row.setcolClinic(voOutPatient.getClinic().getClinicName());

                if (voOutPatient.getPasEvent() != null && voOutPatient.getPasEvent().getSpecialty() != null)
                    row.setcolSpecialty(voOutPatient.getPasEvent().getSpecialty().getText());

                if (voOutPatient.getAppointmentDateTimeIsNotNull())
                    row.setcolClinicDate(voOutPatient.getAppointmentDateTime().toString());

                if (voOutPatient.getPasEvent().getPatient().getIsDead() != null && voOutPatient.getPasEvent().getPatient().getIsDead().booleanValue())
                    row.setBackColor(ConfigFlag.UI.RIP_COLOUR.getValue());

                if(voOutPatient.getPasEvent().getCspDocumentStatusIsNotNull()){
                    row.setcolDocStatus(voOutPatient.getPasEvent().getCspDocumentStatus().getImage());
                    row.setTooltipForcolDocStatus(voOutPatient.getPasEvent().getCspDocumentStatus().getText());
                }

                row.setValue(voOutPatient);
            }

        }
    }

}
项目: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    文件:VoMapper.java   
public OutPatientAttendanceVo fillAttFromMsg(Message msg, OrganisationAndLocation orgLoc, HcpAdmin hcpAdmin,ProviderSystemVo providerSystem) throws Exception
{
    return this.fillAttFromMsg(new OutPatientAttendanceVo(), msg, orgLoc, hcpAdmin,providerSystem);
}
项目:openMAXIMS    文件:VoMapper.java   
public OutPatientAttendanceVo fillAttFromMsg(OutPatientAttendanceVo attVo, Message msg, OrganisationAndLocation orgLoc, HcpAdmin hcpAdmin,ProviderSystemVo providerSystem) throws Exception
{
    PV1 pv1 = (PV1) msg.get("PV1");
    PasEventVo pe=new PasEventVo();

    if(attVo.getPasEvent()!=null)
        pe = attVo.getPasEvent();

        EVN evn = (EVN) msg.get("EVN");
        fillPasEventFromEVN(evn, pe, null);
        fillPasEventFromPV1(pv1, pe, orgLoc, hcpAdmin,providerSystem);
        attVo.setPasEvent(pe);


        attVo.setIsActive(Boolean.TRUE);
        //if (attVo.getAppointmentDateTime() != null)

        if (pv1.getAdmitDateTime().getTimeOfAnEvent() != null && pv1.getAdmitDateTime().getTimeOfAnEvent().getValue() != null)
        {
            attVo.setAppointmentDateTime(new DateTime(pv1.getAdmitDateTime().getTimeOfAnEvent().getValue()));                   
        }               


    String patClass = pv1.getPatientClass().getValue();
    if (patClass != null && patClass.equals(OUTPATIENT_APP))
    {
        attVo.setClinic(orgLoc.getClinicByTaxonomyCode(providerSystem.getCodeSystem(),pv1.getAssignedPatientLocation().getPointOfCare().getValue()));//.getClinicByCode(pv1.getAssignedPatientLocation().getPointOfCare().getValue()));

        // wdev-3104 Reject message if clinic not found
        if (!attVo.getClinicIsNotNull())
        {
            throw new HL7Exception("Clinic not found within application (" + pv1.getAssignedPatientLocation().getPointOfCare().getValue() + ") PV1-3. Message Rejected");           
        }

        // WDEV-13455
        // Set the appointment type from PV1-4 - admission type (specifics set for Patient Diary)
        if (pv1.getAdmissionType() != null)
            attVo.setApptType(pv1.getAdmissionType().getValue());
    }


    return attVo;
}
项目:openmaxims-linux    文件:Logic.java   
private void populateOutPatientList(CorrespondencePatientListsVoCollection voOutPatColl)
{
    if (voOutPatColl != null)
    {
        if (voOutPatColl.size() == 0)
        {
            engine.showMessage("No matching patients found.");
            return;
        }
        storeSearchCriteria();
        GenForm.grdOutPatientRow row = null;
        for (int i = 0; i < voOutPatColl.size(); i++)
        {
            OutPatientAttendanceVo voOutPatient = voOutPatColl.get(i).getOutpatientAttendanceVo();
            if(form.cmbConsultant().getValue()==null && form.getLocalContext().getUserAccessVoIsNotNull()){
                boolean bIsUserAccessConsultant = false;
                UserAccessVo voUserAccess = form.getLocalContext().getUserAccessVo();
                ConsultantAccessVoCollection  collConsultantAccessVo = voUserAccess.getConsultantAccess();
                MedicLiteVo med = null;

                if (collConsultantAccessVo != null)
                {
                    for (int j = 0; j < collConsultantAccessVo.size(); j++)
                    {
                        med = collConsultantAccessVo.get(j).getConsultant();
                        if(med.getID_Hcp().equals(voOutPatient.getPasEvent().getConsultant().getID_Hcp()))
                            bIsUserAccessConsultant=true;
                    }
                }
                if(!bIsUserAccessConsultant)
                    continue;
            }
            if (voOutPatient != null && voOutPatient.getPasEventIsNotNull() && voOutPatient.getPasEvent().getPatientIsNotNull())
            {
                row = form.grdOutPatient().getRows().newRow();
                if (voOutPatient.getPasEvent().getPatient().getNameIsNotNull())
                {
                    row.setcolForename(voOutPatient.getPasEvent().getPatient().getName().getForename());
                    row.setcolSurname(voOutPatient.getPasEvent().getPatient().getName().getSurname());
                }

                ims.core.vo.PatientId voPatId = voOutPatient.getPasEvent().getPatient().getDisplayId();
                if (voPatId != null)
                    row.setcolHospnum(voPatId.getValue());

                if (voOutPatient.getPasEvent().getPatient().getDobIsNotNull())
                    row.setcolDob(voOutPatient.getPasEvent().getPatient().getDob().toString());

                if (voOutPatient.getPasEvent().getPatient().getAgeIsNotNull())
                    row.setColAge(voOutPatient.getPasEvent().getPatient().getAge().toString());
                else
                    row.setColAge(voOutPatient.getPasEvent().getPatient().calculateAge().toString());

                if (voOutPatient.getPasEvent().getPatient().getSexIsNotNull())
                    row.setcolSex(voOutPatient.getPasEvent().getPatient().getSex().getText());

                if (voOutPatient.getClinicIsNotNull())
                    row.setcolClinic(voOutPatient.getClinic().getClinicName());

                if (voOutPatient.getPasEvent() != null && voOutPatient.getPasEvent().getSpecialty() != null)
                    row.setcolSpecialty(voOutPatient.getPasEvent().getSpecialty().getText());

                if (voOutPatient.getAppointmentDateTimeIsNotNull())
                    row.setcolClinicDate(voOutPatient.getAppointmentDateTime().toString());

                if (voOutPatient.getPasEvent().getPatient().getIsDead() != null && voOutPatient.getPasEvent().getPatient().getIsDead().booleanValue())
                    row.setBackColor(ConfigFlag.UI.RIP_COLOUR.getValue());

                if(voOutPatient.getPasEvent().getCspDocumentStatusIsNotNull()){
                    row.setcolDocStatus(voOutPatient.getPasEvent().getCspDocumentStatus().getImage());
                    row.setTooltipForcolDocStatus(voOutPatient.getPasEvent().getCspDocumentStatus().getText());
                }

                row.setValue(voOutPatient);
            }

        }
    }

}
项目: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);
}
项目:openmaxims-linux    文件:VoMapper.java   
public OutPatientAttendanceVo fillAttFromMsg(Message msg, OrganisationAndLocation orgLoc, HcpAdmin hcpAdmin,ProviderSystemVo providerSystem) throws Exception
{
    return this.fillAttFromMsg(new OutPatientAttendanceVo(), msg, orgLoc, hcpAdmin,providerSystem);
}
项目:openmaxims-linux    文件:VoMapper.java   
public OutPatientAttendanceVo fillAttFromMsg(OutPatientAttendanceVo attVo, Message msg, OrganisationAndLocation orgLoc, HcpAdmin hcpAdmin,ProviderSystemVo providerSystem) throws Exception
{
    PV1 pv1 = (PV1) msg.get("PV1");
    PasEventVo pe=new PasEventVo();

    if(attVo.getPasEvent()!=null)
        pe = attVo.getPasEvent();

        EVN evn = (EVN) msg.get("EVN");
        fillPasEventFromEVN(evn, pe, null);
        fillPasEventFromPV1(pv1, pe, orgLoc, hcpAdmin,providerSystem);
        attVo.setPasEvent(pe);


        attVo.setIsActive(Boolean.TRUE);
        //if (attVo.getAppointmentDateTime() != null)

        if (pv1.getAdmitDateTime().getTimeOfAnEvent() != null && pv1.getAdmitDateTime().getTimeOfAnEvent().getValue() != null)
        {
            attVo.setAppointmentDateTime(new DateTime(pv1.getAdmitDateTime().getTimeOfAnEvent().getValue()));                   
        }               


    String patClass = pv1.getPatientClass().getValue();
    if (patClass != null && patClass.equals(OUTPATIENT_APP))
    {
        attVo.setClinic(orgLoc.getClinicByTaxonomyCode(providerSystem.getCodeSystem(),pv1.getAssignedPatientLocation().getPointOfCare().getValue()));//.getClinicByCode(pv1.getAssignedPatientLocation().getPointOfCare().getValue()));

        // wdev-3104 Reject message if clinic not found
        if (!attVo.getClinicIsNotNull())
        {
            throw new HL7Exception("Clinic not found within application (" + pv1.getAssignedPatientLocation().getPointOfCare().getValue() + ") PV1-3. Message Rejected");           
        }

        // WDEV-13455
        // Set the appointment type from PV1-4 - admission type (specifics set for Patient Diary)
        if (pv1.getAdmissionType() != null)
            attVo.setApptType(pv1.getAdmissionType().getValue());
    }


    return attVo;
}