public PatientProcedureLiteVo getProcedureFromSuitableForSurgery(CareContextRefVo careContext) { if (careContext == null || !careContext.getID_CareContextIsNotNull()) throw new CodingRuntimeException("A care context must be selected"); DomainFactory factory = getDomainFactory(); IMSCriteria assessmentCriteria = new IMSCriteria(SuitableForSurgeryAssessment.class, factory); assessmentCriteria.equal("this.careContext.id", careContext.getID_CareContext()); List<SuitableForSurgeryAssessment> assessments = assessmentCriteria.find(); if (assessments == null || assessments.size() == 0) return null; SuitableForSurgeryAssessmentLiteVo assessment = SuitableForSurgeryAssessmentLiteVoAssembler.create(assessments.get(0)); if (assessment != null && assessment.getProcedureIsNotNull() && assessment.getProcedure().getID_PatientProcedureIsNotNull()) { return PatientProcedureLiteVoAssembler.create((PatientProcedure) factory.getDomainObject(PatientProcedure.class, assessment.getProcedure().getID_PatientProcedure())); } return null; }
public ims.core.vo.PatientProcedureLiteVo getProcedureFromSuitableForSurgery(ims.core.admin.vo.CareContextRefVo careContext) { if (careContext == null || !careContext.getID_CareContextIsNotNull()) throw new CodingRuntimeException("A care context must be selected"); DomainFactory factory = getDomainFactory(); IMSCriteria assessmentCriteria = new IMSCriteria(SuitableForSurgeryAssessment.class, factory); assessmentCriteria.equal("this.careContext.id", careContext.getID_CareContext()); List<SuitableForSurgeryAssessment> assessments = assessmentCriteria.find(); if (assessments == null || assessments.size() == 0) return null; SuitableForSurgeryAssessmentLiteVo assessment = SuitableForSurgeryAssessmentLiteVoAssembler.create(assessments.get(0)); if(assessment != null && assessment.getProcedureIsNotNull() && assessment.getProcedure().getID_PatientProcedureIsNotNull()) { return PatientProcedureLiteVoAssembler.create((PatientProcedure) factory.getDomainObject(PatientProcedure.class, assessment.getProcedure().getID_PatientProcedure())); } return null; }
public PatientProcedureLiteVo getProcedureLiteVo(PatientProcedureRefVo procRefVo) { DomainFactory factory = getDomainFactory(); PatientProcedure proc = (PatientProcedure) factory.getDomainObject(PatientProcedure.class, procRefVo.getID_PatientProcedure()); return (PatientProcedureLiteVoAssembler.create(proc)); }