private void populateScreenFromData(BedSpaceVo bedSpace) { form.txtDesc().setValue(bedSpace.getDescription()); form.cmbBedSpaceType().setValue(bedSpace.getBedSpaceType()); form.txtBedNumber().setValue(bedSpace.getBedNumber()); if(bedSpace.getWardTypeIsNotNull()) { if(bedSpace.getWardType().equals(WardType.MAIN)) form.GroupWardType().setValue(GroupWardTypeEnumeration.rdoMain); else if(bedSpace.getWardType().equals(WardType.SIDE)) form.GroupWardType().setValue(GroupWardTypeEnumeration.rdoSide); } else form.GroupWardType().setValue(GroupWardTypeEnumeration.rdoMain); }
private void populateScreenFromData(BedSpaceVo bedSpace) { form.txtDesc().setValue(bedSpace.getDescription()); form.cmbBedSpaceType().setValue(bedSpace.getBedSpaceType()); form.txtBedNumber().setValue(bedSpace.getBedNumber()); form.cmbDependencyLvl().setValue(bedSpace.getDependency()); form.chkIsPrivate().setValue(bedSpace.getPrivateBed()); if(bedSpace.getWardTypeIsNotNull()) { if(bedSpace.getWardType().equals(WardType.MAIN)) form.GroupWardType().setValue(GroupWardTypeEnumeration.rdoMain); else if(bedSpace.getWardType().equals(WardType.SIDE)) form.GroupWardType().setValue(GroupWardTypeEnumeration.rdoSide); } else form.GroupWardType().setValue(GroupWardTypeEnumeration.rdoMain); }
private WardType getSelectedWardType() { if(form.GroupWardType().getValue().equals(GroupWardTypeEnumeration.rdoMain)) return WardType.MAIN; else if(form.GroupWardType().getValue().equals(GroupWardTypeEnumeration.rdoSide)) return WardType.SIDE; return null; }
private void populateTransferInTabFromData() { clearTransferInTab(); PendingTransfersLiteVo voTransfer = form.lyrDetail().tabTransfer().lyrTransfer().tabIn().grdTransferIn().getValue(); if (voTransfer == null) throw new CodingRuntimeException("No Transfer selected in method populateTransferInTabFromData"); //WDEV-9852 - previously defaulted to Main if(voTransfer.getWardTypeIsNotNull()) form.lyrDetail().tabTransfer().lyrTransfer().tabIn().cmbWardType().setValue(voTransfer.getWardType()); else form.lyrDetail().tabTransfer().lyrTransfer().tabIn().cmbWardType().setValue(WardType.MAIN); if (voTransfer.getConsultantIsNotNull()) form.lyrDetail().tabTransfer().lyrTransfer().tabIn().ccInConsultant().setValue(voTransfer.getConsultant()); else if (voTransfer.getInpatientEpisodeIsNotNull() && voTransfer.getInpatientEpisode().getPasEventIsNotNull() && voTransfer.getInpatientEpisode().getPasEvent().getConsultantIsNotNull()) form.lyrDetail().tabTransfer().lyrTransfer().tabIn().ccInConsultant().setValue(voTransfer.getInpatientEpisode().getPasEvent().getConsultant()); Specialty spec = null; if (voTransfer.getSpecialtyIsNotNull()) spec = voTransfer.getSpecialty(); else if (voTransfer.getInpatientEpisodeIsNotNull() && voTransfer.getInpatientEpisode().getPasEventIsNotNull() && voTransfer.getInpatientEpisode().getPasEvent().getSpecialtyIsNotNull()) spec = voTransfer.getInpatientEpisode().getPasEvent().getSpecialty(); PASSpecialty pasSpec = null; if (voTransfer.getPASSpecialtyIsNotNull()) pasSpec = voTransfer.getPASSpecialty(); else if (voTransfer.getInpatientEpisodeIsNotNull() && voTransfer.getInpatientEpisode().getPasEventIsNotNull() && voTransfer.getInpatientEpisode().getPasEvent().getPASSpecialtyIsNotNull()) pasSpec = voTransfer.getInpatientEpisode().getPasEvent().getPASSpecialty(); listSpecialtiesForConsultant(form.lyrDetail().tabTransfer().lyrTransfer().tabIn().ccInConsultant().getValue(), IN_CONSULTANT, spec, pasSpec); // //if conspc call did not find specialty (conspc mapping was removed) add it as a value anyway // if(spec != null) // { // if(!form.lyrDetail().tabTransfer().lyrTransfer().tabIn().cmbInSpecialty().getValues().contains(spec)) // form.lyrDetail().tabTransfer().lyrTransfer().tabIn().cmbInSpecialty().newRow(spec, spec.getText()); // } form.lyrDetail().tabTransfer().lyrTransfer().tabIn().cmbInSpecialty().setValue(spec); form.lyrDetail().tabTransfer().lyrTransfer().tabIn().cmbCCOInSpecialty().setValue(pasSpec); form.lyrDetail().tabTransfer().lyrTransfer().tabIn().dtimTransfer().setValue(new DateTime()); if (voTransfer.getInpatientEpisodeIsNotNull() && voTransfer.getInpatientEpisode().getEstDischargeDateIsNotNull()) form.lyrDetail().tabTransfer().lyrTransfer().tabIn().dteDischarge().setValue(voTransfer.getInpatientEpisode().getEstDischargeDate()); form.lyrDetail().tabTransfer().btnCancelTransfer().setEnabled(true); //WDEV-9790 if(form.getLocalContext().getIsReadOnlyIsNotNull() && form.getLocalContext().getIsReadOnly()) form.lyrDetail().tabTransfer().btnCancelTransfer().setEnabled(false); }
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 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 populateScreenFromData (PendingTransfersLiteVo selectedPendingTransfer) { clearScreen(); if (selectedPendingTransfer == null) return; if (selectedPendingTransfer.getServiceIsNotNull()) { form.qmbService().newRow(selectedPendingTransfer.getService(), selectedPendingTransfer.getService().getServiceName()); form.qmbService().setValue(selectedPendingTransfer.getService()); form.ccConsultant().initializeResponsibleHcp(MosType.MEDIC, null, selectedPendingTransfer.getService(), null); } if(selectedPendingTransfer.getWardTypeIsNotNull()) form.cmbWardType().setValue(selectedPendingTransfer.getWardType()); else form.cmbWardType().setValue(WardType.MAIN); if (selectedPendingTransfer.getConsultantIsNotNull()) form.ccConsultant().setValue(selectedPendingTransfer.getConsultant()); else if (selectedPendingTransfer.getInpatientEpisodeIsNotNull() && selectedPendingTransfer.getInpatientEpisode().getPasEventIsNotNull() && selectedPendingTransfer.getInpatientEpisode().getPasEvent().getConsultantIsNotNull()) form.ccConsultant().setValue(selectedPendingTransfer.getInpatientEpisode().getPasEvent().getConsultant()); Specialty spec = null; if (selectedPendingTransfer.getSpecialtyIsNotNull()) spec = selectedPendingTransfer.getSpecialty(); else if (selectedPendingTransfer.getInpatientEpisodeIsNotNull() && selectedPendingTransfer.getInpatientEpisode().getPasEventIsNotNull() && selectedPendingTransfer.getInpatientEpisode().getPasEvent().getSpecialtyIsNotNull()) spec = selectedPendingTransfer.getInpatientEpisode().getPasEvent().getSpecialty(); if (selectedPendingTransfer.getInpatientEpisodeIsNotNull()) { form.dtimEstDischarge().setValue(selectedPendingTransfer.getInpatientEpisode().getEstDischargeDate()); } if (spec != null) { form.cmbSpecialty().newRow(spec, spec.getText()); form.cmbSpecialty().setValue(spec); } form.dtimTransferAccept().setValue(new DateTime()); form.cmbTransfReason().setValue(selectedPendingTransfer.getTransferReason()); form.txtTransfComment().setValue(selectedPendingTransfer.getTransferComment()); form.cmbPatientStatus().setValue(selectedPendingTransfer.getPatientStatus()); //WDEV-21436 form.chkAllocateBed().setValue(form.chkAllocateBed().isVisible()); }