Converter STU3-R4 improvements

This commit is contained in:
jamesagnew 2020-06-09 05:38:42 -04:00
parent 97b6a9fbdb
commit 2f85c2fd75
5 changed files with 363 additions and 2 deletions

View File

@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import org.hl7.fhir.convertors.conv30_40.Account30_40;
import org.hl7.fhir.convertors.conv30_40.ActivityDefinition30_40;
import org.hl7.fhir.convertors.conv30_40.AllergyIntolerance30_40;
import org.hl7.fhir.convertors.conv30_40.Appointment30_40;
@ -24,6 +25,7 @@ import org.hl7.fhir.convertors.conv30_40.Composition30_40;
import org.hl7.fhir.convertors.conv30_40.ConceptMap30_40;
import org.hl7.fhir.convertors.conv30_40.Condition30_40;
import org.hl7.fhir.convertors.conv30_40.Consent30_40;
import org.hl7.fhir.convertors.conv30_40.Coverage30_40;
import org.hl7.fhir.convertors.conv30_40.DataElement30_40;
import org.hl7.fhir.convertors.conv30_40.DetectedIssue30_40;
import org.hl7.fhir.convertors.conv30_40.DeviceUseStatement30_40;
@ -4931,6 +4933,8 @@ public class VersionConvertor_30_40 {
return null;
if (src instanceof org.hl7.fhir.dstu3.model.Parameters)
return Parameters30_40.convertParameters((org.hl7.fhir.dstu3.model.Parameters) src);
if (src instanceof org.hl7.fhir.dstu3.model.Account)
return Account30_40.convertAccount((org.hl7.fhir.dstu3.model.Account) src);
if (src instanceof org.hl7.fhir.dstu3.model.ActivityDefinition)
return ActivityDefinition30_40.convertActivityDefinition((org.hl7.fhir.dstu3.model.ActivityDefinition) src);
if (src instanceof org.hl7.fhir.dstu3.model.AllergyIntolerance)
@ -4971,6 +4975,8 @@ public class VersionConvertor_30_40 {
return Condition30_40.convertCondition((org.hl7.fhir.dstu3.model.Condition) src);
if (src instanceof org.hl7.fhir.dstu3.model.Consent)
return Consent30_40.convertConsent((org.hl7.fhir.dstu3.model.Consent) src);
if (src instanceof org.hl7.fhir.dstu3.model.Coverage)
return Coverage30_40.convertCoverage((org.hl7.fhir.dstu3.model.Coverage) src);
if (src instanceof org.hl7.fhir.dstu3.model.DataElement)
return DataElement30_40.convertDataElement((org.hl7.fhir.dstu3.model.DataElement) src);
if (src instanceof org.hl7.fhir.dstu3.model.DetectedIssue)
@ -5108,6 +5114,8 @@ public class VersionConvertor_30_40 {
else
return Parameters30_40.convertParameters((org.hl7.fhir.r4.model.Parameters) src);
}
if (src instanceof org.hl7.fhir.r4.model.Account)
return Account30_40.convertAccount((org.hl7.fhir.r4.model.Account) src);
if (src instanceof org.hl7.fhir.r4.model.ActivityDefinition)
return ActivityDefinition30_40.convertActivityDefinition((org.hl7.fhir.r4.model.ActivityDefinition) src);
if (src instanceof org.hl7.fhir.r4.model.AllergyIntolerance)
@ -5148,6 +5156,8 @@ public class VersionConvertor_30_40 {
return Condition30_40.convertCondition((org.hl7.fhir.r4.model.Condition) src);
if (src instanceof org.hl7.fhir.r4.model.Consent)
return Consent30_40.convertConsent((org.hl7.fhir.r4.model.Consent) src);
if (src instanceof org.hl7.fhir.r4.model.Coverage)
return Coverage30_40.convertCoverage((org.hl7.fhir.r4.model.Coverage) src);
if (src instanceof org.hl7.fhir.r4.model.DetectedIssue)
return DetectedIssue30_40.convertDetectedIssue((org.hl7.fhir.r4.model.DetectedIssue) src);
if (src instanceof org.hl7.fhir.r4.model.DeviceUseStatement)

View File

@ -0,0 +1,191 @@
package org.hl7.fhir.convertors.conv30_40;
import org.hl7.fhir.convertors.VersionConvertor_30_40;
import org.hl7.fhir.exceptions.FHIRException;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0
public class Account30_40 extends VersionConvertor_30_40 {
public static org.hl7.fhir.r4.model.Account convertAccount(org.hl7.fhir.dstu3.model.Account src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.Account tgt = new org.hl7.fhir.r4.model.Account();
copyDomainResource(src, tgt);
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(convertIdentifier(t));
if (src.hasStatus())
tgt.setStatusElement(convertAccountStatus(src.getStatusElement()));
if (src.hasType())
tgt.setType(convertCodeableConcept(src.getType()));
if (src.hasName())
tgt.setNameElement(convertString(src.getNameElement()));
if (src.hasSubject()) {
tgt.addSubject(convertReference(src.getSubject()));
}
if (src.hasPeriod())
tgt.setServicePeriod(convertPeriod(src.getPeriod()));
for (org.hl7.fhir.dstu3.model.Account.CoverageComponent t : src.getCoverage()) tgt.addCoverage(convertCoverageComponent(t));
if (src.hasOwner())
tgt.setOwner(convertReference(src.getOwner()));
if (src.hasDescription())
tgt.setDescriptionElement(convertString(src.getDescriptionElement()));
for (org.hl7.fhir.dstu3.model.Account.GuarantorComponent t : src.getGuarantor()) tgt.addGuarantor(convertGuarantorComponent(t));
return tgt;
}
public static org.hl7.fhir.dstu3.model.Account convertAccount(org.hl7.fhir.r4.model.Account src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.dstu3.model.Account tgt = new org.hl7.fhir.dstu3.model.Account();
copyDomainResource(src, tgt);
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(convertIdentifier(t));
if (src.hasStatus())
tgt.setStatusElement(convertAccountStatus(src.getStatusElement()));
if (src.hasType())
tgt.setType(convertCodeableConcept(src.getType()));
if (src.hasName())
tgt.setNameElement(convertString(src.getNameElement()));
if (src.getSubject().size() > 0) {
tgt.setSubject(convertReference(src.getSubjectFirstRep()));
}
if (src.hasServicePeriod())
tgt.setPeriod(convertPeriod(src.getServicePeriod()));
for (org.hl7.fhir.r4.model.Account.CoverageComponent t : src.getCoverage()) tgt.addCoverage(convertCoverageComponent(t));
if (src.hasOwner())
tgt.setOwner(convertReference(src.getOwner()));
if (src.hasDescription())
tgt.setDescriptionElement(convertString(src.getDescriptionElement()));
for (org.hl7.fhir.r4.model.Account.GuarantorComponent t : src.getGuarantor()) tgt.addGuarantor(convertGuarantorComponent(t));
return tgt;
}
static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Account.AccountStatus> convertAccountStatus(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Account.AccountStatus> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Account.AccountStatus> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.Account.AccountStatusEnumFactory());
VersionConvertor_30_40.copyElement(src, tgt);
switch(src.getValue()) {
case ACTIVE:
tgt.setValue(org.hl7.fhir.r4.model.Account.AccountStatus.ACTIVE);
break;
case INACTIVE:
tgt.setValue(org.hl7.fhir.r4.model.Account.AccountStatus.INACTIVE);
break;
case ENTEREDINERROR:
tgt.setValue(org.hl7.fhir.r4.model.Account.AccountStatus.ENTEREDINERROR);
break;
default:
tgt.setValue(org.hl7.fhir.r4.model.Account.AccountStatus.NULL);
break;
}
return tgt;
}
static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Account.AccountStatus> convertAccountStatus(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Account.AccountStatus> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Account.AccountStatus> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.Account.AccountStatusEnumFactory());
VersionConvertor_30_40.copyElement(src, tgt);
switch(src.getValue()) {
case ACTIVE:
tgt.setValue(org.hl7.fhir.dstu3.model.Account.AccountStatus.ACTIVE);
break;
case INACTIVE:
tgt.setValue(org.hl7.fhir.dstu3.model.Account.AccountStatus.INACTIVE);
break;
case ENTEREDINERROR:
tgt.setValue(org.hl7.fhir.dstu3.model.Account.AccountStatus.ENTEREDINERROR);
break;
case ONHOLD:
tgt.setValue(org.hl7.fhir.dstu3.model.Account.AccountStatus.ACTIVE);
break;
case UNKNOWN:
tgt.setValue(org.hl7.fhir.dstu3.model.Account.AccountStatus.ACTIVE);
break;
default:
tgt.setValue(org.hl7.fhir.dstu3.model.Account.AccountStatus.NULL);
break;
}
return tgt;
}
public static org.hl7.fhir.r4.model.Account.CoverageComponent convertCoverageComponent(org.hl7.fhir.dstu3.model.Account.CoverageComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.Account.CoverageComponent tgt = new org.hl7.fhir.r4.model.Account.CoverageComponent();
copyElement(src, tgt);
if (src.hasCoverage())
tgt.setCoverage(convertReference(src.getCoverage()));
if (src.hasPriority())
tgt.setPriorityElement(convertPositiveInt(src.getPriorityElement()));
return tgt;
}
public static org.hl7.fhir.dstu3.model.Account.CoverageComponent convertCoverageComponent(org.hl7.fhir.r4.model.Account.CoverageComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.dstu3.model.Account.CoverageComponent tgt = new org.hl7.fhir.dstu3.model.Account.CoverageComponent();
copyElement(src, tgt);
if (src.hasCoverage())
tgt.setCoverage(convertReference(src.getCoverage()));
if (src.hasPriority())
tgt.setPriorityElement(convertPositiveInt(src.getPriorityElement()));
return tgt;
}
public static org.hl7.fhir.r4.model.Account.GuarantorComponent convertGuarantorComponent(org.hl7.fhir.dstu3.model.Account.GuarantorComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.Account.GuarantorComponent tgt = new org.hl7.fhir.r4.model.Account.GuarantorComponent();
copyElement(src, tgt);
if (src.hasParty())
tgt.setParty(convertReference(src.getParty()));
if (src.hasOnHold())
tgt.setOnHoldElement(convertBoolean(src.getOnHoldElement()));
if (src.hasPeriod())
tgt.setPeriod(convertPeriod(src.getPeriod()));
return tgt;
}
public static org.hl7.fhir.dstu3.model.Account.GuarantorComponent convertGuarantorComponent(org.hl7.fhir.r4.model.Account.GuarantorComponent src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.dstu3.model.Account.GuarantorComponent tgt = new org.hl7.fhir.dstu3.model.Account.GuarantorComponent();
copyElement(src, tgt);
if (src.hasParty())
tgt.setParty(convertReference(src.getParty()));
if (src.hasOnHold())
tgt.setOnHoldElement(convertBoolean(src.getOnHoldElement()));
if (src.hasPeriod())
tgt.setPeriod(convertPeriod(src.getPeriod()));
return tgt;
}
}

View File

@ -0,0 +1,154 @@
package org.hl7.fhir.convertors.conv30_40;
import org.hl7.fhir.convertors.VersionConvertor_30_40;
import org.hl7.fhir.exceptions.FHIRException;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0
public class Coverage30_40 extends VersionConvertor_30_40 {
public static org.hl7.fhir.dstu3.model.Coverage convertCoverage(org.hl7.fhir.r4.model.Coverage src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.dstu3.model.Coverage tgt = new org.hl7.fhir.dstu3.model.Coverage();
copyDomainResource(src, tgt);
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(convertIdentifier(t));
if (src.hasStatus())
tgt.setStatusElement(convertCoverageStatus(src.getStatusElement()));
if (src.hasType())
tgt.setType(convertCodeableConcept(src.getType()));
if (src.hasPolicyHolder())
tgt.setPolicyHolder(convertReference(src.getPolicyHolder()));
if (src.hasSubscriber())
tgt.setSubscriber(convertReference(src.getSubscriber()));
if (src.hasSubscriberId())
tgt.setSubscriberIdElement(convertString(src.getSubscriberIdElement()));
if (src.hasBeneficiary())
tgt.setBeneficiary(convertReference(src.getBeneficiary()));
if (src.hasDependent())
tgt.setDependentElement(convertString(src.getDependentElement()));
if (src.hasRelationship())
tgt.setRelationship(convertCodeableConcept(src.getRelationship()));
if (src.hasPeriod())
tgt.setPeriod(convertPeriod(src.getPeriod()));
for (org.hl7.fhir.r4.model.Reference t : src.getPayor()) tgt.addPayor(convertReference(t));
if (src.hasOrder())
tgt.setOrderElement(convertPositiveInt(src.getOrderElement()));
if (src.hasNetwork())
tgt.setNetworkElement(convertString(src.getNetworkElement()));
for (org.hl7.fhir.r4.model.Reference t : src.getContract()) tgt.addContract(convertReference(t));
return tgt;
}
public static org.hl7.fhir.r4.model.Coverage convertCoverage(org.hl7.fhir.dstu3.model.Coverage src) throws FHIRException {
if (src == null)
return null;
org.hl7.fhir.r4.model.Coverage tgt = new org.hl7.fhir.r4.model.Coverage();
copyDomainResource(src, tgt);
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(convertIdentifier(t));
if (src.hasStatus())
tgt.setStatusElement(convertCoverageStatus(src.getStatusElement()));
if (src.hasType())
tgt.setType(convertCodeableConcept(src.getType()));
if (src.hasPolicyHolder())
tgt.setPolicyHolder(convertReference(src.getPolicyHolder()));
if (src.hasSubscriber())
tgt.setSubscriber(convertReference(src.getSubscriber()));
if (src.hasSubscriberId())
tgt.setSubscriberIdElement(convertString(src.getSubscriberIdElement()));
if (src.hasBeneficiary())
tgt.setBeneficiary(convertReference(src.getBeneficiary()));
if (src.hasDependent())
tgt.setDependentElement(convertString(src.getDependentElement()));
if (src.hasRelationship())
tgt.setRelationship(convertCodeableConcept(src.getRelationship()));
if (src.hasPeriod())
tgt.setPeriod(convertPeriod(src.getPeriod()));
for (org.hl7.fhir.dstu3.model.Reference t : src.getPayor()) tgt.addPayor(convertReference(t));
if (src.hasOrder())
tgt.setOrderElement(convertPositiveInt(src.getOrderElement()));
if (src.hasNetwork())
tgt.setNetworkElement(convertString(src.getNetworkElement()));
for (org.hl7.fhir.dstu3.model.Reference t : src.getContract()) tgt.addContract(convertReference(t));
return tgt;
}
static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Coverage.CoverageStatus> convertCoverageStatus(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Coverage.CoverageStatus> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Coverage.CoverageStatus> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.Coverage.CoverageStatusEnumFactory());
VersionConvertor_30_40.copyElement(src, tgt);
switch(src.getValue()) {
case ACTIVE:
tgt.setValue(org.hl7.fhir.dstu3.model.Coverage.CoverageStatus.ACTIVE);
break;
case CANCELLED:
tgt.setValue(org.hl7.fhir.dstu3.model.Coverage.CoverageStatus.CANCELLED);
break;
case DRAFT:
tgt.setValue(org.hl7.fhir.dstu3.model.Coverage.CoverageStatus.DRAFT);
break;
case ENTEREDINERROR:
tgt.setValue(org.hl7.fhir.dstu3.model.Coverage.CoverageStatus.ENTEREDINERROR);
break;
default:
tgt.setValue(org.hl7.fhir.dstu3.model.Coverage.CoverageStatus.NULL);
break;
}
return tgt;
}
static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Coverage.CoverageStatus> convertCoverageStatus(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Coverage.CoverageStatus> src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Coverage.CoverageStatus> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.Coverage.CoverageStatusEnumFactory());
VersionConvertor_30_40.copyElement(src, tgt);
switch(src.getValue()) {
case ACTIVE:
tgt.setValue(org.hl7.fhir.r4.model.Coverage.CoverageStatus.ACTIVE);
break;
case CANCELLED:
tgt.setValue(org.hl7.fhir.r4.model.Coverage.CoverageStatus.CANCELLED);
break;
case DRAFT:
tgt.setValue(org.hl7.fhir.r4.model.Coverage.CoverageStatus.DRAFT);
break;
case ENTEREDINERROR:
tgt.setValue(org.hl7.fhir.r4.model.Coverage.CoverageStatus.ENTEREDINERROR);
break;
default:
tgt.setValue(org.hl7.fhir.r4.model.Coverage.CoverageStatus.NULL);
break;
}
return tgt;
}
}

