public TriageForTriageProtocolAssessmentVo getTriage(TriageRefVo triage) { if (triage == null || triage.getID_Triage() == null) return null; return TriageForTriageProtocolAssessmentVoAssembler.create((Triage) getDomainFactory().getDomainObject(Triage.class, triage.getID_Triage())); }
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); }