private void populateInstanceControls(TriageProtocolAssessmentVo triageProtocolAssessment) { // Do not clear the instance controls - or else the control for presenting complaint will be cleared as well if (triageProtocolAssessment == null) return; // Fill in presenting problem form.qmbProblem().newRow(triageProtocolAssessment.getPatientProblem().getProblem(), triageProtocolAssessment.getPatientProblem().getProblem().getPCName()); form.qmbProblem().setValue(triageProtocolAssessment.getPatientProblem().getProblem()); // Check main problem form.chkMainProblem().setValue(Boolean.TRUE.equals(triageProtocolAssessment.getIsMain())); // Update problem selection updateProblemSelection(); // Attempt to select descriptor (if still applies) grdPrioritiesRow discriminatorRow = form.grdPriorities().getRowByValue(triageProtocolAssessment.getDiscriminator()); if(discriminatorRow != null)// WDEV-15137 { discriminatorRow.setColSelect(true); } // Update discriminator selection changed updateDiscriminatorSelectionChanged(triageProtocolAssessment.getDiscriminator(), true); // Update authoring information form.qmbAssessmentHCP().newRow(triageProtocolAssessment.getAssessmentNurse(), triageProtocolAssessment.getAssessmentNurse().toString()); form.qmbAssessmentHCP().setValue(triageProtocolAssessment.getAssessmentNurse()); form.dtimAsessmentDate().setValue(triageProtocolAssessment.getAssessmentDateTime()); }
public TriageProtocolAssessmentVo getTriageProtocolAssessment(TriageProtocolAssessmentRefVo triageProtocol) { if (triageProtocol == null || triageProtocol.getID_TriageProtocolAssessment() == null) return null; return TriageProtocolAssessmentVoAssembler.create((TriageProtocolAssessment) getDomainFactory().getDomainObject(TriageProtocolAssessment.class, triageProtocol.getID_TriageProtocolAssessment())); }
public void saveTriageWithAssessment(TriageForTriageProtocolAssessmentVo triage, TriageProtocolAssessmentVo triageProtocol) throws StaleObjectException { if (triage == null) throw new CodingRuntimeException("Triage record to save is null."); if (!triage.isValidated()) throw new CodingRuntimeException("Triage record is not validated."); if (triage.getCurrentTriageAssessmentIsNotNull()) { if (Boolean.TRUE.equals(triage.getCurrentTriageAssessment().getIsMain()) && triage.getCurrentTriagePathway() == null) { PatientRefVo patient = triage.getCurrentTriageAssessment().getPatient(); CareContextRefVo careContext = triage.getCurrentTriageAssessment().getAttendance(); HcpLiteVo hcp = triage.getCurrentTriageAssessment().getAssessmentNurse(); triage.setCurrentTriagePathway(createSavePatientICP(triage.getCurrentTriageAssessment().getPatientProblem().getProblem(), patient, careContext, hcp)); } } Triage domainTriage = TriageForTriageProtocolAssessmentVoAssembler.extractTriage(getDomainFactory(), triage); if (triageProtocol != null) { TriageProtocolAssessment domainTriageProtocol = TriageProtocolAssessmentVoAssembler.extractTriageProtocolAssessment(getDomainFactory(), triageProtocol); getDomainFactory().save(domainTriageProtocol); } getDomainFactory().save(domainTriage); }
public boolean save() throws ims.framework.exceptions.PresentationLogicException { try { if (form.getLocalContext().getTriage() == null) throw new CodingRuntimeException("Triage must be selected"); TriageForTriageProtocolAssessmentVo triage = (TriageForTriageProtocolAssessmentVo) form.getLocalContext().getTriage().clone(); // Get on screen values TriageProtocolAssessmentVo originalRecord = form.getLocalContext().getTriageProtocolAssessment(); TriageProtocolAssessmentVo protocolAssessment = null; if (originalRecord == null || TriageAssessmentAction.RETRIAGE.equals(form.getLocalContext().getTriageAssessmentAction())) protocolAssessment = populateDataFromScreen(null); else protocolAssessment = populateDataFromScreen((TriageProtocolAssessmentVo) originalRecord.clone()); if (TriageAssessmentAction.ADD.equals(form.getLocalContext().getTriageAssessmentAction())) { return saveTriageAssessment(triage, originalRecord, protocolAssessment); } else if (TriageAssessmentAction.EDIT.equals(form.getLocalContext().getTriageAssessmentAction())) { return saveTriageAssessment(triage, originalRecord, protocolAssessment); } else if (TriageAssessmentAction.RETRIAGE.equals(form.getLocalContext().getTriageAssessmentAction())) { return saveTriageAssessment(triage, originalRecord, protocolAssessment); } } catch (StaleObjectException e) { engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue()); engine.close(DialogResult.CANCEL); return false; } return false; }