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

项目:AvoinApotti    文件:DemographicsImpl.java   
public DeathDetailsVo saveDeathDetails(DeathDetailsVo deathDetails) throws StaleObjectException 
{
    // Ensure the value object has been validated
    if (!deathDetails.isValidated())
        throw new DomainRuntimeException("Death details has not been validated");

    DomainFactory factory = getDomainFactory();
    DeathDetails doDD = DeathDetailsVoAssembler.extractDeathDetails(factory, deathDetails);

    if (deathDetails.getIsRIE() != null)
        doDD.setIsRIE(deathDetails.getIsRIE());

    factory.save(doDD);

    return DeathDetailsVoAssembler.create(doDD);
}
项目:AvoinApotti    文件:DemographicsImpl.java   
public DeathDetailsVo getDeathDetails(PatientShort value)
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" from DeathDetails dd"); 

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

    hql.append(" where dd.patient.id = :pId");

    markers.add("pId");
    values.add(value.getID_Patient());

    hql.append(" and dd.isRIE is null");


    List listNotes = factory.find(hql.toString(), markers,values);
    if(listNotes != null && listNotes.size() > 0)
    { 
        DeathDetailsVoCollection voColl = DeathDetailsVoAssembler.createDeathDetailsVoCollectionFromDeathDetails(listNotes);
        if(voColl != null && voColl.size() > 0)
            return voColl.get(0);
    }
    return null;

}
项目:AvoinApotti    文件:Logic.java   
private void open() 
{
    PatientShort patVo = form.getGlobalContext().Core.getPatientShort();
    //form.dteDOD().setValue(patVo.getDodIsNotNull() ? patVo.getDod() : null);//    WDEV-14931
    DeathDetailsVo ddVo = form.getGlobalContext().Core.getDeathDetails();

    if (form.getGlobalContext().Core.getDeathDetails() == null)
        ddVo = domain.getDeathDetails(patVo);

    if (ddVo != null)
    {
        form.getLocalContext().setDeathDetails(ddVo);

        populateScreenFromData(ddVo);
    }
    else //WDEV-16548 patient DOD may have been updated through HL7 message, set this value in the date field 
        form.dteDOD().setValue(form.getGlobalContext().Core.getPatientShort().getDod());

    for (int i = 0; i < form.grdCauseofDeath().getRows().size(); i++)
        form.grdCauseofDeath().getRows().get(i).setTooltip(form.grdCauseofDeath().getRows().get(i).getColCause().getText());
}
项目:AvoinApotti    文件:Logic.java   
private DeathDetailsVo populateDataFromScreen(DeathDetailsVo ddVo) 
{
    if (ddVo == null)
        return null;

    ddVo.setDeathPlaceofDeath(form.cmbPlaceofDeath().getValue());
    ddVo.setDeathCauseEstablished(form.cmbHowCauseEstablished().getValue());
    ddVo.setCancerRelatedDeath(form.cmbCancerRelated().getValue());
    ddVo.setDeathCodeDiscrepency(form.cmbCodeDiscrepency().getValue());

    ddVo.setReferredToCorroner(form.Coroner().getValue() != CoronerEnumeration.None ? (form.Coroner().getValue().equals(CoronerEnumeration.rdoYes) ? Boolean.TRUE : Boolean.FALSE) : null);
    ddVo.setPostMortem(form.cmbPostMortem().getValue());

    DeathConditionsVoCollection collVo = new DeathConditionsVoCollection();
    for (int i = 0 ; i < form.grdCauseofDeath().getRows().size() ; i++)
    {
        if (form.grdCauseofDeath().getRows().get(i).getColCondition() != null
            && form.grdCauseofDeath().getRows().get(i).getColCondition() != "")
        {
            collVo.add(form.grdCauseofDeath().getRows().get(i).getValue());
        }
    }
    ddVo.setDeathConditions(collVo);

    return ddVo;
}
项目:openMAXIMS    文件:DemographicsImpl.java   
public DeathDetailsVo saveDeathDetails(DeathDetailsVo deathDetails) throws StaleObjectException 
{
    // Ensure the value object has been validated
    if (!deathDetails.isValidated())
        throw new DomainRuntimeException("Death details has not been validated");

    DomainFactory factory = getDomainFactory();
    DeathDetails doDD = DeathDetailsVoAssembler.extractDeathDetails(factory, deathDetails);

    if (deathDetails.getIsRIE() != null)
        doDD.setIsRIE(deathDetails.getIsRIE());

    factory.save(doDD);

    return DeathDetailsVoAssembler.create(doDD);
}
项目:openMAXIMS    文件:DemographicsImpl.java   
public Patient saveDemographics(Patient patient, DeathDetailsVo deathDetails) throws StaleObjectException, UniqueKeyViolationException, DomainInterfaceException, IndexOutOfBoundsException
{
    //WDEV-19715 start
    ims.core.patient.domain.objects.Patient domPatient = getDomPatient(patient);
    Boolean wasPatientDodSavedPreviously = domPatient != null && domPatient.getDod() != null;
    Boolean wasPatientDodSavedNow = false;

    saveDeathDetails(deathDetails);

    wasPatientDodSavedNow =  (deathDetails == null || (wasPatientDodSavedPreviously && patient.getDod() != null)) ? null :  domPatient != null && patient.getDod() != null && domPatient.getDod() == null;

    if(patient != null)
        return savePatient(patient, false, wasPatientDodSavedNow);

    //WDEV-19715 --- ends here
    return null;

}
项目:openMAXIMS    文件:DemographicsImpl.java   
public DeathDetailsVo getDeathDetails(PatientShort value)
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" from DeathDetails dd"); 

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

    hql.append(" where dd.patient.id = :pId");

    markers.add("pId");
    values.add(value.getID_Patient());

    hql.append(" and dd.isRIE is null");


    List listNotes = factory.find(hql.toString(), markers,values);
    if(listNotes != null && listNotes.size() > 0)
    { 
        DeathDetailsVoCollection voColl = DeathDetailsVoAssembler.createDeathDetailsVoCollectionFromDeathDetails(listNotes);
        if(voColl != null && voColl.size() > 0)
            return voColl.get(0);
    }
    return null;

}
项目:openMAXIMS    文件:PDSDemographicsImpl.java   
public DeathDetailsVo saveDeathDetails(DeathDetailsVo deathDetails) throws StaleObjectException 
{
    // Ensure the value object has been validated
    if (!deathDetails.isValidated())
        throw new DomainRuntimeException("Death details has not been validated");

    DomainFactory factory = getDomainFactory();
    DeathDetails doDD = DeathDetailsVoAssembler.extractDeathDetails(factory, deathDetails);

    if (deathDetails.getIsRIE() != null)
        doDD.setIsRIE(deathDetails.getIsRIE());

    factory.save(doDD);

    return DeathDetailsVoAssembler.create(doDD);
}
项目:openMAXIMS    文件:PDSDemographicsImpl.java   
public DeathDetailsVo getDeathDetails(PatientRefVo value)
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" from DeathDetails dd"); 

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

    hql.append(" where dd.patient.id = :pId");

    markers.add("pId");
    values.add(value.getID_Patient());

    hql.append(" and dd.isRIE is null");


    List listNotes = factory.find(hql.toString(), markers,values);
    if(listNotes != null && listNotes.size() > 0)
    { 
        DeathDetailsVoCollection voColl = DeathDetailsVoAssembler.createDeathDetailsVoCollectionFromDeathDetails(listNotes);
        if(voColl != null && voColl.size() > 0)
            return voColl.get(0);
    }
    return null;

}
项目:openMAXIMS    文件:Logic.java   
private DeathDetailsVo populateDataFromScreen(DeathDetailsVo ddVo) 
{
    if (ddVo == null)
        return null;

    ddVo.setDeathPlaceofDeath(form.cmbPlaceofDeath().getValue());
    ddVo.setDeathCauseEstablished(form.cmbHowCauseEstablished().getValue());
    ddVo.setCancerRelatedDeath(form.cmbCancerRelated().getValue());
    ddVo.setDeathCodeDiscrepency(form.cmbCodeDiscrepency().getValue());

    ddVo.setReferredToCorroner(form.Coroner().getValue() != CoronerEnumeration.None ? (form.Coroner().getValue().equals(CoronerEnumeration.rdoYes) ? Boolean.TRUE : Boolean.FALSE) : null);
    ddVo.setPostMortem(form.cmbPostMortem().getValue());

    DeathConditionsVoCollection collVo = new DeathConditionsVoCollection();
    for (int i = 0 ; i < form.grdCauseofDeath().getRows().size() ; i++)
    {
        if (form.grdCauseofDeath().getRows().get(i).getColCondition() != null
            && form.grdCauseofDeath().getRows().get(i).getColCondition() != "")
        {
            collVo.add(form.grdCauseofDeath().getRows().get(i).getValue());
        }
    }
    ddVo.setDeathConditions(collVo);

    if(isPds())
    {
        ddVo.setPDSDeathNotificationStatus(form.cmbDeathNotificationStatus().getValue());
        // WDEV-21930 - If the death notification is blank and this is PDS, we need to set it to informal
        if (!ddVo.getPDSDeathNotificationStatusIsNotNull())
            ddVo.setPDSDeathNotificationStatus(PDSDeathNotificationStatus.INFORMAL);
    }

    return ddVo;
}
项目:openMAXIMS    文件:DeathDetailsImpl.java   
/**
* getDeathDetails
*/
public ims.core.vo.DeathDetailsVo getDeathDetails(ims.core.patient.vo.PatientRefVo patientRefVo)
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" from DeathDetails dd where "); 

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

    hql.append(" dd.patient.id = :pId");
    markers.add("pId");
    values.add(patientRefVo.getID_Patient());

    hql.append(" and dd.isRIE is null");

    List listNotes = factory.find(hql.toString(), markers,values);
    if(listNotes != null && listNotes.size() > 0)
    { 
        DeathDetailsVoCollection voColl = DeathDetailsVoAssembler.createDeathDetailsVoCollectionFromDeathDetails(listNotes);
        if(voColl != null && voColl.size() > 0)
            return voColl.get(0);
    }
    return null;
}
项目:openMAXIMS    文件:DemographicsImpl.java   
public DeathDetailsVo saveDeathDetails(DeathDetailsVo deathDetails) throws StaleObjectException 
{
    // Ensure the value object has been validated
    if (!deathDetails.isValidated())
        throw new DomainRuntimeException("Death details has not been validated");

    DomainFactory factory = getDomainFactory();
    DeathDetails doDD = DeathDetailsVoAssembler.extractDeathDetails(factory, deathDetails);

    if (deathDetails.getIsRIE() != null)
        doDD.setIsRIE(deathDetails.getIsRIE());

    factory.save(doDD);

    return DeathDetailsVoAssembler.create(doDD);
}
项目:openMAXIMS    文件:DemographicsImpl.java   
public DeathDetailsVo getDeathDetails(PatientShort value)
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" from DeathDetails dd"); 

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

    hql.append(" where dd.patient.id = :pId");

    markers.add("pId");
    values.add(value.getID_Patient());

    hql.append(" and dd.isRIE is null");


    List listNotes = factory.find(hql.toString(), markers,values);
    if(listNotes != null && listNotes.size() > 0)
    { 
        DeathDetailsVoCollection voColl = DeathDetailsVoAssembler.createDeathDetailsVoCollectionFromDeathDetails(listNotes);
        if(voColl != null && voColl.size() > 0)
            return voColl.get(0);
    }
    return null;

}
项目:openMAXIMS    文件:Logic.java   
private void open() 
{
    PatientShort patVo = form.getGlobalContext().Core.getPatientShort();
    //form.dteDOD().setValue(patVo.getDodIsNotNull() ? patVo.getDod() : null);//    WDEV-14931
    DeathDetailsVo ddVo = form.getGlobalContext().Core.getDeathDetails();

    if (form.getGlobalContext().Core.getDeathDetails() == null)
        ddVo = domain.getDeathDetails(patVo);

    if (ddVo != null)
    {
        form.getLocalContext().setDeathDetails(ddVo);

        populateScreenFromData(ddVo);
    }
    else //WDEV-16548 patient DOD may have been updated through HL7 message, set this value in the date field 
        form.dteDOD().setValue(form.getGlobalContext().Core.getPatientShort().getDod());

    for (int i = 0; i < form.grdCauseofDeath().getRows().size(); i++)
        form.grdCauseofDeath().getRows().get(i).setTooltip(form.grdCauseofDeath().getRows().get(i).getColCause().getText());
}
项目:openMAXIMS    文件:Logic.java   
private DeathDetailsVo populateDataFromScreen(DeathDetailsVo ddVo) 
{
    if (ddVo == null)
        return null;

    ddVo.setDeathPlaceofDeath(form.cmbPlaceofDeath().getValue());
    ddVo.setDeathCauseEstablished(form.cmbHowCauseEstablished().getValue());
    ddVo.setCancerRelatedDeath(form.cmbCancerRelated().getValue());
    ddVo.setDeathCodeDiscrepency(form.cmbCodeDiscrepency().getValue());

    ddVo.setReferredToCorroner(form.Coroner().getValue() != CoronerEnumeration.None ? (form.Coroner().getValue().equals(CoronerEnumeration.rdoYes) ? Boolean.TRUE : Boolean.FALSE) : null);
    ddVo.setPostMortem(form.cmbPostMortem().getValue());

    DeathConditionsVoCollection collVo = new DeathConditionsVoCollection();
    for (int i = 0 ; i < form.grdCauseofDeath().getRows().size() ; i++)
    {
        if (form.grdCauseofDeath().getRows().get(i).getColCondition() != null
            && form.grdCauseofDeath().getRows().get(i).getColCondition() != "")
        {
            collVo.add(form.grdCauseofDeath().getRows().get(i).getValue());
        }
    }
    ddVo.setDeathConditions(collVo);

    return ddVo;
}
项目:openmaxims-linux    文件:DemographicsImpl.java   
public DeathDetailsVo saveDeathDetails(DeathDetailsVo deathDetails) throws StaleObjectException 
{
    // Ensure the value object has been validated
    if (!deathDetails.isValidated())
        throw new DomainRuntimeException("Death details has not been validated");

    DomainFactory factory = getDomainFactory();
    DeathDetails doDD = DeathDetailsVoAssembler.extractDeathDetails(factory, deathDetails);

    if (deathDetails.getIsRIE() != null)
        doDD.setIsRIE(deathDetails.getIsRIE());

    factory.save(doDD);

    return DeathDetailsVoAssembler.create(doDD);
}
项目:openmaxims-linux    文件:DemographicsImpl.java   
public DeathDetailsVo getDeathDetails(PatientShort value)
{
    DomainFactory factory = getDomainFactory();
    StringBuffer hql = new StringBuffer(" from DeathDetails dd"); 

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

    hql.append(" where dd.patient.id = :pId");

    markers.add("pId");
    values.add(value.getID_Patient());

    hql.append(" and dd.isRIE is null");


    List listNotes = factory.find(hql.toString(), markers,values);
    if(listNotes != null && listNotes.size() > 0)
    { 
        DeathDetailsVoCollection voColl = DeathDetailsVoAssembler.createDeathDetailsVoCollectionFromDeathDetails(listNotes);
        if(voColl != null && voColl.size() > 0)
            return voColl.get(0);
    }
    return null;

}
项目:openmaxims-linux    文件:Logic.java   
private void open() 
{
    PatientShort patVo = form.getGlobalContext().Core.getPatientShort();
    //form.dteDOD().setValue(patVo.getDodIsNotNull() ? patVo.getDod() : null);//    WDEV-14931
    DeathDetailsVo ddVo = form.getGlobalContext().Core.getDeathDetails();

    if (form.getGlobalContext().Core.getDeathDetails() == null)
        ddVo = domain.getDeathDetails(patVo);

    if (ddVo != null)
    {
        form.getLocalContext().setDeathDetails(ddVo);

        populateScreenFromData(ddVo);
    }
    else //WDEV-16548 patient DOD may have been updated through HL7 message, set this value in the date field 
        form.dteDOD().setValue(form.getGlobalContext().Core.getPatientShort().getDod());

    for (int i = 0; i < form.grdCauseofDeath().getRows().size(); i++)
        form.grdCauseofDeath().getRows().get(i).setTooltip(form.grdCauseofDeath().getRows().get(i).getColCause().getText());
}
项目:openmaxims-linux    文件:Logic.java   
private DeathDetailsVo populateDataFromScreen(DeathDetailsVo ddVo) 
{
    if (ddVo == null)
        return null;

    ddVo.setDeathPlaceofDeath(form.cmbPlaceofDeath().getValue());
    ddVo.setDeathCauseEstablished(form.cmbHowCauseEstablished().getValue());
    ddVo.setCancerRelatedDeath(form.cmbCancerRelated().getValue());
    ddVo.setDeathCodeDiscrepency(form.cmbCodeDiscrepency().getValue());

    ddVo.setReferredToCorroner(form.Coroner().getValue() != CoronerEnumeration.None ? (form.Coroner().getValue().equals(CoronerEnumeration.rdoYes) ? Boolean.TRUE : Boolean.FALSE) : null);
    ddVo.setPostMortem(form.cmbPostMortem().getValue());

    DeathConditionsVoCollection collVo = new DeathConditionsVoCollection();
    for (int i = 0 ; i < form.grdCauseofDeath().getRows().size() ; i++)
    {
        if (form.grdCauseofDeath().getRows().get(i).getColCondition() != null
            && form.grdCauseofDeath().getRows().get(i).getColCondition() != "")
        {
            collVo.add(form.grdCauseofDeath().getRows().get(i).getValue());
        }
    }
    ddVo.setDeathConditions(collVo);

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

    form.dteDOD().setValue(ddVo.getPatient() != null ? ddVo.getPatient().getDod() : null);//    WDEV-14931
    form.cmbPlaceofDeath().setValue(ddVo.getDeathPlaceofDeath());
    form.cmbHowCauseEstablished().setValue(ddVo.getDeathCauseEstablished());
    form.cmbCancerRelated().setValue(ddVo.getCancerRelatedDeath());
    form.cmbCodeDiscrepency().setValue(ddVo.getDeathCodeDiscrepency());
    form.Coroner().setValue(ddVo.getReferredToCorronerIsNotNull() ? (ddVo.getReferredToCorroner().booleanValue() ? CoronerEnumeration.rdoYes : CoronerEnumeration.rdoNo) : CoronerEnumeration.None);
    form.cmbPostMortem().setValue(ddVo.getPostMortem());

    if (ddVo.getDeathConditionsIsNotNull())
    {
        for (int j = 0 ; j < ddVo.getDeathConditions().size() ; j++)
        {
            for (int i = 0 ; i < form.grdCauseofDeath().getRows().size() ; i++)
            {
                if (form.grdCauseofDeath().getRows().get(i).getColCause().equals(ddVo.getDeathConditions().get(j).getCauseofDeath()))
                {
                    if (ddVo.getDeathConditions().get(j).getPatientDiagnosisIsNotNull())
                        form.grdCauseofDeath().getRows().get(i).setColCondition(ddVo.getDeathConditions().get(j).getPatientDiagnosis().getDiagnosisDescription());
                    else
                        form.grdCauseofDeath().getRows().get(i).setColCondition(ddVo.getDeathConditions().get(j).getDiagnosis().getDiagnosisName());
                    form.grdCauseofDeath().getRows().get(i).setValue(ddVo.getDeathConditions().get(j));
                }
            }
        }
    }
}
项目:openMAXIMS    文件:DemographicsImpl.java   
public void updatePatientDeceasedData(Patient patient, DeathDetailsVo deathDetails, Boolean cancelFutureAppointments, Boolean wasPatientAlreadySavedAsDeceased) throws DomainInterfaceException, StaleObjectException
{       
    if (deathDetails != null && !Boolean.TRUE.equals(wasPatientAlreadySavedAsDeceased))
    {   
        saveDeathDetails(deathDetails);         
    }       

    ims.core.patient.domain.objects.Patient patientDO = (ims.core.patient.domain.objects.Patient) getDomainFactory().getDomainObject(ims.core.patient.domain.objects.Patient.class, patient.getID_Patient());

    if (patientDO != null && !Boolean.TRUE.equals(patientDO.isIsNewPatient()))
    {
        if ((Boolean.TRUE.equals(patient.getCancelSD_APPTS()) || Boolean.TRUE.equals(cancelFutureAppointments)) && (!wasPatientAlreadySavedAsDeceased || (wasPatientAlreadySavedAsDeceased && patient.getVersion_Patient() == patientDO.getVersion())))
        {
            if (Boolean.TRUE.equals(ConfigFlag.DOM.HEARTS_REPLICATE_PATIENTS.getValue()) && ConfigFlag.UI.BED_INFO_UI_TYPE.equals("CCO")) 
                cancelSD_APPTS(patient);
            else
                cancelFutureAppointments(patient);
        }       
        //WDEV-18326
        if (ConfigFlag.DOM.RTT_STATUS_POINT_FUNCTIONALITY.getValue())
        {
            if (patient.getDod() != null && (!wasPatientAlreadySavedAsDeceased || (wasPatientAlreadySavedAsDeceased && patient.getVersion_Patient() == patientDO.getVersion())))
            {
                // WDEV-23646 - Ensure the correct event Date Time is used when creating a new RTT Status
                // When a Patient is marked as deceased, referrals that do get terminated by this operation must have the RTT Status set Date of Death
                java.util.Date eventDeathDetails = new DateTime(patient.getDod()).getJavaDate();
                saveRTTStatusForPatientRIP(patient, eventDeathDetails);
            }
            else  if (!wasPatientAlreadySavedAsDeceased && patient.getDod() == null)
                revertRTTStatus(patient);
        }           
        //WDEV-18259
        if (patient.getDod() != null && (!wasPatientAlreadySavedAsDeceased || (wasPatientAlreadySavedAsDeceased && patient.getVersion_Patient() == patientDO.getVersion())))
            updatePatientElectiveListsForDOD(patient);

        //WDEV-20371
        cancelPendingEmergencyTheatreRecords(patient);

    }   
}
项目:openMAXIMS    文件:BedInfoDialogImpl.java   
public ims.core.vo.DischargedEpisodeADTVo saveDischarge(DischargedEpisodeADTVo dischargedEpisode, BedSpaceStateLiteVo voBedSpacState, DeathDetailsVo deathDetailsVo, Boolean cancelApptsForDeceasedPatient, Boolean checkPatientsGender) throws StaleObjectException, DomainInterfaceException, ForeignKeyViolationException
{   
    if(dischargedEpisode.getPasEventIsNotNull() && dischargedEpisode.getPasEvent().getPatientIsNotNull())
        return dischargePatient(dischargedEpisode.getPasEvent().getPatient(), dischargedEpisode, voBedSpacState, false, null, deathDetailsVo, cancelApptsForDeceasedPatient, checkPatientsGender);

    return null;
}
项目:openMAXIMS    文件:BedInfoDialogImpl.java   
public DeathDetailsVo getDeathDetails(PatientRefVo voPat)
{
    if (voPat == null)
        return null;
    PDSDemographics demographicsImpl = (PDSDemographics) getDomainImpl(PDSDemographicsImpl.class);
    return demographicsImpl.getDeathDetails(voPat);
}
项目:openMAXIMS    文件:Logic.java   
private DeathDetailsVo updateDeathDetails(Patient_DODVo patient)
{
    if (patient.getDod() == null)
        return null;

    DeathDetailsVo deathDetails = form.getGlobalContext().Core.getDeathDetails();
    if (deathDetails != null)
        deathDetails.setIsRIE(true);

    return deathDetails;
}
项目:openMAXIMS    文件:DischargeDetails_OutcomeImpl.java   
public DeathDetailsVo getDeathDetails(Patient_DODVo patientVo)
{
    if (patientVo == null)
        throw new CodingRuntimeException("Cannot retrieve Death Details for null PatientShort argument");

    DeathDetails deathRecordsImpl = (DeathDetails) getDomainImpl(DeathDetailsImpl.class);

    return deathRecordsImpl.getDeathDetails(patientVo);
}
项目:openMAXIMS    文件:Logic.java   
private void open() 
{
    PatientShort patVo = form.getGlobalContext().Core.getPatientShort();
    //form.dteDOD().setValue(patVo.getDodIsNotNull() ? patVo.getDod() : null);//    WDEV-14931
    DeathDetailsVo ddVo = form.getGlobalContext().Core.getDeathDetails();

    if (form.getGlobalContext().Core.getDeathDetails() == null)
        ddVo = domain.getDeathDetails(patVo);

    if (ddVo != null)
    {
        form.getLocalContext().setDeathDetails(ddVo);

        populateScreenFromData(ddVo);
    }
    else 
    {   //WDEV-16548 patient DOD may have been updated through HL7 message, set this value in the date field 
        form.dteDOD().setValue(form.getGlobalContext().Core.getPatientShort().getDod());
        form.timTOD().setValue(form.getGlobalContext().Core.getPatientShort().getTimeOfDeath()); //WDEV-19682

        // WDEV-21930 - If PDS, default Informal
        if (isPds())
        {
            form.cmbDeathNotificationStatus().setValue(PDSDeathNotificationStatus.INFORMAL);
        }
    }   

    //for (int i = 0; i < form.grdCauseofDeath().getRows().size(); i++)
        //form.grdCauseofDeath().getRows().get(i).setTooltip(form.grdCauseofDeath().getRows().get(i).getColCause().getText());
}
项目:openMAXIMS    文件:Logic.java   
private void populateScreenFromData(DeathDetailsVo ddVo) 
{
    if (ddVo == null)
        return;

    form.dteDOD().setValue(ddVo.getPatient() != null ? ddVo.getPatient().getDod() : null);//    WDEV-14931
    form.cmbPlaceofDeath().setValue(ddVo.getDeathPlaceofDeath());
    form.cmbHowCauseEstablished().setValue(ddVo.getDeathCauseEstablished());
    form.cmbCancerRelated().setValue(ddVo.getCancerRelatedDeath());
    form.cmbCodeDiscrepency().setValue(ddVo.getDeathCodeDiscrepency());
    form.Coroner().setValue(ddVo.getReferredToCorronerIsNotNull() ? (ddVo.getReferredToCorroner().booleanValue() ? CoronerEnumeration.rdoYes : CoronerEnumeration.rdoNo) : CoronerEnumeration.None);
    form.cmbPostMortem().setValue(ddVo.getPostMortem());

    if (ddVo.getDeathConditionsIsNotNull())
    {
        for (int j = 0 ; j < ddVo.getDeathConditions().size() ; j++)
        {
            for (int i = 0 ; i < form.grdCauseofDeath().getRows().size() ; i++)
            {
                if (form.grdCauseofDeath().getRows().get(i).getColCause().equals(ddVo.getDeathConditions().get(j).getCauseofDeath()))
                {
                    if (ddVo.getDeathConditions().get(j).getPatientDiagnosisIsNotNull())
                        form.grdCauseofDeath().getRows().get(i).setColCondition(ddVo.getDeathConditions().get(j).getPatientDiagnosis().getDiagnosisDescription());
                    else
                        form.grdCauseofDeath().getRows().get(i).setColCondition(ddVo.getDeathConditions().get(j).getDiagnosis().getDiagnosisName());
                    form.grdCauseofDeath().getRows().get(i).setValue(ddVo.getDeathConditions().get(j));
                }
            }
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void populateScreenFromData(DeathDetailsVo ddVo) 
{
    if (ddVo == null)
        return;

    form.dteDOD().setValue(ddVo.getPatient() != null ? ddVo.getPatient().getDod() : null);//    WDEV-14931
    form.cmbPlaceofDeath().setValue(ddVo.getDeathPlaceofDeath());
    form.cmbHowCauseEstablished().setValue(ddVo.getDeathCauseEstablished());
    form.cmbCancerRelated().setValue(ddVo.getCancerRelatedDeath());
    form.cmbCodeDiscrepency().setValue(ddVo.getDeathCodeDiscrepency());
    form.Coroner().setValue(ddVo.getReferredToCorronerIsNotNull() ? (ddVo.getReferredToCorroner().booleanValue() ? CoronerEnumeration.rdoYes : CoronerEnumeration.rdoNo) : CoronerEnumeration.None);
    form.cmbPostMortem().setValue(ddVo.getPostMortem());

    if (ddVo.getDeathConditionsIsNotNull())
    {
        for (int j = 0 ; j < ddVo.getDeathConditions().size() ; j++)
        {
            for (int i = 0 ; i < form.grdCauseofDeath().getRows().size() ; i++)
            {
                if (form.grdCauseofDeath().getRows().get(i).getColCause().equals(ddVo.getDeathConditions().get(j).getCauseofDeath()))
                {
                    if (ddVo.getDeathConditions().get(j).getPatientDiagnosisIsNotNull())
                        form.grdCauseofDeath().getRows().get(i).setColCondition(ddVo.getDeathConditions().get(j).getPatientDiagnosis().getDiagnosisDescription());
                    else
                        form.grdCauseofDeath().getRows().get(i).setColCondition(ddVo.getDeathConditions().get(j).getDiagnosis().getDiagnosisName());
                    form.grdCauseofDeath().getRows().get(i).setValue(ddVo.getDeathConditions().get(j));
                }
            }
        }
    }
}
项目:AvoinApotti    文件:DemographicsComponentImpl.java   
public DeathDetailsVo saveDeathDetails(DeathDetailsVo deathDetails) throws StaleObjectException 
{
    ims.core.domain.Demographics impl = (ims.core.domain.Demographics) getDomainImpl(DemographicsImpl.class);

    return impl.saveDeathDetails(deathDetails);
}
项目:AvoinApotti    文件:DemographicsComponentImpl.java   
public DeathDetailsVo getDeathDetails(PatientShort value)
{
    ims.core.domain.Demographics impl = (ims.core.domain.Demographics) getDomainImpl(DemographicsImpl.class);

    return impl.getDeathDetails(value);
}
项目:AvoinApotti    文件:DemographicsComponentImpl.java   
public Patient saveDemographics(Patient patient, DeathDetailsVo deathDetails) throws DomainInterfaceException, StaleObjectException, UniqueKeyViolationException 
{
    ims.core.domain.Demographics impl = (ims.core.domain.Demographics) getDomainImpl(DemographicsImpl.class);

    return impl.saveDemographics(patient, deathDetails);
}
项目:openMAXIMS    文件:PDSDemographicsImpl.java   
public Patient saveDemographics(Patient patient, DeathDetailsVo deathDetails, Boolean decouplePatientRecord, Boolean saveToPDS) throws StaleObjectException, UniqueKeyViolationException, DomainInterfaceException, IndexOutOfBoundsException   
{
    //WDEV-19715 start
    ims.core.patient.domain.objects.Patient domPatient = getDomPatient(patient);
    boolean wasPatientDodSavedPreviously = domPatient != null && domPatient.getDod() != null;
    boolean wasPatientDodSavedNow = false;

    saveDeathDetails(deathDetails);

    wasPatientDodSavedNow =  (deathDetails == null || (wasPatientDodSavedPreviously && patient.getDod() != null)) ? false :  domPatient != null && patient.getDod() != null && domPatient.getDod() == null;

    if(patient != null)
    {
        PdsQuery q = new PdsQuery(this);
        q.setNhsNumber(patient.getNhsn() != null ? patient.getNhsn().getValue() : "");
        q.setPatientInContext(patient);

        try
        {
            DomainFactory factory = getDomainFactory();

            PDSBackOfficeItemVo backOfficeItem = q.buildBackOfficeItemAndNotification(PDSBackOfficeType.DEATH, "Decease patient", PDSBackOfficeWorkPriority.P1);
            PDSBackOfficeItem domBackOfficeItem = PDSBackOfficeItemVoAssembler.extractPDSBackOfficeItem(factory, backOfficeItem);

            factory.save(domBackOfficeItem);
        }
        catch (PdsException e)
        {
            e.printStackTrace();

            throw new DomainInterfaceException(e);
        }


        return savePatient(patient, false, wasPatientDodSavedNow && saveToPDS);
    }

    //WDEV-19715 --- ends here
    return null;

}
项目:openMAXIMS    文件:PDSDemographicsImpl.java   
public void updatePatientDeceasedData(Patient patient, DeathDetailsVo deathDetails, Boolean cancelFutureAppointments, Boolean wasPatientAlreadySavedAsDeceased) throws DomainInterfaceException, StaleObjectException
{       
    if (deathDetails != null && !Boolean.TRUE.equals(wasPatientAlreadySavedAsDeceased))
    {   
        saveDeathDetails(deathDetails);         
    }       

    ims.core.patient.domain.objects.Patient patientDO = (ims.core.patient.domain.objects.Patient) getDomainFactory().getDomainObject(ims.core.patient.domain.objects.Patient.class, patient.getID_Patient());

    if (patientDO != null && !Boolean.TRUE.equals(patientDO.isIsNewPatient()))
    {
        if ((Boolean.TRUE.equals(patient.getCancelSD_APPTS()) || Boolean.TRUE.equals(cancelFutureAppointments)) && (!wasPatientAlreadySavedAsDeceased || (wasPatientAlreadySavedAsDeceased && patient.getVersion_Patient() == patientDO.getVersion())))
        {
            if (Boolean.TRUE.equals(ConfigFlag.DOM.HEARTS_REPLICATE_PATIENTS.getValue()) && ConfigFlag.UI.BED_INFO_UI_TYPE.equals("CCO")) 
                cancelSD_APPTS(patient);
            else //WDEV-23059
            {   
                cancelFutureAppointments(patient);
                removeFutureAppointmentDetailRecord(patient);
            }   
        }       
        //WDEV-18326
        if (ConfigFlag.DOM.RTT_STATUS_POINT_FUNCTIONALITY.getValue()) //WDEV-22448
        {
            if (patient.getDod() != null && (!wasPatientAlreadySavedAsDeceased || (patient.getVersion_Patient() == patientDO.getVersion())))
            {
                // WDEV-23646 - Ensure the correct event Date Time is used when creating a new RTT Status
                // When a Patient is marked as deceased, referrals that do get terminated by this operation must have the RTT Status set Date of Death
                java.util.Date eventDateTime = new DateTime(patient.getDod()).getJavaDate();
                saveRTTStatusForPatientRIP(patient, eventDateTime);
            }
            else  if (!wasPatientAlreadySavedAsDeceased && patient.getDod() == null)
                revertRTTStatus(patient);
        }           
        //WDEV-18259 //WDEV-22448
        if (patient.getDod() != null && (!wasPatientAlreadySavedAsDeceased || (patient.getVersion_Patient() == patientDO.getVersion())))
        {   
            updatePatientElectiveListsForDOD(patient);
        }   
    }   
}
项目:openMAXIMS    文件:DemographicsComponentImpl.java   
public DeathDetailsVo saveDeathDetails(DeathDetailsVo deathDetails) throws StaleObjectException 
{
    ims.core.domain.Demographics impl = (ims.core.domain.Demographics) getDomainImpl(DemographicsImpl.class);

    return impl.saveDeathDetails(deathDetails);
}
项目:openMAXIMS    文件:DemographicsComponentImpl.java   
public DeathDetailsVo getDeathDetails(PatientShort value)
{
    ims.core.domain.Demographics impl = (ims.core.domain.Demographics) getDomainImpl(DemographicsImpl.class);

    return impl.getDeathDetails(value);
}
项目:openMAXIMS    文件:DemographicsComponentImpl.java   
public Patient saveDemographics(Patient patient, DeathDetailsVo deathDetails) throws DomainInterfaceException, StaleObjectException, UniqueKeyViolationException 
{
    ims.core.domain.Demographics impl = (ims.core.domain.Demographics) getDomainImpl(DemographicsImpl.class);

    return impl.saveDemographics(patient, deathDetails);
}
项目:openMAXIMS    文件:Logic.java   
private void populateScreenFromData(DeathDetailsVo ddVo) 
{
    if (ddVo == null)
        return;

    form.dteDOD().setValue(ddVo.getPatient() != null ? ddVo.getPatient().getDod() : null);//    WDEV-14931
    //WDEV-19682
    form.timTOD().setValue(ddVo.getPatient() != null ? ddVo.getPatient().getTimeOfDeath() : null);
    if (FormMode.VIEW.equals(form.getMode()))
        form.timTOD().setTooltip(ddVo.getPatient() != null ? (ddVo.getPatient().getDod() != null && ddVo.getPatient().getTimeOfDeath() ==  null ? "Time of Death Not Recorded/Unknown" : null) : null);
    //WDEV-19682 ends here      
    form.cmbPlaceofDeath().setValue(ddVo.getDeathPlaceofDeath());
    form.cmbHowCauseEstablished().setValue(ddVo.getDeathCauseEstablished());
    form.cmbCancerRelated().setValue(ddVo.getCancerRelatedDeath());
    form.cmbCodeDiscrepency().setValue(ddVo.getDeathCodeDiscrepency());
    form.Coroner().setValue(ddVo.getReferredToCorronerIsNotNull() ? (ddVo.getReferredToCorroner().booleanValue() ? CoronerEnumeration.rdoYes : CoronerEnumeration.rdoNo) : CoronerEnumeration.None);
    form.cmbPostMortem().setValue(ddVo.getPostMortem());

    if (ddVo.getDeathConditionsIsNotNull())
    {
        for (int j = 0 ; j < ddVo.getDeathConditions().size() ; j++)
        {
            for (int i = 0 ; i < form.grdCauseofDeath().getRows().size() ; i++)
            {
                if (form.grdCauseofDeath().getRows().get(i).getColCause().equals(ddVo.getDeathConditions().get(j).getCauseofDeath()))
                {
                    if (ddVo.getDeathConditions().get(j).getPatientDiagnosisIsNotNull())
                    {   
                        form.grdCauseofDeath().getRows().get(i).setColCondition(ddVo.getDeathConditions().get(j).getPatientDiagnosis().getDiagnosisDescription());
                        form.grdCauseofDeath().getRows().get(i).setCellColConditionTooltip(ddVo.getDeathConditions().get(j).getPatientDiagnosis().getDiagnosisDescription());
                    }   
                    else
                    {   
                        form.grdCauseofDeath().getRows().get(i).setColCondition(ddVo.getDeathConditions().get(j).getDiagnosis().getDiagnosisName());
                        form.grdCauseofDeath().getRows().get(i).setCellColConditionTooltip(ddVo.getDeathConditions().get(j).getDiagnosis().getDiagnosisName());
                    }   
                    form.grdCauseofDeath().getRows().get(i).setValue(ddVo.getDeathConditions().get(j));
                }
            }
        }
    }

    //WDEV-19443
    if(isPds())
    {
        form.cmbDeathNotificationStatus().setValue(ddVo.getPDSDeathNotificationStatus());

        if(ddVo.getPDSDeathNotificationStatus() == null)
            form.cmbDeathNotificationStatus().setValue(PDSDeathNotificationStatus.INFORMAL);
    }
}
项目:openMAXIMS    文件:DeathDetailsImpl.java   
/**
* saveDeathDetails
*/
public ims.core.vo.DeathDetailsVo saveDeathDetails(ims.core.vo.DeathDetailsVo deathDetails) throws ims.domain.exceptions.StaleObjectException
{
    return null;
}
项目:openMAXIMS    文件:DeathDetailsImpl.java   
@Override
public Patient unDeceasePatient(Patient patient, DeathDetailsVo deathDetails) throws DomainInterfaceException, StaleObjectException
{
    DomainFactory factory = getDomainFactory();

    ims.core.patient.domain.objects.Patient domPatient = PatientAssembler.extractPatient(factory, patient);
    factory.save(domPatient);

    if(deathDetails != null)
    {
        deathDetails.setCancerRelatedDeath(null);
        deathDetails.setDeathCauseEstablished(null);
        deathDetails.setDeathCodeDiscrepency(null);
        deathDetails.setDeathConditions(null);
        deathDetails.setDeathPlaceofDeath(null);
        deathDetails.setPostMortem(null);
        deathDetails.setReferredToCorroner(null);

        DeathDetails domDeathDetails = DeathDetailsVoAssembler.extractDeathDetails(factory, deathDetails);
        factory.save(domDeathDetails);
    }

    Patient patientInContext = PatientAssembler.create(domPatient); 

    PdsQuery q = new PdsQuery(this);
    q.setNhsNumber(patientInContext.getNhsn() != null ? patientInContext.getNhsn().getValue() : "");
    q.setPatientInContext(patientInContext);

    try
    {
        PDSBackOfficeItemVo backOfficeItem = q.buildBackOfficeItemAndNotification(PDSBackOfficeType.DEATH, "Undecease patient", PDSBackOfficeWorkPriority.P1);
        PDSBackOfficeItem domBackOfficeItem = PDSBackOfficeItemVoAssembler.extractPDSBackOfficeItem(factory, backOfficeItem);

        factory.save(domBackOfficeItem);
    }
    catch (PdsException e)
    {
        e.printStackTrace();

        throw new DomainInterfaceException(e);
    }

    return patientInContext;
}
项目:openMAXIMS    文件:DemographicsComponentImpl.java   
public DeathDetailsVo saveDeathDetails(DeathDetailsVo deathDetails) throws StaleObjectException 
{
    ims.core.domain.Demographics impl = (ims.core.domain.Demographics) getDomainImpl(DemographicsImpl.class);

    return impl.saveDeathDetails(deathDetails);
}