View File

@ -43,6 +43,9 @@ public class MedicationRequest30_40 {
tgt.setPriorPrescription(VersionConvertor_30_40.convertReference(src.getPriorPrescription()));
for (org.hl7.fhir.dstu3.model.Reference t : src.getDetectedIssue()) tgt.addDetectedIssue(VersionConvertor_30_40.convertReference(t));
for (org.hl7.fhir.dstu3.model.Reference t : src.getEventHistory()) tgt.addEventHistory(VersionConvertor_30_40.convertReference(t));
if (src.hasRequester() && src.getRequester().hasAgent()) {
tgt.setRequester(VersionConvertor_30_40.convertReference(src.getRequester().getAgent()));
}
return tgt;
}
@ -84,6 +87,9 @@ public class MedicationRequest30_40 {
tgt.setPriorPrescription(VersionConvertor_30_40.convertReference(src.getPriorPrescription()));
for (org.hl7.fhir.r4.model.Reference t : src.getDetectedIssue()) tgt.addDetectedIssue(VersionConvertor_30_40.convertReference(t));
for (org.hl7.fhir.r4.model.Reference t : src.getEventHistory()) tgt.addEventHistory(VersionConvertor_30_40.convertReference(t));
if (src.hasRequester()) {
tgt.getRequester().setAgent(VersionConvertor_30_40.convertReference(src.getRequester()));
}
return tgt;
}

View File

@ -40,7 +40,7 @@ public class RelatedPerson30_40 {
tgt.setGenderElement(VersionConvertor_30_40.convertAdministrativeGender(src.getGenderElement()));
}
if (src.hasBirthDate()) {
tgt.setBirthDate(tgt.getBirthDate());
tgt.setBirthDate(src.getBirthDate());
}
for (org.hl7.fhir.r4.model.Address t : src.getAddress()) {
tgt.addAddress(VersionConvertor_30_40.convertAddress(t));
@ -84,7 +84,7 @@ public class RelatedPerson30_40 {
tgt.setGenderElement(VersionConvertor_30_40.convertAdministrativeGender(src.getGenderElement()));
}
if (src.hasBirthDate()) {
tgt.setBirthDate(tgt.getBirthDate());
tgt.setBirthDate(src.getBirthDate());
}
for (org.hl7.fhir.dstu3.model.Address t : src.getAddress()) {
tgt.addAddress(VersionConvertor_30_40.convertAddress(t));