private MedicationOverViewFilterVo getSearchCriteria() { MedicationOverViewFilterVo searchCriteria = new MedicationOverViewFilterVo(); searchCriteria.setType(form.getLocalContext().getScreenType()); searchCriteria.setFilter(Boolean.TRUE.equals(form.chkFilter().getValue()) ? true : false); searchCriteria.setPatientRef(form.getGlobalContext().Core.getPatientShort()); searchCriteria.setCareContext(form.getGlobalContext().Core.getCurrentCareContext()); searchCriteria.setSelectedMedication(form.recbrOverviews().getValue()); if (isMedicationMultipleDosesPatientLevel()) { searchCriteria.setSelectedMedication(form.recbrOverviews().getValue()); } return searchCriteria; }
private void setPatientSearchCriteria(MedicationOverViewFilterVo medicationOverViewFilterVo) { if (form.chkFilter().isVisible() && medicationOverViewFilterVo != null && medicationOverViewFilterVo.getSelectedMedication() != null) { form.chkFilter().setValue(medicationOverViewFilterVo.getFilter()); try { filterValueChange(false); form.recbrOverviews().setValue(medicationOverViewFilterVo.getSelectedMedication()); onRecbrOverviewsValueChanged(); } catch (PresentationLogicException e) { e.printStackTrace(); } openOverview(domain.getMedicationOverView(form.recbrOverviews().getValue())); } }
private MedicationOverViewFilterVo getSearchCriteria() { MedicationOverViewFilterVo searchCriteria = new MedicationOverViewFilterVo(); searchCriteria.setType(form.getLocalContext().getScreenType()); searchCriteria.setFilter(Boolean.TRUE.equals(form.chkFilter().getValue()) ? true : false); searchCriteria.setPatientRef(form.getGlobalContext().Core.getPatientShort()); searchCriteria.setSelectedMedication(form.recbrOverviews().getValue()); if (isMedicationMultipleDosesPatientLevel()) { searchCriteria.setSelectedMedication(form.recbrOverviews().getValue()); } return searchCriteria; }
public MedicationOverViewLiteVoCollection listMedicationOverviews(MedicationOverViewFilterVo voMedicationViewFilter) { if (voMedicationViewFilter == null) throw new DomainRuntimeException("Invalid Overview"); DomainFactory factory = getDomainFactory(); String hql = " from MedicationOverview mv where mv.careContext.episodeOfCare.careSpell.patient.id = :patid order by mv.authoringInformation.authoringDateTime desc"; List overs = factory.find(hql, new String[]{"patid"}, new Object[]{voMedicationViewFilter.getPatientRef().getID_Patient()}); if(overs.size() == 0) return null; return MedicationOverViewLiteVoAssembler.createMedicationOverViewLiteVoCollectionFromMedicationOverview(overs); }
private void setCareContextSearchCriteria(MedicationOverViewFilterVo medicationOverViewFilterVo) { if (form.chkFilter().isVisible() && medicationOverViewFilterVo != null) { form.chkFilter().setValue(medicationOverViewFilterVo.getFilter()); open(true); } }
protected void onlyrDetailsTabChanged(LayerBridge tab) { if(tab.equals(form.lyrDetails().tabPreview()) && form.getLocalContext().getSelectedItem() != null && form.getLocalContext().getReportChangedIsNotNull() && form.getLocalContext().getReportChanged().booleanValue()) { form.lyrDetails().tabPreview().htmReport().setHTML(""); if(form.getLocalContext().getSelectedItem() != null && form.getLocalContext().getReportChangedIsNotNull() && form.getLocalContext().getReportChanged().booleanValue() && form.getLocalContext().getSelectedItem().getID_ClinicalCorrespondence() != null) { buildReport(); form.getLocalContext().setReportChanged(Boolean.FALSE); } } //WDEV-1039 - 3) We need to Display the Medication Overview record for this context, if the ClinicalCorrespondenceBo has not been saved for the context we are in we need to retrieve the Overview and display it. else if(tab.equals(form.lyrDetails().tabServices()) && !isMedicationDataLoaded()) { form.lyrDetails().tabServices().dyngrdMedication().clear(); MedicationOverViewFilterVo voFilter = new MedicationOverViewFilterVo(); voFilter.setType(MedicationSnapShot.DISCHARGE); voFilter.setCareContext(form.getGlobalContext().Core.getCurrentCareContext()); voFilter.setPatientRef(form.getGlobalContext().Core.getPatientShort()); MedicationOverViewVo voOverView = domain.getLatestMedicationOverViewVo(voFilter); if (voOverView != null && voOverView.getMedicationIsNotNull()) { //WDEV-1039 - 2)We need to change the icons used in the medication preview to those used in the medication page MedicationDosesDynamicGridPopulation gridPopulation = new MedicationDosesDynamicGridPopulation(form.lyrDetails().tabServices().dyngrdMedication(), form.getImages().Admin.Activity, form.getImages().ICP.Child); gridPopulation.initializeGrid(); gridPopulation.populate(voOverView); form.getLocalContext().setIsMedicationDataLoaded(Boolean.TRUE); } } else if(tab.equals(form.lyrDetails().tabCommentsOPD()) && form.getLocalContext().getOutpatientSummaryChanged().booleanValue() && form.getMode().equals(FormMode.EDIT)) { if(form.getLocalContext().getSelectedItem() == null) { OutpatientNotesOutcomeVo voOPDSummary = domain.getOPDSummary(form.getGlobalContext().Core.getCurrentClinicalContact()); if(voOPDSummary != null && form.lyrDetails().tabCommentsOPD().grdClinicalNotes().getRows().size() == 3) { form.lyrDetails().tabCommentsOPD().grdClinicalNotes().getRows().get(0).setColText(voOPDSummary.getClinicalNote().getObjectiveNote()); form.lyrDetails().tabCommentsOPD().grdClinicalNotes().getRows().get(1).setColText(voOPDSummary.getClinicalNote().getPlanNote()); form.lyrDetails().tabCommentsOPD().grdClinicalNotes().getRows().get(2).setColText(voOPDSummary.getInstructionNextClinic()); form.lyrDetails().tabCommentsOPD().cmbOPFollowUp().setValue(voOPDSummary.getOutcome()); form.lyrDetails().tabCommentsOPD().intOPReviewIn().setValue(voOPDSummary.getReviewIn()); form.lyrDetails().tabCommentsOPD().cmbOPReviewIn().setValue(voOPDSummary.getReviewinUnits()); form.getLocalContext().setOutpatientSummaryChanged(Boolean.FALSE); } } } }
public MedicationOverViewVo getLatestMedicationOverViewVo(MedicationOverViewFilterVo filter) { MedicationMultipleDoses intf = (MedicationMultipleDoses) getDomainImpl(MedicationDosesImpl.class); return intf.getLatestMedicationOverViewVo(filter); }
private void open(Boolean search) { form.ctnDetails().setCollapsed(true); MedicationOverViewVo voOverView = new MedicationOverViewVo(); PatientRefVo voPat = new PatientRefVo(); voPat.setID_Patient(form.getGlobalContext().Core.getPatientShort().getID_Patient()); MedicationOverViewFilterVo voFilter = getSearchCriteria(); clearAll(); MedicationOverViewLiteVoCollection voColl = null; if (search) { voColl = domain.listMedicationOverviews(voFilter); if (voColl == null) { engine.showMessage("There is no current Medication Overview for this patient."); displayOrHideEnableDisableScreenSpecificControls(); return; } for (int i = 0 ; i < voColl.size() ; i++) { MedicationOverViewLiteVo voOverLite = voColl.get(i); StringBuffer sb = new StringBuffer(); sb.append(voOverLite.getTypeIsNotNull() ? voOverLite.getType().toString()+ ", " : ""); sb.append(voOverLite.getAuthoringInformationIsNotNull() ? voOverLite.getAuthoringInformation().toString(" - ") + ", " : ""); form.recbrOverviews().newRow(voOverLite, sb.toString()); } if (voColl.size() > 0) { form.recbrOverviews().setValue(voColl.get(0)); } } if (form.recbrOverviews().getValue() != null) { voOverView = domain.getMedicationOverView(form.recbrOverviews().getValue()); openOverview(voOverView); } form.setMode(FormMode.VIEW); displayOrHideEnableDisableScreenSpecificControls(); form.getLocalContext().setSelectedInstance(null); }