public NeedsAssessmentComponentEditVo save(NeedsAssessmentComponentEditVo record, PatientAssessmentVo assessment) throws StaleObjectException { if(record == null) throw new DomainRuntimeException("Invalid need assessment record to save"); if(!record.isValidated()) throw new DomainRuntimeException("Needs assessment record not validated"); DomainFactory factory = getDomainFactory(); NeedsAssessment domainRecord = NeedsAssessmentComponentEditVoAssembler.extractNeedsAssessment(factory, record); PatientAssessment patientAssessment = PatientAssessmentVoAssembler.extractPatientAssessment(factory,assessment); factory.save(domainRecord); factory.save(patientAssessment); return NeedsAssessmentComponentEditVoAssembler.create(domainRecord); }
public ims.core.vo.NeedsAssessmentComponentEditVo get(ims.clinical.vo.NeedsAssessmentRefVo record) { if(record == null || record.getID_NeedsAssessment() == null) throw new DomainRuntimeException("Invalid need assessment record to get"); return NeedsAssessmentComponentEditVoAssembler.create((NeedsAssessment)getDomainFactory().getDomainObject(NeedsAssessment.class, record.getID_NeedsAssessment())); }