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

项目:AvoinApotti    文件:Logic.java   
private void initialize(){
    form.setMode(FormMode.VIEW);

    PatientShort voPatShort = form.getGlobalContext().Core.getPatientShort();
    if (voPatShort == null)
        try {
            throw new FormOpenException("Error: Patient not selected.");
        } catch (FormOpenException e) {
            e.printStackTrace();
        }

    CareContextShortVo currentCareContext = form.getGlobalContext().Core.getCurrentCareContext();
    form.getLocalContext().setSelectedCareContextShort(currentCareContext);

    if(currentCareContext!=null)
        form.getLocalContext().setCurrentCareContextId(currentCareContext.getID_CareContext());

    loadLookupsIntoGrid();

}
项目:AvoinApotti    文件:Logic.java   
/**
 * Function used to update the selection in the grid
 */
private void updateSelection()
{
    if (form.grdResults().getSelectedRow() != null && form.grdResults().getValue() != null)
    {
        Tracking_TrackingAttendanceWorklistVo tracking = form.grdResults().getValue();

        form.getGlobalContext().Core.setPatientShort(new PatientShort(tracking.getPatient().getID_Patient(), tracking.getPatient().getVersion_Patient()));
        form.getGlobalContext().Core.setCurrentCareContext(domain.getCareContext(tracking.getAttendance().getCareContext()));//     WDEV-16012
        form.getGlobalContext().Emergency.setTracking(tracking);

        refreshPIDBarText();//WDEV-17332
    }
    else
    {
        form.getGlobalContext().Core.setPatientShort(null);
        form.getGlobalContext().Core.setCurrentCareContext(null);
        form.getGlobalContext().Emergency.setTracking(null);
    }
}
项目:AvoinApotti    文件:Logic.java   
private CareContextShortVo findEpis(CareContextShortVoCollection coll, PatientShort ps)
{
    for (int i = 0; i < coll.size(); i++)
    {
        if (coll.get(i) != null && ps != null)
        {
            PatientShort patShort = domain.getPatientFromCareContext(coll.get(i));
            if (patShort != null)
            {
                if (patShort.equals(ps))
                    return coll.get(i);
            }
        }
    }
    return null;
}
项目:AvoinApotti    文件:Logic.java   
private void selectPatient()
{
    PatientShort voPatShort = form.lyrPatDetails().tabPagePatientList().grdPatient().getValue();

    if(voPatShort != null && voPatShort.getID_Patient() == null)
    {
        Patient voPatient = replicatePatientIfNeeded(voPatShort);
        if(voPatient == null)
            return;
        else
            voPatShort = voPatient;
    }


    setPatientIntoContext(voPatShort);

    form.lyrPatDetails().tabPagePatientList().grdPatient().getSelectedRow().setValue(voPatShort);
    form.lyrPatDetails().showtabPagePatientDetails();
    populatePatientDetails(voPatShort);
    populateCollectDataGrid(voPatShort, getStatus());
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onDyngrdDisplayRowSelectionChanged(DynamicGridRow row) throws PresentationLogicException
{
    if (row.getValue() instanceof PatientShort)
    {
        form.getGlobalContext().Core.setSelectingPatientForm(engine.getFormName());
        form.getGlobalContext().Core.setPatientShort((PatientShort) row.getValue());
        form.grdInpatients().setValue(null);
    }


    //WDEV-11449 - setting CareContext for EDischarge
    setCareContextIfApplicable(row);

    resetPIDBarText();//WDEV-14476
}
项目:AvoinApotti    文件:Logic.java   
public void initialize(PatientShort patient, EpisodeofCareShortVo episodeOfCare, CareContextShortVo careContext, AdmissionDetailVo admissionDetail)
{
    form.getLocalContext().setPatient(patient);

    if (careContext != null)
        form.getLocalContext().setCareContext(domain.getCareContext(careContext));

    form.getLocalContext().setCurrentAdmissionDetail(admissionDetail);

    form.ccAdmittingConsultant().initialize(null, MedicGrade.CONS);
    form.ccAdmittingConsultant().isRequired(true);

    removeItemsFromReferredAdmittedComboBoxes();
    populateWardsCombo();
    open();
    updateControlsState();

}
项目:AvoinApotti    文件:Logic.java   
private void displaySelectedPatient() 
{
    if(form.getGlobalContext().Core.getPatientShortIsNotNull())
    {
        PatientShort patient = form.getGlobalContext().Core.getPatientShort();
        Patient voPatient = replicatePatientIfNeeded(patient);
        if(voPatient == null)
            return;

        if(voPatient != null)
        {
            addPatient(voPatient);
            form.lyrPatDetails().tabPagePatientList().grdPatient().setValue(voPatient);
            selectPatient();
            form.lyrPatDetails().showtabPagePatientDetails();
        }
    }
}
项目:AvoinApotti    文件:ADTImpl.java   
public void cancelInpatientLeave(PatientShort patient) throws StaleObjectException
{
    DomainFactory factory = getDomainFactory();

    Patient domPatient = PatientShortAssembler.extractPatient(factory, patient);
    InpatientEpisode epis = getCurrentAdmission(factory, patient);
    if (epis != null)
    {
    PASEvent pasevent=epis.getPasEvent();
    Location loc=(Location)factory.getDomainObject(Location.class, domPatient.getWard().getId());
    pasevent.setLocation(loc);
    epis.setPasEvent(pasevent);

    epis.setIsOnLeave(Boolean.FALSE);
    factory.save(epis);
    }
}
项目:AvoinApotti    文件:NHSParamProvider.java   
private void processNHSNoContext(UIEngine engine, IAppParam[] params, String nhsno) 
{
    String patientNHSNo = "";

    if (params != null && params.length > 0)
    {
        for(int i = 0; i<params.length; i++)
        {
            if (params[i].getName().equals(nhsno))
            {
                patientNHSNo = params[i].getValue();
                break;
            }
        }
    }

    PatientShort patient = getPatientByNHS(patientNHSNo);

    if(patient != null)
    {
        SessionData sessData = (SessionData)super.getSession().getAttribute(SessionConstants.SESSION_DATA);
        sessData.context.get().put(ContextQueryItem.PATIENT.getKey(), patient);

        engine.open(ConfigFlag.UI.DEMOGRAPHICS_FORM.getValue() != null ? ConfigFlag.UI.DEMOGRAPHICS_FORM.getValue() : formDemographics , new Object[]{patient});
    }
}
项目:AvoinApotti    文件:EDischargeAllergiesEtcComponentImpl.java   
public PatientAlertEDischargeVoCollection listPatientAlerts(PatientShort patient, Boolean active) 
{
    if(patient == null)
        throw new CodingRuntimeException("Mandatory parameter - Patient not supplied");

    ArrayList names = new ArrayList();
    ArrayList values = new ArrayList();

    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer("from PatientAlert patAlrt ");
    hql.append(" where patAlrt.patient.id = :patient");
    names.add("patient");
    values.add(patient.getID_Patient());

    if (active.equals(Boolean.TRUE))
    {
        hql.append (" and patAlrt.isCurrentlyActiveAlert = :isActive");
        names.add("isActive");
        values.add(Boolean.TRUE);   
    }
    List list = factory.find(hql.toString(), names,values);
    return PatientAlertEDischargeVoAssembler.createPatientAlertEDischargeVoCollectionFromPatientAlert(list).sort();
}
项目:AvoinApotti    文件:Logic.java   
protected void onFormOpen() throws ims.framework.exceptions.FormOpenException
{
    form.setMode(FormMode.VIEW);
    PatientShort voPatShort = form.getGlobalContext().Core.getPatientShort();
    if (voPatShort == null) 
        throw new FormOpenException("Error: Patient not selected.");

    form.getLocalContext().setSelectedCareContextShort(form.getGlobalContext().Core.getCurrentCareContext());
    open();
}
项目:AvoinApotti    文件:Logic.java   
protected void onFormOpen() throws ims.framework.exceptions.FormOpenException
{
    form.setMode(FormMode.VIEW);

    PatientShort voPatShort = form.getGlobalContext().Core.getPatientShort();
    if (voPatShort == null) 
        throw new FormOpenException("Error: Patient not selected.");

    form.getLocalContext().setSelectedCareContextShort(form.getGlobalContext().Core.getCurrentCareContext());
    form.customControlAuthoringInfo().setIsRequiredPropertyToControls(true);       //wdev-13189
    open();
}
项目:AvoinApotti    文件:SessionManagementImpl.java   
public PatientShort getPatientShort(PatientRefVo patientRef)
{
    if(patientRef == null || patientRef.getID_Patient() == null)
        throw new CodingRuntimeException("Cannot get Patient on null Id.");

    return PatientShortAssembler.create((Patient) getDomainFactory().getDomainObject(Patient.class, patientRef.getID_Patient()));
}
项目:AvoinApotti    文件:Logic.java   
private void populateDetailsScreen() {
    CustomListVo voCustomList = form.getLocalContext().getSelectedCustomList();
    if(voCustomList==null)
        return;
    form.lyrCustomListSearch().tabCustomListDetails().cmbListTypeDetails().setValue(voCustomList.getListType());
    form.lyrCustomListSearch().tabCustomListDetails().txtListNameDetails().setValue(voCustomList.getListName());
    form.lyrCustomListSearch().tabCustomListDetails().cmbSpecialtyDetails().setValue(voCustomList.getSpecialty());
    form.lyrCustomListSearch().tabCustomListDetails().dteDateDetails().setValue(voCustomList.getDate());
    form.lyrCustomListSearch().tabCustomListDetails().customControlMosDetails().setValue(voCustomList.getListOwner());
    form.lyrCustomListSearch().tabCustomListDetails().chkActiveOnlydetails().setValue(voCustomList.getIsActive());

    MDTPatientCustomListVo voPatientCustomList = form.getLocalContext().getPatientCustomListVo();

    if(voPatientCustomList!=null && voPatientCustomList.getPatientsIsNotNull()){
        PatientShortCollection collPatientShort = voPatientCustomList.getPatients().sort(SortOrder.ASCENDING);

        form.lyrCustomListSearch().tabCustomListDetails().grdCustomList().getRows().clear();
        if(collPatientShort!=null)
            for (int i = 0; i < collPatientShort.size(); i++) 
            {
                grdCustomListRow row = form.lyrCustomListSearch().tabCustomListDetails().grdCustomList().getRows().newRow();

                PatientShort patientShort = collPatientShort.get(i);
                if(patientShort.getName().getForenameIsNotNull())
                    row.setColForename(patientShort.getName().getForename());
                row.setColSurname(patientShort.getName().getSurname());
                if(patientShort.getDobIsNotNull())
                    row.setColDOB(patientShort.getDob().toString(DateFormat.STANDARD));
                if (patientShort.getDisplayId() != null)
                    row.setColHospNum(patientShort.getDisplayId().getValue());

                row.setValue(patientShort);
            }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void addPatientWard()
{
    PatientShort voPat = form.getGlobalContext().Core.getPatientShort();

    if (voPat.getWard() != null)
    {
        form.cmbDischWard().newRow(voPat.getWard(), voPat.getWard().getName());
        form.cmbDischWard().setValue(voPat.getWard());
    }
}
项目:AvoinApotti    文件:MedConcernOnAdmisImpl.java   
public PatientCurrentConcernVoCollection listPatientConcern(PatientShort patient, IMos voHcp, PatientConcernStatus patientConcernStatus) 
{
    if(patient == null)
        throw new CodingRuntimeException("Patient is mandatory in method listPatientConcern");

    DomainFactory factory = getDomainFactory();

    ArrayList markers = new ArrayList();
    ArrayList values = new ArrayList();

    StringBuffer condStr = new StringBuffer();

    String hql = "from PatientConcern conc where conc.careContext.episodeOfCare.careSpell.patient.id = '" + patient.getID_Patient() + "'";

    if(voHcp != null && voHcp.getIMosHcpId() != null)
    {
        condStr.append(" and conc.allocToTeamMember.id = :idHcp");
            markers.add("idHcp");
        values.add(voHcp.getIMosHcpId());
    }

    if(patientConcernStatus != null)
    {
        condStr.append(" and conc.concernStatus = :status");
            markers.add("status");
        values.add(getDomLookup(patientConcernStatus)); 
    }

    hql += condStr.toString();
    return PatientCurrentConcernVoAssembler.createPatientCurrentConcernVoCollectionFromPatientConcern(factory.find(hql,markers,values)).sort();
}
项目:AvoinApotti    文件:DocumentWorklistImpl.java   
public PatientShort getPatientShort(PatientRefVo patRef)
{
    if (!patRef.getID_PatientIsNotNull())
    {
        throw new DomainRuntimeException("Patient is invalid" );
    }
    return PatientShortAssembler.create((Patient) getDomainFactory().getDomainObject(Patient.class,patRef.getID_Patient()));

}
项目:AvoinApotti    文件:Logic.java   
/**
 * @param voDocumentDetails
 * @param voPasEvent
 */
private void populateScreenPatientInfoFromData(CorrespondenceDetailsVo voDocumentDetails, PasEventVo voPasEvent)
{
    // show patient details

    Patient voPatient = null;
    PatientShort voPatientShort = null;

    if (voDocumentDetails != null)
        voPatient = domain.getPatientLocal(form.getLocalContext().getpasEventVo().getPatient());
    else if (voPasEvent != null)
        voPatientShort = voPasEvent.getPatient();

    if (null != voPatient)
    {

        String sPatientDetails = formatVo(voPatient, "Patient Details");
        sPatientDetails += formatVo(voPasEvent, "Pas Event Details");
        sPatientDetails += formatVo(voPatient.getGp(), "Patient GP Details");
        sPatientDetails += formatVo(voPasEvent.getReferringGP(), "Referral GP Details");
        sPatientDetails += formatVo(voPasEvent.getReferringGpSurgery(), "Referral Surgery Details");

        form.getLocalContext().setPatientGP(voPatient.getGp());

        if (voPatient.getGpSurgeryIsNotNull())
            form.getLocalContext().setPatientGPSurgery(voPatient.getGpSurgery());

    }

}
项目:AvoinApotti    文件:ClinicListImpl.java   
public PatientShort getBookingPatient(Booking_AppointmentVo appointment) 
{
    DomainFactory factory = getDomainFactory();
    List<?> bookings =  factory.find("select booking from Sch_Booking booking join booking.appointments as appt where appt.id = :apptId",new String[]{"apptId"},new Object[]{appointment.getID_Booking_Appointment()});
    if(bookings != null && bookings.size() > 0)
        return Sch_BookingVoAssembler.createSch_BookingVoCollectionFromSch_Booking(bookings).get(0).getPatient();
    return null;
}
项目:AvoinApotti    文件:CustomListMaintenanceImpl.java   
public PatientShort getPatient(PatientShort patient)throws DomainInterfaceException, StaleObjectException 
{
    Demographics impl = (Demographics) getDomainImpl(DemographicsImpl.class);

    try
    {
        return impl.getPatient(patient);
    }
    catch (DomainRuntimeException e) //WDEV-11223
    {
        throw new DomainInterfaceException(e.getMessage());
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateDemographicINfo() 
{
    PatientShort pat = form.getGlobalContext().Core.getPatientShort();

    if (pat == null)
        throw new DomainRuntimeException("No Patient Supplied");

    if (pat.getNameIsNotNull())
    {
        form.lblSurname().setValue(pat.getName().getSurname());
        form.lblForename().setValue(pat.getName().getForename());
    }

    form.lblSex().setValue(pat.getSexIsNotNull() ? pat.getSex().toString() : "");
    form.lblDOB().setValue(pat.getDobIsNotNull() ? pat.getDob().toString() : "");



    PatientIdCollection identifers = pat.getIdentifiers();
    if (identifers != null)
    {
        for (int i = 0; i < identifers.size(); i++)
        {
            ims.core.vo.PatientId id = identifers.get(i);
            ims.RefMan.forms.daycaseadmissiondialog.GenForm.grdIdentifiersRow row = form.grdIdentifiers().getRows().newRow();
            bindColType(row, false);
            row.getcolIdType().setValue(id.getType());
            row.setcolIdValue(id.getValue());
            row.setValue(id);
            if (id.getVerifiedIsNotNull() && !id.getVerified() && id.getType().equals(PatIdType.NHSN))
            {
                row.setBackColor(Color.Orange);
                row.setReadOnly(true);
            }
            if (id.getTypeIsNotNull() && id.getType().equals(PatIdType.NHSN) && !ConfigFlag.GEN.ALLOW_UPDATES_TO_NHS_NO.getValue())
                row.setReadOnly(true);

        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateDemographics()
{
    PatientShort voPatientShort = form.getGlobalContext().Core.getPatientShort();

    if(voPatientShort.getNameIsNotNull())
        form.txtName().setValue(voPatientShort.getName().toShortForm());
    if(voPatientShort.getDobIsNotNull())
        form.txtDOB().setValue(voPatientShort.getDob().toString());
    if (voPatientShort.getSexIsNotNull())
        form.txtSex().setValue(voPatientShort.getSex().getText());
    if(voPatientShort.getIdentifiersIsNotNull())
    {
        displayID(voPatientShort);
    }
}
项目:AvoinApotti    文件:Logic.java   
private void selectPatient() 
{
    if(form.grdPatients().getValue() == null || form.grdPatients().getValue().getPasEvent() == null)
        return;

    PatientForVTERiskAssessmentVo patient = form.grdPatients().getValue().getPasEvent().getPatient();
    PatientShort patientShort = new PatientShort(patient.getID_Patient(), patient.getVersion_Patient());
    form.getGlobalContext().Core.setPatientShort(patientShort);
}
项目:AvoinApotti    文件:DemographicsImpl.java   
public ims.core.vo.Patient getMergedPatient(PatientShort patient) 
{
    ims.core.patient.domain.objects.Patient domPatient = getDomPatient(patient);
    // The id sent down for the patient could be the main one, we may need
    // to check whether this patient id is used as an associated patient anywhere!
    if (domPatient != null && domPatient.getAssociatedPatient() == null)
    {
        DomainFactory factory = getDomainFactory();
        List lst = factory.find("from Patient p where p.associatedPatient.id = :assoc", new String[]{"assoc"}, new Object[]{domPatient.getId()});
        if (lst != null && lst.size() > 0)
            return PatientAssembler.create((ims.core.patient.domain.objects.Patient) lst.get(0));
    }
    return PatientAssembler.create(domPatient);
}
项目:AvoinApotti    文件:STHKCurrentInpatientListComponentImpl.java   
public PatientShort getPatientShort(PatientRefVo patientRefVo) 
{
    Demographics impl = (Demographics) getDomainImpl(DemographicsImpl.class);
    Patient voPat = impl.getPatient(patientRefVo);      

    if (voPat != null)
        return (PatientShort)voPat;
    else
        return null;
}
项目:AvoinApotti    文件:STHKPendingElectiveAdmissionsListComponentImpl.java   
public PatientShort getPatientShort(PatientRefVo patientRefVo) 
{
    Demographics impl = (Demographics) getDomainImpl(DemographicsImpl.class);
    Patient voPat = impl.getPatient(patientRefVo);      

    if (voPat != null)
        return (PatientShort)voPat;
    else
        return null;
}
项目:AvoinApotti    文件:OrderSummaryImpl.java   
private boolean isUsePaedContainer(PatientShort patient)
{
    int cfgAge = ConfigFlag.GEN.PAEDIATRIC_AGE.getValue();
    int patAge = -1;

    Integer iAge = patient.calculateAge();
    if (iAge != null)
        patAge = patient.calculateAge().intValue();

    if (patAge > cfgAge || patAge == -1)
        return false;

    return true;
}
项目:AvoinApotti    文件:Logic.java   
@Override
protected void onDyngrdDischargeDetailsRowSelectionChanged(
        DynamicGridRow row) 
{       
    if (row != null &&
            row.getIdentifier() != null &&
                row.getIdentifier() instanceof PatientShort &&
                    row.getValue() != null &&
                        row.getValue() instanceof DischargeDetailsVo)
    {
        form.getGlobalContext().Core.setPatientShort((PatientShort) row.getIdentifier());

        CareContextRefVo careContextRefVo = ((DischargeDetailsVo) row.getValue()).getCareContextIsNotNull() ? ((DischargeDetailsVo) row.getValue()).getCareContext() : null;
        if (careContextRefVo != null)
        {
            CareContextShortVo careContextShortVo = domain.getCareContextShort(careContextRefVo);
            if (careContextShortVo != null)
            {
                form.getGlobalContext().Core.setCurrentCareContext(careContextShortVo);
                form.getContextMenus().Clinical.getEDischargeListViewItem().setVisible(true);
                resetPIDBarText(); //WDEV-14654
            }               
        }           
    }
    else
    {
        clearSelectedPatient();
    }
}
项目:AvoinApotti    文件:FamilyHistoryImpl.java   
public FamilyHistoryVoCollection list(ClinicalContactShortVo voClinicalContact, PatientShort voPatientShort) 
{
    if(voPatientShort == null || voPatientShort.getID_Patient() == null)
        throw new DomainRuntimeException("Patient Filter not provided for list call. ");

    DomainFactory factory = getDomainFactory();

    java.util.List famhistList = factory.find("select p1_1 from PatientFamilyHistory as p1_1 left join p1_1.clinicalContact as c1_1 left join c1_1.careContext as c2_1 left join c2_1.episodeOfCare as e1_1 left join e1_1.careSpell as c3_1 left join c3_1.patient as p2_1 left join p1_1.patient as p3_1  where( (c3_1.patient.id = :patientId or p1_1.patient.id = :patientId))", new String[]{"patientId"}, new Object[]{voPatientShort.getID_Patient()}); //wdev-18559

    if  ((famhistList != null) && (famhistList.size()>0))
        return FamilyHistoryVoAssembler.createFamilyHistoryVoCollectionFromPatientFamilyHistory(famhistList).sort();
    else
        return null;
}
项目:AvoinApotti    文件:WardSpecimenCollectionImpl.java   
public PatientShort getPatientById(Integer patientId)
{
    if(patientId == null)
        throw new CodingRuntimeException("Cannot get Patient on null Id.");

    return PatientShortAssembler.create((Patient)getDomainFactory().getDomainObject(Patient.class, patientId));
}
项目:AvoinApotti    文件:Logic.java   
private void populateGridDetails(ReferralsRecordingListVoCollection voColl)
{
    form.grdDetails().getRows().clear();
    for (int i = 0; i < voColl.size(); i++)
    {
        grdDetailsRow row = form.grdDetails().getRows().newRow();
        if (voColl.get(i).getCareContextIsNotNull() &&
                voColl.get(i).getCareContext().getEpisodeOfCareIsNotNull() &&
                    voColl.get(i).getCareContext().getEpisodeOfCare().getCareSpellIsNotNull() &&
                        voColl.get(i).getCareContext().getEpisodeOfCare().getCareSpell().getPatientIsNotNull())
        {
            PatientShort patient = voColl.get(i).getCareContext().getEpisodeOfCare().getCareSpell().getPatient();
            if (patient.getNameIsNotNull())
            {
                row.setColSurname(patient.getName().getSurname());
                row.setTooltipForColSurname(patient.getName().getSurname());
                row.setColForename(patient.getName().getForename());
                row.setTooltipForColForename(patient.getName().getForename());
            }
            row.setColSex(patient.getSex() != null? patient.getSex().getText() : "Unknown");
            row.setTooltipForColSex(patient.getSex() != null ? patient.getSex().getText() : "Unknown");
            row.setColDOB(patient.getDob());
            row.setTooltipForColDOB(patient.getDobIsNotNull() ? patient.getDob().toString() : null);
            row.setColHospNo(patient.getHospnum() != null ? patient.getHospnum().getValue() : null);
            row.setTooltipForColHospNo(patient.getHospnum() != null ? patient.getHospnum().getValue() : null);
        }

        row.setColDiscipline(voColl.get(i).getDisciplineIsNotNull() ? voColl.get(i).getDiscipline().toString() : null);
        row.setTooltipForColDiscipline(voColl.get(i).getDisciplineIsNotNull() ? voColl.get(i).getDiscipline().toString() : null);
        row.setColStatus(voColl.get(i).getReferralStatusIsNotNull() ?   voColl.get(i).getReferralStatus().toString() : null);
        row.setTooltipForColStatus(voColl.get(i).getReferralStatusIsNotNull() ? voColl.get(i).getReferralStatus().toString() : null);           
        row.setColSourceOfReferral(voColl.get(i).getReferralSourceIsNotNull() ? voColl.get(i).getReferralSource().toString() : null);
        row.setTooltipForColSourceOfReferral(voColl.get(i).getReferralSourceIsNotNull() ? voColl.get(i).getReferralSource().toString() : null);         
        row.setColReferredTo(voColl.get(i).getReferralHCPIsNotNull() ? (voColl.get(i).getReferralHCP().getNameIsNotNull() ? voColl.get(i).getReferralHCP().getName().toString() : null) : null);
        row.setTooltipForColSourceOfReferral(voColl.get(i).getReferralHCPIsNotNull() ? (voColl.get(i).getReferralHCP().getNameIsNotNull() ? voColl.get(i).getReferralHCP().getName().toString() : null) : null);
        row.setColDateSent(voColl.get(i).getDateSent());
        row.setTooltipForColDateSent(voColl.get(i).getDateSentIsNotNull() ? voColl.get(i).getDateSent().toString() : null);
        row.setValue(voColl.get(i));
    }
}
项目:AvoinApotti    文件:NotificationsImpl.java   
public PatientShort getPatientById(Integer patientId) 
{
    DomainFactory factory = getDomainFactory();
    Patient doPatient = (Patient)factory.getDomainObject(Patient.class, patientId);

    if(doPatient == null)
        throw new DomainRuntimeException("Patient not found");

    PatientShort patient = PatientShortAssembler.create(doPatient);
    patient.setHasAlerts(hasPatientAlerts(patientId));
    patient.setHasAllergies(hasPatientAllergies(patientId));
    patient.calculateAge();

    return patient;
}
项目:AvoinApotti    文件:EDischargePreViewComponentImpl.java   
public GPLiteWithCommChannelsVo getGPLiteWithCommChannelsFromPatientShort(
        PatientShort patientShort) 
{
    if(patientShort == null || patientShort.getID_Patient() == null)
        throw new CodingRuntimeException("PatientShort is null ");
    Patient pat = (Patient) getDomainFactory().getDomainObject(patientShort);
    if(pat == null)
        throw new CodingRuntimeException("Patient is null ");
    return GPLiteWithCommChannelsVoAssembler.create((Gp)pat.getGp() );
}
项目:AvoinApotti    文件:Logic.java   
private void addGridRow(PatientCustomItemVo voItem)
{
    grdDetailsRow row = form.grdDetails().getRows().newRow();

    PatientShort ps = voItem.getPatient();

    if ( (ps.getIsActiveIsNotNull() && ps.getIsActive()) 
            || ps.getAssociatedPatientIsNotNull())
    {
        row.setColSurname(ps.getNameIsNotNull() ? ps.getName().getSurname() : "");      
        row.setColForename(ps.getNameIsNotNull() ? ps.getName().getForename() : "");        

        // WDEV-16083 - display PatientIdType for the DISPLAY_PATID_TYPE flag rather than hardcoding to NHS Number
        PatIdType dispIdType = PatIdType.getNegativeInstance(ConfigFlag.UI.DISPLAY_PATID_TYPE.getValue());
        row.setColPatId(ps.getPatId(dispIdType) != null ? (ps.getPatId(dispIdType).getValueIsNotNull() ? ps.getPatId(dispIdType).getValue().toString() : "") : "");         
        row.setColSex(ps.getSexIsNotNull() ? ps.getSex().toString() : "");      
        row.setColAge(ps.getDobIsNotNull() ? ps.calculateAge().toString() : "");        
        row.setColDOB(ps.getDobIsNotNull() ? ps.getDob().toString() : "");      
        row.setColAddedBy(voItem.getAddedByIsNotNull() ? voItem.getAddedBy().getName().toString() : "");        
        row.setColDateTime(voItem.getAddedDateTimeIsNotNull() ? voItem.getAddedDateTime().toString() : "");

        tickCol(row, voItem);

        if(voItem.getPatient().getAssociatedPatientIsNotNull())
            row.setBackColor(ConfigFlag.UI.MERGED_COLOUR.getValue());

        if (voItem.getPatient().getIsDead().booleanValue())
            row.setBackColor(ConfigFlag.UI.RIP_COLOUR.getValue());          

        row.setValue(voItem);
    }
}
项目:AvoinApotti    文件:InpatientListImpl.java   
public PatientShort getPatient(PatientRefVo patRefVo) throws DomainInterfaceException
{
    if (patRefVo == null)
        throw new CodingRuntimeException("Can not search on patRefVo value");

    DomainFactory factory = getDomainFactory();
    return PatientShortAssembler.create((Patient) factory.getDomainObject(Patient.class, patRefVo.getID_Patient()));
}
项目:AvoinApotti    文件:Logic.java   
/**
 * @param ps
 */
private void setPatientGlobalContext(PatientShort patient)
{
    form.getGlobalContext().Core.setSelectingPatientForm(engine.getFormName());
    form.getGlobalContext().Core.setPatientToBeDisplayed(patient);
    form.getGlobalContext().Core.setPatientShort(patient);
}
项目:AvoinApotti    文件:TrackingAndAttendanceWorklistsImpl.java   
public PatientShort getPatient(PatientRefVo patientRef)
{
    if(patientRef == null || patientRef.getID_Patient() == null)
        return null;

    return PatientShortAssembler.create((Patient) getDomainFactory().getDomainObject(Patient.class, patientRef.getID_Patient()));
}
项目:AvoinApotti    文件:Logic.java   
public void initialize(ims.core.vo.PatientShort patient, ims.core.vo.EpisodeofCareShortVo episodeofcare, ims.core.vo.CareContextShortVo careContext, ims.core.vo.AdmissionDetailVo admission, Boolean isOpenedFromInpatientListForm)
{
    form.getLocalContext().setConfimUndoDischargeMsgBoxId(null);

    form.getLocalContext().setIsOpenedFromInpatientListForm(isOpenedFromInpatientListForm);
    form.getLocalContext().setAdmissionDetail(admission);
    form.getLocalContext().setCareContextShortVo(careContext);
    if( careContext != null)
    {
        form.getLocalContext().setCareContext(domain.getCareContextById(careContext));

    }
    form.getLocalContext().setPatientShort(patient);

    if( form.getLocalContext().getCareContextIsNotNull() && form.getLocalContext().getCareContext().getPasEventIsNotNull() )
    {
        AdmissionDetailVo lastAdmission = domain.getLastAdmissionForPatient(patient);
        AdmissionDetailVo careContextAdmission = domain.getAdmissionForSelectedCareContext(form.getLocalContext().getCareContext());
        if( lastAdmission != null && careContextAdmission != null && lastAdmission.getID_AdmissionDetail().equals(careContextAdmission.getID_AdmissionDetail()))
            form.getLocalContext().setShowUndoDischargeButton(true);
        else
            form.getLocalContext().setShowUndoDischargeButton(false);
    }
    else
        form.getLocalContext().setShowUndoDischargeButton(false);

    open();

    updateControlsState();

}
项目:AvoinApotti    文件:Logic.java   
private PatientDocumentVo savePatientDocuments(PatientShort patient, CareContextMinVo careContext, ClinicRefVo clinic, String fileName, PatientDocumentErrorVoCollection errors) 
{
    if(fileName == null || fileName.length() == 0)
        return null;

    PatientDocumentVo vo = populatePatientDocumentVo(patient, careContext, clinic, populateServerDocumentVo(fileName));

    if(vo == null)
        return null;

    String[] str = vo.validate();
    if (str != null && str.length > 0)
    {
        errors.add(createError(patient, careContext, "Could not be created"));
        return null;
    }

    try 
    {
        return domain.savePatientDocument(vo);
    } 
    catch (StaleObjectException e) 
    {
        e.printStackTrace();
        errors.add(createError(patient, careContext, "Could not be created"));
        return null;
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateHospitalAndWardControls()
{
    SpecimenWorkListItemListVo specimenWorkListItem = domain.getSpecimenWorklistItem(form.getGlobalContext().OCRR.getMoveToWardDetails().getSpecimenId());
    PatientShort patientShort = domain.getPatient(specimenWorkListItem.getSpecimen().getOrder().getPatient().getID_Patient());

    form.getLocalContext().setSpecimenWorkListItem(specimenWorkListItem);
    form.getGlobalContext().Core.setPatientShort(patientShort);

    LocShortMappingsVoCollection coll = domain.listActiveHospitals();

    LocationLiteVo patientWard = domain.getPatientWard(specimenWorkListItem.getSpecimen().getOrder().getPatient().getWard().getID_Location());
    LocationLiteVo hospital = null;

    if (patientWard != null)
    {
        hospital = domain.getHospitalForCurrentLocation(patientWard.getID_Location());
    }

    for (int i = 0; i < coll.size(); i++)
    {
        form.cmbHospital().newRow(coll.get(i), coll.get(i).getName());
    }

    form.cmbHospital().setValue(hospital);

    if (patientWard != null)
    {
        form.qmbWard().newRow(patientWard, patientWard.getName().toString());
        form.qmbWard().setValue(patientWard);
    }

}