private void populateSummaryClinicalInformation(OcsOrderVo order) { // Only update the value of the text box first time if (form.getGlobalContext().OCRR.getOrderAwaitingAuthorisation() != null) { form.lyrDetails().tabSummaryClinicalInfo().txtSummaryClinicalInfo().setValue(order.getSummaryClinicalInformation()); } else { SummaryClinicalInformationVo clinicalInfo = domain.getLatestSummaryClinicalInformation(form.getGlobalContext().Core.getPatientShort()); if (clinicalInfo != null) { form.lyrDetails().tabSummaryClinicalInfo().txtSummaryClinicalInfo().setValue(clinicalInfo.getSummaryClinicalInfo()); } } }
public SummaryClinicalInformationVo getLatestSummaryClinicalInformation(PatientRefVo patient) { if (patient == null || patient.getID_Patient() == null) return null; String query = "SELECT summary FROM SummaryClinicalInformation AS summary LEFT JOIN summary.patient AS patient WHERE summary.isRIE is null AND patient.id = :ID_PATIENT ORDER BY summary.systemInformation.creationDateTime DESC"; return SummaryClinicalInformationVoAssembler.create((SummaryClinicalInformation) getDomainFactory().findFirst(query, "ID_PATIENT", patient.getID_Patient())); }
private void populateInstanceControlsFromData(SummaryClinicalInformationVo summary) { // Clear instance controls clearInstanceControls(); // Check record to populate if (summary == null) return; // Populate data to instance controls form.ccAuthoring().setValue(summary.getAuthoringInformation()); form.dtimLastUpdated().setValue(summary.getSystemInformation().getLastupdateDateTime()); form.txtSummaryClinicalInformation().setValue(summary.getSummaryClinicalInfo()); }
private boolean isTheSameMoS(SummaryClinicalInformationVo summary) { if (summary == null) return false; MemberOfStaffLiteVo mosLite = (MemberOfStaffLiteVo) domain.getMosUser(); if (mosLite == null) return false; return mosLite.equals(summary.getRecordingUser().getRecordingUser()); }
private boolean isTheSameHCP(SummaryClinicalInformationVo summary) { if (summary == null) return false; HcpLiteVo hcpUser = (HcpLiteVo) domain.getHcpLiteUser(); if (hcpUser == null) return false; return hcpUser.equals(summary.getAuthoringInformation().getAuthoringHcp()); }
private boolean hasBeenUpdated(SummaryClinicalInformationVo summary) { if (summary == null) return false; if (summary.getSystemInformation().getLastupdateDateTime() != null) return true; return false; }
public SummaryClinicalInformationVo getSummaryClinicalInformation(SummaryClinicalInformationRefVo summary) { if (summary == null || summary.getID_SummaryClinicalInformation() == null) return null; return SummaryClinicalInformationVoAssembler.create((SummaryClinicalInformation) getDomainFactory().getDomainObject(SummaryClinicalInformation.class, summary.getID_SummaryClinicalInformation())); }
public SummaryClinicalInformationVo saveSummaryClinicalInformation(SummaryClinicalInformationVo summary) throws StaleObjectException { if (summary == null) throw new CodingRuntimeException("Can't save a null record."); if (!summary.isValidated()) throw new CodingRuntimeException("Record to save is not validated."); // Extract domain object to save SummaryClinicalInformation domSummary = SummaryClinicalInformationVoAssembler.extractSummaryClinicalInformation(getDomainFactory(), summary); getDomainFactory().save(domSummary); return SummaryClinicalInformationVoAssembler.create(domSummary); }