private void methodOfDischargeValueChanged() { MethodOfDischarge methodOfDischargeForPatientDeceased = (MethodOfDischarge) domain.getLookupService().getLocalLookup(MethodOfDischarge.class, MethodOfDischarge.TYPE_ID, "PAS", PATIENTDIED); MethodOfDischarge methodOfDischargeForStillBirth = (MethodOfDischarge) domain.getLookupService().getLocalLookup(MethodOfDischarge.class, MethodOfDischarge.TYPE_ID, "PAS", STILLBIRTH); if (ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("MAXIMS") && ((methodOfDischargeForPatientDeceased != null && methodOfDischargeForPatientDeceased.equals(form.lyrDetail().tabDischarge().cmbMethodDischarge().getValue())) || (methodOfDischargeForStillBirth != null && methodOfDischargeForStillBirth.equals(form.lyrDetail().tabDischarge().cmbMethodDischarge().getValue())))) { form.lyrDetail().tabDischarge().cmbDischargeDestination().setValue(DischargeDestination.MORTUARY); if (form.getGlobalContext().Core.getPatientShort() != null && form.getGlobalContext().Core.getPatientShort().getDodIsNotNull()) { form.lyrDetail().tabDischarge().dteDod().setValue(form.getGlobalContext().Core.getPatientShort().getDod()); form.lyrDetail().tabDischarge().timTod().setValue(form.getGlobalContext().Core.getPatientShort().getTimeOfDeath()); } } else if (form.lyrDetail().tabDischarge().cmbMethodDischarge().getValue() == null || !form.lyrDetail().tabDischarge().cmbMethodDischarge().getValue().equals(methodOfDischargeForStillBirth)) { if (DischargeDestination.MORTUARY.equals(form.lyrDetail().tabDischarge().cmbDischargeDestination().getValue())) { form.lyrDetail().tabDischarge().cmbDischargeDestination().setValue(null); } } }
private void updateDischargeDateTimeControls() { if(form.lyrDetail().tabDischarge().cmbMethodDischarge().getValue() == null) { form.lyrDetail().tabDischarge().lblDischargeDod().setVisible(false); form.lyrDetail().tabDischarge().dtimDod().setVisible(false); form.lyrDetail().tabDischarge().dtimDod().setValue(null); form.lyrDetail().tabDischarge().lblDischargeDateTime().setVisible(true); form.lyrDetail().tabDischarge().dtimDischarge().setVisible(true); form.lyrDetail().tabDischarge().dtimDischarge().setValue(new DateTime()); return; } boolean isDead = false; MethodOfDischarge lkpMethodDischarge = form.lyrDetail().tabDischarge().cmbMethodDischarge().getValue(); String extCode = domain.getLookupService().getRemoteLookup(lkpMethodDischarge.getID(), "PAS"); if(extCode != null && (extCode.equals(PATIENTDIED) || extCode.equals(STILLBIRTH))) isDead = true; if(isDead) { form.lyrDetail().tabDischarge().lblDischargeDod().setVisible(true); form.lyrDetail().tabDischarge().dtimDod().setVisible(true); form.lyrDetail().tabDischarge().dtimDod().setValue(new DateTime()); form.lyrDetail().tabDischarge().lblDischargeDateTime().setVisible(false); form.lyrDetail().tabDischarge().dtimDischarge().setVisible(false); form.lyrDetail().tabDischarge().dtimDischarge().setValue(null); } else { form.lyrDetail().tabDischarge().lblDischargeDod().setVisible(false); form.lyrDetail().tabDischarge().dtimDod().setVisible(false); form.lyrDetail().tabDischarge().dtimDod().setValue(null); form.lyrDetail().tabDischarge().lblDischargeDateTime().setVisible(true); form.lyrDetail().tabDischarge().dtimDischarge().setVisible(true); form.lyrDetail().tabDischarge().dtimDischarge().setValue(new DateTime()); } }
private void clearDeceasedInfoDischargeControls() { MethodOfDischarge methodOfDischargeForPatientDeceased = (MethodOfDischarge) domain.getLookupService().getLocalLookup(MethodOfDischarge.class, MethodOfDischarge.TYPE_ID, "PAS", PATIENTDIED); MethodOfDischarge methodOfDischargeForStillBirth = (MethodOfDischarge) domain.getLookupService().getLocalLookup(MethodOfDischarge.class, MethodOfDischarge.TYPE_ID, "PAS", STILLBIRTH); if (form.lyrDetail().tabDischarge().cmbMethodDischarge().getValue() != null && (form.lyrDetail().tabDischarge().cmbMethodDischarge().getValue().equals(methodOfDischargeForPatientDeceased) || form.lyrDetail().tabDischarge().cmbMethodDischarge().getValue().equals(methodOfDischargeForStillBirth))) { form.lyrDetail().tabDischarge().cmbMethodDischarge().setValue(null); form.lyrDetail().tabDischarge().cmbDischargeDestination().setValue(null); form.lyrDetail().tabDischarge().dteDod().setValue(null); form.lyrDetail().tabDischarge().timTod().setValue(null); } }
private void setDeceasedPatientInfoOnDischarge() { MethodOfDischarge methodofDischargeForPatientDeceased = (MethodOfDischarge) domain.getLookupService().getLocalLookup(MethodOfDischarge.class, MethodOfDischarge.TYPE_ID, "PAS", PATIENTDIED); form.lyrDetail().tabDischarge().cmbMethodDischarge().setValue(methodofDischargeForPatientDeceased); form.lyrDetail().tabDischarge().cmbDischargeDestination().setValue(DischargeDestination.MORTUARY); form.lyrDetail().tabDischarge().dteDod().setValue(form.getGlobalContext().Core.getPatientShort().getDod()); form.lyrDetail().tabDischarge().timTod().setValue(form.getGlobalContext().Core.getPatientShort().getTimeOfDeath()); }
private void populateInfantInstanceControls() { enableInfantControls(true); InpatientEpisodeLiteVo voInpatEpis = form.lyrDetail().tabInfants().grdInfants().getValue(); // Current Hospital Label form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().lblInfantCurrentHosp().setValue(""); if (voInpatEpis != null && voInpatEpis.getPasEventIsNotNull()) { LocationLiteVo voHosp = domain.getParentLocation(voInpatEpis.getPasEvent().getLocation()); form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().lblInfantCurrentHosp().setValue(voHosp != null ? voHosp.getName() : ""); } // Current Ward Label form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().lblInfantCurrentWard().setValue(voInpatEpis.getPasEventIsNotNull() && voInpatEpis.getPasEvent().getLocationIsNotNull() ? voInpatEpis.getPasEvent().getLocation().getName() : ""); //try to get existing PendingTransfer if it exists populate screen form.getLocalContext().setPendingInfantTransfer(domain.getPendingTransferForInpatient(voInpatEpis)); // discharge clearInfantDischargeControls(); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().cmbInfantMethodDischarge().setValue(MethodOfDischarge.MEDICALLY_APPROVED); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().cmbInfantDischargeDest().setValue(DischargeDestination.HOME); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().dtimInfantDischarge().setValue(new DateTime()); // transfer clearInfantTransferControls(); loadInfantTransferHospital(); // Consultant form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().ccInfantConsultant().initialize(MosType.MEDIC); // any existing pendingtransfer PendingTransfersLiteVo voTransfer = form.getLocalContext().getPendingInfantTransfer(); if (voTransfer != null) { if (voTransfer.getDestinationWardIsNotNull()) { form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantHospital().setValue(domain.getParentLocation(voTransfer.getDestinationWard())); cmbInfantHospitalValueChanged(true); form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantWard().setValue(voTransfer.getDestinationWard()); } form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantWardType().setValue(voTransfer.getWardType()); form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().dtimInfantTransferRequest().setValue(voTransfer.getTransferRequestDateTime()); form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().ccInfantConsultant().setValue(voTransfer.getConsultant()); listSpecialtiesForConsultant(form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().ccInfantConsultant().getValue(), INFANT_CONSULTANT, voTransfer.getSpecialty(), null); //if conspc call did not find specialty (conspc mapping was removed) add it as a value anyway if(voTransfer.getSpecialtyIsNotNull()) { if(!form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantSpecialty().getValues().contains(voTransfer.getSpecialty())) form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantSpecialty().newRow(voTransfer.getSpecialty(), voTransfer.getSpecialty().getText()); } form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantSpecialty().setValue(voTransfer.getSpecialty()); } else { //WDEV-8466 form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().dtimInfantTransferRequest().setValue(new DateTime()); form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantWardType().setValue(WardType.MAIN); } }
private void updateInfantDischargeDateTimeControls() { if(form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().cmbInfantMethodDischarge().getValue() == null) { form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().lblInfantDod().setVisible(false); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().dtimInfantDod().setVisible(false); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().dtimInfantDod().setValue(null); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().lblInfantDischargeDateTime().setVisible(true); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().dtimInfantDischarge().setVisible(true); if(form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().dtimInfantDischarge().isEnabled()) form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().dtimInfantDischarge().setValue(new DateTime()); return; } boolean isDead = false; MethodOfDischarge lkpMethodDischarge = form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().cmbInfantMethodDischarge().getValue(); String extCode = domain.getLookupService().getRemoteLookup(lkpMethodDischarge.getID(), TaxonomyType.PAS.getText()); if(extCode != null && (extCode.equals(PATIENTDIED) || extCode.equals(STILLBIRTH))) isDead = true; if(isDead) { form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().lblInfantDod().setVisible(true); if(form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().dtimInfantDischarge().isEnabled()) form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().dtimInfantDod().setVisible(true); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().dtimInfantDod().setValue(new DateTime()); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().lblInfantDischargeDateTime().setVisible(false); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().dtimInfantDischarge().setVisible(false); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().dtimInfantDischarge().setValue(null); } else { form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().lblInfantDod().setVisible(false); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().dtimInfantDod().setVisible(false); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().dtimInfantDod().setValue(null); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().lblInfantDischargeDateTime().setVisible(true); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().dtimInfantDischarge().setVisible(true); if(form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().dtimInfantDischarge().isEnabled()) form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().dtimInfantDischarge().setValue(new DateTime()); } }
private void updateDischargeDateTimeControls() { if(form.lyrDetail().tabDischarge().cmbMethodDischarge().getValue() == null) { form.lyrDetail().tabDischarge().lblDischargeDod().setVisible(false); form.lyrDetail().tabDischarge().dteDod().setVisible(false); form.lyrDetail().tabDischarge().timTod().setVisible(false); form.lyrDetail().tabDischarge().btnMarkAsDeceased().setVisible(false); form.lyrDetail().tabDischarge().txtDODMandatory().setVisible(false); form.lyrDetail().tabDischarge().dteDod().setValue(null); form.lyrDetail().tabDischarge().timTod().setValue(null); form.lyrDetail().tabDischarge().lblDischargeDateTime().setVisible(true); form.lyrDetail().tabDischarge().dtimDischarge().setVisible(true); form.lyrDetail().tabDischarge().dtimDischarge().setValue(new DateTime()); form.getGlobalContext().Core.setDeathDetails(null); form.getLocalContext().setDeathDetailsOnDischarge(null); return; } boolean isDead = false; boolean nonHeartsFunc = ConfigFlag.UI.BED_INFO_UI_TYPE.getValue().equals("MAXIMS"); MethodOfDischarge lkpMethodDischarge = form.lyrDetail().tabDischarge().cmbMethodDischarge().getValue(); String extCode = domain.getLookupService().getRemoteLookup(lkpMethodDischarge.getID(), "PAS"); if(extCode != null && (extCode.equals(PATIENTDIED) || extCode.equals(STILLBIRTH))) isDead = true; if(isDead) { form.lyrDetail().tabDischarge().lblDischargeDod().setVisible(true); form.lyrDetail().tabDischarge().lblDischargeDateTime().setVisible(nonHeartsFunc); form.lyrDetail().tabDischarge().dtimDischarge().setVisible(nonHeartsFunc); form.lyrDetail().tabDischarge().dtimDischarge().setValue(null); form.lyrDetail().tabDischarge().dteDod().setVisible(true); form.lyrDetail().tabDischarge().dteDod().setEnabled(false); form.lyrDetail().tabDischarge().timTod().setVisible(true); form.lyrDetail().tabDischarge().timTod().setEnabled(false); form.lyrDetail().tabDischarge().txtDODMandatory().setVisible(true); form.lyrDetail().tabDischarge().btnMarkAsDeceased().setVisible(engine.hasRight(AppRight.ALLOW_MARK_PATIENT_AS_DECEASED)); if (form.getGlobalContext().Core.getPatientShort().getDod() == null) //WDEV-22553 { displayDeathDetails(); } } else { form.lyrDetail().tabDischarge().lblDischargeDod().setVisible(false); form.lyrDetail().tabDischarge().dteDod().setVisible(false); form.lyrDetail().tabDischarge().timTod().setVisible(false); form.lyrDetail().tabDischarge().txtDODMandatory().setVisible(false); form.lyrDetail().tabDischarge().dteDod().setValue(null); form.lyrDetail().tabDischarge().timTod().setValue(null); form.lyrDetail().tabDischarge().lblDischargeDateTime().setVisible(true); form.lyrDetail().tabDischarge().dtimDischarge().setVisible(true); form.lyrDetail().tabDischarge().dtimDischarge().setValue(new DateTime()); form.lyrDetail().tabDischarge().btnMarkAsDeceased().setVisible(false); form.getLocalContext().setDeathDetailsOnDischarge(null); if ((form.getGlobalContext().Core.getSelectedBedSpaceStateIsNotNull() && form.getGlobalContext().Core.getSelectedBedSpaceState().getInpatientEpisode().getPasEvent().getPatient().getDod() == null) || (form.getGlobalContext().Core.getSelectedWaitingAreaPatientIsNotNull() && form.getGlobalContext().Core.getSelectedWaitingAreaPatient().getPasEvent().getPatient().getDod() == null)) { if (form.getGlobalContext().Core.getPatientShortIsNotNull()) { form.getGlobalContext().Core.getPatientShort().setTimeOfDeath(form.lyrDetail().tabDischarge().timTod().getValue()); form.getGlobalContext().Core.getPatientShort().setDod(form.lyrDetail().tabDischarge().dteDod().getValue()); } } form.getGlobalContext().Core.setDeathDetails(null); } form.lyrDetail().tabDischarge().lblDischargeDateTime().setValue(form.lyrDetail().tabDischarge().dteDod().isVisible() ? "Actual Discharge Date/Time:" : "Discharge Date/Time:"); }
private void populateInfantInstanceControls() { enableInfantControls(true); InpatientEpisodeLiteVo voInpatEpis = form.lyrDetail().tabInfants().grdInfants().getValue(); // Current Hospital Label form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().lblInfantCurrentHosp().setValue(""); if (voInpatEpis != null && voInpatEpis.getPasEventIsNotNull()) { LocationLiteVo voHosp = domain.getParentLocation(voInpatEpis.getPasEvent().getLocation()); form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().lblInfantCurrentHosp().setValue(voHosp != null ? voHosp.getName() : ""); } // Current Ward Label form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().lblInfantCurrentWard().setValue(voInpatEpis != null && voInpatEpis.getPasEventIsNotNull() && voInpatEpis.getPasEvent().getLocationIsNotNull() ? voInpatEpis.getPasEvent().getLocation().getName() : ""); //try to get existing PendingTransfer if it exists populate screen form.getLocalContext().setPendingInfantTransfer(domain.getPendingTransferForInpatient(voInpatEpis)); // discharge clearInfantDischargeControls(); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().cmbInfantMethodDischarge().setValue(MethodOfDischarge.MEDICALLY_APPROVED); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().cmbInfantDischargeDest().setValue(DischargeDestination.HOME); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().dtimInfantDischarge().setValue(new DateTime()); // transfer clearInfantTransferControls(); loadInfantTransferHospital(); // Consultant form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().ccInfantConsultant().initialize(MosType.MEDIC); // any existing pendingtransfer PendingTransfersLiteVo voTransfer = form.getLocalContext().getPendingInfantTransfer(); if (voTransfer != null) { if (voTransfer.getDestinationWardIsNotNull()) { form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantHospital().setValue(domain.getParentLocation(voTransfer.getDestinationWard())); cmbInfantHospitalValueChanged(true); form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantWard().setValue(voTransfer.getDestinationWard()); } form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantWardType().setValue(voTransfer.getWardType()); form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().dtimInfantTransferRequest().setValue(voTransfer.getTransferRequestDateTime()); form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().ccInfantConsultant().setValue(voTransfer.getConsultant()); listSpecialtiesForConsultant(form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().ccInfantConsultant().getValue(), INFANT_CONSULTANT, voTransfer.getSpecialty(), null); //if conspc call did not find specialty (conspc mapping was removed) add it as a value anyway if(voTransfer.getSpecialtyIsNotNull()) { if(!form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantSpecialty().getValues().contains(voTransfer.getSpecialty())) form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantSpecialty().newRow(voTransfer.getSpecialty(), voTransfer.getSpecialty().getText()); } form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantSpecialty().setValue(voTransfer.getSpecialty()); form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().txtInfantTransfComment().setValue(voTransfer.getTransferComment()); form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantTransferReason().setValue(voTransfer.getTransferReason()); } else { //WDEV-8466 form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().dtimInfantTransferRequest().setValue(new DateTime()); form.lyrDetail().tabInfants().lyrInfants().tabInfantTransfer().cmbInfantWardType().setValue(WardType.MAIN); } }
private void updateInfantDischargeDateTimeControls() { if (form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().cmbInfantMethodDischarge().getValue() == null) { form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().lblInfantDod().setVisible(false); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().dteInfantDod().setVisible(false); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().dteInfantDod().setValue(null); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().timInfantTod().setVisible(false); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().timInfantTod().setValue(null); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().btnMarkInfantDeceased().setVisible(false); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().txtInfantDODMandatory().setVisible(false); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().lblInfantDischargeDateTime().setVisible(true); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().dtimInfantDischarge().setVisible(true); if(form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().dtimInfantDischarge().isEnabled()) form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().dtimInfantDischarge().setValue(new DateTime()); form.getLocalContext().setDeathDetailsOnDischarge(null); form.getGlobalContext().Core.setDeathDetails(null); if (form.lyrDetail().tabInfants().grdInfants().getValue() != null) { form.getGlobalContext().Core.getPatientShort().setTimeOfDeath(form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().timInfantTod().getValue()); form.getGlobalContext().Core.getPatientShort().setDod(form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().dteInfantDod().getValue()); if (form.getLocalContext().getTempMotherPatientIsNotNull()) form.getGlobalContext().Core.setPatientShort(form.getLocalContext().getTempMotherPatient()); } updateDODButtonText(false, true); return; } boolean isDead = false; MethodOfDischarge lkpMethodDischarge = form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().cmbInfantMethodDischarge().getValue(); String extCode = domain.getLookupService().getRemoteLookup(lkpMethodDischarge.getID(), TaxonomyType.PAS.getText()); if(extCode != null && (extCode.equals(PATIENTDIED) || extCode.equals(STILLBIRTH))) isDead = true; if(isDead) { form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().lblInfantDod().setVisible(true); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().lblInfantDischargeDateTime().setVisible(false); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().dtimInfantDischarge().setVisible(false); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().dtimInfantDischarge().setValue(null); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().dteInfantDod().setEnabled(false); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().dteInfantDod().setVisible(true); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().timInfantTod().setEnabled(false); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().timInfantTod().setVisible(true); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().txtInfantDODMandatory().setVisible(true); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().btnMarkInfantDeceased().setVisible(engine.hasRight(AppRight.ALLOW_MARK_PATIENT_AS_DECEASED)); if (form.lyrDetail().tabInfants().isVisible() && form.lyrDetail().tabInfants().grdInfants().getValue() != null) { form.getLocalContext().setTempMotherPatient(form.getGlobalContext().Core.getPatientShort()); form.getGlobalContext().Core.setPatientShort(domain.getPatientShort(form.lyrDetail().tabInfants().grdInfants().getValue().getPasEvent().getPatient())); if (form.getGlobalContext().Core.getPatientShort().getDod() == null) //WDEV-22553 { displayDeathDetails(); } } } else { form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().lblInfantDod().setVisible(false); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().dteInfantDod().setVisible(false); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().dteInfantDod().setValue(null); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().timInfantTod().setVisible(false); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().timInfantTod().setValue(null); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().lblInfantDischargeDateTime().setVisible(true); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().dtimInfantDischarge().setVisible(true); if(form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().dtimInfantDischarge().isEnabled()) form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().dtimInfantDischarge().setValue(new DateTime()); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().txtInfantDODMandatory().setVisible(false); form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().btnMarkInfantDeceased().setVisible(false); if (form.lyrDetail().tabInfants().grdInfants().getValue() != null) { form.getGlobalContext().Core.getPatientShort().setTimeOfDeath(form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().timInfantTod().getValue()); form.getGlobalContext().Core.getPatientShort().setDod(form.lyrDetail().tabInfants().lyrInfants().tabInfantDischarge().dteInfantDod().getValue()); if (form.getLocalContext().getTempMotherPatientIsNotNull()) form.getGlobalContext().Core.setPatientShort(form.getLocalContext().getTempMotherPatient()); } form.getGlobalContext().Core.setDeathDetails(null); } updateDODButtonText(isDead, true); }