/** * savePatientHandlingMovement */ public ims.nursing.vo.PatientHandlingMovementVo savePatientHandlingMovement(ims.nursing.vo.PatientHandlingMovementVo patHandlingMovement) throws ims.domain.exceptions.StaleObjectException { if(patHandlingMovement == null) throw new CodingRuntimeException("patHandlingMovement parameter is null - method savePatientHandlingMovement"); if(!patHandlingMovement.isValidated()) throw new CodingRuntimeException("patHandlingMovement has not been validated - method savePatientHandlingMovement"); DomainFactory factory = getDomainFactory(); PatientHandlingMovement doPatHandlingMovement = PatientHandlingMovementVoAssembler.extractPatientHandlingMovement(factory, patHandlingMovement); factory.save(doPatHandlingMovement); return PatientHandlingMovementVoAssembler.create(doPatHandlingMovement); }
/** * listPatientHandlingMovementByCareContext */ public ims.nursing.vo.PatientHandlingMovementVoCollection listPatientHandlingMovementByCareContext(ims.core.admin.vo.CareContextRefVo careContext) { DomainFactory factory = getDomainFactory(); List patHandlingMovements = factory.find("from PatientHandlingMovement patHandMove where patHandMove.careContext.id = :idCareContext", new String[]{"idCareContext"}, new Object[]{careContext.getID_CareContext()}); if(patHandlingMovements != null && patHandlingMovements.size() > 0) return PatientHandlingMovementVoAssembler.createPatientHandlingMovementVoCollectionFromPatientHandlingMovement(patHandlingMovements).sort(SortOrder.DESCENDING); return null; }