public void populate( ims.vo.ValueObjectBeanMap map, ims.spinalinjuries.vo.beans.NurAssessmentCleansingDressingVoBean bean) { this.id = bean.getId(); this.version = bean.getVersion(); this.iscomplete = bean.getIsComplete(); this.assessmentinfo = ims.nursing.vo.AssessmentInfoCollection.buildFromBeanCollection(bean.getAssessmentInfo()); this.copy = bean.getCopy(); this.componenttype = bean.getComponentType() == null ? null : ims.nursing.vo.lookups.AssessmentComponentType.buildLookup(bean.getComponentType()); this.lastassessmentinfo = bean.getLastAssessmentInfo() == null ? null : bean.getLastAssessmentInfo().buildVo(map); this.careplantemplate = ims.nursing.vo.CarePlanTemplateCollection.buildFromBeanCollection( bean.getCarePlanTemplate()); this.careplans = ims.nursing.vo.CarePlanCollection.buildFromBeanCollection(bean.getCarePlans()); this.hygieneactivities = ims.nursing.vo.HygieneActivitiesCollection.buildFromBeanCollection( bean.getHygieneActivities()); this.dressingandgrooming = ims.nursing.vo.DressingAndGroomingActivitiesCollection.buildFromBeanCollection( bean.getDressingAndGrooming()); this.bathingpattern = bean.getBathingPattern() == null ? null : ims.nursing.vo.lookups.BathingPattern.buildLookup(bean.getBathingPattern()); this.frequency = bean.getFrequency(); }
/** * Update the ValueObject with the Domain Object. * * @param map DomainObjectMap of DomainObjects to already created ValueObjects. * @param valueObject to be updated * @param domainObject ims.nursing.careplans.domain.objects.CarePlanTemplate */ public static ims.nursing.vo.CarePlanTemplateTitle insert( DomainObjectMap map, ims.nursing.vo.CarePlanTemplateTitle valueObject, ims.nursing.careplans.domain.objects.CarePlanTemplate domainObject) { if (null == domainObject) { return valueObject; } if (null == map) { map = new DomainObjectMap(); } valueObject.setID_CarePlanTemplate(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; // CreationDate java.util.Date CreationDate = domainObject.getCreationDate(); if (null != CreationDate) { valueObject.setCreationDate(new ims.framework.utils.Date(CreationDate)); } // AssessmentComponent ims.domain.lookups.LookupInstance instance2 = domainObject.getAssessmentComponent(); 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.nursing.vo.lookups.AssessmentComponentType voLookup2 = new ims.nursing.vo.lookups.AssessmentComponentType( instance2.getId(), instance2.getText(), instance2.isActive(), null, img, color); ims.nursing.vo.lookups.AssessmentComponentType 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.nursing.vo.lookups.AssessmentComponentType( parent2.getId(), parent2.getText(), parent2.isActive(), null, img, color)); parentVoLookup2 = parentVoLookup2.getParent(); parent2 = parent2.getParent(); } valueObject.setAssessmentComponent(voLookup2); } // Title valueObject.setTitle(domainObject.getTitle()); // Active valueObject.setActive(domainObject.isActive()); 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.nursing.assessment.domain.objects.EatingComponent */ public static ims.coe.vo.AssessmentEatingAndDrinking insert( DomainObjectMap map, ims.coe.vo.AssessmentEatingAndDrinking valueObject, ims.nursing.assessment.domain.objects.EatingComponent domainObject) { if (null == domainObject) { return valueObject; } if (null == map) { map = new DomainObjectMap(); } valueObject.setID_AssessmentComponent(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; // NutritionalMethod java.util.List listNutritionalMethod = domainObject.getNutritionalMethod(); ims.nursing.vo.lookups.NutritionalMethodCollection NutritionalMethod = new ims.nursing.vo.lookups.NutritionalMethodCollection(); for (java.util.Iterator iterator = listNutritionalMethod.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.nursing.vo.lookups.NutritionalMethod voInstance = new ims.nursing.vo.lookups.NutritionalMethod( instance.getId(), instance.getText(), instance.isActive(), null, img, color); ims.nursing.vo.lookups.NutritionalMethod 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.nursing.vo.lookups.NutritionalMethod( parent.getId(), parent.getText(), parent.isActive(), null, img, color)); parentVoInstance = parentVoInstance.getParent(); parent = parent.getParent(); } NutritionalMethod.add(voInstance); } valueObject.setNutritionalMethod(NutritionalMethod); // OralAssessment valueObject.setOralAssessment( ims.nursing.vo.domain.OralAssessmentAssembler .createOralAssessmentCollectionFromEatingOralAssessment( map, domainObject.getOralAssessment())); // DifficultiesWithSwallowing ims.domain.lookups.LookupInstance instance3 = domainObject.getDifficultiesWithSwallowing(); if (null != instance3) { ims.framework.utils.ImagePath img = null; ims.framework.utils.Color color = null; img = null; if (instance3.getImage() != null) { img = new ims.framework.utils.ImagePath( instance3.getImage().getImageId(), instance3.getImage().getImagePath()); } color = instance3.getColor(); if (color != null) color.getValue(); ims.core.vo.lookups.YesNoUnknown voLookup3 = new ims.core.vo.lookups.YesNoUnknown( instance3.getId(), instance3.getText(), instance3.isActive(), null, img, color); ims.core.vo.lookups.YesNoUnknown parentVoLookup3 = voLookup3; ims.domain.lookups.LookupInstance parent3 = instance3.getParent(); while (parent3 != null) { if (parent3.getImage() != null) { img = new ims.framework.utils.ImagePath( parent3.getImage().getImageId(), parent3.getImage().getImagePath()); } else { img = null; } color = parent3.getColor(); if (color != null) color.getValue(); parentVoLookup3.setParent( new ims.core.vo.lookups.YesNoUnknown( parent3.getId(), parent3.getText(), parent3.isActive(), null, img, color)); parentVoLookup3 = parentVoLookup3.getParent(); parent3 = parent3.getParent(); } valueObject.setDifficultiesWithSwallowing(voLookup3); } // Swallowing valueObject.setSwallowing( ims.coe.vo.domain.SwallowingAssessmentAssembler .createSwallowingAssessmentCollectionFromEatingSwallowingDetails( map, domainObject.getSwallowing())); // ManualDexterity valueObject.setManualDexterity( ims.coe.vo.domain.ManualDexterityAssembler .createManualDexterityCollectionFromEatingManualDexterity( map, domainObject.getManualDexterity())); // DescribeAppetite ims.domain.lookups.LookupInstance instance6 = domainObject.getDescribeAppetite(); if (null != instance6) { ims.framework.utils.ImagePath img = null; ims.framework.utils.Color color = null; img = null; if (instance6.getImage() != null) { img = new ims.framework.utils.ImagePath( instance6.getImage().getImageId(), instance6.getImage().getImagePath()); } color = instance6.getColor(); if (color != null) color.getValue(); ims.coe.vo.lookups.DescribeAppetite voLookup6 = new ims.coe.vo.lookups.DescribeAppetite( instance6.getId(), instance6.getText(), instance6.isActive(), null, img, color); ims.coe.vo.lookups.DescribeAppetite parentVoLookup6 = voLookup6; ims.domain.lookups.LookupInstance parent6 = instance6.getParent(); while (parent6 != null) { if (parent6.getImage() != null) { img = new ims.framework.utils.ImagePath( parent6.getImage().getImageId(), parent6.getImage().getImagePath()); } else { img = null; } color = parent6.getColor(); if (color != null) color.getValue(); parentVoLookup6.setParent( new ims.coe.vo.lookups.DescribeAppetite( parent6.getId(), parent6.getText(), parent6.isActive(), null, img, color)); parentVoLookup6 = parentVoLookup6.getParent(); parent6 = parent6.getParent(); } valueObject.setDescribeAppetite(voLookup6); } // AnySpecialDiet ims.domain.lookups.LookupInstance instance7 = domainObject.getAnySpecialDiet(); if (null != instance7) { ims.framework.utils.ImagePath img = null; ims.framework.utils.Color color = null; img = null; if (instance7.getImage() != null) { img = new ims.framework.utils.ImagePath( instance7.getImage().getImageId(), instance7.getImage().getImagePath()); } color = instance7.getColor(); if (color != null) color.getValue(); ims.core.vo.lookups.YesNoUnknown voLookup7 = new ims.core.vo.lookups.YesNoUnknown( instance7.getId(), instance7.getText(), instance7.isActive(), null, img, color); ims.core.vo.lookups.YesNoUnknown parentVoLookup7 = voLookup7; ims.domain.lookups.LookupInstance parent7 = instance7.getParent(); while (parent7 != null) { if (parent7.getImage() != null) { img = new ims.framework.utils.ImagePath( parent7.getImage().getImageId(), parent7.getImage().getImagePath()); } else { img = null; } color = parent7.getColor(); if (color != null) color.getValue(); parentVoLookup7.setParent( new ims.core.vo.lookups.YesNoUnknown( parent7.getId(), parent7.getText(), parent7.isActive(), null, img, color)); parentVoLookup7 = parentVoLookup7.getParent(); parent7 = parent7.getParent(); } valueObject.setAnySpecialDiet(voLookup7); } // SpecialDiet ims.domain.lookups.LookupInstance instance8 = domainObject.getSpecialDiet(); if (null != instance8) { ims.framework.utils.ImagePath img = null; ims.framework.utils.Color color = null; img = null; if (instance8.getImage() != null) { img = new ims.framework.utils.ImagePath( instance8.getImage().getImageId(), instance8.getImage().getImagePath()); } color = instance8.getColor(); if (color != null) color.getValue(); ims.nursing.vo.lookups.SpecialDiet voLookup8 = new ims.nursing.vo.lookups.SpecialDiet( instance8.getId(), instance8.getText(), instance8.isActive(), null, img, color); ims.nursing.vo.lookups.SpecialDiet parentVoLookup8 = voLookup8; ims.domain.lookups.LookupInstance parent8 = instance8.getParent(); while (parent8 != null) { if (parent8.getImage() != null) { img = new ims.framework.utils.ImagePath( parent8.getImage().getImageId(), parent8.getImage().getImagePath()); } else { img = null; } color = parent8.getColor(); if (color != null) color.getValue(); parentVoLookup8.setParent( new ims.nursing.vo.lookups.SpecialDiet( parent8.getId(), parent8.getText(), parent8.isActive(), null, img, color)); parentVoLookup8 = parentVoLookup8.getParent(); parent8 = parent8.getParent(); } valueObject.setSpecialDiet(voLookup8); } // FoodPatientLikes valueObject.setFoodPatientLikes(domainObject.getFoodPatientLikes()); // FoodPatientDislikes valueObject.setFoodPatientDislikes(domainObject.getFoodPatientDislikes()); // FoodPatientFavourite valueObject.setFoodPatientFavourite(domainObject.getFoodPatientFavourite()); // RequireAssistance ims.domain.lookups.LookupInstance instance12 = domainObject.getRequireAssistance(); if (null != instance12) { ims.framework.utils.ImagePath img = null; ims.framework.utils.Color color = null; img = null; if (instance12.getImage() != null) { img = new ims.framework.utils.ImagePath( instance12.getImage().getImageId(), instance12.getImage().getImagePath()); } color = instance12.getColor(); if (color != null) color.getValue(); ims.core.vo.lookups.YesNoUnknown voLookup12 = new ims.core.vo.lookups.YesNoUnknown( instance12.getId(), instance12.getText(), instance12.isActive(), null, img, color); ims.core.vo.lookups.YesNoUnknown parentVoLookup12 = voLookup12; ims.domain.lookups.LookupInstance parent12 = instance12.getParent(); while (parent12 != null) { if (parent12.getImage() != null) { img = new ims.framework.utils.ImagePath( parent12.getImage().getImageId(), parent12.getImage().getImagePath()); } else { img = null; } color = parent12.getColor(); if (color != null) color.getValue(); parentVoLookup12.setParent( new ims.core.vo.lookups.YesNoUnknown( parent12.getId(), parent12.getText(), parent12.isActive(), null, img, color)); parentVoLookup12 = parentVoLookup12.getParent(); parent12 = parent12.getParent(); } valueObject.setRequireAssistance(voLookup12); } // MiniNutritionalAssessment valueObject.setMiniNutritionalAssessment( ims.nursing.vo.domain.MiniNutritionalAssessmentAssembler.create( map, domainObject.getMiniNutritionalAssessment())); // MNAScore valueObject.setMNAScore(domainObject.getMNAScore()); // isComplete valueObject.setIsComplete(domainObject.isIsComplete()); // AssessmentInfo valueObject.setAssessmentInfo( ims.nursing.vo.domain.AssessmentInfoAssembler .createAssessmentInfoCollectionFromAssessmentInfo( map, domainObject.getAssessmentInfo())); // Copy valueObject.setCopy(domainObject.isCopy()); // ComponentType ims.domain.lookups.LookupInstance instance18 = domainObject.getComponentType(); if (null != instance18) { ims.framework.utils.ImagePath img = null; ims.framework.utils.Color color = null; img = null; if (instance18.getImage() != null) { img = new ims.framework.utils.ImagePath( instance18.getImage().getImageId(), instance18.getImage().getImagePath()); } color = instance18.getColor(); if (color != null) color.getValue(); ims.nursing.vo.lookups.AssessmentComponentType voLookup18 = new ims.nursing.vo.lookups.AssessmentComponentType( instance18.getId(), instance18.getText(), instance18.isActive(), null, img, color); ims.nursing.vo.lookups.AssessmentComponentType parentVoLookup18 = voLookup18; ims.domain.lookups.LookupInstance parent18 = instance18.getParent(); while (parent18 != null) { if (parent18.getImage() != null) { img = new ims.framework.utils.ImagePath( parent18.getImage().getImageId(), parent18.getImage().getImagePath()); } else { img = null; } color = parent18.getColor(); if (color != null) color.getValue(); parentVoLookup18.setParent( new ims.nursing.vo.lookups.AssessmentComponentType( parent18.getId(), parent18.getText(), parent18.isActive(), null, img, color)); parentVoLookup18 = parentVoLookup18.getParent(); parent18 = parent18.getParent(); } valueObject.setComponentType(voLookup18); } // CarePlanTemplate valueObject.setCarePlanTemplate( ims.nursing.vo.domain.CarePlanTemplateAssembler .createCarePlanTemplateCollectionFromCarePlanTemplate( map, domainObject.getCarePlanTemplate())); // CarePlans valueObject.setCarePlans( ims.nursing.vo.domain.CarePlanAssembler.createCarePlanCollectionFromCarePlan( map, domainObject.getCarePlans())); return valueObject; }