private Patient_AssessmentVo assemblePatientAssessment(PatientAssessment doPatientAssessment) { if(doPatientAssessment == null) return null; Patient_AssessmentVo patientAssessment = new Patient_AssessmentVo(doPatientAssessment.getId(), doPatientAssessment.getVersion()); patientAssessment.setIsRIE(doPatientAssessment.getIsRIE()); patientAssessment.setStatus(doPatientAssessment.getStatus() != null ? LookupHelper.getPatientAssessmentStatusReasonInstance(getLookupService(), doPatientAssessment.getStatus().getId()) : null); patientAssessment.setAuthoringInformation(AuthoringInformationVoAssembler.create(doPatientAssessment.getAuthoringInformation())); patientAssessment.setCompletedHCP(HcpLiteVoAssembler.create(doPatientAssessment.getCompletedHCP())); patientAssessment.setCompletedDateTime(doPatientAssessment.getCompletedDateTime() != null ? new DateTime(doPatientAssessment.getCompletedDateTime()) : null); patientAssessment.setPatient(doPatientAssessment.getPatient() != null ? new PatientRefVo(doPatientAssessment.getPatient().getId(), doPatientAssessment.getPatient().getVersion()) : null); patientAssessment.setEpisodeOfCare(doPatientAssessment.getEpisodeOfCare() != null ? new EpisodeOfCareRefVo(doPatientAssessment.getEpisodeOfCare().getId(), doPatientAssessment.getEpisodeOfCare().getVersion()) : null); patientAssessment.setCareContext(doPatientAssessment.getCareContext() != null ? new CareContextRefVo(doPatientAssessment.getCareContext().getId(), doPatientAssessment.getCareContext().getVersion()) : null); patientAssessment.setClinicalContact(doPatientAssessment.getClinicalContact() != null ? new ClinicalContactRefVo(doPatientAssessment.getClinicalContact().getId(), doPatientAssessment.getClinicalContact().getVersion()) : null); patientAssessment.setScore(doPatientAssessment.getScore()); patientAssessment.setIsAssessmentDocumentSaved(doPatientAssessment.isIsAssessmentDocumentSaved()); patientAssessment.setAssessmentData(assemblePatientAssessmentData(doPatientAssessment.getAssessmentData())); //wdev-15972 patientAssessment.setAssociatedDocument(doPatientAssessment.getAssociatedDocument() != null ? new PatientDocumentRefVo(doPatientAssessment.getAssociatedDocument().getId(),doPatientAssessment.getAssociatedDocument().getVersion()):null); //---------- return patientAssessment; }
private Patient_AssessmentAnswerVo assemblePatientAssessmentAnswer(PatientAssessmentAnswer doPatientAssessmentAnswer) { if(doPatientAssessmentAnswer == null) return null; Patient_AssessmentAnswerVo patientAssessmentAnswer = new Patient_AssessmentAnswerVo(doPatientAssessmentAnswer.getId(), doPatientAssessmentAnswer.getVersion()); patientAssessmentAnswer.setIsRIE(doPatientAssessmentAnswer.getIsRIE()); patientAssessmentAnswer.setAuthoringInfo(AuthoringInformationVoAssembler.create(doPatientAssessmentAnswer.getAuthoringInfo())); if(doPatientAssessmentAnswer.getAnswerDetails() != null) { patientAssessmentAnswer.setAnswerDetails(new Answer_DetailsVoCollection()); for (Object next : doPatientAssessmentAnswer.getAnswerDetails()) { if(next instanceof PatientAnswerDetails) { patientAssessmentAnswer.getAnswerDetails().add(assemblePatientAnswerDetails((PatientAnswerDetails) next)); } } } return patientAssessmentAnswer; }
private Patient_GraphicAssessmentFindingVo assemblePatientGraphicAssessmentFinding(PatientGraphicAssessmentFinding doPatientGraphicAssessmentFinding) { if(doPatientGraphicAssessmentFinding == null) return null; Patient_GraphicAssessmentFindingVo patientGraphicAssessmentFinding = new Patient_GraphicAssessmentFindingVo(doPatientGraphicAssessmentFinding.getId(), doPatientGraphicAssessmentFinding.getVersion()); patientGraphicAssessmentFinding.setIsRIE(doPatientGraphicAssessmentFinding.getIsRIE()); patientGraphicAssessmentFinding.setAreaName(doPatientGraphicAssessmentFinding.getAreaName()); patientGraphicAssessmentFinding.setGraphicFinding(DrawingGraphicFindingVoAssembler.create(doPatientGraphicAssessmentFinding.getGraphicFinding())); patientGraphicAssessmentFinding.setAreaDrawn(doPatientGraphicAssessmentFinding.getAreaDrawn()); patientGraphicAssessmentFinding.setAuthoringInformation(AuthoringInformationVoAssembler.create(doPatientGraphicAssessmentFinding.getAuthoringInformation())); patientGraphicAssessmentFinding.setAreaDetails(doPatientGraphicAssessmentFinding.getAreaDetails()); if(doPatientGraphicAssessmentFinding.getStage() != null) { patientGraphicAssessmentFinding.setStage(new Patient_GraphicalAssessmentStageVoCollection()); for(Object next : doPatientGraphicAssessmentFinding.getStage()) { if(next instanceof PatientGraphicalAssessmentStage) { patientGraphicAssessmentFinding.getStage().add(assemblePatientGraphicalAssessmentStage((PatientGraphicalAssessmentStage) next)); } } } return patientGraphicAssessmentFinding; }