/** * Update the ValueObject with the Domain Object. * * @param map DomainObjectMap of DomainObjects to already created ValueObjects. * @param valueObject to be updated * @param domainObject ims.RefMan.domain.objects.ReportNote */ public static ims.RefMan.vo.CorrespondenceNoteLiteVo insert( DomainObjectMap map, ims.RefMan.vo.CorrespondenceNoteLiteVo valueObject, ims.RefMan.domain.objects.ReportNote domainObject) { if (null == domainObject) { return valueObject; } if (null == map) { map = new DomainObjectMap(); } valueObject.setID_ReportNote(domainObject.getId()); valueObject.setIsRIE(domainObject.getIsRIE()); // If this is a recordedInError record, and the domainObject // value isIncludeRecord has not been set, then we return null and // not the value object if (valueObject.getIsRIE() != null && valueObject.getIsRIE().booleanValue() == true && !domainObject.isIncludeRecord()) return null; // If this is not a recordedInError record, and the domainObject // value isIncludeRecord has been set, then we return null and // not the value object if ((valueObject.getIsRIE() == null || valueObject.getIsRIE().booleanValue() == false) && domainObject.isIncludeRecord()) return null; // CatsReferral if (domainObject.getCatsReferral() != null) { if (domainObject.getCatsReferral() instanceof HibernateProxy) // If the proxy is set, there is no need to lazy load, the proxy knows the // id already. { HibernateProxy p = (HibernateProxy) domainObject.getCatsReferral(); int id = Integer.parseInt(p.getHibernateLazyInitializer().getIdentifier().toString()); valueObject.setCatsReferral(new ims.RefMan.vo.CatsReferralRefVo(id, -1)); } else { valueObject.setCatsReferral( new ims.RefMan.vo.CatsReferralRefVo( domainObject.getCatsReferral().getId(), domainObject.getCatsReferral().getVersion())); } } // AuthoringInformation valueObject.setAuthoringInformation( ims.core.vo.domain.AuthoringInformationVoAssembler.create( map, domainObject.getAuthoringInformation())); // RecordingInformation valueObject.setRecordingInformation( ims.core.vo.domain.AuthoringInformationVoAssembler.create( map, domainObject.getRecordingInformation())); return valueObject; }
/** * Update the ValueObject with the Domain Object. * * @param map DomainObjectMap of DomainObjects to already created ValueObjects. * @param valueObject to be updated * @param domainObject ims.clinical.domain.objects.PatientProcedureChecklist */ public static ims.clinical.vo.PatientProcedureChecklistVo insert( DomainObjectMap map, ims.clinical.vo.PatientProcedureChecklistVo valueObject, ims.clinical.domain.objects.PatientProcedureChecklist domainObject) { if (null == domainObject) { return valueObject; } if (null == map) { map = new DomainObjectMap(); } valueObject.setID_PatientProcedureChecklist(domainObject.getId()); valueObject.setIsRIE(domainObject.getIsRIE()); // If this is a recordedInError record, and the domainObject // value isIncludeRecord has not been set, then we return null and // not the value object if (valueObject.getIsRIE() != null && valueObject.getIsRIE().booleanValue() == true && !domainObject.isIncludeRecord()) return null; // If this is not a recordedInError record, and the domainObject // value isIncludeRecord has been set, then we return null and // not the value object if ((valueObject.getIsRIE() == null || valueObject.getIsRIE().booleanValue() == false) && domainObject.isIncludeRecord()) return null; // ClinicalContact if (domainObject.getClinicalContact() != null) { if (domainObject.getClinicalContact() instanceof HibernateProxy) // If the proxy is set, there is no need to lazy load, the proxy knows the // id already. { HibernateProxy p = (HibernateProxy) domainObject.getClinicalContact(); int id = Integer.parseInt(p.getHibernateLazyInitializer().getIdentifier().toString()); valueObject.setClinicalContact(new ims.core.admin.vo.ClinicalContactRefVo(id, -1)); } else { valueObject.setClinicalContact( new ims.core.admin.vo.ClinicalContactRefVo( domainObject.getClinicalContact().getId(), domainObject.getClinicalContact().getVersion())); } } // PresentProcedures valueObject.setPresentProcedures( ims.core.vo.domain.PatientProcedureVoAssembler .createPatientProcedureVoCollectionFromPatientProcedure( map, domainObject.getPresentProcedures())); // OtherProcedures valueObject.setOtherProcedures( ims.clinical.vo.domain.PatientAbsentProcedureVoAssembler .createPatientAbsentProcedureVoCollectionFromPatientAbsentProcedure( map, domainObject.getOtherProcedures())); // AuthoringInformation valueObject.setAuthoringInformation( ims.core.vo.domain.AuthoringInformationVoAssembler.create( map, domainObject.getAuthoringInformation())); return valueObject; }
/** * Update the ValueObject with the Domain Object. * * @param map DomainObjectMap of DomainObjects to already created ValueObjects. * @param valueObject to be updated * @param domainObject ims.core.clinical.domain.objects.PatientDiagnosis */ public static ims.core.vo.PatientDiagnosisEDischargeVo insert( DomainObjectMap map, ims.core.vo.PatientDiagnosisEDischargeVo valueObject, ims.core.clinical.domain.objects.PatientDiagnosis domainObject) { if (null == domainObject) { return valueObject; } if (null == map) { map = new DomainObjectMap(); } valueObject.setID_PatientDiagnosis(domainObject.getId()); valueObject.setIsRIE(domainObject.getIsRIE()); // If this is a recordedInError record, and the domainObject // value isIncludeRecord has not been set, then we return null and // not the value object if (valueObject.getIsRIE() != null && valueObject.getIsRIE().booleanValue() == true && !domainObject.isIncludeRecord()) return null; // If this is not a recordedInError record, and the domainObject // value isIncludeRecord has been set, then we return null and // not the value object if ((valueObject.getIsRIE() == null || valueObject.getIsRIE().booleanValue() == false) && domainObject.isIncludeRecord()) return null; // StatusHistory valueObject.setStatusHistory( ims.clinical.vo.domain.PatientDiagnosisStatusVoAssembler .createPatientDiagnosisStatusVoCollectionFromPatientDiagnosisStatus( map, domainObject.getStatusHistory())); // DiagnosisDescription valueObject.setDiagnosisDescription(domainObject.getDiagnosisDescription()); // DiagnosedDate Integer DiagnosedDate = domainObject.getDiagnosedDate(); if (null != DiagnosedDate) { valueObject.setDiagnosedDate(new ims.framework.utils.PartialDate(DiagnosedDate)); } // Diagnosis valueObject.setDiagnosis( ims.core.vo.domain.DiagLiteVoAssembler.create(map, domainObject.getDiagnosis())); // SourceofInformation ims.domain.lookups.LookupInstance instance5 = domainObject.getSourceofInformation(); if (null != instance5) { ims.framework.utils.ImagePath img = null; ims.framework.utils.Color color = null; img = null; if (instance5.getImage() != null) { img = new ims.framework.utils.ImagePath( instance5.getImage().getImageId(), instance5.getImage().getImagePath()); } color = instance5.getColor(); if (color != null) color.getValue(); ims.core.vo.lookups.SourceofInformation voLookup5 = new ims.core.vo.lookups.SourceofInformation( instance5.getId(), instance5.getText(), instance5.isActive(), null, img, color); ims.core.vo.lookups.SourceofInformation parentVoLookup5 = voLookup5; ims.domain.lookups.LookupInstance parent5 = instance5.getParent(); while (parent5 != null) { if (parent5.getImage() != null) { img = new ims.framework.utils.ImagePath( parent5.getImage().getImageId(), parent5.getImage().getImagePath()); } else { img = null; } color = parent5.getColor(); if (color != null) color.getValue(); parentVoLookup5.setParent( new ims.core.vo.lookups.SourceofInformation( parent5.getId(), parent5.getText(), parent5.isActive(), null, img, color)); parentVoLookup5 = parentVoLookup5.getParent(); parent5 = parent5.getParent(); } valueObject.setSourceofInformation(voLookup5); } // isComplication valueObject.setIsComplication(domainObject.isIsComplication()); // isComorbidity valueObject.setIsComorbidity(domainObject.isIsComorbidity()); // DateResolved java.util.Date DateResolved = domainObject.getDateResolved(); if (null != DateResolved) { valueObject.setDateResolved(new ims.framework.utils.Date(DateResolved)); } // CareContext valueObject.setCareContext( ims.core.vo.domain.CareContextForEdischargeDiagnosisVoAssembler.create( map, domainObject.getCareContext())); // DiagLaterality ims.domain.lookups.LookupInstance instance10 = domainObject.getDiagLaterality(); if (null != instance10) { ims.framework.utils.ImagePath img = null; ims.framework.utils.Color color = null; img = null; if (instance10.getImage() != null) { img = new ims.framework.utils.ImagePath( instance10.getImage().getImageId(), instance10.getImage().getImagePath()); } color = instance10.getColor(); if (color != null) color.getValue(); ims.core.vo.lookups.LateralityLRB voLookup10 = new ims.core.vo.lookups.LateralityLRB( instance10.getId(), instance10.getText(), instance10.isActive(), null, img, color); ims.core.vo.lookups.LateralityLRB parentVoLookup10 = voLookup10; ims.domain.lookups.LookupInstance parent10 = instance10.getParent(); while (parent10 != null) { if (parent10.getImage() != null) { img = new ims.framework.utils.ImagePath( parent10.getImage().getImageId(), parent10.getImage().getImagePath()); } else { img = null; } color = parent10.getColor(); if (color != null) color.getValue(); parentVoLookup10.setParent( new ims.core.vo.lookups.LateralityLRB( parent10.getId(), parent10.getText(), parent10.isActive(), null, img, color)); parentVoLookup10 = parentVoLookup10.getParent(); parent10 = parent10.getParent(); } valueObject.setDiagLaterality(voLookup10); } // SiteText valueObject.setSiteText(domainObject.getSiteText()); // AuthoringInfo valueObject.setAuthoringInfo( ims.core.vo.domain.AuthoringInformationVoAssembler.create( map, domainObject.getAuthoringInfo())); // IncludeDiagnosisInDiscReports valueObject.setIncludeDiagnosisInDiscReports( ims.core.vo.domain.IncludeDiagnosisInDischargeReportVoAssembler .createIncludeDiagnosisInDischargeReportVoCollectionFromIncludeDiagnosisInDischargeReport( map, domainObject.getIncludeDiagnosisInDiscReports())); // isPrevRelevantDiagnosis valueObject.setIsPrevRelevantDiagnosis(domainObject.isIsPrevRelevantDiagnosis()); // SysInfo // set system information valueObject.setSysInfo( ims.vo.domain.SystemInformationAssembler.create(domainObject.getSystemInformation())); // DateOnset java.util.Date DateOnset = domainObject.getDateOnset(); if (null != DateOnset) { valueObject.setDateOnset(new ims.framework.utils.Date(DateOnset)); } // ClinicalContact if (domainObject.getClinicalContact() != null) { if (domainObject.getClinicalContact() instanceof HibernateProxy) // If the proxy is set, there is no need to lazy load, the proxy knows the // id already. { HibernateProxy p = (HibernateProxy) domainObject.getClinicalContact(); int id = Integer.parseInt(p.getHibernateLazyInitializer().getIdentifier().toString()); valueObject.setClinicalContact(new ims.core.admin.vo.ClinicalContactRefVo(id, -1)); } else { valueObject.setClinicalContact( new ims.core.admin.vo.ClinicalContactRefVo( domainObject.getClinicalContact().getId(), domainObject.getClinicalContact().getVersion())); } } // PrimaryForCareSpells valueObject.setPrimaryForCareSpells( ims.core.vo.domain.CSPrimaryDiagnosisVoAssembler .createCSPrimaryDiagnosisVoCollectionFromCsPrimaryDiagnosis( map, domainObject.getPrimaryForCareSpells())); // CoMorbidityForEpisodeOfCares valueObject.setCoMorbidityForEpisodeOfCares( ims.core.vo.domain.EpisodeOfCareCoMorbidityVoAssembler .createEpisodeOfCareCoMorbidityVoCollectionFromEpisodeOfCareCoMorbidity( map, domainObject.getCoMorbidityForEpisodeOfCares())); // EpisodeOfCare if (domainObject.getEpisodeOfCare() != null) { if (domainObject.getEpisodeOfCare() instanceof HibernateProxy) // If the proxy is set, there is no need to lazy load, the proxy knows the // id already. { HibernateProxy p = (HibernateProxy) domainObject.getEpisodeOfCare(); int id = Integer.parseInt(p.getHibernateLazyInitializer().getIdentifier().toString()); valueObject.setEpisodeOfCare(new ims.core.admin.vo.EpisodeOfCareRefVo(id, -1)); } else { valueObject.setEpisodeOfCare( new ims.core.admin.vo.EpisodeOfCareRefVo( domainObject.getEpisodeOfCare().getId(), domainObject.getEpisodeOfCare().getVersion())); } } // diagnosedOnAdmission valueObject.setDiagnosedOnAdmission(domainObject.isDiagnosedOnAdmission()); return valueObject; }
/** * Update the ValueObject with the Domain Object. * * @param map DomainObjectMap of DomainObjects to already created ValueObjects. * @param valueObject to be updated * @param domainObject ims.oncology.domain.objects.PathologyDetails */ public static ims.clinicaladmin.vo.PathologyDetailsVo insert( DomainObjectMap map, ims.clinicaladmin.vo.PathologyDetailsVo valueObject, ims.oncology.domain.objects.PathologyDetails domainObject) { if (null == domainObject) { return valueObject; } if (null == map) { map = new DomainObjectMap(); } valueObject.setID_PathologyDetails(domainObject.getId()); valueObject.setIsRIE(domainObject.getIsRIE()); // If this is a recordedInError record, and the domainObject // value isIncludeRecord has not been set, then we return null and // not the value object if (valueObject.getIsRIE() != null && valueObject.getIsRIE().booleanValue() == true && !domainObject.isIncludeRecord()) return null; // If this is not a recordedInError record, and the domainObject // value isIncludeRecord has been set, then we return null and // not the value object if ((valueObject.getIsRIE() == null || valueObject.getIsRIE().booleanValue() == false) && domainObject.isIncludeRecord()) return null; // InvasiveLesionSize valueObject.setInvasiveLesionSize(domainObject.getInvasiveLesionSize()); // SynchronousTumourIndicator ims.domain.lookups.LookupInstance instance2 = domainObject.getSynchronousTumourIndicator(); if (null != instance2) { ims.framework.utils.ImagePath img = null; ims.framework.utils.Color color = null; img = null; if (instance2.getImage() != null) { img = new ims.framework.utils.ImagePath( instance2.getImage().getImageId(), instance2.getImage().getImagePath()); } color = instance2.getColor(); if (color != null) color.getValue(); ims.oncology.vo.lookups.SynchronousTumourIndicator voLookup2 = new ims.oncology.vo.lookups.SynchronousTumourIndicator( instance2.getId(), instance2.getText(), instance2.isActive(), null, img, color); ims.oncology.vo.lookups.SynchronousTumourIndicator parentVoLookup2 = voLookup2; ims.domain.lookups.LookupInstance parent2 = instance2.getParent(); while (parent2 != null) { if (parent2.getImage() != null) { img = new ims.framework.utils.ImagePath( parent2.getImage().getImageId(), parent2.getImage().getImagePath()); } else { img = null; } color = parent2.getColor(); if (color != null) color.getValue(); parentVoLookup2.setParent( new ims.oncology.vo.lookups.SynchronousTumourIndicator( parent2.getId(), parent2.getText(), parent2.isActive(), null, img, color)); parentVoLookup2 = parentVoLookup2.getParent(); parent2 = parent2.getParent(); } valueObject.setSynchronousTumourIndicator(voLookup2); } // Histology valueObject.setHistology( ims.clinicaladmin.vo.domain.TumourHistologyLiteVoAssembler .createTumourHistologyLiteVoCollectionFromTumourHistology( map, domainObject.getHistology())); // VascularLymphInvasion ims.domain.lookups.LookupInstance instance4 = domainObject.getVascularLymphInvasion(); if (null != instance4) { ims.framework.utils.ImagePath img = null; ims.framework.utils.Color color = null; img = null; if (instance4.getImage() != null) { img = new ims.framework.utils.ImagePath( instance4.getImage().getImageId(), instance4.getImage().getImagePath()); } color = instance4.getColor(); if (color != null) color.getValue(); ims.oncology.vo.lookups.VascularLymphInvasion voLookup4 = new ims.oncology.vo.lookups.VascularLymphInvasion( instance4.getId(), instance4.getText(), instance4.isActive(), null, img, color); ims.oncology.vo.lookups.VascularLymphInvasion parentVoLookup4 = voLookup4; ims.domain.lookups.LookupInstance parent4 = instance4.getParent(); while (parent4 != null) { if (parent4.getImage() != null) { img = new ims.framework.utils.ImagePath( parent4.getImage().getImageId(), parent4.getImage().getImagePath()); } else { img = null; } color = parent4.getColor(); if (color != null) color.getValue(); parentVoLookup4.setParent( new ims.oncology.vo.lookups.VascularLymphInvasion( parent4.getId(), parent4.getText(), parent4.isActive(), null, img, color)); parentVoLookup4 = parentVoLookup4.getParent(); parent4 = parent4.getParent(); } valueObject.setVascularLymphInvasion(voLookup4); } // ExcisionMargin ims.domain.lookups.LookupInstance instance5 = domainObject.getExcisionMargin(); if (null != instance5) { ims.framework.utils.ImagePath img = null; ims.framework.utils.Color color = null; img = null; if (instance5.getImage() != null) { img = new ims.framework.utils.ImagePath( instance5.getImage().getImageId(), instance5.getImage().getImagePath()); } color = instance5.getColor(); if (color != null) color.getValue(); ims.oncology.vo.lookups.ExcisionMargin voLookup5 = new ims.oncology.vo.lookups.ExcisionMargin( instance5.getId(), instance5.getText(), instance5.isActive(), null, img, color); ims.oncology.vo.lookups.ExcisionMargin parentVoLookup5 = voLookup5; ims.domain.lookups.LookupInstance parent5 = instance5.getParent(); while (parent5 != null) { if (parent5.getImage() != null) { img = new ims.framework.utils.ImagePath( parent5.getImage().getImageId(), parent5.getImage().getImagePath()); } else { img = null; } color = parent5.getColor(); if (color != null) color.getValue(); parentVoLookup5.setParent( new ims.oncology.vo.lookups.ExcisionMargin( parent5.getId(), parent5.getText(), parent5.isActive(), null, img, color)); parentVoLookup5 = parentVoLookup5.getParent(); parent5 = parent5.getParent(); } valueObject.setExcisionMargin(voLookup5); } // NumberNodesExamined valueObject.setNumberNodesExamined(domainObject.getNumberNodesExamined()); // NodesPositiveNumber valueObject.setNodesPositiveNumber(domainObject.getNodesPositiveNumber()); // PathologicalTVal valueObject.setPathologicalTVal( ims.clinicaladmin.vo.domain.TumourGroupSiteTNMValueVoAssembler.create( map, domainObject.getPathologicalTVal())); // PathologicalNVal valueObject.setPathologicalNVal( ims.clinicaladmin.vo.domain.TumourGroupSiteTNMValueVoAssembler.create( map, domainObject.getPathologicalNVal())); // PathologicalMVal valueObject.setPathologicalMVal( ims.clinicaladmin.vo.domain.TumourGroupSiteTNMValueVoAssembler.create( map, domainObject.getPathologicalMVal())); // PathologicalOverall valueObject.setPathologicalOverall( ims.clinicaladmin.vo.domain.TumourGroupSiteOverallStagingVoAssembler.create( map, domainObject.getPathologicalOverall())); // ServiceReportId valueObject.setServiceReportId(domainObject.getServiceReportId()); // ServiceReportStatus ims.domain.lookups.LookupInstance instance13 = domainObject.getServiceReportStatus(); if (null != instance13) { ims.framework.utils.ImagePath img = null; ims.framework.utils.Color color = null; img = null; if (instance13.getImage() != null) { img = new ims.framework.utils.ImagePath( instance13.getImage().getImageId(), instance13.getImage().getImagePath()); } color = instance13.getColor(); if (color != null) color.getValue(); ims.oncology.vo.lookups.ServiceReportStatus voLookup13 = new ims.oncology.vo.lookups.ServiceReportStatus( instance13.getId(), instance13.getText(), instance13.isActive(), null, img, color); ims.oncology.vo.lookups.ServiceReportStatus parentVoLookup13 = voLookup13; ims.domain.lookups.LookupInstance parent13 = instance13.getParent(); while (parent13 != null) { if (parent13.getImage() != null) { img = new ims.framework.utils.ImagePath( parent13.getImage().getImageId(), parent13.getImage().getImagePath()); } else { img = null; } color = parent13.getColor(); if (color != null) color.getValue(); parentVoLookup13.setParent( new ims.oncology.vo.lookups.ServiceReportStatus( parent13.getId(), parent13.getText(), parent13.isActive(), null, img, color)); parentVoLookup13 = parentVoLookup13.getParent(); parent13 = parent13.getParent(); } valueObject.setServiceReportStatus(voLookup13); } // SpecimenNature ims.domain.lookups.LookupInstance instance14 = domainObject.getSpecimenNature(); if (null != instance14) { ims.framework.utils.ImagePath img = null; ims.framework.utils.Color color = null; img = null; if (instance14.getImage() != null) { img = new ims.framework.utils.ImagePath( instance14.getImage().getImageId(), instance14.getImage().getImagePath()); } color = instance14.getColor(); if (color != null) color.getValue(); ims.oncology.vo.lookups.SpecimenNature voLookup14 = new ims.oncology.vo.lookups.SpecimenNature( instance14.getId(), instance14.getText(), instance14.isActive(), null, img, color); ims.oncology.vo.lookups.SpecimenNature parentVoLookup14 = voLookup14; ims.domain.lookups.LookupInstance parent14 = instance14.getParent(); while (parent14 != null) { if (parent14.getImage() != null) { img = new ims.framework.utils.ImagePath( parent14.getImage().getImageId(), parent14.getImage().getImagePath()); } else { img = null; } color = parent14.getColor(); if (color != null) color.getValue(); parentVoLookup14.setParent( new ims.oncology.vo.lookups.SpecimenNature( parent14.getId(), parent14.getText(), parent14.isActive(), null, img, color)); parentVoLookup14 = parentVoLookup14.getParent(); parent14 = parent14.getParent(); } valueObject.setSpecimenNature(voLookup14); } // OrgaCodeRequester valueObject.setOrgaCodeRequester( ims.core.vo.domain.OrgLiteVoAssembler.create(map, domainObject.getOrgaCodeRequester())); // CareProfCodeRequester valueObject.setCareProfCodeRequester( (ims.core.vo.HcpLiteVo) ims.core.vo.domain.HcpLiteVoAssembler.create( map, domainObject.getCareProfCodeRequester())); // TCategoryExtended valueObject.setTCategoryExtended( ims.clinicaladmin.vo.domain.TumourGroupSiteTNMValueVoAssembler .createTumourGroupSiteTNMValueVoCollectionFromTumourGroupSiteTNMValue( map, domainObject.getTCategoryExtended())); // MCategoryExtended valueObject.setMCategoryExtended( ims.clinicaladmin.vo.domain.TumourGroupSiteTNMValueVoAssembler .createTumourGroupSiteTNMValueVoCollectionFromTumourGroupSiteTNMValue( map, domainObject.getMCategoryExtended())); // Status ims.domain.lookups.LookupInstance instance19 = domainObject.getStatus(); if (null != instance19) { ims.framework.utils.ImagePath img = null; ims.framework.utils.Color color = null; img = null; if (instance19.getImage() != null) { img = new ims.framework.utils.ImagePath( instance19.getImage().getImageId(), instance19.getImage().getImagePath()); } color = instance19.getColor(); if (color != null) color.getValue(); ims.oncology.vo.lookups.HistopathologyReportStatus voLookup19 = new ims.oncology.vo.lookups.HistopathologyReportStatus( instance19.getId(), instance19.getText(), instance19.isActive(), null, img, color); ims.oncology.vo.lookups.HistopathologyReportStatus parentVoLookup19 = voLookup19; ims.domain.lookups.LookupInstance parent19 = instance19.getParent(); while (parent19 != null) { if (parent19.getImage() != null) { img = new ims.framework.utils.ImagePath( parent19.getImage().getImageId(), parent19.getImage().getImagePath()); } else { img = null; } color = parent19.getColor(); if (color != null) color.getValue(); parentVoLookup19.setParent( new ims.oncology.vo.lookups.HistopathologyReportStatus( parent19.getId(), parent19.getText(), parent19.isActive(), null, img, color)); parentVoLookup19 = parentVoLookup19.getParent(); parent19 = parent19.getParent(); } valueObject.setStatus(voLookup19); } // AuthoringInformation valueObject.setAuthoringInformation( ims.core.vo.domain.AuthoringInformationVoAssembler.create( map, domainObject.getAuthoringInformation())); // AssociatedQuestions valueObject.setAssociatedQuestions( ims.assessment.vo.domain.PatientAssessmentVoAssembler.create( map, domainObject.getAssociatedQuestions())); // AssociatiatedTumourDetails valueObject.setAssociatiatedTumourDetails( ims.oncology.vo.domain.PrimaryTumourDetailsShortVoAssembler.create( map, domainObject.getAssociatiatedTumourDetails())); // GradeOfDifferentation valueObject.setGradeOfDifferentation( ims.clinicaladmin.vo.domain.TumourGroupHistopathologyGradeVoAssembler.create( map, domainObject.getGradeOfDifferentation())); // InvestigationType ims.domain.lookups.LookupInstance instance24 = domainObject.getInvestigationType(); if (null != instance24) { ims.framework.utils.ImagePath img = null; ims.framework.utils.Color color = null; img = null; if (instance24.getImage() != null) { img = new ims.framework.utils.ImagePath( instance24.getImage().getImageId(), instance24.getImage().getImagePath()); } color = instance24.getColor(); if (color != null) color.getValue(); ims.oncology.vo.lookups.InvestigationType voLookup24 = new ims.oncology.vo.lookups.InvestigationType( instance24.getId(), instance24.getText(), instance24.isActive(), null, img, color); ims.oncology.vo.lookups.InvestigationType parentVoLookup24 = voLookup24; ims.domain.lookups.LookupInstance parent24 = instance24.getParent(); while (parent24 != null) { if (parent24.getImage() != null) { img = new ims.framework.utils.ImagePath( parent24.getImage().getImageId(), parent24.getImage().getImagePath()); } else { img = null; } color = parent24.getColor(); if (color != null) color.getValue(); parentVoLookup24.setParent( new ims.oncology.vo.lookups.InvestigationType( parent24.getId(), parent24.getText(), parent24.isActive(), null, img, color)); parentVoLookup24 = parentVoLookup24.getParent(); parent24 = parent24.getParent(); } valueObject.setInvestigationType(voLookup24); } // SampleReceiptDate java.util.Date SampleReceiptDate = domainObject.getSampleReceiptDate(); if (null != SampleReceiptDate) { valueObject.setSampleReceiptDate(new ims.framework.utils.Date(SampleReceiptDate)); } // InvestigationResultDate java.util.Date InvestigationResultDate = domainObject.getInvestigationResultDate(); if (null != InvestigationResultDate) { valueObject.setInvestigationResultDate(new ims.framework.utils.Date(InvestigationResultDate)); } // ReportingConsultantCode valueObject.setReportingConsultantCode( (ims.core.vo.HcpLiteVo) ims.core.vo.domain.HcpLiteVoAssembler.create( map, domainObject.getReportingConsultantCode())); // ReportingOrganisation valueObject.setReportingOrganisation( ims.core.vo.domain.OrgLiteVoAssembler.create(map, domainObject.getReportingOrganisation())); // CareContext if (domainObject.getCareContext() != null) { if (domainObject.getCareContext() instanceof HibernateProxy) // If the proxy is set, there is no need to lazy load, the proxy knows the // id already. { HibernateProxy p = (HibernateProxy) domainObject.getCareContext(); int id = Integer.parseInt(p.getHibernateLazyInitializer().getIdentifier().toString()); valueObject.setCareContext(new ims.core.admin.vo.CareContextRefVo(id, -1)); } else { valueObject.setCareContext( new ims.core.admin.vo.CareContextRefVo( domainObject.getCareContext().getId(), domainObject.getCareContext().getVersion())); } } // PreviousVersion if (domainObject.getPreviousVersion() != null) { if (domainObject.getPreviousVersion() instanceof HibernateProxy) // If the proxy is set, there is no need to lazy load, the proxy knows the // id already. { HibernateProxy p = (HibernateProxy) domainObject.getPreviousVersion(); int id = Integer.parseInt(p.getHibernateLazyInitializer().getIdentifier().toString()); valueObject.setPreviousVersion(new ims.oncology.vo.PathologyDetailsRefVo(id, -1)); } else { valueObject.setPreviousVersion( new ims.oncology.vo.PathologyDetailsRefVo( domainObject.getPreviousVersion().getId(), domainObject.getPreviousVersion().getVersion())); } } return valueObject; }
/** * Update the ValueObject with the Domain Object. * * @param map DomainObjectMap of DomainObjects to already created ValueObjects. * @param valueObject to be updated * @param domainObject ims.RefMan.domain.objects.ConsultationClinicalNotes */ public static ims.RefMan.vo.ConsultationClinicalNotesVo insert( DomainObjectMap map, ims.RefMan.vo.ConsultationClinicalNotesVo valueObject, ims.RefMan.domain.objects.ConsultationClinicalNotes domainObject) { if (null == domainObject) { return valueObject; } if (null == map) { map = new DomainObjectMap(); } valueObject.setID_ConsultationClinicalNotes(domainObject.getId()); valueObject.setIsRIE(domainObject.getIsRIE()); // If this is a recordedInError record, and the domainObject // value isIncludeRecord has not been set, then we return null and // not the value object if (valueObject.getIsRIE() != null && valueObject.getIsRIE().booleanValue() == true && !domainObject.isIncludeRecord()) return null; // If this is not a recordedInError record, and the domainObject // value isIncludeRecord has been set, then we return null and // not the value object if ((valueObject.getIsRIE() == null || valueObject.getIsRIE().booleanValue() == false) && domainObject.isIncludeRecord()) return null; // HistoryPresentingComplaint valueObject.setHistoryPresentingComplaint(domainObject.getHistoryPresentingComplaint()); // RelevantPMH valueObject.setRelevantPMH(domainObject.getRelevantPMH()); // OtherRelevantHistory valueObject.setOtherRelevantHistory(domainObject.getOtherRelevantHistory()); // RelevantMedication valueObject.setRelevantMedication(domainObject.getRelevantMedication()); // Examination valueObject.setExamination(domainObject.getExamination()); // hasNoKnownAllergies valueObject.setHasNoKnownAllergies(domainObject.isHasNoKnownAllergies()); // Allergies valueObject.setAllergies( ims.core.vo.domain.PatientAllergyAssembler.createPatientAllergyCollectionFromPatientAllergy( map, domainObject.getAllergies())); // seeScannedNotes valueObject.setSeeScannedNotes(domainObject.isSeeScannedNotes()); // NotesDictated valueObject.setNotesDictated(domainObject.isNotesDictated()); // IncludeNotesInGpReport valueObject.setIncludeNotesInGpReport(domainObject.isIncludeNotesInGpReport()); // ClinicalImpression valueObject.setClinicalImpression(domainObject.getClinicalImpression()); // HealthQuestionnaireCompleted valueObject.setHealthQuestionnaireCompleted(domainObject.isHealthQuestionnaireCompleted()); // CatsReferral if (domainObject.getCatsReferral() != null) { if (domainObject.getCatsReferral() instanceof HibernateProxy) // If the proxy is set, there is no need to lazy load, the proxy knows the // id already. { HibernateProxy p = (HibernateProxy) domainObject.getCatsReferral(); int id = Integer.parseInt(p.getHibernateLazyInitializer().getIdentifier().toString()); valueObject.setCatsReferral(new ims.RefMan.vo.CatsReferralRefVo(id, -1)); } else { valueObject.setCatsReferral( new ims.RefMan.vo.CatsReferralRefVo( domainObject.getCatsReferral().getId(), domainObject.getCatsReferral().getVersion())); } } // RecordingInformation valueObject.setRecordingInformation( ims.core.vo.domain.AuthoringInformationVoAssembler.create( map, domainObject.getRecordingInformation())); // LastUpdatingHCP valueObject.setLastUpdatingHCP( ims.core.vo.domain.AuthoringInformationVoAssembler.create( map, domainObject.getLastUpdatingHCP())); // InitiallySeenBy valueObject.setInitiallySeenBy( ims.core.vo.domain.AuthoringInformationVoAssembler.create( map, domainObject.getInitiallySeenBy())); return valueObject; }
/** * Update the ValueObject with the Domain Object. * * @param map DomainObjectMap of DomainObjects to already created ValueObjects. * @param valueObject to be updated * @param domainObject ims.icps.instantiation.domain.objects.PatientICP */ public static ims.icp.vo.PatientICPVo insert( DomainObjectMap map, ims.icp.vo.PatientICPVo valueObject, ims.icps.instantiation.domain.objects.PatientICP domainObject) { if (null == domainObject) { return valueObject; } if (null == map) { map = new DomainObjectMap(); } valueObject.setID_PatientICP(domainObject.getId()); valueObject.setIsRIE(domainObject.getIsRIE()); // If this is a recordedInError record, and the domainObject // value isIncludeRecord has not been set, then we return null and // not the value object if (valueObject.getIsRIE() != null && valueObject.getIsRIE().booleanValue() == true && !domainObject.isIncludeRecord()) return null; // If this is not a recordedInError record, and the domainObject // value isIncludeRecord has been set, then we return null and // not the value object if ((valueObject.getIsRIE() == null || valueObject.getIsRIE().booleanValue() == false) && domainObject.isIncludeRecord()) return null; // Patient if (domainObject.getPatient() != null) { if (domainObject.getPatient() instanceof HibernateProxy) // If the proxy is set, there is no need to lazy load, the proxy knows the // id already. { HibernateProxy p = (HibernateProxy) domainObject.getPatient(); int id = Integer.parseInt(p.getHibernateLazyInitializer().getIdentifier().toString()); valueObject.setPatient(new ims.core.patient.vo.PatientRefVo(id, -1)); } else { valueObject.setPatient( new ims.core.patient.vo.PatientRefVo( domainObject.getPatient().getId(), domainObject.getPatient().getVersion())); } } // CareContext if (domainObject.getCareContext() != null) { if (domainObject.getCareContext() instanceof HibernateProxy) // If the proxy is set, there is no need to lazy load, the proxy knows the // id already. { HibernateProxy p = (HibernateProxy) domainObject.getCareContext(); int id = Integer.parseInt(p.getHibernateLazyInitializer().getIdentifier().toString()); valueObject.setCareContext(new ims.core.admin.vo.CareContextRefVo(id, -1)); } else { valueObject.setCareContext( new ims.core.admin.vo.CareContextRefVo( domainObject.getCareContext().getId(), domainObject.getCareContext().getVersion())); } } // ClinicalContact if (domainObject.getClinicalContact() != null) { if (domainObject.getClinicalContact() instanceof HibernateProxy) // If the proxy is set, there is no need to lazy load, the proxy knows the // id already. { HibernateProxy p = (HibernateProxy) domainObject.getClinicalContact(); int id = Integer.parseInt(p.getHibernateLazyInitializer().getIdentifier().toString()); valueObject.setClinicalContact(new ims.core.admin.vo.ClinicalContactRefVo(id, -1)); } else { valueObject.setClinicalContact( new ims.core.admin.vo.ClinicalContactRefVo( domainObject.getClinicalContact().getId(), domainObject.getClinicalContact().getVersion())); } } // PasEvent if (domainObject.getPasEvent() != null) { if (domainObject.getPasEvent() instanceof HibernateProxy) // If the proxy is set, there is no need to lazy load, the proxy knows the // id already. { HibernateProxy p = (HibernateProxy) domainObject.getPasEvent(); int id = Integer.parseInt(p.getHibernateLazyInitializer().getIdentifier().toString()); valueObject.setPasEvent(new ims.core.admin.pas.vo.PASEventRefVo(id, -1)); } else { valueObject.setPasEvent( new ims.core.admin.pas.vo.PASEventRefVo( domainObject.getPasEvent().getId(), domainObject.getPasEvent().getVersion())); } } // ICP valueObject.setICP(ims.icp.vo.domain.ICPLiteVoAssembler.create(map, domainObject.getICP())); // AuthoringInformation valueObject.setAuthoringInformation( ims.core.vo.domain.AuthoringInformationVoAssembler.create( map, domainObject.getAuthoringInformation())); // Stages valueObject.setStages( ims.icp.vo.domain.PatientICPStageVoAssembler .createPatientICPStageVoCollectionFromPatientICPStage(map, domainObject.getStages())); // hasOutstandingAdminActions valueObject.setHasOutstandingAdminActions(domainObject.isHasOutstandingAdminActions()); // hasOutstandingNursingActions valueObject.setHasOutstandingNursingActions(domainObject.isHasOutstandingNursingActions()); // hasOutstandingPhysioActions valueObject.setHasOutstandingPhysioActions(domainObject.isHasOutstandingPhysioActions()); // hasOutstandingClinicalActions valueObject.setHasOutstandingClinicalActions(domainObject.isHasOutstandingClinicalActions()); // Appointments ims.scheduling.vo.Booking_AppointmentRefVoCollection Appointments = new ims.scheduling.vo.Booking_AppointmentRefVoCollection(); for (java.util.Iterator iterator = domainObject.getAppointments().iterator(); iterator.hasNext(); ) { ims.scheduling.domain.objects.Booking_Appointment tmp = (ims.scheduling.domain.objects.Booking_Appointment) iterator.next(); if (tmp != null) Appointments.add( new ims.scheduling.vo.Booking_AppointmentRefVo(tmp.getId(), tmp.getVersion())); } valueObject.setAppointments(Appointments); // CriticalEvents ims.icps.instantiation.vo.PatientCriticalEventsRefVoCollection CriticalEvents = new ims.icps.instantiation.vo.PatientCriticalEventsRefVoCollection(); for (java.util.Iterator iterator = domainObject.getCriticalEvents().iterator(); iterator.hasNext(); ) { ims.icps.instantiation.domain.objects.PatientCriticalEvents tmp = (ims.icps.instantiation.domain.objects.PatientCriticalEvents) iterator.next(); if (tmp != null) CriticalEvents.add( new ims.icps.instantiation.vo.PatientCriticalEventsRefVo( tmp.getId(), tmp.getVersion())); } valueObject.setCriticalEvents(CriticalEvents); // StartedDateTime java.util.Date StartedDateTime = domainObject.getStartedDateTime(); if (null != StartedDateTime) { valueObject.setStartedDateTime(new ims.framework.utils.DateTime(StartedDateTime)); } // CompletedDateTime java.util.Date CompletedDateTime = domainObject.getCompletedDateTime(); if (null != CompletedDateTime) { valueObject.setCompletedDateTime(new ims.framework.utils.DateTime(CompletedDateTime)); } // EvaluationNotes ims.icps.instantiation.vo.PatientICPEvaluationNoteRefVoCollection EvaluationNotes = new ims.icps.instantiation.vo.PatientICPEvaluationNoteRefVoCollection(); for (java.util.Iterator iterator = domainObject.getEvaluationNotes().iterator(); iterator.hasNext(); ) { ims.icps.instantiation.domain.objects.PatientICPEvaluationNote tmp = (ims.icps.instantiation.domain.objects.PatientICPEvaluationNote) iterator.next(); if (tmp != null) EvaluationNotes.add( new ims.icps.instantiation.vo.PatientICPEvaluationNoteRefVo( tmp.getId(), tmp.getVersion())); } valueObject.setEvaluationNotes(EvaluationNotes); return valueObject; }
/** * Update the ValueObject with the Domain Object. * * @param map DomainObjectMap of DomainObjects to already created ValueObjects. * @param valueObject to be updated * @param domainObject ims.medical.domain.objects.OPDSpasticityAssessTreat */ public static ims.generalmedical.vo.OPDSpasticityAssessTreatVo insert( DomainObjectMap map, ims.generalmedical.vo.OPDSpasticityAssessTreatVo valueObject, ims.medical.domain.objects.OPDSpasticityAssessTreat domainObject) { if (null == domainObject) { return valueObject; } if (null == map) { map = new DomainObjectMap(); } valueObject.setID_OPDSpasticityAssessTreat(domainObject.getId()); valueObject.setIsRIE(domainObject.getIsRIE()); // If this is a recordedInError record, and the domainObject // value isIncludeRecord has not been set, then we return null and // not the value object if (valueObject.getIsRIE() != null && valueObject.getIsRIE().booleanValue() == true && !domainObject.isIncludeRecord()) return null; // If this is not a recordedInError record, and the domainObject // value isIncludeRecord has been set, then we return null and // not the value object if ((valueObject.getIsRIE() == null || valueObject.getIsRIE().booleanValue() == false) && domainObject.isIncludeRecord()) return null; // TreatGoals valueObject.setTreatGoals( ims.generalmedical.vo.domain.OPDSpasticityAssessTreatGoalVoAssembler .createOPDSpasticityAssessTreatGoalVoCollectionFromOPDSpasAssessTreatGoal( map, domainObject.getTreatGoals())); // TreatmentPlan java.util.List listTreatmentPlan = domainObject.getTreatmentPlan(); ims.spinalinjuries.vo.lookups.SATreatmentPlanCollection TreatmentPlan = new ims.spinalinjuries.vo.lookups.SATreatmentPlanCollection(); for (java.util.Iterator iterator = listTreatmentPlan.iterator(); iterator.hasNext(); ) { ims.framework.utils.ImagePath img = null; ims.framework.utils.Color color = null; ims.domain.lookups.LookupInstance instance = (ims.domain.lookups.LookupInstance) iterator.next(); if (instance.getImage() != null) { img = new ims.framework.utils.ImagePath( instance.getImage().getImageId(), instance.getImage().getImagePath()); } else { img = null; } color = instance.getColor(); if (color != null) color.getValue(); ims.spinalinjuries.vo.lookups.SATreatmentPlan voInstance = new ims.spinalinjuries.vo.lookups.SATreatmentPlan( instance.getId(), instance.getText(), instance.isActive(), null, img, color); ims.spinalinjuries.vo.lookups.SATreatmentPlan parentVoInstance = voInstance; ims.domain.lookups.LookupInstance parent = instance.getParent(); while (parent != null) { if (parent.getImage() != null) { img = new ims.framework.utils.ImagePath( parent.getImage().getImageId(), parent.getImage().getImagePath()); } else { img = null; } color = parent.getColor(); if (color != null) color.getValue(); parentVoInstance.setParent( new ims.spinalinjuries.vo.lookups.SATreatmentPlan( parent.getId(), parent.getText(), parent.isActive(), null, img, color)); parentVoInstance = parentVoInstance.getParent(); parent = parent.getParent(); } TreatmentPlan.add(voInstance); } valueObject.setTreatmentPlan(TreatmentPlan); // BotulismTreatment java.util.List listBotulismTreatment = domainObject.getBotulismTreatment(); ims.spinalinjuries.vo.lookups.SABotulinmCollection BotulismTreatment = new ims.spinalinjuries.vo.lookups.SABotulinmCollection(); for (java.util.Iterator iterator = listBotulismTreatment.iterator(); iterator.hasNext(); ) { ims.framework.utils.ImagePath img = null; ims.framework.utils.Color color = null; ims.domain.lookups.LookupInstance instance = (ims.domain.lookups.LookupInstance) iterator.next(); if (instance.getImage() != null) { img = new ims.framework.utils.ImagePath( instance.getImage().getImageId(), instance.getImage().getImagePath()); } else { img = null; } color = instance.getColor(); if (color != null) color.getValue(); ims.spinalinjuries.vo.lookups.SABotulinm voInstance = new ims.spinalinjuries.vo.lookups.SABotulinm( instance.getId(), instance.getText(), instance.isActive(), null, img, color); ims.spinalinjuries.vo.lookups.SABotulinm parentVoInstance = voInstance; ims.domain.lookups.LookupInstance parent = instance.getParent(); while (parent != null) { if (parent.getImage() != null) { img = new ims.framework.utils.ImagePath( parent.getImage().getImageId(), parent.getImage().getImagePath()); } else { img = null; } color = parent.getColor(); if (color != null) color.getValue(); parentVoInstance.setParent( new ims.spinalinjuries.vo.lookups.SABotulinm( parent.getId(), parent.getText(), parent.isActive(), null, img, color)); parentVoInstance = parentVoInstance.getParent(); parent = parent.getParent(); } BotulismTreatment.add(voInstance); } valueObject.setBotulismTreatment(BotulismTreatment); // JointContracture valueObject.setJointContracture(domainObject.getJointContracture()); // LimbFinding valueObject.setLimbFinding( ims.generalmedical.vo.domain.OPDSpasAssLimbsVoAssembler .createOPDSpasAssLimbsVoCollectionFromOPDSpasAssLimbs( map, domainObject.getLimbFinding())); // CareContext valueObject.setCareContext( ims.core.vo.domain.CareContextShortVoAssembler.create(map, domainObject.getCareContext())); // AuthoringInformation valueObject.setAuthoringInformation( ims.core.vo.domain.AuthoringInformationVoAssembler.create( map, domainObject.getAuthoringInformation())); return valueObject; }