protected final void oncmbReferralSourceValueSet(Object value) { java.util.ArrayList listOfValues = this.form.cmbReferralSource().getValues(); if (value == null) { if (listOfValues != null && listOfValues.size() > 0) { for (int x = 0; x < listOfValues.size(); x++) { ims.core.vo.lookups.SourceOfReferral existingInstance = (ims.core.vo.lookups.SourceOfReferral) listOfValues.get(x); if (!existingInstance.isActive()) { bindcmbReferralSourceLookup(); return; } } } } else if (value instanceof ims.core.vo.lookups.SourceOfReferral) { ims.core.vo.lookups.SourceOfReferral instance = (ims.core.vo.lookups.SourceOfReferral) value; if (listOfValues != null) { if (listOfValues.size() == 0) bindcmbReferralSourceLookup(); for (int x = 0; x < listOfValues.size(); x++) { ims.core.vo.lookups.SourceOfReferral existingInstance = (ims.core.vo.lookups.SourceOfReferral) listOfValues.get(x); if (existingInstance.equals(instance)) return; } } this.form .cmbReferralSource() .newRow(instance, instance.getText(), instance.getImage(), instance.getTextColor()); } }
public void populate( ims.vo.ValueObjectBeanMap map, ims.core.vo.beans.PasEventShortAdmitVoBean bean) { this.id = bean.getId(); this.version = bean.getVersion(); this.patient = bean.getPatient() == null ? null : bean.getPatient().buildVo(map); this.paseventid = bean.getPasEventId(); this.eventdatetime = bean.getEventDateTime() == null ? null : bean.getEventDateTime().buildDateTime(); this.location = bean.getLocation() == null ? null : new ims.core.resource.place.vo.LocationRefVo( new Integer(bean.getLocation().getId()), bean.getLocation().getVersion()); this.consultant = bean.getConsultant() == null ? null : new ims.core.resource.people.vo.MedicRefVo( new Integer(bean.getConsultant().getId()), bean.getConsultant().getVersion()); this.specialty = bean.getSpecialty() == null ? null : ims.core.vo.lookups.Specialty.buildLookup(bean.getSpecialty()); this.passpecialty = bean.getPASSpecialty() == null ? null : ims.core.vo.lookups.PASSpecialty.buildLookup(bean.getPASSpecialty()); this.sourceofreferral = bean.getSourceOfReferral() == null ? null : ims.core.vo.lookups.SourceOfReferral.buildLookup(bean.getSourceOfReferral()); this.eventtype = bean.getEventType() == null ? null : ims.core.vo.lookups.PasEventType.buildLookup(bean.getEventType()); }
/** * 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.admin.domain.objects.Referral */ public static ims.core.vo.PASReferralVo insert( DomainObjectMap map, ims.core.vo.PASReferralVo valueObject, ims.core.admin.domain.objects.Referral domainObject) { if (null == domainObject) { return valueObject; } if (null == map) { map = new DomainObjectMap(); } valueObject.setID_Referral(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; // Details valueObject.setDetails(domainObject.getDetails()); // ReferralReceivedDate java.util.Date ReferralReceivedDate = domainObject.getReferralReceivedDate(); if (null != ReferralReceivedDate) { valueObject.setReferralReceivedDate(new ims.framework.utils.Date(ReferralReceivedDate)); } // OriginalReferralDate java.util.Date OriginalReferralDate = domainObject.getOriginalReferralDate(); if (null != OriginalReferralDate) { valueObject.setOriginalReferralDate(new ims.framework.utils.Date(OriginalReferralDate)); } // FirstApptDate java.util.Date FirstApptDate = domainObject.getFirstApptDate(); if (null != FirstApptDate) { valueObject.setFirstApptDate(new ims.framework.utils.DateTime(FirstApptDate)); } // SourceOfReferral ims.domain.lookups.LookupInstance instance5 = domainObject.getSourceOfReferral(); 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.SourceOfReferral voLookup5 = new ims.core.vo.lookups.SourceOfReferral( instance5.getId(), instance5.getText(), instance5.isActive(), null, img, color); ims.core.vo.lookups.SourceOfReferral 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.SourceOfReferral( parent5.getId(), parent5.getText(), parent5.isActive(), null, img, color)); parentVoLookup5 = parentVoLookup5.getParent(); parent5 = parent5.getParent(); } valueObject.setSourceOfReferral(voLookup5); } // ReferringGP valueObject.setReferringGP( ims.core.vo.domain.GpLiteVoAssembler.create(map, domainObject.getReferringGP())); // ReferringClinician valueObject.setReferringClinician( ims.core.vo.domain.HcpLiteVoAssembler.create(map, domainObject.getReferringClinician())); // ReferredTo valueObject.setReferredTo( ims.core.vo.domain.HcpLiteVoAssembler.create(map, domainObject.getReferredTo())); // ReferralDetails valueObject.setReferralDetails(domainObject.getReferralDetails()); // DateOfReferral java.util.Date DateOfReferral = domainObject.getDateOfReferral(); if (null != DateOfReferral) { valueObject.setDateOfReferral(new ims.framework.utils.Date(DateOfReferral)); } // ReferralLocation valueObject.setReferralLocation(domainObject.getReferralLocation()); // ReferralType ims.domain.lookups.LookupInstance instance12 = domainObject.getReferralType(); 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.ReferralType voLookup12 = new ims.core.vo.lookups.ReferralType( instance12.getId(), instance12.getText(), instance12.isActive(), null, img, color); ims.core.vo.lookups.ReferralType 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.ReferralType( parent12.getId(), parent12.getText(), parent12.isActive(), null, img, color)); parentVoLookup12 = parentVoLookup12.getParent(); parent12 = parent12.getParent(); } valueObject.setReferralType(voLookup12); } 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.ReferralLetterDetails */ public static ims.RefMan.vo.ReferralLetterServiceVo insert( DomainObjectMap map, ims.RefMan.vo.ReferralLetterServiceVo valueObject, ims.core.clinical.domain.objects.ReferralLetterDetails domainObject) { if (null == domainObject) { return valueObject; } if (null == map) { map = new DomainObjectMap(); } valueObject.setID_ReferralLetterDetails(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; // Service valueObject.setService( ims.core.vo.domain.ServiceLiteVoAssembler.create(map, domainObject.getService())); // ReferrerType ims.domain.lookups.LookupInstance instance2 = domainObject.getReferrerType(); 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.core.vo.lookups.SourceOfReferral voLookup2 = new ims.core.vo.lookups.SourceOfReferral( instance2.getId(), instance2.getText(), instance2.isActive(), null, img, color); ims.core.vo.lookups.SourceOfReferral 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.core.vo.lookups.SourceOfReferral( parent2.getId(), parent2.getText(), parent2.isActive(), null, img, color)); parentVoLookup2 = parentVoLookup2.getParent(); parent2 = parent2.getParent(); } valueObject.setReferrerType(voLookup2); } return valueObject; }