private KeyDatesVo getOrCreateNextGoalPlanDate(KeyDatesVoCollection keyDates) { if (keyDates != null) { for (KeyDatesVo keyDate : keyDates) { if (KeyDateType.NEXTGOALPLANDATE.equals(keyDate.getDateType())) return keyDate; } } KeyDatesVo date = new KeyDatesVo(); date.setDateType(KeyDateType.NEXTGOALPLANDATE); return date; }
private KeyDatesVo getOrCreateProposedDischargedDate(KeyDatesVoCollection keyDates) { if (keyDates != null) { for (KeyDatesVo keyDate : keyDates) { if (KeyDateType.PROPOSEDDISCHARGEDATE.equals(keyDate.getDateType())) return keyDate; } } KeyDatesVo date = new KeyDatesVo(); date.setDateType(KeyDateType.PROPOSEDDISCHARGEDATE); return date; }
/** * Function used to set values to labels in the header of the form */ private void populateHeaderControls(MDTListAndDatesVo mdtDetails, AdmisSummary admissionSummary) { // Clear header details clearHeaderControls(); // Check parameter if (mdtDetails == null) return; // Fill in 'MDT List' name form.lblMDTList().setValue(mdtDetails.getListPatientisOn().getText()); KeyDatesVoCollection keyDates = mdtDetails.getKeyDates(); // Fill in 'Next Goal Plan' date and 'Proposed Discharge Date' for (KeyDatesVo keyDate : keyDates) { if (KeyDateType.NEXTGOALPLANDATE.equals(keyDate.getDateType())) form.lblNextGoalPlanDate().setValue(keyDate.getDate().toString(DateFormat.STANDARD)); if (KeyDateType.PROPOSEDDISCHARGEDATE.equals(keyDate.getDateType())) form.lblProposedDischageDate().setValue(keyDate.getDate().toString(DateFormat.STANDARD)); } form.lblClassification().setValue(getClassification(admissionSummary)); form.lblPrimaryPathology().setValue(getPrimaryPathology(admissionSummary)); }
/** * Function used to prepare the screen for recording a new 'MDT Meeting' */ private void newInstance() { // Clear instance controls clearInstanceControls(); form.grdMDT().setValue(null); // Clear local contexts holding current records form.getLocalContext().setCurrentMDTMeeting(null); form.getLocalContext().setCurrentMDTNote(null); // Set default values MDTListAndDatesVo latestListMDT = form.getLocalContext().getMDTListAndDates(); if (latestListMDT != null) { form.cmbListMDT().setValue(latestListMDT.getListPatientisOn()); for (KeyDatesVo keyDate : latestListMDT.getKeyDates()) { if (KeyDateType.NEXTGOALPLANDATE.equals(keyDate.getDateType())) form.pdtNextGoalPlanDate().setValue(keyDate.getDate()); if (KeyDateType.PROPOSEDDISCHARGEDATE.equals(keyDate.getDateType())) form.pdtProposedDischargedDate().setValue(keyDate.getDate()); } } form.dteMDTMeetingDate().setValue(new Date()); // Default in authoring info for MDT Notes form.ctnDetails().qmbRecHCP().clear(); Hcp hcp = (Hcp) domain.getHcpUser(); if(hcp != null) { form.ctnDetails().qmbRecHCP().newRow(hcp, hcp.toString()); form.ctnDetails().qmbRecHCP().setValue(hcp); } form.ctnDetails().dtimRecDateTime().setValue(new DateTime()); // Set form to EDIT mode form.setMode(FormMode.EDIT); }
/** * Function used to populate a MDT Meeting instance to controls * @param mdtMeeting */ private void populateInstanceControlsFromData(MDTMeetingVo mdtMeeting) { // Clear instance controls clearInstanceControls(); // Check parameter if (mdtMeeting == null) return; // Populate 'Meeting Date' control form.dteMDTMeetingDate().setValue(mdtMeeting.getMDTMeetingDate()); // Populate MDT List if (mdtMeeting.getListPatientisOn() != null) { form.cmbListMDT().setValue(mdtMeeting.getListPatientisOn()); if (form.cmbListMDT().getValue() == null) { form.cmbListMDT().newRow(mdtMeeting.getListPatientisOn(), mdtMeeting.getListPatientisOn().getText()); form.cmbListMDT().setValue(mdtMeeting.getListPatientisOn()); } } // Populate Key Dates if (mdtMeeting.getKeyDates() != null) { for (KeyDatesVo keyDate : mdtMeeting.getKeyDates()) { if (KeyDateType.NEXTGOALPLANDATE.equals(keyDate.getDateType())) { form.pdtNextGoalPlanDate().setValue(keyDate.getDate()); } if (KeyDateType.PROPOSEDDISCHARGEDATE.equals(keyDate.getDateType())) { form.pdtProposedDischargedDate().setValue(keyDate.getDate()); } } } // Populate 'MDT Meeting Notes' to notes grid for (MDTNotesVo note : mdtMeeting.getMeetingNotes()) { grdNotesSummaryRow noteRow = form.grdNotesSummary().getRows().newRow(); noteRow.setColArea(note.getArea().getText()); replaceSingleLineBreaks(note);//WDEV-17379 noteRow.setColNotes(note.getNotes()); noteRow.setValue(note); } }
/** * Function used to populate a MDT Meeting instance to controls * @param mdtMeeting */ private void populateInstanceControlsFromData(MDTMeetingVo mdtMeeting) { // Clear instance controls clearInstanceControls(); // Check parameter if (mdtMeeting == null) return; // Populate 'Meeting Date' control form.dteMDTMeetingDate().setValue(mdtMeeting.getMDTMeetingDate()); // Populate MDT List if (mdtMeeting.getListPatientisOn() != null) { form.cmbListMDT().setValue(mdtMeeting.getListPatientisOn()); if (form.cmbListMDT().getValue() == null) { form.cmbListMDT().newRow(mdtMeeting.getListPatientisOn(), mdtMeeting.getListPatientisOn().getText()); form.cmbListMDT().setValue(mdtMeeting.getListPatientisOn()); } } // Populate Key Dates if (mdtMeeting.getKeyDates() != null) { for (KeyDatesVo keyDate : mdtMeeting.getKeyDates()) { if (KeyDateType.NEXTGOALPLANDATE.equals(keyDate.getDateType())) { form.pdtNextGoalPlanDate().setValue(keyDate.getDate()); } if (KeyDateType.PROPOSEDDISCHARGEDATE.equals(keyDate.getDateType())) { form.pdtProposedDischargedDate().setValue(keyDate.getDate()); } } } // Populate 'MDT Meeting Notes' to notes grid for (MDTNotesVo note : mdtMeeting.getMeetingNotes()) { grdNotesSummaryRow noteRow = form.grdNotesSummary().getRows().newRow(); noteRow.setColArea(note.getArea().getText()); replaceSingleLineBreaks(note);//WDEV-17379 if(note.getNotes() != null) noteRow.setColNotes(replaceImsRichText(note.getNotes().toString())); //WDEV-19893 noteRow.setValue(note); } }