Java 类ims.clinical.vo.DischargeDetailsVo 实例源码

项目:AvoinApotti    文件:Logic.java   
private void checkIfCheckBoxShouldBeDisplayedAnyway(DischargeReadyToLeaveVo voReady) 
{
    GP voGP = domain.getPatientsGP(form.getGlobalContext().Core.getPatientShort());
    boolean hasEmail = false;
    if (voGP != null && voGP.getCommChannel(ChannelType.EMAIL) != null)
        hasEmail = true;

    DischargeDetailsVo volocalDD = domain.getDischargeDetails(form.getGlobalContext().Core.getCurrentCareContext());
    form.getLocalContext().setCurrentDischargeDetailsVo(volocalDD);

    if ( !hasEmail
        && volocalDD != null
        && volocalDD.getDischargeLetterStatusIsNotNull()
        && volocalDD.getDischargeLetterStatus().equals(DischargeLetterStatus.GENERATED)
        && (voReady.getHasPatientReceivedCopyOfDischarge() == null
                || (voReady.getHasPatientReceivedCopyOfDischargeIsNotNull() &&  ! voReady.getHasPatientReceivedCopyOfDischarge()) ) )
    {
        form.chkLetterGiven().setVisible(true);
        form.lblLetterGiven().setVisible(true);

        if (form.getMode().equals(FormMode.EDIT))
            form.chkLetterGiven().setEnabled(true);
    }

}
项目:AvoinApotti    文件:EDischargeDiagnosisEtcComponentImpl.java   
public DischargeDetailsVo saveDischargeDetails(DischargeDetailsVo voDischargeDetails, SummaryRefVo summaryVo) throws DomainInterfaceException, StaleObjectException
{
    if(voDischargeDetails == null)
        throw new CodingRuntimeException("DischargeDetailsVo is null");

    if(!voDischargeDetails.isValidated())
        throw new CodingRuntimeException("DischargeDetailsVo Value Object has not been validated");

    DomainFactory factory = getDomainFactory();
    DischargeDetails doDD = DischargeDetailsVoAssembler.extractDischargeDetails(factory, voDischargeDetails);

    factory.save(doDD);

    if (summaryVo != null)
    {
        IEDischargeHelper impl = (IEDischargeHelper)getDomainImpl(EDischargeHelper.class);
        impl.updateSummaryIfRequired(voDischargeDetails, summaryVo, factory);
    }

    return DischargeDetailsVoAssembler.create(doDD);

}
项目:AvoinApotti    文件:EDischargeSummarySthkComponentImpl.java   
/**
* saveSummary
*/
public EDischargeSTHKSummaryVo saveSummaryAndDischargeDetails(EDischargeSTHKSummaryVo summary, DischargeDetailsVo dischargeDetails) throws StaleObjectException, DomainInterfaceException
{
    if (summary == null)
        throw new CodingRuntimeException("summary is null in method saveSummary");
    if (!summary.isValidated())
        throw new CodingRuntimeException("summary has not been validated in method saveSummary");

    if (dischargeDetails != null)
    {
        IEDischargeHelper impl = (IEDischargeHelper)getDomainImpl(EDischargeHelper.class);
        summary.setDischargeDetails(impl.saveDischargeDetails(dischargeDetails));
    }

    DomainFactory factory = getDomainFactory();
    Summary doSummary = EDischargeSTHKSummaryVoAssembler.extractSummary(factory, summary);
    factory.save(doSummary);

    return EDischargeSTHKSummaryVoAssembler.create(doSummary);
}
项目:openMAXIMS    文件:Logic.java   
private void populateDD(DischargeDetailsVo voDD)
{
    form.getLocalContext().setCurrentDischargeDetails(voDD);

    if (voDD != null)
    {
        form.ctnCurrentDiagnoses().chkNoComor().setValue(voDD.getHasNoComorbidities());
        form.ctnCurrentDiagnoses().chkNoComp().setValue(voDD.getHasNoComplications());

        PatientNoDiagInfoForCCVo patientNoDiagInfo = domain.getPatientNoDiagInfoForCareContext(form.getGlobalContext().Core.getCurrentCareContext());

        if (patientNoDiagInfo != null)
        {
            form.ctnCurrentDiagnoses().chkNoDiagnosis().setValue(PatientDiagnosisStatus.NOKNOWNDIAGNOSISFOREPISODE.equals(patientNoDiagInfo.getDiagnosisStatus()));
        }
        else
            form.ctnCurrentDiagnoses().chkNoDiagnosis().setValue(voDD.getHasNoDiagnosis());
    }
}
项目:openMAXIMS    文件:EDischargeSummarySthkComponentImpl.java   
/**
* saveSummary
*/
public EDischargeSTHKSummaryVo saveSummaryAndDischargeDetails(EDischargeSTHKSummaryVo summary, DischargeDetailsVo dischargeDetails) throws StaleObjectException, DomainInterfaceException
{
    if (summary == null)
        throw new CodingRuntimeException("summary is null in method saveSummary");
    if (!summary.isValidated())
        throw new CodingRuntimeException("summary has not been validated in method saveSummary");

    if (dischargeDetails != null)
    {
        IEDischargeHelper impl = (IEDischargeHelper)getDomainImpl(EDischargeHelper.class);
        summary.setDischargeDetails(impl.saveDischargeDetails(dischargeDetails));
    }

    DomainFactory factory = getDomainFactory();
    Summary doSummary = EDischargeSTHKSummaryVoAssembler.extractSummary(factory, summary);
    factory.save(doSummary);

    return EDischargeSTHKSummaryVoAssembler.create(doSummary);
}
项目:openMAXIMS    文件:Logic.java   
private void checkIfCheckBoxShouldBeDisplayedAnyway(DischargeReadyToLeaveVo voReady) 
{
    GP voGP = domain.getPatientsGP(form.getGlobalContext().Core.getPatientShort());
    boolean hasEmail = false;
    if (voGP != null && voGP.getCommChannel(ChannelType.EMAIL) != null)
        hasEmail = true;

    DischargeDetailsVo volocalDD = domain.getDischargeDetails(form.getGlobalContext().Core.getCurrentCareContext());
    form.getLocalContext().setCurrentDischargeDetailsVo(volocalDD);

    if ( !hasEmail
        && volocalDD != null
        && volocalDD.getDischargeLetterStatusIsNotNull()
        && volocalDD.getDischargeLetterStatus().equals(DischargeLetterStatus.GENERATED)
        && (voReady.getHasPatientReceivedCopyOfDischarge() == null
                || (voReady.getHasPatientReceivedCopyOfDischargeIsNotNull() &&  ! voReady.getHasPatientReceivedCopyOfDischarge()) ) )
    {
        form.chkLetterGiven().setVisible(true);
        form.lblLetterGiven().setVisible(true);

        if (form.getMode().equals(FormMode.EDIT))
            form.chkLetterGiven().setEnabled(true);
    }

}
项目:openmaxims-linux    文件:EDischargeDiagnosisEtcComponentImpl.java   
public DischargeDetailsVo saveDischargeDetails(DischargeDetailsVo voDischargeDetails, SummaryRefVo summaryVo) throws DomainInterfaceException, StaleObjectException
{
    if(voDischargeDetails == null)
        throw new CodingRuntimeException("DischargeDetailsVo is null");

    if(!voDischargeDetails.isValidated())
        throw new CodingRuntimeException("DischargeDetailsVo Value Object has not been validated");

    DomainFactory factory = getDomainFactory();
    DischargeDetails doDD = DischargeDetailsVoAssembler.extractDischargeDetails(factory, voDischargeDetails);

    factory.save(doDD);

    if (summaryVo != null)
    {
        IEDischargeHelper impl = (IEDischargeHelper)getDomainImpl(EDischargeHelper.class);
        impl.updateSummaryIfRequired(voDischargeDetails, summaryVo, factory);
    }

    return DischargeDetailsVoAssembler.create(doDD);

}
项目:openmaxims-linux    文件:Logic.java   
private void checkIfCheckBoxShouldBeDisplayedAnyway(DischargeReadyToLeaveVo voReady) 
{
    GP voGP = domain.getPatientsGP(form.getGlobalContext().Core.getPatientShort());
    boolean hasEmail = false;
    if (voGP != null && voGP.getCommChannel(ChannelType.EMAIL) != null)
        hasEmail = true;

    DischargeDetailsVo volocalDD = domain.getDischargeDetails(form.getGlobalContext().Core.getCurrentCareContext());
    form.getLocalContext().setCurrentDischargeDetailsVo(volocalDD);

    if ( !hasEmail
        && volocalDD != null
        && volocalDD.getDischargeLetterStatusIsNotNull()
        && volocalDD.getDischargeLetterStatus().equals(DischargeLetterStatus.GENERATED)
        && (voReady.getHasPatientReceivedCopyOfDischarge() == null
                || (voReady.getHasPatientReceivedCopyOfDischargeIsNotNull() &&  ! voReady.getHasPatientReceivedCopyOfDischarge()) ) )
    {
        form.chkLetterGiven().setVisible(true);
        form.lblLetterGiven().setVisible(true);

        if (form.getMode().equals(FormMode.EDIT))
            form.chkLetterGiven().setEnabled(true);
    }

}
项目:AvoinApotti    文件:DischargeSummaryScheduleSTHKFormImpl.java   
public DischargeDetailsVo saveDischargeDetails(DischargeDetailsVo discharge) throws StaleObjectException
{
    if(discharge == null) {
        throw new CodingRuntimeException("DischargeDetailVo is null");
    }
    if (!discharge.isValidated()) {
        throw new DomainRuntimeException("DischargeDetailVo not validated");
    }

    DomainFactory factory = getDomainFactory();
    DischargeDetails doDischargeDetails = DischargeDetailsVoAssembler.extractDischargeDetails(factory, discharge);          
    factory.save(doDischargeDetails);           
    return DischargeDetailsVoAssembler.create(doDischargeDetails);
}
项目:AvoinApotti    文件:DischargeSummaryScheduleSTHKFormImpl.java   
public DischargeDetailsVo getDischargeDetailsForCareContext(CareContextRefVo careContext)   
{
    if(careContext == null ||
            careContext.getID_CareContext() == null)
        throw new CodingRuntimeException("CareContext is null or id not provided for getDischargeDetailsForCareContext");   

    DomainFactory factory = getDomainFactory();
    List dischargeDetails = factory.find("select dd from DischargeDetails as dd left join dd.careContext as cc where cc.id = :idCareContext", new String[]{"idCareContext"}, new Object[]{careContext.getID_CareContext()});
    DischargeDetailsVoCollection discharge = DischargeDetailsVoAssembler.createDischargeDetailsVoCollectionFromDischargeDetails(dischargeDetails);      

    return discharge != null && discharge.size() > 0 ? (discharge.get(0) != null ? discharge.get(0) : null) : null;
}
项目:AvoinApotti    文件:Logic.java   
private void populateScreenFromData(DischargeReadyToLeaveVo voReady)
{
    if (voReady == null)
        return;
    //--    
    form.txtNurseEnabledDischargeInstruction().setValue((voReady.getDischargeDetailsIsNotNull()&& voReady.getDischargeDetails().getNurseEnabledInstructionsIsNotNull())? voReady.getDischargeDetails().getNurseEnabledInstructions().getNurseEnabledInstructions() : null);
    //---
    form.txtNurseEnabledConfirmation().setValue(voReady.getNurseEnabledDischargeConfirmation());
    form.dtimDODisch().setValue(voReady.getCompletedOnIsNotNull() ? voReady.getCompletedOn() : null);
    form.ccAuthoring().setValue(voReady.getAuthoringInfoIsNotNull() ? voReady.getAuthoringInfo() : null);
    if (voReady.getHasPatientReceivedCopyOfDischargeIsNotNull())
    {
        form.chkLetterGiven().setValue(voReady.getHasPatientReceivedCopyOfDischarge());
        manageCheckBox(true, false);
    }

    //check if the gps have email and if letter status is IN_PROGRESS / GENERATED and HasPatientReceivedCopyOfDischarge == null
    checkIfCheckBoxShouldBeDisplayedAnyway(voReady);

    if (voReady.getDischargeDetailsIsNotNull())
    {
        DischargeDetailsVo voDisch = voReady.getDischargeDetails();

        form.ccDischCons().setValue(voDisch.getDischargingConsultantIsNotNull() ? voDisch.getDischargingConsultant() : null);
        form.cmbDischSpec().setValue(voDisch.getDischargingSpecialtyIsNotNull() ? voDisch.getDischargingSpecialty() : null);
        form.dtimDODisch().setValue(voDisch.getDateOfDischargeIsNotNull() ? voDisch.getDateOfDischarge() : null);
        form.cmbDischMethod().setValue(voDisch.getDischargeMethodIsNotNull() ? voDisch.getDischargeMethod() : null);
        form.cmbDischDest().setValue(voDisch.getDischargeDestinationIsNotNull() ? voDisch.getDischargeDestination() : null);
        form.cmbDischWard().setValue(voDisch.getDischargingWardIsNotNull() ? voDisch.getDischargingWard() : null);
        if (voDisch.getDischargingWardIsNotNull() && form.cmbDischWard().getValue() == null)
        {
            form.cmbDischWard().newRow(voDisch.getDischargingWard(), voDisch.getDischargingWard().getName());
            form.cmbDischWard().setValue(voDisch.getDischargingWard());
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateDD(DischargeDetailsVo voDD)
{
    form.getLocalContext().setCurrentDischargeDetails(voDD);

    if (voDD != null)
    {
        form.ctnCurrentDiagnoses().chkNoComor().setValue(voDD.getHasNoComorbidities());
        form.ctnCurrentDiagnoses().chkNoComp().setValue(voDD.getHasNoComplications());
        form.ctnCurrentDiagnoses().chkNoDiagnosis().setValue(voDD.getHasNoDiagnosis());
    }
}
项目:AvoinApotti    文件:Logic.java   
private void populateDD(DischargeDetailsVo voDD)
{
    form.getLocalContext().setCurrentDischargeDetails(voDD);

    if (voDD != null)
    {
        form.chkNoCoMorbidity().setValue(voDD.getHasNoComorbidities());
        form.chkNoComplications().setValue(voDD.getHasNoComplications());
        form.chkNoDiagnosis().setValue(voDD.getHasNoDiagnosis());
    }
}
项目:AvoinApotti    文件:Logic.java   
public void open()
{
    DischargeDetailsVo voDD = domain.getDischargeDetails(form.getGlobalContext().Core.getCurrentCareContext());
    populateDD(voDD);

    DischargeClinicalInformationSTHKVo voClinInfo = domain.getClinicalInfo(form.getGlobalContext().Core.getCurrentCareContext());

    form.getLocalContext().setSelectedRecord(voClinInfo);
    populatePatientAlerts(voClinInfo==null);
    populateScreenFromData(voClinInfo);

    setSchoolControls();
    manageReadOnly();
}
项目: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    文件:Logic.java   
private DischargeDetailsVo populateDataFromScreen(DischargeDetailsVo dischargeDetails)
{
    if (dischargeDetails==null){
        throw new CodingRuntimeException("DischargeDetails should not be null");
    }
    dischargeDetails.setHasNoComorbidities(form.chkNoComorbidities().getValue());
    dischargeDetails.setHasNoComplications(form.chkNoComplications().getValue());
    return dischargeDetails;

}
项目:AvoinApotti    文件:Logic.java   
private void populateScreenFromData(DischargeDetailsVo dischargeDetails)
{
    if (dischargeDetails == null) 
        return;

    form.chkNoComorbidities().setValue(dischargeDetails.getHasNoComorbidities());
    form.chkNoComplications().setValue(dischargeDetails.getHasNoComplications());
}
项目:AvoinApotti    文件:EDischargeDiagnosisEtcComponentImpl.java   
public DischargeDetailsVo save(DischargeDetailsVo dd, PatientDiagnosisEDischargeVoCollection diags, SummaryRefVo summary) throws StaleObjectException, UniqueKeyViolationException, DomainInterfaceException
{
    if (diags!=null)
    {
        for (int i = 0 ; i < diags.size() ; i++)
        {
            saveDiagnosisVo(diags.get(i),summary);
        }
    }
    return saveDischargeDetails(dd, summary);

}
项目:AvoinApotti    文件:EDischargePatientReadyToLeaveSTHKComponentImpl.java   
public DischargeDetailsVo saveDischargeDetails(DischargeDetailsVo dischargeDetail) throws StaleObjectException 
{
    EDischargeSTHK edischargeImpl = (EDischargeSTHK)getDomainImpl(EDischargeSTHKImpl.class);
    try {
        edischargeImpl.saveDischargeDetails(dischargeDetail);
    } catch (DomainInterfaceException e) {
            throw new CodingRuntimeException(e);
    }
    return null;
}
项目:AvoinApotti    文件:EDischargeDiagnosisComponentImpl.java   
public DischargeDetailsVo getDischargeDetails(CareContextRefVo careContextRefvo) 
{
    if(careContextRefvo == null)
        throw new CodingRuntimeException("careContextRefVo Filter not provided for list call. ");

    if(careContextRefvo != null)
    {
        DomainFactory factory = getDomainFactory();
        StringBuffer hql = new StringBuffer(" from DischargeDetails dd where "); 
        String andStr = " ";

        ArrayList<String> markers = new ArrayList<String>();
        ArrayList<Serializable> values = new ArrayList<Serializable>();

        hql.append(andStr + " dd.careContext.id = :careContextId");
            markers.add("careContextId");
        values.add(careContextRefvo.getID_CareContext());
        andStr = " and ";   

        List list = factory.find(hql.toString(), markers,values);
        if(list != null && list.size() > 0)
        { 
            DischargeDetailsVoCollection voColl = DischargeDetailsVoAssembler.createDischargeDetailsVoCollectionFromDischargeDetails(list);
            if(voColl != null && voColl.size() > 0)
                return voColl.get(0);
        }
    }
    return null;
}
项目:AvoinApotti    文件:EDischargeDiagnosisComponentImpl.java   
public DischargeDetailsVo saveDischargeDetails(DischargeDetailsVo voDischargeDetails) throws DomainInterfaceException, StaleObjectException 
{
    if(voDischargeDetails == null)
        throw new CodingRuntimeException("DischargeDetailsVo is null");

    if(!voDischargeDetails.isValidated())
        throw new CodingRuntimeException("DischargeDetailsVo Value Object has not been validated");

    DomainFactory factory = getDomainFactory();
    DischargeDetails doDD = DischargeDetailsVoAssembler.extractDischargeDetails(factory, voDischargeDetails);

    factory.save(doDD);
    return DischargeDetailsVoAssembler.create(doDD);
}
项目:AvoinApotti    文件:EDischargeImpl.java   
/**
* get Discharge Details
*/
public ims.clinical.vo.DischargeDetailsVo getDischargeDetails(ims.core.admin.vo.CareContextRefVo careContextRefvo)
{
    if(careContextRefvo == null)
        throw new CodingRuntimeException("careContextRefVo Filter not provided for list call. ");

    if(careContextRefvo != null)
    {
        DomainFactory factory = getDomainFactory();
        StringBuffer hql = new StringBuffer(" from DischargeDetails dd where "); 
        String andStr = " ";

        ArrayList<String> markers = new ArrayList<String>();
        ArrayList<Serializable> values = new ArrayList<Serializable>();

        hql.append(andStr + " dd.careContext.id = :careContextId");
            markers.add("careContextId");
        values.add(careContextRefvo.getID_CareContext());
        andStr = " and ";   

        List list = factory.find(hql.toString(), markers,values);
        if(list != null && list.size() > 0)
        { 
            DischargeDetailsVoCollection voColl = DischargeDetailsVoAssembler.createDischargeDetailsVoCollectionFromDischargeDetails(list);
            if(voColl != null && voColl.size() > 0)
                return voColl.get(0);
        }
    }
    return null;
}
项目:AvoinApotti    文件:EDischargeImpl.java   
public DischargeDetailsVo saveDischargeDetails(DischargeDetailsVo voDischargeDetails) throws DomainInterfaceException, StaleObjectException 
{
    if(voDischargeDetails == null)
        throw new CodingRuntimeException("DischargeDetailsVo is null");

    if(!voDischargeDetails.isValidated())
        throw new CodingRuntimeException("DischargeDetailsVo Value Object has not been validated");

    DomainFactory factory = getDomainFactory();
    DischargeDetails doDD = DischargeDetailsVoAssembler.extractDischargeDetails(factory, voDischargeDetails);

    factory.save(doDD);
    return DischargeDetailsVoAssembler.create(doDD);
}
项目:AvoinApotti    文件:EDischargeImpl.java   
public DischargeSupplementaryNotesVo saveSupplementaryAndDD(DischargeSupplementaryNotesVo voDischSupp, DischargeDetailsVo voDD) throws DomainInterfaceException, StaleObjectException 
{
    if(voDischSupp == null)
        throw new CodingRuntimeException("DischargeSupplementaryNotesVo is null");

    if(!voDischSupp.isValidated())
        throw new CodingRuntimeException("DischargeSupplementaryNotesVo Value Object has not been validated");

    DomainFactory factory = getDomainFactory();
    DischargeSupplementaryNotes doDSN = DischargeSupplementaryNotesVoAssembler.extractDischargeSupplementaryNotes(factory, voDischSupp);

    //WDEV-8813
    // Workaround for the case when 2 users save in the same time a new DischargeSupplementaryNotesVO
    //In this case the domain.save call doesn't throw a StaleObjectExeption, even if it is the case
    if (!voDischSupp.getID_DischargeSupplementaryNotesIsNotNull())
    {
        DischargeSupplementaryNotesVo voDischargeSupp = getSupplementary(voDischSupp.getCareContext());
        if (voDischargeSupp!=null)
        {
            throw new StaleObjectException(doDSN,"A DischargeSupplementaryNotesVo was already saved by another user");
        }
    }


    factory.save(doDSN);


    if (voDD != null)
    {
        DischargeDetails doDD = DischargeDetailsVoAssembler.extractDischargeDetails(factory, voDD);
        factory.save(doDD);
    }
    return DischargeSupplementaryNotesVoAssembler.create(doDSN);
}
项目:AvoinApotti    文件:EDischargePreViewComponentImpl.java   
public DischargeDetailsVo getDischargeDetailsForCareContext(CareContextRefVo careContext)   
{
    if(careContext == null ||
            careContext.getID_CareContext() == null)
        throw new CodingRuntimeException("CareContext is null or id not provided for getDischargeDetailsForCareContext");   

    DomainFactory factory = getDomainFactory();
    List dischargeDetails = factory.find("select dd from DischargeDetails as dd left join dd.careContext as cc where cc.id = :idCareContext", new String[]{"idCareContext"}, new Object[]{careContext.getID_CareContext()});
    DischargeDetailsVoCollection discharge = DischargeDetailsVoAssembler.createDischargeDetailsVoCollectionFromDischargeDetails(dischargeDetails);      

    return discharge != null && discharge.size() > 0 ? (discharge.get(0) != null ? discharge.get(0) : null) : null;
}
项目:AvoinApotti    文件:EDischargePreViewComponentImpl.java   
public DischargeDetailsVo saveDischargeDetails(
        DischargeDetailsVo dischargeDetail) throws StaleObjectException {
    EDischarge edischargeImpl = (EDischarge)getDomainImpl(EDischargeImpl.class);
    try {
        edischargeImpl.saveDischargeDetails(dischargeDetail);
    } catch (DomainInterfaceException e) {
            throw new CodingRuntimeException(e);
    }
    return null;
}
项目:openMAXIMS    文件:DischargeSummaryScheduleImpl.java   
public DischargeDetailsVo saveDischargeDetails(DischargeDetailsVo discharge) throws StaleObjectException
{
    if(discharge == null) {
        throw new CodingRuntimeException("DischargeDetailVo is null");
    }
    if (!discharge.isValidated()) {
        throw new DomainRuntimeException("DischargeDetailVo not validated");
    }

    DomainFactory factory = getDomainFactory();
    DischargeDetails doDischargeDetails = DischargeDetailsVoAssembler.extractDischargeDetails(factory, discharge);          
    factory.save(doDischargeDetails);           
    return DischargeDetailsVoAssembler.create(doDischargeDetails);
}
项目:openMAXIMS    文件:DischargeSummaryScheduleImpl.java   
public DischargeDetailsVo getDischargeDetailsForCareContext(CareContextRefVo careContext)   
{
    if(careContext == null ||
            careContext.getID_CareContext() == null)
        throw new CodingRuntimeException("CareContext is null or id not provided for getDischargeDetailsForCareContext");   

    DomainFactory factory = getDomainFactory();
    List dischargeDetails = factory.find("select dd from DischargeDetails as dd left join dd.careContext as cc where cc.id = :idCareContext", new String[]{"idCareContext"}, new Object[]{careContext.getID_CareContext()});
    DischargeDetailsVoCollection discharge = DischargeDetailsVoAssembler.createDischargeDetailsVoCollectionFromDischargeDetails(dischargeDetails);      

    return discharge != null && discharge.size() > 0 ? (discharge.get(0) != null ? discharge.get(0) : null) : null;
}
项目:openmaxims-linux    文件:EDischargePreViewComponentImpl.java   
public DischargeDetailsVo getDischargeDetailsForCareContext(CareContextRefVo careContext)   
{
    if(careContext == null ||
            careContext.getID_CareContext() == null)
        throw new CodingRuntimeException("CareContext is null or id not provided for getDischargeDetailsForCareContext");   

    DomainFactory factory = getDomainFactory();
    List dischargeDetails = factory.find("select dd from DischargeDetails as dd left join dd.careContext as cc where cc.id = :idCareContext", new String[]{"idCareContext"}, new Object[]{careContext.getID_CareContext()});
    DischargeDetailsVoCollection discharge = DischargeDetailsVoAssembler.createDischargeDetailsVoCollectionFromDischargeDetails(dischargeDetails);      

    return discharge != null && discharge.size() > 0 ? (discharge.get(0) != null ? discharge.get(0) : null) : null;
}
项目:openMAXIMS    文件:DischargeSummaryScheduleSTHKImpl.java   
public DischargeDetailsVo saveDischargeDetails(DischargeDetailsVo discharge) throws StaleObjectException
{
    if(discharge == null) {
        throw new CodingRuntimeException("DischargeDetailVo is null");
    }
    if (!discharge.isValidated()) {
        throw new DomainRuntimeException("DischargeDetailVo not validated");
    }

    DomainFactory factory = getDomainFactory();
    DischargeDetails doDischargeDetails = DischargeDetailsVoAssembler.extractDischargeDetails(factory, discharge);          
    factory.save(doDischargeDetails);           
    return DischargeDetailsVoAssembler.create(doDischargeDetails);
}
项目:openMAXIMS    文件:DischargeSummaryScheduleSTHKImpl.java   
public DischargeDetailsVo getDischargeDetailsForCareContext(CareContextRefVo careContext)   
{
    if(careContext == null ||
            careContext.getID_CareContext() == null)
        throw new CodingRuntimeException("CareContext is null or id not provided for getDischargeDetailsForCareContext");   

    DomainFactory factory = getDomainFactory();
    List dischargeDetails = factory.find("select dd from DischargeDetails as dd left join dd.careContext as cc where cc.id = :idCareContext", new String[]{"idCareContext"}, new Object[]{careContext.getID_CareContext()});
    DischargeDetailsVoCollection discharge = DischargeDetailsVoAssembler.createDischargeDetailsVoCollectionFromDischargeDetails(dischargeDetails);      

    return discharge != null && discharge.size() > 0 ? (discharge.get(0) != null ? discharge.get(0) : null) : null;
}
项目:openMAXIMS    文件:DischargeSummaryScheduleSTHKFormImpl.java   
public DischargeDetailsVo saveDischargeDetails(DischargeDetailsVo discharge) throws StaleObjectException
{
    if(discharge == null) {
        throw new CodingRuntimeException("DischargeDetailVo is null");
    }
    if (!discharge.isValidated()) {
        throw new DomainRuntimeException("DischargeDetailVo not validated");
    }

    DomainFactory factory = getDomainFactory();
    DischargeDetails doDischargeDetails = DischargeDetailsVoAssembler.extractDischargeDetails(factory, discharge);          
    factory.save(doDischargeDetails);           
    return DischargeDetailsVoAssembler.create(doDischargeDetails);
}
项目:openMAXIMS    文件:DischargeSummaryScheduleSTHKFormImpl.java   
public DischargeDetailsVo getDischargeDetailsForCareContext(CareContextRefVo careContext)   
{
    if(careContext == null ||
            careContext.getID_CareContext() == null)
        throw new CodingRuntimeException("CareContext is null or id not provided for getDischargeDetailsForCareContext");   

    DomainFactory factory = getDomainFactory();
    List dischargeDetails = factory.find("select dd from DischargeDetails as dd left join dd.careContext as cc where cc.id = :idCareContext", new String[]{"idCareContext"}, new Object[]{careContext.getID_CareContext()});
    DischargeDetailsVoCollection discharge = DischargeDetailsVoAssembler.createDischargeDetailsVoCollectionFromDischargeDetails(dischargeDetails);      

    return discharge != null && discharge.size() > 0 ? (discharge.get(0) != null ? discharge.get(0) : null) : null;
}
项目:openMAXIMS    文件:Logic.java   
private void populateScreenFromData(DischargeReadyToLeaveVo voReady)
{
    if (voReady == null)
        return;
    //--    
    form.txtNurseEnabledDischargeInstruction().setValue((voReady.getDischargeDetailsIsNotNull()&& voReady.getDischargeDetails().getNurseEnabledInstructionsIsNotNull())? voReady.getDischargeDetails().getNurseEnabledInstructions().getNurseEnabledInstructions() : null);
    //---
    form.txtNurseEnabledConfirmation().setValue(voReady.getNurseEnabledDischargeConfirmation());
    form.dtimDODisch().setValue(voReady.getCompletedOnIsNotNull() ? voReady.getCompletedOn() : null);
    form.ccAuthoring().setValue(voReady.getAuthoringInfoIsNotNull() ? voReady.getAuthoringInfo() : null);
    if (voReady.getHasPatientReceivedCopyOfDischargeIsNotNull())
    {
        form.chkLetterGiven().setValue(voReady.getHasPatientReceivedCopyOfDischarge());
        manageCheckBox(true, false);
    }

    //check if the gps have email and if letter status is IN_PROGRESS / GENERATED and HasPatientReceivedCopyOfDischarge == null
    checkIfCheckBoxShouldBeDisplayedAnyway(voReady);

    if (voReady.getDischargeDetailsIsNotNull())
    {
        DischargeDetailsVo voDisch = voReady.getDischargeDetails();

        form.ccDischCons().setValue(voDisch.getDischargingConsultantIsNotNull() ? voDisch.getDischargingConsultant() : null);
        form.cmbDischSpec().setValue(voDisch.getDischargingSpecialtyIsNotNull() ? voDisch.getDischargingSpecialty() : null);
        form.dtimDODisch().setValue(voDisch.getDateOfDischargeIsNotNull() ? voDisch.getDateOfDischarge() : null);
        form.cmbDischMethod().setValue(voDisch.getDischargeMethodIsNotNull() ? voDisch.getDischargeMethod() : null);
        form.cmbDischDest().setValue(voDisch.getDischargeDestinationIsNotNull() ? voDisch.getDischargeDestination() : null);
        form.cmbDischWard().setValue(voDisch.getDischargingWardIsNotNull() ? voDisch.getDischargingWard() : null);
        if (voDisch.getDischargingWardIsNotNull() && form.cmbDischWard().getValue() == null)
        {
            form.cmbDischWard().newRow(voDisch.getDischargingWard(), voDisch.getDischargingWard().getName());
            form.cmbDischWard().setValue(voDisch.getDischargingWard());
        }
    }

}
项目:openMAXIMS    文件:Logic.java   
private DischargeDetailsVo updateDischargeComorbidityComplicationRecorded(DischargeDetailsVo dd, boolean comorbidityAdded, boolean complicationAdded)
{
    if (dd == null)
        return null;
    if (comorbidityAdded)
        dd.setHasNoComorbidities(Boolean.FALSE);
    if (complicationAdded)
        dd.setHasNoComplications(Boolean.FALSE);

    return dd;
}
项目:openMAXIMS    文件:Logic.java   
private void populateDD(DischargeDetailsVo voDD)
{
    form.getLocalContext().setCurrentDischargeDetails(voDD);

    if (voDD != null)
    {
        form.chkNoCoMorbidity().setValue(voDD.getHasNoComorbidities());
        form.chkNoComplications().setValue(voDD.getHasNoComplications());
        form.chkNoDiagnosis().setValue(voDD.getHasNoDiagnosis());
    }
}
项目:openMAXIMS    文件:Logic.java   
public void open()
{
    DischargeDetailsVo voDD = domain.getDischargeDetails(form.getGlobalContext().Core.getCurrentCareContext());
    populateDD(voDD);

    DischargeClinicalInformationSTHKVo voClinInfo = domain.getClinicalInfo(form.getGlobalContext().Core.getCurrentCareContext());

    form.getLocalContext().setSelectedRecord(voClinInfo);
    populatePatientAlerts(voClinInfo==null);
    populateScreenFromData(voClinInfo);

    setSchoolControls();
    manageReadOnly();
}
项目:openMAXIMS    文件: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();
    }
}
项目:openMAXIMS    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    String rez1 = null;
    String rez2 = null;

    if(ob1 instanceof DischargeDetailsVo )
    {
        DischargeDetailsVo ps1 = (DischargeDetailsVo)ob1;
        rez1 = ps1.getDischargingWard() != null  ? ps1.getDischargingWard().getIGenericItemInfoName():null;
    }
    if(ob2 instanceof DischargeDetailsVo)
    {
        DischargeDetailsVo ps2 = (DischargeDetailsVo)ob2;
        rez2 = ps2.getDischargingWard() != null  ? ps2.getDischargingWard().getIGenericItemInfoName():null;
    }

    if(rez1 != null && rez2 != null)
        return  rez1.compareToIgnoreCase(rez2)*direction;

    if(rez1 != null && rez2 == null)
        return  direction;

    if(rez2 != null && rez1 == null)
        return (-1)*direction;

    return 0;
}
项目:openMAXIMS    文件:Logic.java   
public int compare(Object ob1, Object ob2) 
{
    DateTime rez1 = null;
    DateTime rez2 = null;

    if(ob1 instanceof DischargeDetailsVo )
    {
        DischargeDetailsVo ps1 = (DischargeDetailsVo)ob1;
        rez1 = ps1.getDateOfDischarge();
    }
    if(ob2 instanceof DischargeDetailsVo)
    {
        DischargeDetailsVo ps2 = (DischargeDetailsVo)ob2;
        rez2 = ps2.getDateOfDischarge();
    }

    if(rez1 != null && rez2 != null)
        return  rez1.compareTo(rez2)*direction;

    if(rez1 != null && rez2 == null)
        return  direction;

    if(rez2 != null && rez1 == null)
        return (-1)*direction;

    return 0;
}