public MRSAAssessmentVoCollection listMRSA(CareContextRefVo careContext) { if (careContext == null || careContext.getID_CareContext() == null) return null; ArrayList<String> paramNames = new ArrayList<String>(); ArrayList<Object> paramValues = new ArrayList<Object>(); String query = "from MRSAAssessment mrsa where mrsa.class = MRSAAssessment and mrsa.careContext.id = :RCC"; paramNames.add("RCC"); paramValues.add(careContext.getID_CareContext()); return MRSAAssessmentVoAssembler.createMRSAAssessmentVoCollectionFromMRSAAssessment(getDomainFactory().find(query, paramNames, paramValues)).sort(SortOrder.DESCENDING); }
public MRSAAssessmentVo saveMRSA(MRSAAssessmentVo assessmentMRSA, ClinicalContactShortVo voClinicalContactShort) throws StaleObjectException { if(!assessmentMRSA.isValidated()) throw new DomainRuntimeException("This Pain Assessment has not been validated"); DomainFactory factory = getDomainFactory(); MRSAAssessment doAssessMRSA = MRSAAssessmentVoAssembler.extractMRSAAssessment(factory, assessmentMRSA); factory.save(doAssessMRSA); return MRSAAssessmentVoAssembler.create(doAssessMRSA); }