conv10_40 files cleaned up

This commit is contained in:
markiantorno 2020-02-06 17:24:52 -05:00
parent 5054c83e90
commit 68979fee95
56 changed files with 1462 additions and 1894 deletions

View File

@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import java.util.Collections;
public class Appointment10_40 { public class Appointment10_40 {
@ -18,27 +19,21 @@ public class Appointment10_40 {
} }
if (src.hasType()) if (src.hasType())
tgt.addServiceType(VersionConvertor_10_40.convertCodeableConcept(src.getType())); tgt.addServiceType(VersionConvertor_10_40.convertCodeableConcept(src.getType()));
if (src.hasPriority()) { if (src.hasPriorityElement())
tgt.setPriority(src.getPriority()); tgt.setPriorityElement((org.hl7.fhir.r4.model.UnsignedIntType) VersionConvertor_10_40.convertType(src.getPriorityElement()));
} if (src.hasDescriptionElement())
if (src.hasDescription()) { tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
tgt.setDescription(src.getDescription()); if (src.hasStartElement())
} tgt.setStartElement((org.hl7.fhir.r4.model.InstantType) VersionConvertor_10_40.convertType(src.getStartElement()));
if (src.hasStart()) { if (src.hasEndElement())
tgt.setStart(src.getStart()); tgt.setEndElement((org.hl7.fhir.r4.model.InstantType) VersionConvertor_10_40.convertType(src.getEndElement()));
} if (src.hasMinutesDurationElement())
if (src.hasEnd()) { tgt.setMinutesDurationElement((org.hl7.fhir.r4.model.PositiveIntType) VersionConvertor_10_40.convertType(src.getMinutesDurationElement()));
tgt.setEnd(src.getEnd());
}
if (src.hasMinutesDuration()) {
tgt.setMinutesDuration(src.getMinutesDuration());
}
if (src.hasSlot()) { if (src.hasSlot()) {
for (org.hl7.fhir.dstu2.model.Reference t : src.getSlot()) tgt.addSlot(VersionConvertor_10_40.convertReference(t)); for (org.hl7.fhir.dstu2.model.Reference t : src.getSlot()) tgt.addSlot(VersionConvertor_10_40.convertReference(t));
} }
if (src.hasComment()) { if (src.hasCommentElement())
tgt.setComment(src.getComment()); tgt.setCommentElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getCommentElement()));
}
if (src.hasParticipant()) { if (src.hasParticipant()) {
for (org.hl7.fhir.dstu2.model.Appointment.AppointmentParticipantComponent t : src.getParticipant()) tgt.addParticipant(convertAppointmentParticipantComponent(t)); for (org.hl7.fhir.dstu2.model.Appointment.AppointmentParticipantComponent t : src.getParticipant()) tgt.addParticipant(convertAppointmentParticipantComponent(t));
} }
@ -59,27 +54,21 @@ public class Appointment10_40 {
if (src.hasServiceType()) { if (src.hasServiceType()) {
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getServiceType()) tgt.setType(VersionConvertor_10_40.convertCodeableConcept(t)); for (org.hl7.fhir.r4.model.CodeableConcept t : src.getServiceType()) tgt.setType(VersionConvertor_10_40.convertCodeableConcept(t));
} }
if (src.hasPriority()) { if (src.hasPriorityElement())
tgt.setPriority(src.getPriority()); tgt.setPriorityElement((org.hl7.fhir.dstu2.model.UnsignedIntType) VersionConvertor_10_40.convertType(src.getPriorityElement()));
} if (src.hasDescriptionElement())
if (src.hasDescription()) { tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
tgt.setDescription(src.getDescription()); if (src.hasStartElement())
} tgt.setStartElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_40.convertType(src.getStartElement()));
if (src.hasStart()) { if (src.hasEndElement())
tgt.setStart(src.getStart()); tgt.setEndElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_40.convertType(src.getEndElement()));
} if (src.hasMinutesDurationElement())
if (src.hasEnd()) { tgt.setMinutesDurationElement((org.hl7.fhir.dstu2.model.PositiveIntType) VersionConvertor_10_40.convertType(src.getMinutesDurationElement()));
tgt.setEnd(src.getEnd());
}
if (src.hasMinutesDuration()) {
tgt.setMinutesDuration(src.getMinutesDuration());
}
if (src.hasSlot()) { if (src.hasSlot()) {
for (org.hl7.fhir.r4.model.Reference t : src.getSlot()) tgt.addSlot(VersionConvertor_10_40.convertReference(t)); for (org.hl7.fhir.r4.model.Reference t : src.getSlot()) tgt.addSlot(VersionConvertor_10_40.convertReference(t));
} }
if (src.hasComment()) { if (src.hasCommentElement())
tgt.setComment(src.getComment()); tgt.setCommentElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getCommentElement()));
}
if (src.hasParticipant()) { if (src.hasParticipant()) {
for (org.hl7.fhir.r4.model.Appointment.AppointmentParticipantComponent t : src.getParticipant()) tgt.addParticipant(convertAppointmentParticipantComponent(t)); for (org.hl7.fhir.r4.model.Appointment.AppointmentParticipantComponent t : src.getParticipant()) tgt.addParticipant(convertAppointmentParticipantComponent(t));
} }

View File

@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import java.util.Collections;
public class AppointmentResponse10_40 { public class AppointmentResponse10_40 {
@ -16,12 +17,10 @@ public class AppointmentResponse10_40 {
if (src.hasAppointment()) { if (src.hasAppointment()) {
tgt.setAppointment(VersionConvertor_10_40.convertReference(src.getAppointment())); tgt.setAppointment(VersionConvertor_10_40.convertReference(src.getAppointment()));
} }
if (src.hasStart()) { if (src.hasStartElement())
tgt.setStart(src.getStart()); tgt.setStartElement((org.hl7.fhir.r4.model.InstantType) VersionConvertor_10_40.convertType(src.getStartElement()));
} if (src.hasEndElement())
if (src.hasEnd()) { tgt.setEndElement((org.hl7.fhir.r4.model.InstantType) VersionConvertor_10_40.convertType(src.getEndElement()));
tgt.setEnd(src.getEnd());
}
if (src.hasParticipantType()) { if (src.hasParticipantType()) {
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getParticipantType()) tgt.addParticipantType(VersionConvertor_10_40.convertCodeableConcept(t)); for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getParticipantType()) tgt.addParticipantType(VersionConvertor_10_40.convertCodeableConcept(t));
} }
@ -31,9 +30,8 @@ public class AppointmentResponse10_40 {
if (src.hasParticipantStatus()) { if (src.hasParticipantStatus()) {
tgt.setParticipantStatus(convertParticipantStatus(src.getParticipantStatus())); tgt.setParticipantStatus(convertParticipantStatus(src.getParticipantStatus()));
} }
if (src.hasComment()) { if (src.hasCommentElement())
tgt.setComment(src.getComment()); tgt.setCommentElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getCommentElement()));
}
return tgt; return tgt;
} }
@ -48,12 +46,10 @@ public class AppointmentResponse10_40 {
if (src.hasAppointment()) { if (src.hasAppointment()) {
tgt.setAppointment(VersionConvertor_10_40.convertReference(src.getAppointment())); tgt.setAppointment(VersionConvertor_10_40.convertReference(src.getAppointment()));
} }
if (src.hasStart()) { if (src.hasStartElement())
tgt.setStart(src.getStart()); tgt.setStartElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_40.convertType(src.getStartElement()));
} if (src.hasEndElement())
if (src.hasEnd()) { tgt.setEndElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_40.convertType(src.getEndElement()));
tgt.setEnd(src.getEnd());
}
if (src.hasParticipantType()) { if (src.hasParticipantType()) {
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getParticipantType()) tgt.addParticipantType(VersionConvertor_10_40.convertCodeableConcept(t)); for (org.hl7.fhir.r4.model.CodeableConcept t : src.getParticipantType()) tgt.addParticipantType(VersionConvertor_10_40.convertCodeableConcept(t));
} }
@ -63,9 +59,8 @@ public class AppointmentResponse10_40 {
if (src.hasParticipantStatus()) { if (src.hasParticipantStatus()) {
tgt.setParticipantStatus(convertParticipantStatus(src.getParticipantStatus())); tgt.setParticipantStatus(convertParticipantStatus(src.getParticipantStatus()));
} }
if (src.hasComment()) { if (src.hasCommentElement())
tgt.setComment(src.getComment()); tgt.setCommentElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getCommentElement()));
}
return tgt; return tgt;
} }

View File

@ -1,7 +1,12 @@
package org.hl7.fhir.convertors.conv10_40; package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_30;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r4.model.InstantType;
import org.hl7.fhir.r4.model.StringType;
import java.util.Collections;
public class AuditEvent10_40 { public class AuditEvent10_40 {
@ -21,13 +26,13 @@ public class AuditEvent10_40 {
tgt.setAction(convertAuditEventAction(src.getEvent().getAction())); tgt.setAction(convertAuditEventAction(src.getEvent().getAction()));
} }
if (src.hasEvent()) { if (src.hasEvent()) {
tgt.setRecorded(src.getEvent().getDateTime()); tgt.setRecordedElement((InstantType) VersionConvertor_10_40.convertType(src.getEvent().getDateTimeElement()));
} }
if (src.hasEvent()) { if (src.hasEvent()) {
tgt.setOutcome(convertAuditEventOutcome(src.getEvent().getOutcome())); tgt.setOutcome(convertAuditEventOutcome(src.getEvent().getOutcome()));
} }
if (src.hasEvent()) { if (src.hasEvent()) {
tgt.setOutcomeDesc(src.getEvent().getOutcomeDesc()); tgt.setOutcomeDescElement((StringType) VersionConvertor_10_40.convertType(src.getEvent().getOutcomeDescElement()));
} }
if (src.hasEvent()) { if (src.hasEvent()) {
for (org.hl7.fhir.dstu2.model.Coding t : src.getEvent().getPurposeOfEvent()) tgt.addPurposeOfEvent().addCoding(VersionConvertor_10_40.convertCoding(t)); for (org.hl7.fhir.dstu2.model.Coding t : src.getEvent().getPurposeOfEvent()) tgt.addPurposeOfEvent().addCoding(VersionConvertor_10_40.convertCoding(t));
@ -59,14 +64,14 @@ public class AuditEvent10_40 {
if (src.hasAction()) { if (src.hasAction()) {
tgt.getEvent().setAction(convertAuditEventAction(src.getAction())); tgt.getEvent().setAction(convertAuditEventAction(src.getAction()));
} }
if (src.hasRecorded()) { if (src.hasRecordedElement()) {
tgt.getEvent().setDateTime(src.getRecorded()); tgt.getEvent().setDateTimeElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_40.convertType(src.getRecordedElement()));
} }
if (src.hasOutcome()) { if (src.hasOutcome()) {
tgt.getEvent().setOutcome(convertAuditEventOutcome(src.getOutcome())); tgt.getEvent().setOutcome(convertAuditEventOutcome(src.getOutcome()));
} }
if (src.hasOutcomeDesc()) { if (src.hasOutcomeDescElement()) {
tgt.getEvent().setOutcomeDesc(src.getOutcomeDesc()); tgt.getEvent().setOutcomeDescElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getOutcomeDescElement()));
} }
if (src.hasPurposeOfEvent()) { if (src.hasPurposeOfEvent()) {
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getPurposeOfEvent()) for (org.hl7.fhir.r4.model.Coding cc : t.getCoding()) tgt.getEvent().addPurposeOfEvent(VersionConvertor_10_40.convertCoding(cc)); for (org.hl7.fhir.r4.model.CodeableConcept t : src.getPurposeOfEvent()) for (org.hl7.fhir.r4.model.Coding cc : t.getCoding()) tgt.getEvent().addPurposeOfEvent(VersionConvertor_10_40.convertCoding(cc));
@ -134,15 +139,12 @@ public class AuditEvent10_40 {
} }
if (src.hasUserId()) if (src.hasUserId())
tgt.getWho().setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getUserId())); tgt.getWho().setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getUserId()));
if (src.hasAltId()) { if (src.hasAltIdElement())
tgt.setAltId(src.getAltId()); tgt.setAltIdElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getAltIdElement()));
} if (src.hasNameElement())
if (src.hasName()) { tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
tgt.setName(src.getName()); if (src.hasRequestorElement())
} tgt.setRequestorElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getRequestorElement()));
if (src.hasRequestor()) {
tgt.setRequestor(src.getRequestor());
}
if (src.hasLocation()) { if (src.hasLocation()) {
tgt.setLocation(VersionConvertor_10_40.convertReference(src.getLocation())); tgt.setLocation(VersionConvertor_10_40.convertReference(src.getLocation()));
} }
@ -175,15 +177,12 @@ public class AuditEvent10_40 {
if (src.getWho().hasReference() || src.getWho().hasDisplay() || src.getWho().hasExtension() || src.getWho().hasId()) if (src.getWho().hasReference() || src.getWho().hasDisplay() || src.getWho().hasExtension() || src.getWho().hasId())
tgt.setReference(VersionConvertor_10_40.convertReference(src.getWho())); tgt.setReference(VersionConvertor_10_40.convertReference(src.getWho()));
} }
if (src.hasAltId()) { if (src.hasAltIdElement())
tgt.setAltId(src.getAltId()); tgt.setAltIdElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getAltIdElement()));
} if (src.hasNameElement())
if (src.hasName()) { tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
tgt.setName(src.getName()); if (src.hasRequestorElement())
} tgt.setRequestorElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getRequestorElement()));
if (src.hasRequestor()) {
tgt.setRequestor(src.getRequestor());
}
if (src.hasLocation()) { if (src.hasLocation()) {
tgt.setLocation(VersionConvertor_10_40.convertReference(src.getLocation())); tgt.setLocation(VersionConvertor_10_40.convertReference(src.getLocation()));
} }
@ -207,9 +206,8 @@ public class AuditEvent10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkComponent tgt = new org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkComponent(); org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkComponent tgt = new org.hl7.fhir.dstu2.model.AuditEvent.AuditEventParticipantNetworkComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasAddress()) { if (src.hasAddressElement())
tgt.setAddress(src.getAddress()); tgt.setAddressElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getAddressElement()));
}
if (src.hasType()) { if (src.hasType()) {
tgt.setType(convertAuditEventParticipantNetworkType(src.getType())); tgt.setType(convertAuditEventParticipantNetworkType(src.getType()));
} }
@ -221,9 +219,8 @@ public class AuditEvent10_40 {
return null; return null;
org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkComponent tgt = new org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkComponent(); org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkComponent tgt = new org.hl7.fhir.r4.model.AuditEvent.AuditEventAgentNetworkComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasAddress()) { if (src.hasAddressElement())
tgt.setAddress(src.getAddress()); tgt.setAddressElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getAddressElement()));
}
if (src.hasType()) { if (src.hasType()) {
tgt.setType(convertAuditEventParticipantNetworkType(src.getType())); tgt.setType(convertAuditEventParticipantNetworkType(src.getType()));
} }
@ -251,12 +248,10 @@ public class AuditEvent10_40 {
if (src.hasSecurityLabel()) { if (src.hasSecurityLabel()) {
for (org.hl7.fhir.dstu2.model.Coding t : src.getSecurityLabel()) tgt.addSecurityLabel(VersionConvertor_10_40.convertCoding(t)); for (org.hl7.fhir.dstu2.model.Coding t : src.getSecurityLabel()) tgt.addSecurityLabel(VersionConvertor_10_40.convertCoding(t));
} }
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
} if (src.hasDescriptionElement())
if (src.hasDescription()) { tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
tgt.setDescription(src.getDescription());
}
if (src.hasQuery()) { if (src.hasQuery()) {
tgt.setQuery(src.getQuery()); tgt.setQuery(src.getQuery());
} }
@ -289,12 +284,10 @@ public class AuditEvent10_40 {
if (src.hasSecurityLabel()) { if (src.hasSecurityLabel()) {
for (org.hl7.fhir.r4.model.Coding t : src.getSecurityLabel()) tgt.addSecurityLabel(VersionConvertor_10_40.convertCoding(t)); for (org.hl7.fhir.r4.model.Coding t : src.getSecurityLabel()) tgt.addSecurityLabel(VersionConvertor_10_40.convertCoding(t));
} }
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
} if (src.hasDescriptionElement())
if (src.hasDescription()) { tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
tgt.setDescription(src.getDescription());
}
if (src.hasQuery()) { if (src.hasQuery()) {
tgt.setQuery(src.getQuery()); tgt.setQuery(src.getQuery());
} }
@ -309,9 +302,8 @@ public class AuditEvent10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectDetailComponent tgt = new org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectDetailComponent(); org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectDetailComponent tgt = new org.hl7.fhir.dstu2.model.AuditEvent.AuditEventObjectDetailComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasType()) { if (src.hasTypeElement())
tgt.setType(src.getType()); tgt.setTypeElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getTypeElement()));
}
if (src.hasValueStringType()) if (src.hasValueStringType())
tgt.setValue(src.getValueStringType().getValue().getBytes()); tgt.setValue(src.getValueStringType().getValue().getBytes());
else if (src.hasValueBase64BinaryType()) else if (src.hasValueBase64BinaryType())
@ -324,9 +316,8 @@ public class AuditEvent10_40 {
return null; return null;
org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityDetailComponent tgt = new org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityDetailComponent(); org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityDetailComponent tgt = new org.hl7.fhir.r4.model.AuditEvent.AuditEventEntityDetailComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasType()) { if (src.hasTypeElement())
tgt.setType(src.getType()); tgt.setTypeElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getTypeElement()));
}
if (src.hasValue()) if (src.hasValue())
tgt.setValue(new org.hl7.fhir.r4.model.Base64BinaryType(src.getValue())); tgt.setValue(new org.hl7.fhir.r4.model.Base64BinaryType(src.getValue()));
return tgt; return tgt;
@ -409,9 +400,8 @@ public class AuditEvent10_40 {
return null; return null;
org.hl7.fhir.r4.model.AuditEvent.AuditEventSourceComponent tgt = new org.hl7.fhir.r4.model.AuditEvent.AuditEventSourceComponent(); org.hl7.fhir.r4.model.AuditEvent.AuditEventSourceComponent tgt = new org.hl7.fhir.r4.model.AuditEvent.AuditEventSourceComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasSite()) { if (src.hasSiteElement())
tgt.setSite(src.getSite()); tgt.setSiteElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getSiteElement()));
}
if (src.hasIdentifier()) if (src.hasIdentifier())
tgt.getObserver().setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifier())); tgt.getObserver().setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifier()));
if (src.hasType()) { if (src.hasType()) {
@ -425,9 +415,8 @@ public class AuditEvent10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.AuditEvent.AuditEventSourceComponent tgt = new org.hl7.fhir.dstu2.model.AuditEvent.AuditEventSourceComponent(); org.hl7.fhir.dstu2.model.AuditEvent.AuditEventSourceComponent tgt = new org.hl7.fhir.dstu2.model.AuditEvent.AuditEventSourceComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasSite()) { if (src.hasSiteElement())
tgt.setSite(src.getSite()); tgt.setSiteElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getSiteElement()));
}
if (src.hasObserver()) if (src.hasObserver())
tgt.setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getObserver().getIdentifier())); tgt.setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getObserver().getIdentifier()));
if (src.hasType()) { if (src.hasType()) {

View File

@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import java.util.Collections;
public class Basic10_40 { public class Basic10_40 {
@ -19,9 +20,8 @@ public class Basic10_40 {
if (src.hasSubject()) { if (src.hasSubject()) {
tgt.setSubject(VersionConvertor_10_40.convertReference(src.getSubject())); tgt.setSubject(VersionConvertor_10_40.convertReference(src.getSubject()));
} }
if (src.hasCreated()) { if (src.hasCreatedElement())
tgt.setCreated(src.getCreated()); tgt.setCreatedElement((org.hl7.fhir.r4.model.DateType) VersionConvertor_10_40.convertType(src.getCreatedElement()));
}
if (src.hasAuthor()) { if (src.hasAuthor()) {
tgt.setAuthor(VersionConvertor_10_40.convertReference(src.getAuthor())); tgt.setAuthor(VersionConvertor_10_40.convertReference(src.getAuthor()));
} }
@ -42,9 +42,8 @@ public class Basic10_40 {
if (src.hasSubject()) { if (src.hasSubject()) {
tgt.setSubject(VersionConvertor_10_40.convertReference(src.getSubject())); tgt.setSubject(VersionConvertor_10_40.convertReference(src.getSubject()));
} }
if (src.hasCreated()) { if (src.hasCreatedElement())
tgt.setCreated(src.getCreated()); tgt.setCreatedElement((org.hl7.fhir.dstu2.model.DateType) VersionConvertor_10_40.convertType(src.getCreatedElement()));
}
if (src.hasAuthor()) { if (src.hasAuthor()) {
tgt.setAuthor(VersionConvertor_10_40.convertReference(src.getAuthor())); tgt.setAuthor(VersionConvertor_10_40.convertReference(src.getAuthor()));
} }

View File

@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import java.util.Collections;
public class Binary10_40 { public class Binary10_40 {
@ -10,9 +11,8 @@ public class Binary10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.Binary tgt = new org.hl7.fhir.dstu2.model.Binary(); org.hl7.fhir.dstu2.model.Binary tgt = new org.hl7.fhir.dstu2.model.Binary();
VersionConvertor_10_40.copyResource(src, tgt); VersionConvertor_10_40.copyResource(src, tgt);
if (src.hasContentType()) { if (src.hasContentTypeElement())
tgt.setContentType(src.getContentType()); tgt.setContentTypeElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_40.convertType(src.getContentTypeElement()));
}
tgt.setContent(src.getContent()); tgt.setContent(src.getContent());
return tgt; return tgt;
} }
@ -22,9 +22,8 @@ public class Binary10_40 {
return null; return null;
org.hl7.fhir.r4.model.Binary tgt = new org.hl7.fhir.r4.model.Binary(); org.hl7.fhir.r4.model.Binary tgt = new org.hl7.fhir.r4.model.Binary();
VersionConvertor_10_40.copyResource(src, tgt); VersionConvertor_10_40.copyResource(src, tgt);
if (src.hasContentType()) { if (src.hasContentTypeElement())
tgt.setContentType(src.getContentType()); tgt.setContentTypeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_10_40.convertType(src.getContentTypeElement()));
}
if (src.hasContent()) { if (src.hasContent()) {
tgt.setContent(src.getContent()); tgt.setContent(src.getContent());
} }

View File

@ -3,6 +3,7 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertorAdvisor40; import org.hl7.fhir.convertors.VersionConvertorAdvisor40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import java.util.Collections;
public class Bundle10_40 { public class Bundle10_40 {
@ -14,8 +15,8 @@ public class Bundle10_40 {
if (src.hasType()) { if (src.hasType()) {
tgt.setType(convertBundleType(src.getType())); tgt.setType(convertBundleType(src.getType()));
} }
if (src.hasTotal()) if (src.hasTotalElement())
tgt.setTotal(src.getTotal()); tgt.setTotalElement((org.hl7.fhir.r4.model.UnsignedIntType) VersionConvertor_10_40.convertType(src.getTotalElement()));
if (src.hasLink()) { if (src.hasLink()) {
for (org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); for (org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t));
} }
@ -36,8 +37,8 @@ public class Bundle10_40 {
if (src.hasType()) { if (src.hasType()) {
tgt.setType(convertBundleType(src.getType())); tgt.setType(convertBundleType(src.getType()));
} }
if (src.hasTotal()) if (src.hasTotalElement())
tgt.setTotal(src.getTotal()); tgt.setTotalElement((org.hl7.fhir.dstu2.model.UnsignedIntType) VersionConvertor_10_40.convertType(src.getTotalElement()));
if (src.hasLink()) { if (src.hasLink()) {
for (org.hl7.fhir.r4.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); for (org.hl7.fhir.r4.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t));
} }
@ -61,9 +62,8 @@ public class Bundle10_40 {
if (src.hasLink()) { if (src.hasLink()) {
for (org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t)); for (org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t));
} }
if (src.hasFullUrl()) { if (src.hasFullUrlElement())
tgt.setFullUrl(src.getFullUrl()); tgt.setFullUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_10_40.convertType(src.getFullUrlElement()));
}
if (src.hasResource()) { if (src.hasResource()) {
tgt.setResource(VersionConvertor_10_40.convertResource(src.getResource())); tgt.setResource(VersionConvertor_10_40.convertResource(src.getResource()));
} }
@ -113,21 +113,16 @@ public class Bundle10_40 {
if (src.hasMethod()) { if (src.hasMethod()) {
tgt.setMethod(convertHTTPVerb(src.getMethod())); tgt.setMethod(convertHTTPVerb(src.getMethod()));
} }
if (src.hasUrl()) { if (src.hasUrlElement())
tgt.setUrl(src.getUrl()); tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement()));
} if (src.hasIfNoneMatchElement())
if (src.hasIfNoneMatch()) { tgt.setIfNoneMatchElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getIfNoneMatchElement()));
tgt.setIfNoneMatch(src.getIfNoneMatch()); if (src.hasIfModifiedSinceElement())
} tgt.setIfModifiedSinceElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_40.convertType(src.getIfModifiedSinceElement()));
if (src.hasIfModifiedSince()) { if (src.hasIfMatchElement())
tgt.setIfModifiedSince(src.getIfModifiedSince()); tgt.setIfMatchElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getIfMatchElement()));
} if (src.hasIfNoneExistElement())
if (src.hasIfMatch()) { tgt.setIfNoneExistElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getIfNoneExistElement()));
tgt.setIfMatch(src.getIfMatch());
}
if (src.hasIfNoneExist()) {
tgt.setIfNoneExist(src.getIfNoneExist());
}
return tgt; return tgt;
} }
@ -139,21 +134,16 @@ public class Bundle10_40 {
if (src.hasMethod()) { if (src.hasMethod()) {
tgt.setMethod(convertHTTPVerb(src.getMethod())); tgt.setMethod(convertHTTPVerb(src.getMethod()));
} }
if (src.hasUrl()) { if (src.hasUrlElement())
tgt.setUrl(src.getUrl()); tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement()));
} if (src.hasIfNoneMatchElement())
if (src.hasIfNoneMatch()) { tgt.setIfNoneMatchElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getIfNoneMatchElement()));
tgt.setIfNoneMatch(src.getIfNoneMatch()); if (src.hasIfModifiedSinceElement())
} tgt.setIfModifiedSinceElement((org.hl7.fhir.r4.model.InstantType) VersionConvertor_10_40.convertType(src.getIfModifiedSinceElement()));
if (src.hasIfModifiedSince()) { if (src.hasIfMatchElement())
tgt.setIfModifiedSince(src.getIfModifiedSince()); tgt.setIfMatchElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getIfMatchElement()));
} if (src.hasIfNoneExistElement())
if (src.hasIfMatch()) { tgt.setIfNoneExistElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getIfNoneExistElement()));
tgt.setIfMatch(src.getIfMatch());
}
if (src.hasIfNoneExist()) {
tgt.setIfNoneExist(src.getIfNoneExist());
}
return tgt; return tgt;
} }
@ -162,18 +152,14 @@ public class Bundle10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.Bundle.BundleEntryResponseComponent tgt = new org.hl7.fhir.dstu2.model.Bundle.BundleEntryResponseComponent(); org.hl7.fhir.dstu2.model.Bundle.BundleEntryResponseComponent tgt = new org.hl7.fhir.dstu2.model.Bundle.BundleEntryResponseComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasStatus()) { if (src.hasStatusElement())
tgt.setStatus(src.getStatus()); tgt.setStatusElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getStatusElement()));
} if (src.hasLocationElement())
if (src.hasLocation()) { tgt.setLocationElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getLocationElement()));
tgt.setLocation(src.getLocation()); if (src.hasEtagElement())
} tgt.setEtagElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getEtagElement()));
if (src.hasEtag()) { if (src.hasLastModifiedElement())
tgt.setEtag(src.getEtag()); tgt.setLastModifiedElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_40.convertType(src.getLastModifiedElement()));
}
if (src.hasLastModified()) {
tgt.setLastModified(src.getLastModified());
}
return tgt; return tgt;
} }
@ -182,18 +168,14 @@ public class Bundle10_40 {
return null; return null;
org.hl7.fhir.r4.model.Bundle.BundleEntryResponseComponent tgt = new org.hl7.fhir.r4.model.Bundle.BundleEntryResponseComponent(); org.hl7.fhir.r4.model.Bundle.BundleEntryResponseComponent tgt = new org.hl7.fhir.r4.model.Bundle.BundleEntryResponseComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasStatus()) { if (src.hasStatusElement())
tgt.setStatus(src.getStatus()); tgt.setStatusElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getStatusElement()));
} if (src.hasLocationElement())
if (src.hasLocation()) { tgt.setLocationElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_10_40.convertType(src.getLocationElement()));
tgt.setLocation(src.getLocation()); if (src.hasEtagElement())
} tgt.setEtagElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getEtagElement()));
if (src.hasEtag()) { if (src.hasLastModifiedElement())
tgt.setEtag(src.getEtag()); tgt.setLastModifiedElement((org.hl7.fhir.r4.model.InstantType) VersionConvertor_10_40.convertType(src.getLastModifiedElement()));
}
if (src.hasLastModified()) {
tgt.setLastModified(src.getLastModified());
}
return tgt; return tgt;
} }
@ -205,9 +187,8 @@ public class Bundle10_40 {
if (src.hasMode()) { if (src.hasMode()) {
tgt.setMode(convertSearchEntryMode(src.getMode())); tgt.setMode(convertSearchEntryMode(src.getMode()));
} }
if (src.hasScore()) { if (src.hasScoreElement())
tgt.setScore(src.getScore()); tgt.setScoreElement((org.hl7.fhir.dstu2.model.DecimalType) VersionConvertor_10_40.convertType(src.getScoreElement()));
}
return tgt; return tgt;
} }
@ -219,9 +200,8 @@ public class Bundle10_40 {
if (src.hasMode()) { if (src.hasMode()) {
tgt.setMode(convertSearchEntryMode(src.getMode())); tgt.setMode(convertSearchEntryMode(src.getMode()));
} }
if (src.hasScore()) { if (src.hasScoreElement())
tgt.setScore(src.getScore()); tgt.setScoreElement((org.hl7.fhir.r4.model.DecimalType) VersionConvertor_10_40.convertType(src.getScoreElement()));
}
return tgt; return tgt;
} }
@ -230,12 +210,10 @@ public class Bundle10_40 {
return null; return null;
org.hl7.fhir.r4.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.r4.model.Bundle.BundleLinkComponent(); org.hl7.fhir.r4.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.r4.model.Bundle.BundleLinkComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasRelation()) { if (src.hasRelationElement())
tgt.setRelation(src.getRelation()); tgt.setRelationElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getRelationElement()));
} if (src.hasUrlElement())
if (src.hasUrl()) { tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement()));
tgt.setUrl(src.getUrl());
}
return tgt; return tgt;
} }
@ -244,12 +222,10 @@ public class Bundle10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent(); org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasRelation()) { if (src.hasRelationElement())
tgt.setRelation(src.getRelation()); tgt.setRelationElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getRelationElement()));
} if (src.hasUrlElement())
if (src.hasUrl()) { tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement()));
tgt.setUrl(src.getUrl());
}
return tgt; return tgt;
} }

View File

@ -2,6 +2,9 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r4.model.BooleanType;
import java.util.Collections;
public class CarePlan10_40 { public class CarePlan10_40 {
@ -32,9 +35,8 @@ public class CarePlan10_40 {
if (src.hasCategory()) { if (src.hasCategory()) {
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getCategory()) tgt.addCategory(VersionConvertor_10_40.convertCodeableConcept(t)); for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getCategory()) tgt.addCategory(VersionConvertor_10_40.convertCodeableConcept(t));
} }
if (src.hasDescription()) { if (src.hasDescriptionElement())
tgt.setDescription(src.getDescription()); tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
}
if (src.hasAddresses()) { if (src.hasAddresses()) {
for (org.hl7.fhir.dstu2.model.Reference t : src.getAddresses()) tgt.addAddresses(VersionConvertor_10_40.convertReference(t)); for (org.hl7.fhir.dstu2.model.Reference t : src.getAddresses()) tgt.addAddresses(VersionConvertor_10_40.convertReference(t));
} }
@ -75,9 +77,8 @@ public class CarePlan10_40 {
if (src.hasCategory()) { if (src.hasCategory()) {
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getCategory()) tgt.addCategory(VersionConvertor_10_40.convertCodeableConcept(t)); for (org.hl7.fhir.r4.model.CodeableConcept t : src.getCategory()) tgt.addCategory(VersionConvertor_10_40.convertCodeableConcept(t));
} }
if (src.hasDescription()) { if (src.hasDescriptionElement())
tgt.setDescription(src.getDescription()); tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
}
if (src.hasAddresses()) { if (src.hasAddresses()) {
for (org.hl7.fhir.r4.model.Reference t : src.getAddresses()) tgt.addAddresses(VersionConvertor_10_40.convertReference(t)); for (org.hl7.fhir.r4.model.Reference t : src.getAddresses()) tgt.addAddresses(VersionConvertor_10_40.convertReference(t));
} }
@ -144,8 +145,8 @@ public class CarePlan10_40 {
if (src.hasStatus()) { if (src.hasStatus()) {
tgt.setStatus(convertCarePlanActivityStatus(src.getStatus())); tgt.setStatus(convertCarePlanActivityStatus(src.getStatus()));
} }
if (src.hasDoNotPerform()) { if (src.hasDoNotPerformElement()) {
tgt.setProhibited(src.getDoNotPerform()); tgt.setProhibitedElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getDoNotPerformElement()));
} }
if (src.hasScheduled()) { if (src.hasScheduled()) {
tgt.setScheduled(VersionConvertor_10_40.convertType(src.getScheduled())); tgt.setScheduled(VersionConvertor_10_40.convertType(src.getScheduled()));
@ -165,9 +166,8 @@ public class CarePlan10_40 {
if (src.hasQuantity()) { if (src.hasQuantity()) {
tgt.setQuantity(VersionConvertor_10_40.convertSimpleQuantity(src.getQuantity())); tgt.setQuantity(VersionConvertor_10_40.convertSimpleQuantity(src.getQuantity()));
} }
if (src.hasDescription()) { if (src.hasDescriptionElement())
tgt.setDescription(src.getDescription()); tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
}
return tgt; return tgt;
} }
@ -191,8 +191,8 @@ public class CarePlan10_40 {
if (src.hasStatus()) { if (src.hasStatus()) {
tgt.setStatus(convertCarePlanActivityStatus(src.getStatus())); tgt.setStatus(convertCarePlanActivityStatus(src.getStatus()));
} }
if (src.hasProhibited()) { if (src.hasProhibitedElement()) {
tgt.setDoNotPerform(src.getProhibited()); tgt.setDoNotPerformElement((BooleanType) VersionConvertor_10_40.convertType(src.getProhibitedElement()));
} }
if (src.hasScheduled()) { if (src.hasScheduled()) {
tgt.setScheduled(VersionConvertor_10_40.convertType(src.getScheduled())); tgt.setScheduled(VersionConvertor_10_40.convertType(src.getScheduled()));
@ -212,9 +212,8 @@ public class CarePlan10_40 {
if (src.hasQuantity()) { if (src.hasQuantity()) {
tgt.setQuantity(VersionConvertor_10_40.convertSimpleQuantity(src.getQuantity())); tgt.setQuantity(VersionConvertor_10_40.convertSimpleQuantity(src.getQuantity()));
} }
if (src.hasDescription()) { if (src.hasDescriptionElement())
tgt.setDescription(src.getDescription()); tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
}
return tgt; return tgt;
} }

View File

@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import java.util.Collections;
public class Communication10_40 { public class Communication10_40 {
@ -34,12 +35,10 @@ public class Communication10_40 {
if (src.hasEncounter()) { if (src.hasEncounter()) {
tgt.setEncounter(VersionConvertor_10_40.convertReference(src.getEncounter())); tgt.setEncounter(VersionConvertor_10_40.convertReference(src.getEncounter()));
} }
if (src.hasSent()) { if (src.hasSentElement())
tgt.setSent(src.getSent()); tgt.setSentElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getSentElement()));
} if (src.hasReceivedElement())
if (src.hasReceived()) { tgt.setReceivedElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getReceivedElement()));
tgt.setReceived(src.getReceived());
}
if (src.hasReason()) { if (src.hasReason()) {
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getReason()) tgt.addReasonCode(VersionConvertor_10_40.convertCodeableConcept(t)); for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getReason()) tgt.addReasonCode(VersionConvertor_10_40.convertCodeableConcept(t));
} }
@ -78,12 +77,10 @@ public class Communication10_40 {
if (src.hasEncounter()) { if (src.hasEncounter()) {
tgt.setEncounter(VersionConvertor_10_40.convertReference(src.getEncounter())); tgt.setEncounter(VersionConvertor_10_40.convertReference(src.getEncounter()));
} }
if (src.hasSent()) { if (src.hasSentElement())
tgt.setSent(src.getSent()); tgt.setSentElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getSentElement()));
} if (src.hasReceivedElement())
if (src.hasReceived()) { tgt.setReceivedElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getReceivedElement()));
tgt.setReceived(src.getReceived());
}
if (src.hasReasonCode()) { if (src.hasReasonCode()) {
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReasonCode()) tgt.addReason(VersionConvertor_10_40.convertCodeableConcept(t)); for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReasonCode()) tgt.addReason(VersionConvertor_10_40.convertCodeableConcept(t));
} }

View File

@ -1,7 +1,9 @@
package org.hl7.fhir.convertors.conv10_40; package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.dstu2.model.DateTimeType;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import java.util.Collections;
public class CommunicationRequest10_40 { public class CommunicationRequest10_40 {
@ -43,8 +45,8 @@ public class CommunicationRequest10_40 {
if (src.hasReasonCode()) { if (src.hasReasonCode()) {
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReasonCode()) tgt.addReason(VersionConvertor_10_40.convertCodeableConcept(t)); for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReasonCode()) tgt.addReason(VersionConvertor_10_40.convertCodeableConcept(t));
} }
if (src.hasAuthoredOn()) { if (src.hasAuthoredOnElement()) {
tgt.setRequestedOn(src.getAuthoredOn()); tgt.setRequestedOnElement((DateTimeType) VersionConvertor_10_40.convertType(src.getAuthoredOnElement()));
} }
if (src.hasSubject()) { if (src.hasSubject()) {
tgt.setSubject(VersionConvertor_10_40.convertReference(src.getSubject())); tgt.setSubject(VersionConvertor_10_40.convertReference(src.getSubject()));
@ -93,8 +95,8 @@ public class CommunicationRequest10_40 {
if (src.hasReason()) { if (src.hasReason()) {
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getReason()) tgt.addReasonCode(VersionConvertor_10_40.convertCodeableConcept(t)); for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getReason()) tgt.addReasonCode(VersionConvertor_10_40.convertCodeableConcept(t));
} }
if (src.hasRequestedOn()) { if (src.hasRequestedOnElement()) {
tgt.setAuthoredOn(src.getRequestedOn()); tgt.setAuthoredOnElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getRequestedOnElement()));
} }
if (src.hasSubject()) { if (src.hasSubject()) {
tgt.setSubject(VersionConvertor_10_40.convertReference(src.getSubject())); tgt.setSubject(VersionConvertor_10_40.convertReference(src.getSubject()));

View File

@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import java.util.Collections;
public class Composition10_40 { public class Composition10_40 {
@ -13,16 +14,15 @@ public class Composition10_40 {
if (src.hasIdentifier()) { if (src.hasIdentifier()) {
tgt.setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifier())); tgt.setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifier()));
} }
if (src.hasDate()) if (src.hasDateElement())
tgt.setDate(src.getDate()); tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement()));
if (src.hasType()) { if (src.hasType()) {
tgt.setType(VersionConvertor_10_40.convertCodeableConcept(src.getType())); tgt.setType(VersionConvertor_10_40.convertCodeableConcept(src.getType()));
} }
if (src.hasCategory()) if (src.hasCategory())
tgt.setClass_(VersionConvertor_10_40.convertCodeableConcept(src.getCategoryFirstRep())); tgt.setClass_(VersionConvertor_10_40.convertCodeableConcept(src.getCategoryFirstRep()));
if (src.hasTitle()) { if (src.hasTitleElement())
tgt.setTitle(src.getTitle()); tgt.setTitleElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getTitleElement()));
}
if (src.hasStatus()) { if (src.hasStatus()) {
tgt.setStatus(convertCompositionStatus(src.getStatus())); tgt.setStatus(convertCompositionStatus(src.getStatus()));
} }
@ -61,17 +61,16 @@ public class Composition10_40 {
if (src.hasIdentifier()) { if (src.hasIdentifier()) {
tgt.setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifier())); tgt.setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifier()));
} }
if (src.hasDate()) if (src.hasDateElement())
tgt.setDate(src.getDate()); tgt.setDateElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement()));
if (src.hasType()) { if (src.hasType()) {
tgt.setType(VersionConvertor_10_40.convertCodeableConcept(src.getType())); tgt.setType(VersionConvertor_10_40.convertCodeableConcept(src.getType()));
} }
if (src.hasClass_()) { if (src.hasClass_()) {
tgt.addCategory(VersionConvertor_10_40.convertCodeableConcept(src.getClass_())); tgt.addCategory(VersionConvertor_10_40.convertCodeableConcept(src.getClass_()));
} }
if (src.hasTitle()) { if (src.hasTitleElement())
tgt.setTitle(src.getTitle()); tgt.setTitleElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getTitleElement()));
}
if (src.hasStatus()) { if (src.hasStatus()) {
tgt.setStatus(convertCompositionStatus(src.getStatus())); tgt.setStatus(convertCompositionStatus(src.getStatus()));
} }
@ -147,9 +146,8 @@ public class Composition10_40 {
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasMode()) if (src.hasMode())
tgt.addMode(convertCompositionAttestationMode(src.getMode())); tgt.addMode(convertCompositionAttestationMode(src.getMode()));
if (src.hasTime()) { if (src.hasTimeElement())
tgt.setTime(src.getTime()); tgt.setTimeElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getTimeElement()));
}
if (src.hasParty()) { if (src.hasParty()) {
tgt.setParty(VersionConvertor_10_40.convertReference(src.getParty())); tgt.setParty(VersionConvertor_10_40.convertReference(src.getParty()));
} }
@ -163,9 +161,8 @@ public class Composition10_40 {
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasMode()) if (src.hasMode())
tgt.setMode(convertCompositionAttestationMode(src.getMode().get(0).getValue())); tgt.setMode(convertCompositionAttestationMode(src.getMode().get(0).getValue()));
if (src.hasTime()) { if (src.hasTimeElement())
tgt.setTime(src.getTime()); tgt.setTimeElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getTimeElement()));
}
if (src.hasParty()) { if (src.hasParty()) {
tgt.setParty(VersionConvertor_10_40.convertReference(src.getParty())); tgt.setParty(VersionConvertor_10_40.convertReference(src.getParty()));
} }
@ -245,9 +242,8 @@ public class Composition10_40 {
return null; return null;
org.hl7.fhir.r4.model.Composition.SectionComponent tgt = new org.hl7.fhir.r4.model.Composition.SectionComponent(); org.hl7.fhir.r4.model.Composition.SectionComponent tgt = new org.hl7.fhir.r4.model.Composition.SectionComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasTitle()) { if (src.hasTitleElement())
tgt.setTitle(src.getTitle()); tgt.setTitleElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getTitleElement()));
}
if (src.hasCode()) { if (src.hasCode()) {
tgt.setCode(VersionConvertor_10_40.convertCodeableConcept(src.getCode())); tgt.setCode(VersionConvertor_10_40.convertCodeableConcept(src.getCode()));
} }
@ -281,9 +277,8 @@ public class Composition10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.Composition.SectionComponent tgt = new org.hl7.fhir.dstu2.model.Composition.SectionComponent(); org.hl7.fhir.dstu2.model.Composition.SectionComponent tgt = new org.hl7.fhir.dstu2.model.Composition.SectionComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasTitle()) { if (src.hasTitleElement())
tgt.setTitle(src.getTitle()); tgt.setTitleElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getTitleElement()));
}
if (src.hasCode()) { if (src.hasCode()) {
tgt.setCode(VersionConvertor_10_40.convertCodeableConcept(src.getCode())); tgt.setCode(VersionConvertor_10_40.convertCodeableConcept(src.getCode()));
} }

View File

@ -2,11 +2,12 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r4.model.CanonicalType; import org.hl7.fhir.r4.model.*;
import org.hl7.fhir.r4.model.ConceptMap;
import org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupComponent; import org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupComponent;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Collections;
public class ConceptMap10_40 { public class ConceptMap10_40 {
@ -15,17 +16,17 @@ public class ConceptMap10_40 {
return null; return null;
org.hl7.fhir.r4.model.ConceptMap tgt = new org.hl7.fhir.r4.model.ConceptMap(); org.hl7.fhir.r4.model.ConceptMap tgt = new org.hl7.fhir.r4.model.ConceptMap();
VersionConvertor_10_40.copyDomainResource(src, tgt); VersionConvertor_10_40.copyDomainResource(src, tgt);
tgt.setUrl(src.getUrl()); tgt.setUrlElement((UriType) VersionConvertor_10_40.convertType(src.getUrlElement()));
tgt.setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifier())); tgt.setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifier()));
tgt.setVersion(src.getVersion()); tgt.setVersionElement((StringType) VersionConvertor_10_40.convertType(src.getVersionElement()));
tgt.setName(src.getName()); tgt.setNameElement((StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus())); tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus()));
if (src.hasExperimental()) if (src.hasExperimentalElement())
tgt.setExperimental(src.getExperimental()); tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getExperimentalElement()));
tgt.setPublisher(src.getPublisher()); tgt.setPublisherElement((StringType) VersionConvertor_10_40.convertType(src.getPublisherElement()));
for (org.hl7.fhir.dstu2.model.ConceptMap.ConceptMapContactComponent t : src.getContact()) tgt.addContact(convertConceptMapContactComponent(t)); for (org.hl7.fhir.dstu2.model.ConceptMap.ConceptMapContactComponent t : src.getContact()) tgt.addContact(convertConceptMapContactComponent(t));
if (src.hasDate()) if (src.hasDateElement())
tgt.setDate(src.getDate()); tgt.setDateElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement()));
tgt.setDescription(src.getDescription()); tgt.setDescription(src.getDescription());
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_40.isJurisdiction(t)) for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_40.isJurisdiction(t))
tgt.addJurisdiction(VersionConvertor_10_40.convertCodeableConcept(t)); tgt.addJurisdiction(VersionConvertor_10_40.convertCodeableConcept(t));
@ -49,34 +50,29 @@ public class ConceptMap10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.ConceptMap tgt = new org.hl7.fhir.dstu2.model.ConceptMap(); org.hl7.fhir.dstu2.model.ConceptMap tgt = new org.hl7.fhir.dstu2.model.ConceptMap();
VersionConvertor_10_40.copyDomainResource(src, tgt); VersionConvertor_10_40.copyDomainResource(src, tgt);
if (src.hasUrl()) { if (src.hasUrlElement())
tgt.setUrl(src.getUrl()); tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement()));
}
if (src.hasIdentifier()) { if (src.hasIdentifier()) {
tgt.setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifier())); tgt.setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifier()));
} }
if (src.hasVersion()) { if (src.hasVersionElement())
tgt.setVersion(src.getVersion()); tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement()));
} if (src.hasNameElement())
if (src.hasName()) { tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
tgt.setName(src.getName());
}
if (src.hasStatus()) { if (src.hasStatus()) {
tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus())); tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus()));
} }
if (src.hasExperimental()) if (src.hasExperimentalElement())
tgt.setExperimental(src.getExperimental()); tgt.setExperimentalElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getExperimentalElement()));
if (src.hasPublisher()) { if (src.hasPublisherElement())
tgt.setPublisher(src.getPublisher()); tgt.setPublisherElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getPublisherElement()));
}
if (src.hasContact()) { if (src.hasContact()) {
for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(convertConceptMapContactComponent(t)); for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(convertConceptMapContactComponent(t));
} }
if (src.hasDate()) if (src.hasDateElement())
tgt.setDate(src.getDate()); tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement()));
if (src.hasDescription()) { if (src.hasDescriptionElement())
tgt.setDescription(src.getDescription()); tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
}
for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept())
tgt.addUseContext(VersionConvertor_10_40.convertCodeableConcept(t.getValueCodeableConcept())); tgt.addUseContext(VersionConvertor_10_40.convertCodeableConcept(t.getValueCodeableConcept()));
if (src.hasJurisdiction()) { if (src.hasJurisdiction()) {
@ -85,9 +81,8 @@ public class ConceptMap10_40 {
if (src.hasPurpose()) { if (src.hasPurpose()) {
tgt.setRequirements(src.getPurpose()); tgt.setRequirements(src.getPurpose());
} }
if (src.hasCopyright()) { if (src.hasCopyrightElement())
tgt.setCopyright(src.getCopyright()); tgt.setCopyrightElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getCopyrightElement()));
}
if (src.hasSource()) { if (src.hasSource()) {
tgt.setSource(VersionConvertor_10_40.convertType(src.getSource())); tgt.setSource(VersionConvertor_10_40.convertType(src.getSource()));
} }
@ -105,9 +100,8 @@ public class ConceptMap10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.ConceptMap.ConceptMapContactComponent tgt = new org.hl7.fhir.dstu2.model.ConceptMap.ConceptMapContactComponent(); org.hl7.fhir.dstu2.model.ConceptMap.ConceptMapContactComponent tgt = new org.hl7.fhir.dstu2.model.ConceptMap.ConceptMapContactComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
}
if (src.hasTelecom()) { if (src.hasTelecom()) {
for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t));
} }
@ -119,9 +113,8 @@ public class ConceptMap10_40 {
return null; return null;
org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
}
if (src.hasTelecom()) { if (src.hasTelecom()) {
for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t));
} }
@ -187,14 +180,14 @@ public class ConceptMap10_40 {
return null; return null;
org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent(); org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasElement()) { if (src.hasElementElement()) {
tgt.setProperty(src.getElement()); tgt.setPropertyElement((UriType) VersionConvertor_10_40.convertType(src.getElementElement()));
} }
if (src.hasCodeSystem()) { if (src.hasCodeSystemElement()) {
tgt.setSystem(src.getCodeSystem()); tgt.setSystemElement((CanonicalType) VersionConvertor_10_40.convertType(src.getCodeSystemElement()));
} }
if (src.hasCode()) { if (src.hasCodeElement()) {
tgt.setValue(src.getCode()); tgt.setValueElement((StringType) VersionConvertor_10_40.convertType(src.getCodeElement()));
} }
return tgt; return tgt;
} }
@ -204,14 +197,14 @@ public class ConceptMap10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent(); org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasProperty()) { if (src.hasPropertyElement()) {
tgt.setElement(src.getProperty()); tgt.setElementElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getPropertyElement()));
} }
if (src.hasSystem()) { if (src.hasSystemElement()) {
tgt.setCodeSystem(src.getSystem()); tgt.setCodeSystemElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getSystemElement()));
} }
if (src.hasValue()) { if (src.hasValueElement()) {
tgt.setCode(src.getValue()); tgt.setCodeElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getValueElement()));
} }
return tgt; return tgt;
} }
@ -223,8 +216,8 @@ public class ConceptMap10_40 {
for (org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent t : src.getTarget()) { for (org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent t : src.getTarget()) {
org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent(); org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasCode()) { if (src.hasCodeElement()) {
tgt.setCode(src.getCode()); tgt.setCodeElement((CodeType) VersionConvertor_10_40.convertType(src.getCodeElement()));
} }
tgt.addTarget(convertTargetElementComponent(t)); tgt.addTarget(convertTargetElementComponent(t));
if (src.hasCodeSystem()) { if (src.hasCodeSystem()) {
@ -240,9 +233,8 @@ public class ConceptMap10_40 {
org.hl7.fhir.dstu2.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.dstu2.model.ConceptMap.SourceElementComponent(); org.hl7.fhir.dstu2.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.dstu2.model.ConceptMap.SourceElementComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
tgt.setCodeSystem(g.getSource()); tgt.setCodeSystem(g.getSource());
if (src.hasCode()) { if (src.hasCodeElement())
tgt.setCode(src.getCode()); tgt.setCodeElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_40.convertType(src.getCodeElement()));
}
if (src.hasTarget()) { if (src.hasTarget()) {
for (org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent t : src.getTarget()) tgt.addTarget(convertTargetElementComponent(t, g)); for (org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent t : src.getTarget()) tgt.addTarget(convertTargetElementComponent(t, g));
} }
@ -255,14 +247,13 @@ public class ConceptMap10_40 {
org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent(); org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
tgt.setCodeSystem(g.getTarget()); tgt.setCodeSystem(g.getTarget());
if (src.hasCode()) { if (src.hasCodeElement())
tgt.setCode(src.getCode()); tgt.setCodeElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_40.convertType(src.getCodeElement()));
}
if (src.hasEquivalence()) { if (src.hasEquivalence()) {
tgt.setEquivalence(convertConceptMapEquivalence(src.getEquivalence())); tgt.setEquivalence(convertConceptMapEquivalence(src.getEquivalence()));
} }
if (src.hasComment()) { if (src.hasCommentElement()) {
tgt.setComments(src.getComment()); tgt.setCommentsElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getCommentElement()));
} }
if (src.hasDependsOn()) { if (src.hasDependsOn()) {
for (org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) tgt.addDependsOn(convertOtherElementComponent(t)); for (org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) tgt.addDependsOn(convertOtherElementComponent(t));
@ -278,14 +269,13 @@ public class ConceptMap10_40 {
return null; return null;
org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent(); org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasCode()) { if (src.hasCodeElement())
tgt.setCode(src.getCode()); tgt.setCodeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_10_40.convertType(src.getCodeElement()));
}
if (src.hasEquivalence()) { if (src.hasEquivalence()) {
tgt.setEquivalence(convertConceptMapEquivalence(src.getEquivalence())); tgt.setEquivalence(convertConceptMapEquivalence(src.getEquivalence()));
} }
if (src.hasComments()) { if (src.hasCommentsElement()) {
tgt.setComment(src.getComments()); tgt.setCommentElement((StringType) VersionConvertor_10_40.convertType(src.getCommentsElement()));
} }
if (src.hasDependsOn()) { if (src.hasDependsOn()) {
for (org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) tgt.addDependsOn(convertOtherElementComponent(t)); for (org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) tgt.addDependsOn(convertOtherElementComponent(t));

View File

@ -1,7 +1,11 @@
package org.hl7.fhir.convertors.conv10_40; package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.dstu2.model.DateType;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r4.model.DateTimeType;
import java.util.Collections;
public class Condition10_40 { public class Condition10_40 {
@ -22,8 +26,8 @@ public class Condition10_40 {
if (src.hasAsserter()) { if (src.hasAsserter()) {
tgt.setAsserter(VersionConvertor_10_40.convertReference(src.getAsserter())); tgt.setAsserter(VersionConvertor_10_40.convertReference(src.getAsserter()));
} }
if (src.hasRecordedDate()) if (src.hasRecordedDateElement())
tgt.setDateRecorded(src.getRecordedDate()); tgt.setDateRecordedElement((DateType) VersionConvertor_10_40.convertType(src.getRecordedDateElement()));
if (src.hasCode()) { if (src.hasCode()) {
tgt.setCode(VersionConvertor_10_40.convertCodeableConcept(src.getCode())); tgt.setCode(VersionConvertor_10_40.convertCodeableConcept(src.getCode()));
} }
@ -73,8 +77,8 @@ public class Condition10_40 {
if (src.hasAsserter()) { if (src.hasAsserter()) {
tgt.setAsserter(VersionConvertor_10_40.convertReference(src.getAsserter())); tgt.setAsserter(VersionConvertor_10_40.convertReference(src.getAsserter()));
} }
if (src.hasDateRecorded()) if (src.hasDateRecordedElement())
tgt.setRecordedDate(src.getDateRecorded()); tgt.setRecordedDateElement((DateTimeType) VersionConvertor_10_40.convertType(src.getDateRecordedElement()));
if (src.hasCode()) { if (src.hasCode()) {
tgt.setCode(VersionConvertor_10_40.convertCodeableConcept(src.getCode())); tgt.setCode(VersionConvertor_10_40.convertCodeableConcept(src.getCode()));
} }

View File

@ -2,11 +2,17 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertorConstants; import org.hl7.fhir.convertors.VersionConvertorConstants;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.dstu2.model.StringType;
import org.hl7.fhir.dstu2.model.UnsignedIntType;
import org.hl7.fhir.dstu2.model.UriType;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r4.model.*;
import org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestComponent; import org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestComponent;
import org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceComponent; import org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceComponent;
import org.hl7.fhir.r4.model.CapabilityStatement.SystemRestfulInteraction; import org.hl7.fhir.r4.model.CapabilityStatement.SystemRestfulInteraction;
import java.util.Collections;
public class Conformance10_40 { public class Conformance10_40 {
public static org.hl7.fhir.dstu2.model.Conformance.ConditionalDeleteStatus convertConditionalDeleteStatus(org.hl7.fhir.r4.model.CapabilityStatement.ConditionalDeleteStatus src) throws FHIRException { public static org.hl7.fhir.dstu2.model.Conformance.ConditionalDeleteStatus convertConditionalDeleteStatus(org.hl7.fhir.r4.model.CapabilityStatement.ConditionalDeleteStatus src) throws FHIRException {
@ -44,37 +50,31 @@ public class Conformance10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.Conformance tgt = new org.hl7.fhir.dstu2.model.Conformance(); org.hl7.fhir.dstu2.model.Conformance tgt = new org.hl7.fhir.dstu2.model.Conformance();
VersionConvertor_10_40.copyDomainResource(src, tgt, "http://hl7.org/fhir/3.0/StructureDefinition/extension-CapabilityStatement.acceptUnknown"); VersionConvertor_10_40.copyDomainResource(src, tgt, "http://hl7.org/fhir/3.0/StructureDefinition/extension-CapabilityStatement.acceptUnknown");
if (src.hasUrl()) { if (src.hasUrlElement())
tgt.setUrl(src.getUrl()); tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement()));
} if (src.hasVersionElement())
if (src.hasVersion()) { tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement()));
tgt.setVersion(src.getVersion()); if (src.hasNameElement())
} tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
if (src.hasName()) {
tgt.setName(src.getName());
}
if (src.hasStatus()) { if (src.hasStatus()) {
tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus())); tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus()));
} }
if (src.hasExperimental()) if (src.hasExperimentalElement())
tgt.setExperimental(src.getExperimental()); tgt.setExperimentalElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getExperimentalElement()));
if (src.hasDate()) if (src.hasDateElement())
tgt.setDate(src.getDate()); tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement()));
if (src.hasPublisher()) { if (src.hasPublisherElement())
tgt.setPublisher(src.getPublisher()); tgt.setPublisherElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getPublisherElement()));
}
if (src.hasContact()) { if (src.hasContact()) {
for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(convertConformanceContactComponent(t)); for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(convertConformanceContactComponent(t));
} }
if (src.hasDescription()) { if (src.hasDescriptionElement())
tgt.setDescription(src.getDescription()); tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
} if (src.hasPurposeElement()) {
if (src.hasPurpose()) { tgt.setRequirementsElement((StringType) VersionConvertor_10_40.convertType(src.getPurposeElement()));
tgt.setRequirements(src.getPurpose());
}
if (src.hasCopyright()) {
tgt.setCopyright(src.getCopyright());
} }
if (src.hasCopyrightElement())
tgt.setCopyrightElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getCopyrightElement()));
if (src.hasKind()) { if (src.hasKind()) {
tgt.setKind(convertConformanceStatementKind(src.getKind())); tgt.setKind(convertConformanceStatementKind(src.getKind()));
} }
@ -110,25 +110,21 @@ public class Conformance10_40 {
return null; return null;
org.hl7.fhir.r4.model.CapabilityStatement tgt = new org.hl7.fhir.r4.model.CapabilityStatement(); org.hl7.fhir.r4.model.CapabilityStatement tgt = new org.hl7.fhir.r4.model.CapabilityStatement();
VersionConvertor_10_40.copyDomainResource(src, tgt); VersionConvertor_10_40.copyDomainResource(src, tgt);
if (src.hasUrl()) { if (src.hasUrlElement())
tgt.setUrl(src.getUrl()); tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement()));
} if (src.hasVersionElement())
if (src.hasVersion()) { tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement()));
tgt.setVersion(src.getVersion()); if (src.hasNameElement())
} tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
if (src.hasName()) {
tgt.setName(src.getName());
}
if (src.hasStatus()) { if (src.hasStatus()) {
tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus())); tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus()));
} }
if (src.hasExperimental()) if (src.hasExperimentalElement())
tgt.setExperimental(src.getExperimental()); tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getExperimentalElement()));
if (src.hasDate()) if (src.hasDateElement())
tgt.setDate(src.getDate()); tgt.setDateElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement()));
if (src.hasPublisher()) { if (src.hasPublisherElement())
tgt.setPublisher(src.getPublisher()); tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getPublisherElement()));
}
if (src.hasContact()) { if (src.hasContact()) {
for (org.hl7.fhir.dstu2.model.Conformance.ConformanceContactComponent t : src.getContact()) tgt.addContact(convertConformanceContactComponent(t)); for (org.hl7.fhir.dstu2.model.Conformance.ConformanceContactComponent t : src.getContact()) tgt.addContact(convertConformanceContactComponent(t));
} }
@ -175,9 +171,8 @@ public class Conformance10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.Conformance.ConformanceContactComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceContactComponent(); org.hl7.fhir.dstu2.model.Conformance.ConformanceContactComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceContactComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
}
if (src.hasTelecom()) { if (src.hasTelecom()) {
for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t));
} }
@ -189,9 +184,8 @@ public class Conformance10_40 {
return null; return null;
org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
}
if (src.hasTelecom()) { if (src.hasTelecom()) {
for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t));
} }
@ -206,8 +200,8 @@ public class Conformance10_40 {
if (src.hasMode()) { if (src.hasMode()) {
tgt.setMode(convertDocumentMode(src.getMode())); tgt.setMode(convertDocumentMode(src.getMode()));
} }
if (src.hasDocumentation()) { if (src.hasDocumentationElement()) {
tgt.setDocumentation(src.getDocumentation()); tgt.setDocumentationElement((MarkdownType) VersionConvertor_10_40.convertType(src.getDocumentationElement()));
} }
if (src.hasProfile()) { if (src.hasProfile()) {
tgt.setProfileElement(VersionConvertor_10_40.convertReferenceToCanonical(src.getProfile())); tgt.setProfileElement(VersionConvertor_10_40.convertReferenceToCanonical(src.getProfile()));
@ -223,8 +217,8 @@ public class Conformance10_40 {
if (src.hasMode()) { if (src.hasMode()) {
tgt.setMode(convertDocumentMode(src.getMode())); tgt.setMode(convertDocumentMode(src.getMode()));
} }
if (src.hasDocumentation()) { if (src.hasDocumentationElement()) {
tgt.setDocumentation(src.getDocumentation()); tgt.setDocumentationElement((StringType) VersionConvertor_10_40.convertType(src.getDocumentationElement()));
} }
if (src.hasProfileElement()) { if (src.hasProfileElement()) {
tgt.setProfile(VersionConvertor_10_40.convertCanonicalToReference(src.getProfileElement())); tgt.setProfile(VersionConvertor_10_40.convertCanonicalToReference(src.getProfileElement()));
@ -237,9 +231,8 @@ public class Conformance10_40 {
return null; return null;
org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementImplementationComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementImplementationComponent(); org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementImplementationComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementImplementationComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasDescription()) { if (src.hasDescriptionElement())
tgt.setDescription(src.getDescription()); tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
}
if (src.hasUrl()) { if (src.hasUrl()) {
tgt.setUrl(src.getUrl()); tgt.setUrl(src.getUrl());
} }
@ -251,12 +244,10 @@ public class Conformance10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.Conformance.ConformanceImplementationComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceImplementationComponent(); org.hl7.fhir.dstu2.model.Conformance.ConformanceImplementationComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceImplementationComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasDescription()) { if (src.hasDescriptionElement())
tgt.setDescription(src.getDescription()); tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
} if (src.hasUrlElement())
if (src.hasUrl()) { tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement()));
tgt.setUrl(src.getUrl());
}
return tgt; return tgt;
} }
@ -268,11 +259,11 @@ public class Conformance10_40 {
if (src.hasEndpoint()) { if (src.hasEndpoint()) {
for (org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent t : src.getEndpoint()) tgt.addEndpoint(convertConformanceMessagingEndpointComponent(t)); for (org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementMessagingEndpointComponent t : src.getEndpoint()) tgt.addEndpoint(convertConformanceMessagingEndpointComponent(t));
} }
if (src.hasReliableCache()) { if (src.hasReliableCacheElement()) {
tgt.setReliableCache(src.getReliableCache()); tgt.setReliableCacheElement((UnsignedIntType) VersionConvertor_10_40.convertType(src.getReliableCacheElement()));
} }
if (src.hasDocumentation()) { if (src.hasDocumentationElement()) {
tgt.setDocumentation(src.getDocumentation()); tgt.setDocumentationElement((StringType) VersionConvertor_10_40.convertType(src.getDocumentationElement()));
} }
for (org.hl7.fhir.r4.model.Extension e : src.getExtensionsByUrl(VersionConvertorConstants.IG_CONFORMANCE_MESSAGE_EVENT)) { for (org.hl7.fhir.r4.model.Extension e : src.getExtensionsByUrl(VersionConvertorConstants.IG_CONFORMANCE_MESSAGE_EVENT)) {
org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEventComponent event = new org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEventComponent(); org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEventComponent event = new org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEventComponent();
@ -304,11 +295,11 @@ public class Conformance10_40 {
if (src.hasEndpoint()) { if (src.hasEndpoint()) {
for (org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEndpointComponent t : src.getEndpoint()) tgt.addEndpoint(convertConformanceMessagingEndpointComponent(t)); for (org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEndpointComponent t : src.getEndpoint()) tgt.addEndpoint(convertConformanceMessagingEndpointComponent(t));
} }
if (src.hasReliableCache()) { if (src.hasReliableCacheElement()) {
tgt.setReliableCache(src.getReliableCache()); tgt.setReliableCacheElement((org.hl7.fhir.r4.model.UnsignedIntType) VersionConvertor_10_40.convertType(src.getReliableCacheElement()));
} }
if (src.hasDocumentation()) { if (src.hasDocumentationElement()) {
tgt.setDocumentation(src.getDocumentation()); tgt.setDocumentationElement((MarkdownType) VersionConvertor_10_40.convertType(src.getDocumentationElement()));
} }
for (org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEventComponent t : src.getEvent()) { for (org.hl7.fhir.dstu2.model.Conformance.ConformanceMessagingEventComponent t : src.getEvent()) {
org.hl7.fhir.r4.model.Extension e = new org.hl7.fhir.r4.model.Extension(VersionConvertorConstants.IG_CONFORMANCE_MESSAGE_EVENT); org.hl7.fhir.r4.model.Extension e = new org.hl7.fhir.r4.model.Extension(VersionConvertorConstants.IG_CONFORMANCE_MESSAGE_EVENT);
@ -341,8 +332,8 @@ public class Conformance10_40 {
if (src.hasProtocol()) { if (src.hasProtocol()) {
tgt.setProtocol(VersionConvertor_10_40.convertCoding(src.getProtocol())); tgt.setProtocol(VersionConvertor_10_40.convertCoding(src.getProtocol()));
} }
if (src.hasAddress()) { if (src.hasAddressElement()) {
tgt.setAddress(src.getAddress()); tgt.setAddressElement((UrlType) VersionConvertor_10_40.convertType(src.getAddressElement()));
} }
return tgt; return tgt;
} }
@ -355,8 +346,8 @@ public class Conformance10_40 {
if (src.hasProtocol()) { if (src.hasProtocol()) {
tgt.setProtocol(VersionConvertor_10_40.convertCoding(src.getProtocol())); tgt.setProtocol(VersionConvertor_10_40.convertCoding(src.getProtocol()));
} }
if (src.hasAddress()) { if (src.hasAddressElement()) {
tgt.setAddress(src.getAddress()); tgt.setAddressElement((UriType) VersionConvertor_10_40.convertType(src.getAddressElement()));
} }
return tgt; return tgt;
} }
@ -369,8 +360,8 @@ public class Conformance10_40 {
if (src.hasMode()) { if (src.hasMode()) {
tgt.setMode(convertRestfulConformanceMode(src.getMode())); tgt.setMode(convertRestfulConformanceMode(src.getMode()));
} }
if (src.hasDocumentation()) { if (src.hasDocumentationElement()) {
tgt.setDocumentation(src.getDocumentation()); tgt.setDocumentationElement((MarkdownType) VersionConvertor_10_40.convertType(src.getDocumentationElement()));
} }
if (src.hasSecurity()) { if (src.hasSecurity()) {
tgt.setSecurity(convertConformanceRestSecurityComponent(src.getSecurity())); tgt.setSecurity(convertConformanceRestSecurityComponent(src.getSecurity()));
@ -403,8 +394,8 @@ public class Conformance10_40 {
if (src.hasMode()) { if (src.hasMode()) {
tgt.setMode(convertRestfulConformanceMode(src.getMode())); tgt.setMode(convertRestfulConformanceMode(src.getMode()));
} }
if (src.hasDocumentation()) { if (src.hasDocumentationElement()) {
tgt.setDocumentation(src.getDocumentation()); tgt.setDocumentationElement((StringType) VersionConvertor_10_40.convertType(src.getDocumentationElement()));
} }
if (src.hasSecurity()) { if (src.hasSecurity()) {
tgt.setSecurity(convertConformanceRestSecurityComponent(src.getSecurity())); tgt.setSecurity(convertConformanceRestSecurityComponent(src.getSecurity()));
@ -443,9 +434,8 @@ public class Conformance10_40 {
return null; return null;
org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceOperationComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceOperationComponent(); org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceOperationComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceOperationComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
}
if (src.hasDefinition()) { if (src.hasDefinition()) {
tgt.setDefinitionElement(VersionConvertor_10_40.convertReferenceToCanonical(src.getDefinition())); tgt.setDefinitionElement(VersionConvertor_10_40.convertReferenceToCanonical(src.getDefinition()));
} }
@ -457,9 +447,8 @@ public class Conformance10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.Conformance.ConformanceRestOperationComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceRestOperationComponent(); org.hl7.fhir.dstu2.model.Conformance.ConformanceRestOperationComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceRestOperationComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
}
if (src.hasDefinitionElement()) { if (src.hasDefinitionElement()) {
tgt.setDefinition(VersionConvertor_10_40.convertCanonicalToReference(src.getDefinitionElement())); tgt.setDefinition(VersionConvertor_10_40.convertCanonicalToReference(src.getDefinitionElement()));
} }
@ -471,8 +460,8 @@ public class Conformance10_40 {
return null; return null;
org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceComponent(); org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasType()) { if (src.hasTypeElement()) {
tgt.setType(src.getType()); tgt.setTypeElement((CodeType) VersionConvertor_10_40.convertType(src.getTypeElement()));
} }
if (src.hasProfile()) { if (src.hasProfile()) {
tgt.setProfileElement(VersionConvertor_10_40.convertReferenceToCanonical(src.getProfile())); tgt.setProfileElement(VersionConvertor_10_40.convertReferenceToCanonical(src.getProfile()));
@ -483,17 +472,17 @@ public class Conformance10_40 {
if (src.hasVersioning()) { if (src.hasVersioning()) {
tgt.setVersioning(convertResourceVersionPolicy(src.getVersioning())); tgt.setVersioning(convertResourceVersionPolicy(src.getVersioning()));
} }
if (src.hasReadHistory()) { if (src.hasReadHistoryElement()) {
tgt.setReadHistory(src.getReadHistory()); tgt.setReadHistoryElement((BooleanType) VersionConvertor_10_40.convertType(src.getReadHistoryElement()));
} }
if (src.hasUpdateCreate()) { if (src.hasUpdateCreateElement()) {
tgt.setUpdateCreate(src.getUpdateCreate()); tgt.setUpdateCreateElement((BooleanType) VersionConvertor_10_40.convertType(src.getUpdateCreateElement()));
} }
if (src.hasConditionalCreate()) { if (src.hasConditionalCreateElement()) {
tgt.setConditionalCreate(src.getConditionalCreate()); tgt.setConditionalCreateElement((BooleanType) VersionConvertor_10_40.convertType(src.getConditionalCreateElement()));
} }
if (src.hasConditionalUpdate()) { if (src.hasConditionalUpdateElement()) {
tgt.setConditionalUpdate(src.getConditionalUpdate()); tgt.setConditionalUpdateElement((BooleanType) VersionConvertor_10_40.convertType(src.getConditionalUpdateElement()));
} }
if (src.hasConditionalDelete()) { if (src.hasConditionalDelete()) {
tgt.setConditionalDelete(convertConditionalDeleteStatus(src.getConditionalDelete())); tgt.setConditionalDelete(convertConditionalDeleteStatus(src.getConditionalDelete()));
@ -526,17 +515,17 @@ public class Conformance10_40 {
if (src.hasVersioning()) { if (src.hasVersioning()) {
tgt.setVersioning(convertResourceVersionPolicy(src.getVersioning())); tgt.setVersioning(convertResourceVersionPolicy(src.getVersioning()));
} }
if (src.hasReadHistory()) { if (src.hasReadHistoryElement()) {
tgt.setReadHistory(src.getReadHistory()); tgt.setReadHistoryElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getReadHistoryElement()));
} }
if (src.hasUpdateCreate()) { if (src.hasUpdateCreateElement()) {
tgt.setUpdateCreate(src.getUpdateCreate()); tgt.setUpdateCreateElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getUpdateCreateElement()));
} }
if (src.hasConditionalCreate()) { if (src.hasConditionalCreateElement()) {
tgt.setConditionalCreate(src.getConditionalCreate()); tgt.setConditionalCreateElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getConditionalCreateElement()));
} }
if (src.hasConditionalUpdate()) { if (src.hasConditionalUpdateElement()) {
tgt.setConditionalUpdate(src.getConditionalUpdate()); tgt.setConditionalUpdateElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getConditionalUpdateElement()));
} }
if (src.hasConditionalDelete()) { if (src.hasConditionalDelete()) {
tgt.setConditionalDelete(convertConditionalDeleteStatus(src.getConditionalDelete())); tgt.setConditionalDelete(convertConditionalDeleteStatus(src.getConditionalDelete()));
@ -558,17 +547,16 @@ public class Conformance10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.Conformance.ConformanceRestResourceSearchParamComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceRestResourceSearchParamComponent(); org.hl7.fhir.dstu2.model.Conformance.ConformanceRestResourceSearchParamComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceRestResourceSearchParamComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
} if (src.hasDefinitionElement()) {
if (src.hasDefinition()) { tgt.setDefinitionElement((UriType) VersionConvertor_10_40.convertType(src.getDefinitionElement()));
tgt.setDefinition(src.getDefinition());
} }
if (src.hasType()) { if (src.hasType()) {
tgt.setType(VersionConvertor_10_40.convertSearchParamType(src.getType())); tgt.setType(VersionConvertor_10_40.convertSearchParamType(src.getType()));
} }
if (src.hasDocumentation()) { if (src.hasDocumentationElement()) {
tgt.setDocumentation(src.getDocumentation()); tgt.setDocumentationElement((StringType) VersionConvertor_10_40.convertType(src.getDocumentationElement()));
} }
return tgt; return tgt;
} }
@ -578,17 +566,16 @@ public class Conformance10_40 {
return null; return null;
org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent(); org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestResourceSearchParamComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
} if (src.hasDefinitionElement()) {
if (src.hasDefinition()) { tgt.setDefinitionElement((CanonicalType) VersionConvertor_10_40.convertType(src.getDefinitionElement()));
tgt.setDefinition(src.getDefinition());
} }
if (src.hasType()) { if (src.hasType()) {
tgt.setType(VersionConvertor_10_40.convertSearchParamType(src.getType())); tgt.setType(VersionConvertor_10_40.convertSearchParamType(src.getType()));
} }
if (src.hasDocumentation()) { if (src.hasDocumentationElement()) {
tgt.setDocumentation(src.getDocumentation()); tgt.setDocumentationElement((MarkdownType) VersionConvertor_10_40.convertType(src.getDocumentationElement()));
} }
return tgt; return tgt;
} }
@ -598,15 +585,14 @@ public class Conformance10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.Conformance.ConformanceRestSecurityComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceRestSecurityComponent(); org.hl7.fhir.dstu2.model.Conformance.ConformanceRestSecurityComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceRestSecurityComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasCors()) { if (src.hasCorsElement()) {
tgt.setCors(src.getCors()); tgt.setCorsElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getCorsElement()));
} }
if (src.hasService()) { if (src.hasService()) {
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getService()) tgt.addService(VersionConvertor_10_40.convertCodeableConcept(t)); for (org.hl7.fhir.r4.model.CodeableConcept t : src.getService()) tgt.addService(VersionConvertor_10_40.convertCodeableConcept(t));
} }
if (src.hasDescription()) { if (src.hasDescriptionElement())
tgt.setDescription(src.getDescription()); tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
}
return tgt; return tgt;
} }
@ -615,8 +601,8 @@ public class Conformance10_40 {
return null; return null;
org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityComponent(); org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementRestSecurityComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasCors()) { if (src.hasCorsElement()) {
tgt.setCors(src.getCors()); tgt.setCorsElement((BooleanType) VersionConvertor_10_40.convertType(src.getCorsElement()));
} }
if (src.hasService()) { if (src.hasService()) {
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getService()) tgt.addService(VersionConvertor_10_40.convertCodeableConcept(t)); for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getService()) tgt.addService(VersionConvertor_10_40.convertCodeableConcept(t));
@ -632,14 +618,12 @@ public class Conformance10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.Conformance.ConformanceSoftwareComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceSoftwareComponent(); org.hl7.fhir.dstu2.model.Conformance.ConformanceSoftwareComponent tgt = new org.hl7.fhir.dstu2.model.Conformance.ConformanceSoftwareComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
} if (src.hasVersionElement())
if (src.hasVersion()) { tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement()));
tgt.setVersion(src.getVersion()); if (src.hasReleaseDateElement()) {
} tgt.setReleaseDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getReleaseDateElement()));
if (src.hasReleaseDate()) {
tgt.setReleaseDate(src.getReleaseDate());
} }
return tgt; return tgt;
} }
@ -649,14 +633,12 @@ public class Conformance10_40 {
return null; return null;
org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementSoftwareComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementSoftwareComponent(); org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementSoftwareComponent tgt = new org.hl7.fhir.r4.model.CapabilityStatement.CapabilityStatementSoftwareComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
} if (src.hasVersionElement())
if (src.hasVersion()) { tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement()));
tgt.setVersion(src.getVersion()); if (src.hasReleaseDateElement()) {
} tgt.setReleaseDateElement((DateTimeType) VersionConvertor_10_40.convertType(src.getReleaseDateElement()));
if (src.hasReleaseDate()) {
tgt.setReleaseDate(src.getReleaseDate());
} }
return tgt; return tgt;
} }

View File

@ -2,10 +2,12 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r4.model.*;
import org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionKind; import org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionKind;
import org.hl7.fhir.r4.model.StructureDefinition.TypeDerivationRule; import org.hl7.fhir.r4.model.StructureDefinition.TypeDerivationRule;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Collections;
public class DataElement10_40 { public class DataElement10_40 {
@ -19,21 +21,21 @@ public class DataElement10_40 {
if (src.hasIdentifier()) { if (src.hasIdentifier()) {
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t)); for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t));
} }
if (src.hasVersion()) { if (src.hasVersionElement()) {
tgt.setVersion(src.getVersion()); tgt.setVersionElement((StringType) VersionConvertor_10_40.convertType(src.getVersionElement()));
} }
if (src.hasStatus()) { if (src.hasStatus()) {
tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus())); tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus()));
} }
if (src.hasExperimental()) if (src.hasExperimentalElement())
tgt.setExperimental(src.getExperimental()); tgt.setExperimentalElement((BooleanType) VersionConvertor_10_40.convertType(src.getExperimentalElement()));
if (src.hasPublisher()) { if (src.hasPublisherElement()) {
tgt.setPublisher(src.getPublisher()); tgt.setPublisherElement((StringType) VersionConvertor_10_40.convertType(src.getPublisherElement()));
} }
if (src.hasDate()) if (src.hasDateElement())
tgt.setDate(src.getDate()); tgt.setDateElement((DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement()));
if (src.hasName()) { if (src.hasNameElement()) {
tgt.setName(src.getName()); tgt.setNameElement((StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
} }
if (src.hasContact()) { if (src.hasContact()) {
for (org.hl7.fhir.dstu2.model.DataElement.DataElementContactComponent t : src.getContact()) tgt.addContact(convertDataElementContactComponent(t)); for (org.hl7.fhir.dstu2.model.DataElement.DataElementContactComponent t : src.getContact()) tgt.addContact(convertDataElementContactComponent(t));
@ -69,8 +71,8 @@ public class DataElement10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.DataElement.DataElementContactComponent tgt = new org.hl7.fhir.dstu2.model.DataElement.DataElementContactComponent(); org.hl7.fhir.dstu2.model.DataElement.DataElementContactComponent tgt = new org.hl7.fhir.dstu2.model.DataElement.DataElementContactComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) { if (src.hasNameElement()) {
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
} }
if (src.hasTelecom()) { if (src.hasTelecom()) {
for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t));
@ -83,8 +85,8 @@ public class DataElement10_40 {
return null; return null;
org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) { if (src.hasNameElement()) {
tgt.setName(src.getName()); tgt.setNameElement((StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
} }
if (src.hasTelecom()) { if (src.hasTelecom()) {
for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t));
@ -97,17 +99,17 @@ public class DataElement10_40 {
return null; return null;
org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionMappingComponent tgt = new org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionMappingComponent(); org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionMappingComponent tgt = new org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionMappingComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasIdentity()) { if (src.hasIdentityElement()) {
tgt.setIdentity(src.getIdentity()); tgt.setIdentityElement((IdType) VersionConvertor_10_40.convertType(src.getIdentityElement()));
} }
if (src.hasUri()) { if (src.hasUriElement()) {
tgt.setUri(src.getUri()); tgt.setUriElement((UriType) VersionConvertor_10_40.convertType(src.getUriElement()));
} }
if (src.hasName()) { if (src.hasNameElement()) {
tgt.setName(src.getName()); tgt.setNameElement((StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
} }
if (src.hasComments()) { if (src.hasCommentsElement()) {
tgt.setComment(src.getComments()); tgt.setCommentElement((StringType) VersionConvertor_10_40.convertType(src.getCommentsElement()));
} }
return tgt; return tgt;
} }

View File

@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import java.util.Collections;
public class DetectedIssue10_40 { public class DetectedIssue10_40 {
@ -22,9 +23,8 @@ public class DetectedIssue10_40 {
if (src.hasImplicated()) { if (src.hasImplicated()) {
for (org.hl7.fhir.r4.model.Reference t : src.getImplicated()) tgt.addImplicated(VersionConvertor_10_40.convertReference(t)); for (org.hl7.fhir.r4.model.Reference t : src.getImplicated()) tgt.addImplicated(VersionConvertor_10_40.convertReference(t));
} }
if (src.hasDetail()) { if (src.hasDetailElement())
tgt.setDetail(src.getDetail()); tgt.setDetailElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDetailElement()));
}
if (src.hasIdentifiedDateTimeType()) if (src.hasIdentifiedDateTimeType())
tgt.setDateElement(VersionConvertor_10_40.convertDateTime(src.getIdentifiedDateTimeType())); tgt.setDateElement(VersionConvertor_10_40.convertDateTime(src.getIdentifiedDateTimeType()));
if (src.hasAuthor()) { if (src.hasAuthor()) {
@ -33,9 +33,8 @@ public class DetectedIssue10_40 {
if (src.hasIdentifier()) { if (src.hasIdentifier()) {
tgt.setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifierFirstRep())); tgt.setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifierFirstRep()));
} }
if (src.hasReference()) { if (src.hasReferenceElement())
tgt.setReference(src.getReference()); tgt.setReferenceElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getReferenceElement()));
}
if (src.hasMitigation()) { if (src.hasMitigation()) {
for (org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueMitigationComponent t : src.getMitigation()) tgt.addMitigation(convertDetectedIssueMitigationComponent(t)); for (org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueMitigationComponent t : src.getMitigation()) tgt.addMitigation(convertDetectedIssueMitigationComponent(t));
} }
@ -59,9 +58,8 @@ public class DetectedIssue10_40 {
if (src.hasImplicated()) { if (src.hasImplicated()) {
for (org.hl7.fhir.dstu2.model.Reference t : src.getImplicated()) tgt.addImplicated(VersionConvertor_10_40.convertReference(t)); for (org.hl7.fhir.dstu2.model.Reference t : src.getImplicated()) tgt.addImplicated(VersionConvertor_10_40.convertReference(t));
} }
if (src.hasDetail()) { if (src.hasDetailElement())
tgt.setDetail(src.getDetail()); tgt.setDetailElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDetailElement()));
}
if (src.hasDate()) if (src.hasDate())
tgt.setIdentified(VersionConvertor_10_40.convertDateTime(src.getDateElement())); tgt.setIdentified(VersionConvertor_10_40.convertDateTime(src.getDateElement()));
if (src.hasAuthor()) { if (src.hasAuthor()) {
@ -70,9 +68,8 @@ public class DetectedIssue10_40 {
if (src.hasIdentifier()) { if (src.hasIdentifier()) {
tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifier())); tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifier()));
} }
if (src.hasReference()) { if (src.hasReferenceElement())
tgt.setReference(src.getReference()); tgt.setReferenceElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_10_40.convertType(src.getReferenceElement()));
}
if (src.hasMitigation()) { if (src.hasMitigation()) {
for (org.hl7.fhir.dstu2.model.DetectedIssue.DetectedIssueMitigationComponent t : src.getMitigation()) tgt.addMitigation(convertDetectedIssueMitigationComponent(t)); for (org.hl7.fhir.dstu2.model.DetectedIssue.DetectedIssueMitigationComponent t : src.getMitigation()) tgt.addMitigation(convertDetectedIssueMitigationComponent(t));
} }
@ -87,8 +84,8 @@ public class DetectedIssue10_40 {
if (src.hasAction()) { if (src.hasAction()) {
tgt.setAction(VersionConvertor_10_40.convertCodeableConcept(src.getAction())); tgt.setAction(VersionConvertor_10_40.convertCodeableConcept(src.getAction()));
} }
if (src.hasDate()) if (src.hasDateElement())
tgt.setDate(src.getDate()); tgt.setDateElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement()));
if (src.hasAuthor()) { if (src.hasAuthor()) {
tgt.setAuthor(VersionConvertor_10_40.convertReference(src.getAuthor())); tgt.setAuthor(VersionConvertor_10_40.convertReference(src.getAuthor()));
} }
@ -103,8 +100,8 @@ public class DetectedIssue10_40 {
if (src.hasAction()) { if (src.hasAction()) {
tgt.setAction(VersionConvertor_10_40.convertCodeableConcept(src.getAction())); tgt.setAction(VersionConvertor_10_40.convertCodeableConcept(src.getAction()));
} }
if (src.hasDate()) if (src.hasDateElement())
tgt.setDate(src.getDate()); tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement()));
if (src.hasAuthor()) { if (src.hasAuthor()) {
tgt.setAuthor(VersionConvertor_10_40.convertReference(src.getAuthor())); tgt.setAuthor(VersionConvertor_10_40.convertReference(src.getAuthor()));
} }

View File

@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import java.util.Collections;
public class DeviceMetric10_40 { public class DeviceMetric10_40 {
@ -92,9 +93,8 @@ public class DeviceMetric10_40 {
if (src.hasState()) { if (src.hasState()) {
tgt.setState(convertDeviceMetricCalibrationState(src.getState())); tgt.setState(convertDeviceMetricCalibrationState(src.getState()));
} }
if (src.hasTime()) { if (src.hasTimeElement())
tgt.setTime(src.getTime()); tgt.setTimeElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_40.convertType(src.getTimeElement()));
}
return tgt; return tgt;
} }
@ -109,9 +109,8 @@ public class DeviceMetric10_40 {
if (src.hasState()) { if (src.hasState()) {
tgt.setState(convertDeviceMetricCalibrationState(src.getState())); tgt.setState(convertDeviceMetricCalibrationState(src.getState()));
} }
if (src.hasTime()) { if (src.hasTimeElement())
tgt.setTime(src.getTime()); tgt.setTimeElement((org.hl7.fhir.r4.model.InstantType) VersionConvertor_10_40.convertType(src.getTimeElement()));
}
return tgt; return tgt;
} }

View File

@ -3,6 +3,7 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r4.model.Annotation; import org.hl7.fhir.r4.model.Annotation;
import java.util.Collections;
public class DeviceUseStatement10_40 { public class DeviceUseStatement10_40 {
@ -26,9 +27,8 @@ public class DeviceUseStatement10_40 {
if (src.hasNote()) { if (src.hasNote()) {
for (Annotation t : src.getNote()) tgt.addNotes(t.getText()); for (Annotation t : src.getNote()) tgt.addNotes(t.getText());
} }
if (src.hasRecordedOn()) { if (src.hasRecordedOnElement())
tgt.setRecordedOn(src.getRecordedOn()); tgt.setRecordedOnElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getRecordedOnElement()));
}
if (src.hasSubject()) { if (src.hasSubject()) {
tgt.setSubject(VersionConvertor_10_40.convertReference(src.getSubject())); tgt.setSubject(VersionConvertor_10_40.convertReference(src.getSubject()));
} }
@ -57,9 +57,8 @@ public class DeviceUseStatement10_40 {
if (src.hasNotes()) { if (src.hasNotes()) {
for (org.hl7.fhir.dstu2.model.StringType t : src.getNotes()) tgt.addNote().setText(t.getValue()); for (org.hl7.fhir.dstu2.model.StringType t : src.getNotes()) tgt.addNote().setText(t.getValue());
} }
if (src.hasRecordedOn()) { if (src.hasRecordedOnElement())
tgt.setRecordedOn(src.getRecordedOn()); tgt.setRecordedOnElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getRecordedOnElement()));
}
if (src.hasSubject()) { if (src.hasSubject()) {
tgt.setSubject(VersionConvertor_10_40.convertReference(src.getSubject())); tgt.setSubject(VersionConvertor_10_40.convertReference(src.getSubject()));
} }

View File

@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import java.util.Collections;
public class DiagnosticReport10_40 { public class DiagnosticReport10_40 {
@ -31,9 +32,8 @@ public class DiagnosticReport10_40 {
if (src.hasEffective()) { if (src.hasEffective()) {
tgt.setEffective(VersionConvertor_10_40.convertType(src.getEffective())); tgt.setEffective(VersionConvertor_10_40.convertType(src.getEffective()));
} }
if (src.hasIssued()) { if (src.hasIssuedElement())
tgt.setIssued(src.getIssued()); tgt.setIssuedElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_40.convertType(src.getIssuedElement()));
}
if (src.hasSpecimen()) { if (src.hasSpecimen()) {
for (org.hl7.fhir.r4.model.Reference t : src.getSpecimen()) tgt.addSpecimen(VersionConvertor_10_40.convertReference(t)); for (org.hl7.fhir.r4.model.Reference t : src.getSpecimen()) tgt.addSpecimen(VersionConvertor_10_40.convertReference(t));
} }
@ -46,9 +46,8 @@ public class DiagnosticReport10_40 {
if (src.hasMedia()) { if (src.hasMedia()) {
for (org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportMediaComponent t : src.getMedia()) tgt.addImage(convertDiagnosticReportImageComponent(t)); for (org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportMediaComponent t : src.getMedia()) tgt.addImage(convertDiagnosticReportImageComponent(t));
} }
if (src.hasConclusion()) { if (src.hasConclusionElement())
tgt.setConclusion(src.getConclusion()); tgt.setConclusionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getConclusionElement()));
}
if (src.hasConclusionCode()) { if (src.hasConclusionCode()) {
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getConclusionCode()) tgt.addCodedDiagnosis(VersionConvertor_10_40.convertCodeableConcept(t)); for (org.hl7.fhir.r4.model.CodeableConcept t : src.getConclusionCode()) tgt.addCodedDiagnosis(VersionConvertor_10_40.convertCodeableConcept(t));
} }
@ -84,9 +83,8 @@ public class DiagnosticReport10_40 {
if (src.hasEffective()) { if (src.hasEffective()) {
tgt.setEffective(VersionConvertor_10_40.convertType(src.getEffective())); tgt.setEffective(VersionConvertor_10_40.convertType(src.getEffective()));
} }
if (src.hasIssued()) { if (src.hasIssuedElement())
tgt.setIssued(src.getIssued()); tgt.setIssuedElement((org.hl7.fhir.r4.model.InstantType) VersionConvertor_10_40.convertType(src.getIssuedElement()));
}
if (src.hasSpecimen()) { if (src.hasSpecimen()) {
for (org.hl7.fhir.dstu2.model.Reference t : src.getSpecimen()) tgt.addSpecimen(VersionConvertor_10_40.convertReference(t)); for (org.hl7.fhir.dstu2.model.Reference t : src.getSpecimen()) tgt.addSpecimen(VersionConvertor_10_40.convertReference(t));
} }
@ -99,9 +97,8 @@ public class DiagnosticReport10_40 {
if (src.hasImage()) { if (src.hasImage()) {
for (org.hl7.fhir.dstu2.model.DiagnosticReport.DiagnosticReportImageComponent t : src.getImage()) tgt.addMedia(convertDiagnosticReportImageComponent(t)); for (org.hl7.fhir.dstu2.model.DiagnosticReport.DiagnosticReportImageComponent t : src.getImage()) tgt.addMedia(convertDiagnosticReportImageComponent(t));
} }
if (src.hasConclusion()) { if (src.hasConclusionElement())
tgt.setConclusion(src.getConclusion()); tgt.setConclusionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getConclusionElement()));
}
if (src.hasCodedDiagnosis()) { if (src.hasCodedDiagnosis()) {
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getCodedDiagnosis()) tgt.addConclusionCode(VersionConvertor_10_40.convertCodeableConcept(t)); for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getCodedDiagnosis()) tgt.addConclusionCode(VersionConvertor_10_40.convertCodeableConcept(t));
} }
@ -116,9 +113,8 @@ public class DiagnosticReport10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.DiagnosticReport.DiagnosticReportImageComponent tgt = new org.hl7.fhir.dstu2.model.DiagnosticReport.DiagnosticReportImageComponent(); org.hl7.fhir.dstu2.model.DiagnosticReport.DiagnosticReportImageComponent tgt = new org.hl7.fhir.dstu2.model.DiagnosticReport.DiagnosticReportImageComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasComment()) { if (src.hasCommentElement())
tgt.setComment(src.getComment()); tgt.setCommentElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getCommentElement()));
}
if (src.hasLink()) { if (src.hasLink()) {
tgt.setLink(VersionConvertor_10_40.convertReference(src.getLink())); tgt.setLink(VersionConvertor_10_40.convertReference(src.getLink()));
} }
@ -130,9 +126,8 @@ public class DiagnosticReport10_40 {
return null; return null;
org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportMediaComponent tgt = new org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportMediaComponent(); org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportMediaComponent tgt = new org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportMediaComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasComment()) { if (src.hasCommentElement())
tgt.setComment(src.getComment()); tgt.setCommentElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getCommentElement()));
}
if (src.hasLink()) { if (src.hasLink()) {
tgt.setLink(VersionConvertor_10_40.convertReference(src.getLink())); tgt.setLink(VersionConvertor_10_40.convertReference(src.getLink()));
} }

View File

@ -2,8 +2,12 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.dstu2.model.CodeableConcept; import org.hl7.fhir.dstu2.model.CodeableConcept;
import org.hl7.fhir.dstu2.model.DateTimeType;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r4.model.DocumentReference.ReferredDocumentStatus; import org.hl7.fhir.r4.model.DocumentReference.ReferredDocumentStatus;
import org.hl7.fhir.r4.model.InstantType;
import java.util.Collections;
public class DocumentReference10_40 { public class DocumentReference10_40 {
@ -66,8 +70,8 @@ public class DocumentReference10_40 {
if (src.hasAuthenticator()) { if (src.hasAuthenticator()) {
tgt.setAuthenticator(VersionConvertor_10_40.convertReference(src.getAuthenticator())); tgt.setAuthenticator(VersionConvertor_10_40.convertReference(src.getAuthenticator()));
} }
if (src.hasDate()) { if (src.hasDateElement()) {
tgt.setCreated(src.getDate()); tgt.setCreatedElement((DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement()));
} }
if (src.hasStatus()) { if (src.hasStatus()) {
tgt.setStatus(convertDocumentReferenceStatus(src.getStatus())); tgt.setStatus(convertDocumentReferenceStatus(src.getStatus()));
@ -78,9 +82,8 @@ public class DocumentReference10_40 {
if (src.hasRelatesTo()) { if (src.hasRelatesTo()) {
for (org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceRelatesToComponent t : src.getRelatesTo()) tgt.addRelatesTo(convertDocumentReferenceRelatesToComponent(t)); for (org.hl7.fhir.r4.model.DocumentReference.DocumentReferenceRelatesToComponent t : src.getRelatesTo()) tgt.addRelatesTo(convertDocumentReferenceRelatesToComponent(t));
} }
if (src.hasDescription()) { if (src.hasDescriptionElement())
tgt.setDescription(src.getDescription()); tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
}
if (src.hasSecurityLabel()) { if (src.hasSecurityLabel()) {
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getSecurityLabel()) tgt.addSecurityLabel(VersionConvertor_10_40.convertCodeableConcept(t)); for (org.hl7.fhir.r4.model.CodeableConcept t : src.getSecurityLabel()) tgt.addSecurityLabel(VersionConvertor_10_40.convertCodeableConcept(t));
} }
@ -119,8 +122,8 @@ public class DocumentReference10_40 {
if (src.hasAuthenticator()) { if (src.hasAuthenticator()) {
tgt.setAuthenticator(VersionConvertor_10_40.convertReference(src.getAuthenticator())); tgt.setAuthenticator(VersionConvertor_10_40.convertReference(src.getAuthenticator()));
} }
if (src.hasCreated()) { if (src.hasCreatedElement()) {
tgt.setDate(src.getCreated()); tgt.setDateElement((InstantType) VersionConvertor_10_40.convertType(src.getCreatedElement()));
} }
if (src.hasStatus()) { if (src.hasStatus()) {
tgt.setStatus(convertDocumentReferenceStatus(src.getStatus())); tgt.setStatus(convertDocumentReferenceStatus(src.getStatus()));
@ -131,9 +134,8 @@ public class DocumentReference10_40 {
if (src.hasRelatesTo()) { if (src.hasRelatesTo()) {
for (org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceRelatesToComponent t : src.getRelatesTo()) tgt.addRelatesTo(convertDocumentReferenceRelatesToComponent(t)); for (org.hl7.fhir.dstu2.model.DocumentReference.DocumentReferenceRelatesToComponent t : src.getRelatesTo()) tgt.addRelatesTo(convertDocumentReferenceRelatesToComponent(t));
} }
if (src.hasDescription()) { if (src.hasDescriptionElement())
tgt.setDescription(src.getDescription()); tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
}
if (src.hasSecurityLabel()) { if (src.hasSecurityLabel()) {
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getSecurityLabel()) tgt.addSecurityLabel(VersionConvertor_10_40.convertCodeableConcept(t)); for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getSecurityLabel()) tgt.addSecurityLabel(VersionConvertor_10_40.convertCodeableConcept(t));
} }

View File

@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import java.util.Collections;
public class Encounter10_40 { public class Encounter10_40 {

View File

@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import java.util.Collections;
public class EnrollmentRequest10_40 { public class EnrollmentRequest10_40 {
@ -13,9 +14,8 @@ public class EnrollmentRequest10_40 {
if (src.hasIdentifier()) { if (src.hasIdentifier()) {
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t)); for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t));
} }
if (src.hasCreated()) { if (src.hasCreatedElement())
tgt.setCreated(src.getCreated()); tgt.setCreatedElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getCreatedElement()));
}
if (src.hasProvider()) { if (src.hasProvider()) {
tgt.setProvider(VersionConvertor_10_40.convertReference(src.getProvider())); tgt.setProvider(VersionConvertor_10_40.convertReference(src.getProvider()));
} }
@ -36,9 +36,8 @@ public class EnrollmentRequest10_40 {
if (src.hasIdentifier()) { if (src.hasIdentifier()) {
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t)); for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t));
} }
if (src.hasCreated()) { if (src.hasCreatedElement())
tgt.setCreated(src.getCreated()); tgt.setCreatedElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getCreatedElement()));
}
if (src.hasCoverage()) { if (src.hasCoverage()) {
tgt.setCoverage(VersionConvertor_10_40.convertReference(src.getCoverage())); tgt.setCoverage(VersionConvertor_10_40.convertReference(src.getCoverage()));
} }

View File

@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import java.util.Collections;
public class EnrollmentResponse10_40 { public class EnrollmentResponse10_40 {
@ -16,12 +17,10 @@ public class EnrollmentResponse10_40 {
if (src.hasRequest()) { if (src.hasRequest()) {
tgt.setRequest(VersionConvertor_10_40.convertReference(src.getRequest())); tgt.setRequest(VersionConvertor_10_40.convertReference(src.getRequest()));
} }
if (src.hasDisposition()) { if (src.hasDispositionElement())
tgt.setDisposition(src.getDisposition()); tgt.setDispositionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDispositionElement()));
} if (src.hasCreatedElement())
if (src.hasCreated()) { tgt.setCreatedElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getCreatedElement()));
tgt.setCreated(src.getCreated());
}
if (src.hasOrganization()) { if (src.hasOrganization()) {
tgt.setOrganization(VersionConvertor_10_40.convertReference(src.getOrganization())); tgt.setOrganization(VersionConvertor_10_40.convertReference(src.getOrganization()));
} }
@ -39,12 +38,10 @@ public class EnrollmentResponse10_40 {
if (src.hasIdentifier()) { if (src.hasIdentifier()) {
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t)); for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t));
} }
if (src.hasDisposition()) { if (src.hasDispositionElement())
tgt.setDisposition(src.getDisposition()); tgt.setDispositionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDispositionElement()));
} if (src.hasCreatedElement())
if (src.hasCreated()) { tgt.setCreatedElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getCreatedElement()));
tgt.setCreated(src.getCreated());
}
return tgt; return tgt;
} }
} }

View File

@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import java.util.Collections;
public class EpisodeOfCare10_40 { public class EpisodeOfCare10_40 {

View File

@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import java.util.Collections;
public class FamilyMemberHistory10_40 { public class FamilyMemberHistory10_40 {
@ -50,14 +51,13 @@ public class FamilyMemberHistory10_40 {
if (src.hasPatient()) { if (src.hasPatient()) {
tgt.setPatient(VersionConvertor_10_40.convertReference(src.getPatient())); tgt.setPatient(VersionConvertor_10_40.convertReference(src.getPatient()));
} }
if (src.hasDate()) if (src.hasDateElement())
tgt.setDate(src.getDate()); tgt.setDateElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement()));
if (src.hasStatus()) { if (src.hasStatus()) {
tgt.setStatus(convertFamilyHistoryStatus(src.getStatus())); tgt.setStatus(convertFamilyHistoryStatus(src.getStatus()));
} }
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
}
if (src.hasRelationship()) { if (src.hasRelationship()) {
tgt.setRelationship(VersionConvertor_10_40.convertCodeableConcept(src.getRelationship())); tgt.setRelationship(VersionConvertor_10_40.convertCodeableConcept(src.getRelationship()));
} }
@ -87,14 +87,13 @@ public class FamilyMemberHistory10_40 {
if (src.hasPatient()) { if (src.hasPatient()) {
tgt.setPatient(VersionConvertor_10_40.convertReference(src.getPatient())); tgt.setPatient(VersionConvertor_10_40.convertReference(src.getPatient()));
} }
if (src.hasDate()) if (src.hasDateElement())
tgt.setDate(src.getDate()); tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement()));
if (src.hasStatus()) { if (src.hasStatus()) {
tgt.setStatus(convertFamilyHistoryStatus(src.getStatus())); tgt.setStatus(convertFamilyHistoryStatus(src.getStatus()));
} }
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
}
if (src.hasRelationship()) { if (src.hasRelationship()) {
tgt.setRelationship(VersionConvertor_10_40.convertCodeableConcept(src.getRelationship())); tgt.setRelationship(VersionConvertor_10_40.convertCodeableConcept(src.getRelationship()));
} }

View File

@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import java.util.Collections;
public class Flag10_40 { public class Flag10_40 {

View File

@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import java.util.Collections;
public class Group10_40 { public class Group10_40 {
@ -16,18 +17,15 @@ public class Group10_40 {
if (src.hasType()) { if (src.hasType()) {
tgt.setType(convertGroupType(src.getType())); tgt.setType(convertGroupType(src.getType()));
} }
if (src.hasActual()) { if (src.hasActualElement())
tgt.setActual(src.getActual()); tgt.setActualElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getActualElement()));
}
if (src.hasCode()) { if (src.hasCode()) {
tgt.setCode(VersionConvertor_10_40.convertCodeableConcept(src.getCode())); tgt.setCode(VersionConvertor_10_40.convertCodeableConcept(src.getCode()));
} }
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
} if (src.hasQuantityElement())
if (src.hasQuantity()) { tgt.setQuantityElement((org.hl7.fhir.r4.model.UnsignedIntType) VersionConvertor_10_40.convertType(src.getQuantityElement()));
tgt.setQuantity(src.getQuantity());
}
if (src.hasCharacteristic()) { if (src.hasCharacteristic()) {
for (org.hl7.fhir.dstu2.model.Group.GroupCharacteristicComponent t : src.getCharacteristic()) tgt.addCharacteristic(convertGroupCharacteristicComponent(t)); for (org.hl7.fhir.dstu2.model.Group.GroupCharacteristicComponent t : src.getCharacteristic()) tgt.addCharacteristic(convertGroupCharacteristicComponent(t));
} }
@ -48,18 +46,15 @@ public class Group10_40 {
if (src.hasType()) { if (src.hasType()) {
tgt.setType(convertGroupType(src.getType())); tgt.setType(convertGroupType(src.getType()));
} }
if (src.hasActual()) { if (src.hasActualElement())
tgt.setActual(src.getActual()); tgt.setActualElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getActualElement()));
}
if (src.hasCode()) { if (src.hasCode()) {
tgt.setCode(VersionConvertor_10_40.convertCodeableConcept(src.getCode())); tgt.setCode(VersionConvertor_10_40.convertCodeableConcept(src.getCode()));
} }
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
} if (src.hasQuantityElement())
if (src.hasQuantity()) { tgt.setQuantityElement((org.hl7.fhir.dstu2.model.UnsignedIntType) VersionConvertor_10_40.convertType(src.getQuantityElement()));
tgt.setQuantity(src.getQuantity());
}
if (src.hasCharacteristic()) { if (src.hasCharacteristic()) {
for (org.hl7.fhir.r4.model.Group.GroupCharacteristicComponent t : src.getCharacteristic()) tgt.addCharacteristic(convertGroupCharacteristicComponent(t)); for (org.hl7.fhir.r4.model.Group.GroupCharacteristicComponent t : src.getCharacteristic()) tgt.addCharacteristic(convertGroupCharacteristicComponent(t));
} }
@ -80,9 +75,8 @@ public class Group10_40 {
if (src.hasValue()) { if (src.hasValue()) {
tgt.setValue(VersionConvertor_10_40.convertType(src.getValue())); tgt.setValue(VersionConvertor_10_40.convertType(src.getValue()));
} }
if (src.hasExclude()) { if (src.hasExcludeElement())
tgt.setExclude(src.getExclude()); tgt.setExcludeElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getExcludeElement()));
}
if (src.hasPeriod()) { if (src.hasPeriod()) {
tgt.setPeriod(VersionConvertor_10_40.convertPeriod(src.getPeriod())); tgt.setPeriod(VersionConvertor_10_40.convertPeriod(src.getPeriod()));
} }
@ -100,9 +94,8 @@ public class Group10_40 {
if (src.hasValue()) { if (src.hasValue()) {
tgt.setValue(VersionConvertor_10_40.convertType(src.getValue())); tgt.setValue(VersionConvertor_10_40.convertType(src.getValue()));
} }
if (src.hasExclude()) { if (src.hasExcludeElement())
tgt.setExclude(src.getExclude()); tgt.setExcludeElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getExcludeElement()));
}
if (src.hasPeriod()) { if (src.hasPeriod()) {
tgt.setPeriod(VersionConvertor_10_40.convertPeriod(src.getPeriod())); tgt.setPeriod(VersionConvertor_10_40.convertPeriod(src.getPeriod()));
} }
@ -120,9 +113,8 @@ public class Group10_40 {
if (src.hasPeriod()) { if (src.hasPeriod()) {
tgt.setPeriod(VersionConvertor_10_40.convertPeriod(src.getPeriod())); tgt.setPeriod(VersionConvertor_10_40.convertPeriod(src.getPeriod()));
} }
if (src.hasInactive()) { if (src.hasInactiveElement())
tgt.setInactive(src.getInactive()); tgt.setInactiveElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getInactiveElement()));
}
return tgt; return tgt;
} }
@ -137,9 +129,8 @@ public class Group10_40 {
if (src.hasPeriod()) { if (src.hasPeriod()) {
tgt.setPeriod(VersionConvertor_10_40.convertPeriod(src.getPeriod())); tgt.setPeriod(VersionConvertor_10_40.convertPeriod(src.getPeriod()));
} }
if (src.hasInactive()) { if (src.hasInactiveElement())
tgt.setInactive(src.getInactive()); tgt.setInactiveElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getInactiveElement()));
}
return tgt; return tgt;
} }

View File

@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import java.util.Collections;
public class HealthcareService10_40 { public class HealthcareService10_40 {
@ -68,12 +69,10 @@ public class HealthcareService10_40 {
if (src.hasLocation()) { if (src.hasLocation()) {
tgt.addLocation(VersionConvertor_10_40.convertReference(src.getLocation())); tgt.addLocation(VersionConvertor_10_40.convertReference(src.getLocation()));
} }
if (src.hasComment()) { if (src.hasCommentElement())
tgt.setComment(src.getComment()); tgt.setCommentElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getCommentElement()));
} if (src.hasExtraDetailsElement())
if (src.hasExtraDetails()) { tgt.setExtraDetailsElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_10_40.convertType(src.getExtraDetailsElement()));
tgt.setExtraDetails(src.getExtraDetails());
}
if (src.hasPhoto()) { if (src.hasPhoto()) {
tgt.setPhoto(VersionConvertor_10_40.convertAttachment(src.getPhoto())); tgt.setPhoto(VersionConvertor_10_40.convertAttachment(src.getPhoto()));
} }
@ -99,18 +98,16 @@ public class HealthcareService10_40 {
if (src.hasReferralMethod()) { if (src.hasReferralMethod()) {
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getReferralMethod()) tgt.addReferralMethod(VersionConvertor_10_40.convertCodeableConcept(t)); for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getReferralMethod()) tgt.addReferralMethod(VersionConvertor_10_40.convertCodeableConcept(t));
} }
if (src.hasAppointmentRequired()) { if (src.hasAppointmentRequiredElement())
tgt.setAppointmentRequired(src.getAppointmentRequired()); tgt.setAppointmentRequiredElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getAppointmentRequiredElement()));
}
if (src.hasAvailableTime()) { if (src.hasAvailableTime()) {
for (org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceAvailableTimeComponent t : src.getAvailableTime()) tgt.addAvailableTime(convertHealthcareServiceAvailableTimeComponent(t)); for (org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceAvailableTimeComponent t : src.getAvailableTime()) tgt.addAvailableTime(convertHealthcareServiceAvailableTimeComponent(t));
} }
if (src.hasNotAvailable()) { if (src.hasNotAvailable()) {
for (org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceNotAvailableComponent t : src.getNotAvailable()) tgt.addNotAvailable(convertHealthcareServiceNotAvailableComponent(t)); for (org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceNotAvailableComponent t : src.getNotAvailable()) tgt.addNotAvailable(convertHealthcareServiceNotAvailableComponent(t));
} }
if (src.hasAvailabilityExceptions()) { if (src.hasAvailabilityExceptionsElement())
tgt.setAvailabilityExceptions(src.getAvailabilityExceptions()); tgt.setAvailabilityExceptionsElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getAvailabilityExceptionsElement()));
}
return tgt; return tgt;
} }
@ -133,12 +130,10 @@ public class HealthcareService10_40 {
if (src.hasLocation()) { if (src.hasLocation()) {
for (org.hl7.fhir.r4.model.Reference t : src.getLocation()) tgt.setLocation(VersionConvertor_10_40.convertReference(t)); for (org.hl7.fhir.r4.model.Reference t : src.getLocation()) tgt.setLocation(VersionConvertor_10_40.convertReference(t));
} }
if (src.hasComment()) { if (src.hasCommentElement())
tgt.setComment(src.getComment()); tgt.setCommentElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getCommentElement()));
} if (src.hasExtraDetailsElement())
if (src.hasExtraDetails()) { tgt.setExtraDetailsElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getExtraDetailsElement()));
tgt.setExtraDetails(src.getExtraDetails());
}
if (src.hasPhoto()) { if (src.hasPhoto()) {
tgt.setPhoto(VersionConvertor_10_40.convertAttachment(src.getPhoto())); tgt.setPhoto(VersionConvertor_10_40.convertAttachment(src.getPhoto()));
} }
@ -165,18 +160,16 @@ public class HealthcareService10_40 {
if (src.hasReferralMethod()) { if (src.hasReferralMethod()) {
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReferralMethod()) tgt.addReferralMethod(VersionConvertor_10_40.convertCodeableConcept(t)); for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReferralMethod()) tgt.addReferralMethod(VersionConvertor_10_40.convertCodeableConcept(t));
} }
if (src.hasAppointmentRequired()) { if (src.hasAppointmentRequiredElement())
tgt.setAppointmentRequired(src.getAppointmentRequired()); tgt.setAppointmentRequiredElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getAppointmentRequiredElement()));
}
if (src.hasAvailableTime()) { if (src.hasAvailableTime()) {
for (org.hl7.fhir.r4.model.HealthcareService.HealthcareServiceAvailableTimeComponent t : src.getAvailableTime()) tgt.addAvailableTime(convertHealthcareServiceAvailableTimeComponent(t)); for (org.hl7.fhir.r4.model.HealthcareService.HealthcareServiceAvailableTimeComponent t : src.getAvailableTime()) tgt.addAvailableTime(convertHealthcareServiceAvailableTimeComponent(t));
} }
if (src.hasNotAvailable()) { if (src.hasNotAvailable()) {
for (org.hl7.fhir.r4.model.HealthcareService.HealthcareServiceNotAvailableComponent t : src.getNotAvailable()) tgt.addNotAvailable(convertHealthcareServiceNotAvailableComponent(t)); for (org.hl7.fhir.r4.model.HealthcareService.HealthcareServiceNotAvailableComponent t : src.getNotAvailable()) tgt.addNotAvailable(convertHealthcareServiceNotAvailableComponent(t));
} }
if (src.hasAvailabilityExceptions()) { if (src.hasAvailabilityExceptionsElement())
tgt.setAvailabilityExceptions(src.getAvailabilityExceptions()); tgt.setAvailabilityExceptionsElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getAvailabilityExceptionsElement()));
}
return tgt; return tgt;
} }
@ -188,15 +181,12 @@ public class HealthcareService10_40 {
if (src.hasDaysOfWeek()) { if (src.hasDaysOfWeek()) {
for (org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.HealthcareService.DaysOfWeek> t : src.getDaysOfWeek()) VersionConvertor_10_40.copyElement(t, tgt.addDaysOfWeekElement().setValue(convertDaysOfWeek(t.getValue()))); for (org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.HealthcareService.DaysOfWeek> t : src.getDaysOfWeek()) VersionConvertor_10_40.copyElement(t, tgt.addDaysOfWeekElement().setValue(convertDaysOfWeek(t.getValue())));
} }
if (src.hasAllDay()) { if (src.hasAllDayElement())
tgt.setAllDay(src.getAllDay()); tgt.setAllDayElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getAllDayElement()));
} if (src.hasAvailableStartTimeElement())
if (src.hasAvailableStartTime()) { tgt.setAvailableStartTimeElement((org.hl7.fhir.r4.model.TimeType) VersionConvertor_10_40.convertType(src.getAvailableStartTimeElement()));
tgt.setAvailableStartTime(src.getAvailableStartTime()); if (src.hasAvailableEndTimeElement())
} tgt.setAvailableEndTimeElement((org.hl7.fhir.r4.model.TimeType) VersionConvertor_10_40.convertType(src.getAvailableEndTimeElement()));
if (src.hasAvailableEndTime()) {
tgt.setAvailableEndTime(src.getAvailableEndTime());
}
return tgt; return tgt;
} }
@ -208,15 +198,12 @@ public class HealthcareService10_40 {
if (src.hasDaysOfWeek()) { if (src.hasDaysOfWeek()) {
for (org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek> t : src.getDaysOfWeek()) VersionConvertor_10_40.copyElement(t, tgt.addDaysOfWeekElement().setValue(convertDaysOfWeek(t.getValue()))); for (org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.HealthcareService.DaysOfWeek> t : src.getDaysOfWeek()) VersionConvertor_10_40.copyElement(t, tgt.addDaysOfWeekElement().setValue(convertDaysOfWeek(t.getValue())));
} }
if (src.hasAllDay()) { if (src.hasAllDayElement())
tgt.setAllDay(src.getAllDay()); tgt.setAllDayElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getAllDayElement()));
} if (src.hasAvailableStartTimeElement())
if (src.hasAvailableStartTime()) { tgt.setAvailableStartTimeElement((org.hl7.fhir.dstu2.model.TimeType) VersionConvertor_10_40.convertType(src.getAvailableStartTimeElement()));
tgt.setAvailableStartTime(src.getAvailableStartTime()); if (src.hasAvailableEndTimeElement())
} tgt.setAvailableEndTimeElement((org.hl7.fhir.dstu2.model.TimeType) VersionConvertor_10_40.convertType(src.getAvailableEndTimeElement()));
if (src.hasAvailableEndTime()) {
tgt.setAvailableEndTime(src.getAvailableEndTime());
}
return tgt; return tgt;
} }
@ -225,9 +212,8 @@ public class HealthcareService10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceNotAvailableComponent tgt = new org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceNotAvailableComponent(); org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceNotAvailableComponent tgt = new org.hl7.fhir.dstu2.model.HealthcareService.HealthcareServiceNotAvailableComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasDescription()) { if (src.hasDescriptionElement())
tgt.setDescription(src.getDescription()); tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
}
if (src.hasDuring()) { if (src.hasDuring()) {
tgt.setDuring(VersionConvertor_10_40.convertPeriod(src.getDuring())); tgt.setDuring(VersionConvertor_10_40.convertPeriod(src.getDuring()));
} }
@ -239,9 +225,8 @@ public class HealthcareService10_40 {
return null; return null;
org.hl7.fhir.r4.model.HealthcareService.HealthcareServiceNotAvailableComponent tgt = new org.hl7.fhir.r4.model.HealthcareService.HealthcareServiceNotAvailableComponent(); org.hl7.fhir.r4.model.HealthcareService.HealthcareServiceNotAvailableComponent tgt = new org.hl7.fhir.r4.model.HealthcareService.HealthcareServiceNotAvailableComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasDescription()) { if (src.hasDescriptionElement())
tgt.setDescription(src.getDescription()); tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
}
if (src.hasDuring()) { if (src.hasDuring()) {
tgt.setDuring(VersionConvertor_10_40.convertPeriod(src.getDuring())); tgt.setDuring(VersionConvertor_10_40.convertPeriod(src.getDuring()));
} }

View File

@ -1,11 +1,15 @@
package org.hl7.fhir.convertors.conv10_40; package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.dstu2.model.IdType;
import org.hl7.fhir.dstu2.model.ImplementationGuide.GuidePageKind; import org.hl7.fhir.dstu2.model.ImplementationGuide.GuidePageKind;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r4.model.Enumeration; import org.hl7.fhir.r4.model.Enumeration;
import org.hl7.fhir.r4.model.ImplementationGuide.GuidePageGeneration; import org.hl7.fhir.r4.model.ImplementationGuide.GuidePageGeneration;
import org.hl7.fhir.r4.model.StringType;
import java.util.List; import java.util.List;
import java.util.Collections;
public class ImplementationGuide10_40 { public class ImplementationGuide10_40 {
@ -14,38 +18,32 @@ public class ImplementationGuide10_40 {
return null; return null;
org.hl7.fhir.r4.model.ImplementationGuide tgt = new org.hl7.fhir.r4.model.ImplementationGuide(); org.hl7.fhir.r4.model.ImplementationGuide tgt = new org.hl7.fhir.r4.model.ImplementationGuide();
VersionConvertor_10_40.copyDomainResource(src, tgt); VersionConvertor_10_40.copyDomainResource(src, tgt);
if (src.hasUrl()) { if (src.hasUrlElement())
tgt.setUrl(src.getUrl()); tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement()));
} if (src.hasVersionElement())
if (src.hasVersion()) { tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement()));
tgt.setVersion(src.getVersion()); if (src.hasNameElement())
} tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
if (src.hasName()) {
tgt.setName(src.getName());
}
if (src.hasStatus()) { if (src.hasStatus()) {
tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus())); tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus()));
} }
if (src.hasExperimental()) if (src.hasExperimentalElement())
tgt.setExperimental(src.getExperimental()); tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getExperimentalElement()));
if (src.hasPublisher()) { if (src.hasPublisherElement())
tgt.setPublisher(src.getPublisher()); tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getPublisherElement()));
}
if (src.hasContact()) { if (src.hasContact()) {
for (org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideContactComponent t : src.getContact()) tgt.addContact(convertImplementationGuideContactComponent(t)); for (org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideContactComponent t : src.getContact()) tgt.addContact(convertImplementationGuideContactComponent(t));
} }
if (src.hasDate()) if (src.hasDateElement())
tgt.setDate(src.getDate()); tgt.setDateElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement()));
if (src.hasDescription()) { if (src.hasDescriptionElement())
tgt.setDescription(src.getDescription()); tgt.setDescriptionElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
}
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_40.isJurisdiction(t)) for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_40.isJurisdiction(t))
tgt.addJurisdiction(VersionConvertor_10_40.convertCodeableConcept(t)); tgt.addJurisdiction(VersionConvertor_10_40.convertCodeableConcept(t));
else else
tgt.addUseContext(VersionConvertor_10_40.convertCodeableConceptToUsageContext(t)); tgt.addUseContext(VersionConvertor_10_40.convertCodeableConceptToUsageContext(t));
if (src.hasCopyright()) { if (src.hasCopyrightElement())
tgt.setCopyright(src.getCopyright()); tgt.setCopyrightElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_10_40.convertType(src.getCopyrightElement()));
}
if (src.hasFhirVersion()) { if (src.hasFhirVersion()) {
tgt.addFhirVersion(org.hl7.fhir.r4.model.Enumerations.FHIRVersion.fromCode(src.getFhirVersion())); tgt.addFhirVersion(org.hl7.fhir.r4.model.Enumerations.FHIRVersion.fromCode(src.getFhirVersion()));
} }
@ -69,39 +67,33 @@ public class ImplementationGuide10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.ImplementationGuide tgt = new org.hl7.fhir.dstu2.model.ImplementationGuide(); org.hl7.fhir.dstu2.model.ImplementationGuide tgt = new org.hl7.fhir.dstu2.model.ImplementationGuide();
VersionConvertor_10_40.copyDomainResource(src, tgt); VersionConvertor_10_40.copyDomainResource(src, tgt);
if (src.hasUrl()) { if (src.hasUrlElement())
tgt.setUrl(src.getUrl()); tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement()));
} if (src.hasVersionElement())
if (src.hasVersion()) { tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement()));
tgt.setVersion(src.getVersion()); if (src.hasNameElement())
} tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
if (src.hasName()) {
tgt.setName(src.getName());
}
if (src.hasStatus()) { if (src.hasStatus()) {
tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus())); tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus()));
} }
if (src.hasExperimental()) if (src.hasExperimentalElement())
tgt.setExperimental(src.getExperimental()); tgt.setExperimentalElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getExperimentalElement()));
if (src.hasPublisher()) { if (src.hasPublisherElement())
tgt.setPublisher(src.getPublisher()); tgt.setPublisherElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getPublisherElement()));
}
if (src.hasContact()) { if (src.hasContact()) {
for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(convertImplementationGuideContactComponent(t)); for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(convertImplementationGuideContactComponent(t));
} }
if (src.hasDate()) if (src.hasDateElement())
tgt.setDate(src.getDate()); tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement()));
if (src.hasDescription()) { if (src.hasDescriptionElement())
tgt.setDescription(src.getDescription()); tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
}
for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept())
tgt.addUseContext(VersionConvertor_10_40.convertCodeableConcept(t.getValueCodeableConcept())); tgt.addUseContext(VersionConvertor_10_40.convertCodeableConcept(t.getValueCodeableConcept()));
if (src.hasJurisdiction()) { if (src.hasJurisdiction()) {
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_10_40.convertCodeableConcept(t)); for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_10_40.convertCodeableConcept(t));
} }
if (src.hasCopyright()) { if (src.hasCopyrightElement())
tgt.setCopyright(src.getCopyright()); tgt.setCopyrightElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getCopyrightElement()));
}
for (Enumeration<org.hl7.fhir.r4.model.Enumerations.FHIRVersion> v : src.getFhirVersion()) { for (Enumeration<org.hl7.fhir.r4.model.Enumerations.FHIRVersion> v : src.getFhirVersion()) {
tgt.setFhirVersion(v.asStringValue()); tgt.setFhirVersion(v.asStringValue());
} }
@ -128,9 +120,8 @@ public class ImplementationGuide10_40 {
return null; return null;
org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
}
if (src.hasTelecom()) { if (src.hasTelecom()) {
for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t));
} }
@ -142,9 +133,8 @@ public class ImplementationGuide10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideContactComponent tgt = new org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideContactComponent(); org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideContactComponent tgt = new org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideContactComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
}
if (src.hasTelecom()) { if (src.hasTelecom()) {
for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t));
} }
@ -156,9 +146,8 @@ public class ImplementationGuide10_40 {
return null; return null;
org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideDependsOnComponent tgt = new org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideDependsOnComponent(); org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideDependsOnComponent tgt = new org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideDependsOnComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasUri()) { if (src.hasUriElement())
tgt.setUri(src.getUri()); tgt.setUriElement((org.hl7.fhir.r4.model.CanonicalType) VersionConvertor_10_40.convertType(src.getUriElement()));
}
return tgt; return tgt;
} }
@ -168,9 +157,8 @@ public class ImplementationGuide10_40 {
org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideDependencyComponent tgt = new org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideDependencyComponent(); org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideDependencyComponent tgt = new org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideDependencyComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
tgt.setType(org.hl7.fhir.dstu2.model.ImplementationGuide.GuideDependencyType.REFERENCE); tgt.setType(org.hl7.fhir.dstu2.model.ImplementationGuide.GuideDependencyType.REFERENCE);
if (src.hasUri()) { if (src.hasUriElement())
tgt.setUri(src.getUri()); tgt.setUriElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getUriElement()));
}
return tgt; return tgt;
} }
@ -179,9 +167,8 @@ public class ImplementationGuide10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideGlobalComponent tgt = new org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideGlobalComponent(); org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideGlobalComponent tgt = new org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuideGlobalComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasType()) { if (src.hasTypeElement())
tgt.setType(src.getType()); tgt.setTypeElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_40.convertType(src.getTypeElement()));
}
if (src.hasProfileElement()) { if (src.hasProfileElement()) {
tgt.setProfile(VersionConvertor_10_40.convertCanonicalToReference(src.getProfileElement())); tgt.setProfile(VersionConvertor_10_40.convertCanonicalToReference(src.getProfileElement()));
} }
@ -193,9 +180,8 @@ public class ImplementationGuide10_40 {
return null; return null;
org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideGlobalComponent tgt = new org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideGlobalComponent(); org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideGlobalComponent tgt = new org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideGlobalComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasType()) { if (src.hasTypeElement())
tgt.setType(src.getType()); tgt.setTypeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_10_40.convertType(src.getTypeElement()));
}
if (src.hasProfile()) { if (src.hasProfile()) {
tgt.setProfileElement(VersionConvertor_10_40.convertReferenceToCanonical(src.getProfile())); tgt.setProfileElement(VersionConvertor_10_40.convertReferenceToCanonical(src.getProfile()));
} }
@ -207,15 +193,13 @@ public class ImplementationGuide10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePackageComponent tgt = new org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePackageComponent(); org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePackageComponent tgt = new org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePackageComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasId()) { if (src.hasIdElement()) {
tgt.setId(src.getId()); tgt.setIdElement((IdType) VersionConvertor_10_40.convertType(src.getIdElement()));
}
if (src.hasName()) {
tgt.setName(src.getName());
}
if (src.hasDescription()) {
tgt.setDescription(src.getDescription());
} }
if (src.hasNameElement())
tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
if (src.hasDescriptionElement())
tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
return tgt; return tgt;
} }
@ -225,10 +209,10 @@ public class ImplementationGuide10_40 {
org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideDefinitionGroupingComponent tgt = new org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideDefinitionGroupingComponent(); org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideDefinitionGroupingComponent tgt = new org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideDefinitionGroupingComponent();
tgt.setId("p" + (context.getGrouping().size() + 1)); tgt.setId("p" + (context.getGrouping().size() + 1));
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
if (src.hasDescription()) if (src.hasDescriptionElement())
tgt.setDescription(src.getDescription()); tgt.setDescriptionElement((StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
for (org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePackageResourceComponent t : src.getResource()) { for (org.hl7.fhir.dstu2.model.ImplementationGuide.ImplementationGuidePackageResourceComponent t : src.getResource()) {
org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideDefinitionResourceComponent tn = convertImplementationGuidePackageResourceComponent(t); org.hl7.fhir.r4.model.ImplementationGuide.ImplementationGuideDefinitionResourceComponent tn = convertImplementationGuidePackageResourceComponent(t);
tn.setGroupingId(tgt.getId()); tn.setGroupingId(tgt.getId());
@ -244,10 +228,10 @@ public class ImplementationGuide10_40 {
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasExampleCanonicalType()) if (src.hasExampleCanonicalType())
tgt.setExampleFor(VersionConvertor_10_40.convertCanonicalToReference(src.getExampleCanonicalType())); tgt.setExampleFor(VersionConvertor_10_40.convertCanonicalToReference(src.getExampleCanonicalType()));
if (src.hasName()) if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
if (src.hasDescription()) if (src.hasDescriptionElement())
tgt.setDescription(src.getDescription()); tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
if (src.hasReference()) if (src.hasReference())
tgt.setSource(VersionConvertor_10_40.convertReference(src.getReference())); tgt.setSource(VersionConvertor_10_40.convertReference(src.getReference()));
return tgt; return tgt;
@ -260,10 +244,10 @@ public class ImplementationGuide10_40 {
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasExampleFor()) if (src.hasExampleFor())
tgt.setExample(VersionConvertor_10_40.convertReferenceToCanonical(src.getExampleFor())); tgt.setExample(VersionConvertor_10_40.convertReferenceToCanonical(src.getExampleFor()));
if (src.hasName()) if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
if (src.hasDescription()) if (src.hasDescriptionElement())
tgt.setDescription(src.getDescription()); tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
if (src.hasSourceReference()) if (src.hasSourceReference())
tgt.setReference(VersionConvertor_10_40.convertReference(src.getSourceReference())); tgt.setReference(VersionConvertor_10_40.convertReference(src.getSourceReference()));
else if (src.hasSourceUriType()) else if (src.hasSourceUriType())
@ -281,8 +265,8 @@ public class ImplementationGuide10_40 {
tgt.setName(convertUriToUrl(src.getSourceElement())); tgt.setName(convertUriToUrl(src.getSourceElement()));
} }
} }
if (src.hasName()) { if (src.hasNameElement()) {
tgt.setTitle(src.getName()); tgt.setTitleElement((StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
} }
if (src.hasKind()) if (src.hasKind())
tgt.setGeneration(convertPageGeneration(src.getKind())); tgt.setGeneration(convertPageGeneration(src.getKind()));
@ -299,8 +283,8 @@ public class ImplementationGuide10_40 {
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasNameUrlType()) if (src.hasNameUrlType())
tgt.setSource(src.getNameUrlType().getValue()); tgt.setSource(src.getNameUrlType().getValue());
if (src.hasTitle()) { if (src.hasTitleElement()) {
tgt.setName(src.getTitle()); tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getTitleElement()));
} }
if (src.hasGeneration()) if (src.hasGeneration())
tgt.setKind(convertPageGeneration(src.getGeneration())); tgt.setKind(convertPageGeneration(src.getGeneration()));

View File

@ -2,6 +2,11 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r4.model.BooleanType;
import org.hl7.fhir.r4.model.DateTimeType;
import org.hl7.fhir.r4.model.StringType;
import java.util.Collections;
public class List10_40 { public class List10_40 {
@ -13,8 +18,8 @@ public class List10_40 {
if (src.hasIdentifier()) { if (src.hasIdentifier()) {
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t)); for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t));
} }
if (src.hasTitle()) { if (src.hasTitleElement()) {
tgt.setTitle(src.getTitle()); tgt.setTitleElement((StringType) VersionConvertor_10_40.convertType(src.getTitleElement()));
} }
if (src.hasCode()) { if (src.hasCode()) {
tgt.setCode(VersionConvertor_10_40.convertCodeableConcept(src.getCode())); tgt.setCode(VersionConvertor_10_40.convertCodeableConcept(src.getCode()));
@ -31,8 +36,8 @@ public class List10_40 {
if (src.hasStatus()) { if (src.hasStatus()) {
tgt.setStatus(convertListStatus(src.getStatus())); tgt.setStatus(convertListStatus(src.getStatus()));
} }
if (src.hasDate()) if (src.hasDateElement())
tgt.setDate(src.getDate()); tgt.setDateElement((DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement()));
if (src.hasOrderedBy()) { if (src.hasOrderedBy()) {
tgt.setOrderedBy(VersionConvertor_10_40.convertCodeableConcept(src.getOrderedBy())); tgt.setOrderedBy(VersionConvertor_10_40.convertCodeableConcept(src.getOrderedBy()));
} }
@ -55,8 +60,8 @@ public class List10_40 {
if (src.hasIdentifier()) { if (src.hasIdentifier()) {
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t)); for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t));
} }
if (src.hasTitle()) { if (src.hasTitleElement()) {
tgt.setTitle(src.getTitle()); tgt.setTitleElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getTitleElement()));
} }
if (src.hasCode()) { if (src.hasCode()) {
tgt.setCode(VersionConvertor_10_40.convertCodeableConcept(src.getCode())); tgt.setCode(VersionConvertor_10_40.convertCodeableConcept(src.getCode()));
@ -73,8 +78,8 @@ public class List10_40 {
if (src.hasStatus()) { if (src.hasStatus()) {
tgt.setStatus(convertListStatus(src.getStatus())); tgt.setStatus(convertListStatus(src.getStatus()));
} }
if (src.hasDate()) if (src.hasDateElement())
tgt.setDate(src.getDate()); tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement()));
if (src.hasOrderedBy()) { if (src.hasOrderedBy()) {
tgt.setOrderedBy(VersionConvertor_10_40.convertCodeableConcept(src.getOrderedBy())); tgt.setOrderedBy(VersionConvertor_10_40.convertCodeableConcept(src.getOrderedBy()));
} }
@ -98,11 +103,11 @@ public class List10_40 {
if (src.hasFlag()) { if (src.hasFlag()) {
tgt.setFlag(VersionConvertor_10_40.convertCodeableConcept(src.getFlag())); tgt.setFlag(VersionConvertor_10_40.convertCodeableConcept(src.getFlag()));
} }
if (src.hasDeleted()) { if (src.hasDeletedElement()) {
tgt.setDeleted(src.getDeleted()); tgt.setDeletedElement((BooleanType) VersionConvertor_10_40.convertType(src.getDeletedElement()));
} }
if (src.hasDate()) if (src.hasDateElement())
tgt.setDate(src.getDate()); tgt.setDateElement((DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement()));
if (src.hasItem()) { if (src.hasItem()) {
tgt.setItem(VersionConvertor_10_40.convertReference(src.getItem())); tgt.setItem(VersionConvertor_10_40.convertReference(src.getItem()));
} }
@ -117,11 +122,11 @@ public class List10_40 {
if (src.hasFlag()) { if (src.hasFlag()) {
tgt.setFlag(VersionConvertor_10_40.convertCodeableConcept(src.getFlag())); tgt.setFlag(VersionConvertor_10_40.convertCodeableConcept(src.getFlag()));
} }
if (src.hasDeleted()) { if (src.hasDeletedElement()) {
tgt.setDeleted(src.getDeleted()); tgt.setDeletedElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getDeletedElement()));
} }
if (src.hasDate()) if (src.hasDateElement())
tgt.setDate(src.getDate()); tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement()));
if (src.hasItem()) { if (src.hasItem()) {
tgt.setItem(VersionConvertor_10_40.convertReference(src.getItem())); tgt.setItem(VersionConvertor_10_40.convertReference(src.getItem()));
} }

View File

@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import java.util.Collections;
public class Location10_40 { public class Location10_40 {
@ -16,12 +17,10 @@ public class Location10_40 {
if (src.hasStatus()) { if (src.hasStatus()) {
tgt.setStatus(convertLocationStatus(src.getStatus())); tgt.setStatus(convertLocationStatus(src.getStatus()));
} }
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
} if (src.hasDescriptionElement())
if (src.hasDescription()) { tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
tgt.setDescription(src.getDescription());
}
if (src.hasMode()) { if (src.hasMode()) {
tgt.setMode(convertLocationMode(src.getMode())); tgt.setMode(convertLocationMode(src.getMode()));
} }
@ -60,12 +59,10 @@ public class Location10_40 {
if (src.hasStatus()) { if (src.hasStatus()) {
tgt.setStatus(convertLocationStatus(src.getStatus())); tgt.setStatus(convertLocationStatus(src.getStatus()));
} }
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
} if (src.hasDescriptionElement())
if (src.hasDescription()) { tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
tgt.setDescription(src.getDescription());
}
if (src.hasMode()) { if (src.hasMode()) {
tgt.setMode(convertLocationMode(src.getMode())); tgt.setMode(convertLocationMode(src.getMode()));
} }
@ -124,15 +121,12 @@ public class Location10_40 {
return null; return null;
org.hl7.fhir.r4.model.Location.LocationPositionComponent tgt = new org.hl7.fhir.r4.model.Location.LocationPositionComponent(); org.hl7.fhir.r4.model.Location.LocationPositionComponent tgt = new org.hl7.fhir.r4.model.Location.LocationPositionComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasLongitude()) { if (src.hasLongitudeElement())
tgt.setLongitude(src.getLongitude()); tgt.setLongitudeElement((org.hl7.fhir.r4.model.DecimalType) VersionConvertor_10_40.convertType(src.getLongitudeElement()));
} if (src.hasLatitudeElement())
if (src.hasLatitude()) { tgt.setLatitudeElement((org.hl7.fhir.r4.model.DecimalType) VersionConvertor_10_40.convertType(src.getLatitudeElement()));
tgt.setLatitude(src.getLatitude()); if (src.hasAltitudeElement())
} tgt.setAltitudeElement((org.hl7.fhir.r4.model.DecimalType) VersionConvertor_10_40.convertType(src.getAltitudeElement()));
if (src.hasAltitude()) {
tgt.setAltitude(src.getAltitude());
}
return tgt; return tgt;
} }
@ -141,15 +135,12 @@ public class Location10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.Location.LocationPositionComponent tgt = new org.hl7.fhir.dstu2.model.Location.LocationPositionComponent(); org.hl7.fhir.dstu2.model.Location.LocationPositionComponent tgt = new org.hl7.fhir.dstu2.model.Location.LocationPositionComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasLongitude()) { if (src.hasLongitudeElement())
tgt.setLongitude(src.getLongitude()); tgt.setLongitudeElement((org.hl7.fhir.dstu2.model.DecimalType) VersionConvertor_10_40.convertType(src.getLongitudeElement()));
} if (src.hasLatitudeElement())
if (src.hasLatitude()) { tgt.setLatitudeElement((org.hl7.fhir.dstu2.model.DecimalType) VersionConvertor_10_40.convertType(src.getLatitudeElement()));
tgt.setLatitude(src.getLatitude()); if (src.hasAltitudeElement())
} tgt.setAltitudeElement((org.hl7.fhir.dstu2.model.DecimalType) VersionConvertor_10_40.convertType(src.getAltitudeElement()));
if (src.hasAltitude()) {
tgt.setAltitude(src.getAltitude());
}
return tgt; return tgt;
} }

View File

@ -4,6 +4,9 @@ import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r4.model.Dosage; import org.hl7.fhir.r4.model.Dosage;
import org.hl7.fhir.r4.model.Dosage.DosageDoseAndRateComponent; import org.hl7.fhir.r4.model.Dosage.DosageDoseAndRateComponent;
import org.hl7.fhir.r4.model.StringType;
import java.util.Collections;
public class MedicationDispense10_40 { public class MedicationDispense10_40 {
@ -36,20 +39,18 @@ public class MedicationDispense10_40 {
if (src.hasDaysSupply()) { if (src.hasDaysSupply()) {
tgt.setDaysSupply(VersionConvertor_10_40.convertSimpleQuantity(src.getDaysSupply())); tgt.setDaysSupply(VersionConvertor_10_40.convertSimpleQuantity(src.getDaysSupply()));
} }
if (src.hasWhenPrepared()) { if (src.hasWhenPreparedElement())
tgt.setWhenPrepared(src.getWhenPrepared()); tgt.setWhenPreparedElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getWhenPreparedElement()));
} if (src.hasWhenHandedOverElement())
if (src.hasWhenHandedOver()) { tgt.setWhenHandedOverElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getWhenHandedOverElement()));
tgt.setWhenHandedOver(src.getWhenHandedOver());
}
if (src.hasDestination()) { if (src.hasDestination()) {
tgt.setDestination(VersionConvertor_10_40.convertReference(src.getDestination())); tgt.setDestination(VersionConvertor_10_40.convertReference(src.getDestination()));
} }
if (src.hasReceiver()) { if (src.hasReceiver()) {
for (org.hl7.fhir.dstu2.model.Reference t : src.getReceiver()) tgt.addReceiver(VersionConvertor_10_40.convertReference(t)); for (org.hl7.fhir.dstu2.model.Reference t : src.getReceiver()) tgt.addReceiver(VersionConvertor_10_40.convertReference(t));
} }
if (src.hasNote()) if (src.hasNoteElement())
tgt.addNote().setText(src.getNote()); tgt.setNote(Collections.singletonList((org.hl7.fhir.r4.model.Annotation) VersionConvertor_10_40.convertType(src.getNoteElement())));
if (src.hasDosageInstruction()) { if (src.hasDosageInstruction()) {
for (org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseDosageInstructionComponent t : src.getDosageInstruction()) tgt.addDosageInstruction(convertMedicationDispenseDosageInstructionComponent(t)); for (org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseDosageInstructionComponent t : src.getDosageInstruction()) tgt.addDosageInstruction(convertMedicationDispenseDosageInstructionComponent(t));
} }
@ -88,12 +89,10 @@ public class MedicationDispense10_40 {
if (src.hasDaysSupply()) { if (src.hasDaysSupply()) {
tgt.setDaysSupply(VersionConvertor_10_40.convertSimpleQuantity(src.getDaysSupply())); tgt.setDaysSupply(VersionConvertor_10_40.convertSimpleQuantity(src.getDaysSupply()));
} }
if (src.hasWhenPrepared()) { if (src.hasWhenPreparedElement())
tgt.setWhenPrepared(src.getWhenPrepared()); tgt.setWhenPreparedElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getWhenPreparedElement()));
} if (src.hasWhenHandedOverElement())
if (src.hasWhenHandedOver()) { tgt.setWhenHandedOverElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getWhenHandedOverElement()));
tgt.setWhenHandedOver(src.getWhenHandedOver());
}
if (src.hasDestination()) { if (src.hasDestination()) {
tgt.setDestination(VersionConvertor_10_40.convertReference(src.getDestination())); tgt.setDestination(VersionConvertor_10_40.convertReference(src.getDestination()));
} }
@ -117,8 +116,8 @@ public class MedicationDispense10_40 {
return null; return null;
org.hl7.fhir.r4.model.Dosage tgt = new org.hl7.fhir.r4.model.Dosage(); org.hl7.fhir.r4.model.Dosage tgt = new org.hl7.fhir.r4.model.Dosage();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasText()) { if (src.hasTextElement()) {
tgt.setText(src.getText()); tgt.setTextElement((StringType) VersionConvertor_10_40.convertType(src.getTextElement()));
} }
if (src.hasTiming()) { if (src.hasTiming()) {
tgt.setTiming(VersionConvertor_10_40.convertTiming(src.getTiming())); tgt.setTiming(VersionConvertor_10_40.convertTiming(src.getTiming()));
@ -152,8 +151,8 @@ public class MedicationDispense10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseDosageInstructionComponent tgt = new org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseDosageInstructionComponent(); org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseDosageInstructionComponent tgt = new org.hl7.fhir.dstu2.model.MedicationDispense.MedicationDispenseDosageInstructionComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasText()) { if (src.hasTextElement()) {
tgt.setText(src.getText()); tgt.setTextElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getTextElement()));
} }
if (src.hasTiming()) { if (src.hasTiming()) {
tgt.setTiming(VersionConvertor_10_40.convertTiming(src.getTiming())); tgt.setTiming(VersionConvertor_10_40.convertTiming(src.getTiming()));

View File

@ -3,6 +3,7 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r4.model.Dosage.DosageDoseAndRateComponent; import org.hl7.fhir.r4.model.Dosage.DosageDoseAndRateComponent;
import java.util.Collections;
public class MedicationStatement10_40 { public class MedicationStatement10_40 {
@ -32,8 +33,8 @@ public class MedicationStatement10_40 {
if (src.hasDerivedFrom()) { if (src.hasDerivedFrom()) {
for (org.hl7.fhir.r4.model.Reference t : src.getDerivedFrom()) tgt.addSupportingInformation(VersionConvertor_10_40.convertReference(t)); for (org.hl7.fhir.r4.model.Reference t : src.getDerivedFrom()) tgt.addSupportingInformation(VersionConvertor_10_40.convertReference(t));
} }
if (src.hasDateAsserted()) if (src.hasDateAssertedElement())
tgt.setDateAsserted(src.getDateAsserted()); tgt.setDateAssertedElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateAssertedElement()));
if (src.hasNote()) { if (src.hasNote()) {
for (org.hl7.fhir.r4.model.Annotation t : src.getNote()) tgt.setNote(t.getText()); for (org.hl7.fhir.r4.model.Annotation t : src.getNote()) tgt.setNote(t.getText());
} }
@ -69,10 +70,10 @@ public class MedicationStatement10_40 {
if (src.hasSupportingInformation()) { if (src.hasSupportingInformation()) {
for (org.hl7.fhir.dstu2.model.Reference t : src.getSupportingInformation()) tgt.addDerivedFrom(VersionConvertor_10_40.convertReference(t)); for (org.hl7.fhir.dstu2.model.Reference t : src.getSupportingInformation()) tgt.addDerivedFrom(VersionConvertor_10_40.convertReference(t));
} }
if (src.hasDateAsserted()) if (src.hasDateAssertedElement())
tgt.setDateAsserted(src.getDateAsserted()); tgt.setDateAssertedElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateAssertedElement()));
if (src.hasNote()) if (src.hasNoteElement())
tgt.addNote().setText(src.getNote()); tgt.setNote(Collections.singletonList((org.hl7.fhir.r4.model.Annotation) VersionConvertor_10_40.convertType(src.getNoteElement())));
if (src.hasDosage()) { if (src.hasDosage()) {
for (org.hl7.fhir.dstu2.model.MedicationStatement.MedicationStatementDosageComponent t : src.getDosage()) tgt.addDosage(convertMedicationStatementDosageComponent(t)); for (org.hl7.fhir.dstu2.model.MedicationStatement.MedicationStatementDosageComponent t : src.getDosage()) tgt.addDosage(convertMedicationStatementDosageComponent(t));
} }

View File

@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import java.util.Collections;
public class MessageHeader10_40 { public class MessageHeader10_40 {
@ -10,15 +11,13 @@ public class MessageHeader10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.MessageHeader.MessageDestinationComponent tgt = new org.hl7.fhir.dstu2.model.MessageHeader.MessageDestinationComponent(); org.hl7.fhir.dstu2.model.MessageHeader.MessageDestinationComponent tgt = new org.hl7.fhir.dstu2.model.MessageHeader.MessageDestinationComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
}
if (src.hasTarget()) { if (src.hasTarget()) {
tgt.setTarget(VersionConvertor_10_40.convertReference(src.getTarget())); tgt.setTarget(VersionConvertor_10_40.convertReference(src.getTarget()));
} }
if (src.hasEndpoint()) { if (src.hasEndpointElement())
tgt.setEndpoint(src.getEndpoint()); tgt.setEndpointElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getEndpointElement()));
}
return tgt; return tgt;
} }
@ -27,15 +26,13 @@ public class MessageHeader10_40 {
return null; return null;
org.hl7.fhir.r4.model.MessageHeader.MessageDestinationComponent tgt = new org.hl7.fhir.r4.model.MessageHeader.MessageDestinationComponent(); org.hl7.fhir.r4.model.MessageHeader.MessageDestinationComponent tgt = new org.hl7.fhir.r4.model.MessageHeader.MessageDestinationComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
}
if (src.hasTarget()) { if (src.hasTarget()) {
tgt.setTarget(VersionConvertor_10_40.convertReference(src.getTarget())); tgt.setTarget(VersionConvertor_10_40.convertReference(src.getTarget()));
} }
if (src.hasEndpoint()) { if (src.hasEndpointElement())
tgt.setEndpoint(src.getEndpoint()); tgt.setEndpointElement((org.hl7.fhir.r4.model.UrlType) VersionConvertor_10_40.convertType(src.getEndpointElement()));
}
return tgt; return tgt;
} }
@ -113,9 +110,8 @@ public class MessageHeader10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.MessageHeader.MessageHeaderResponseComponent tgt = new org.hl7.fhir.dstu2.model.MessageHeader.MessageHeaderResponseComponent(); org.hl7.fhir.dstu2.model.MessageHeader.MessageHeaderResponseComponent tgt = new org.hl7.fhir.dstu2.model.MessageHeader.MessageHeaderResponseComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasIdentifier()) { if (src.hasIdentifierElement())
tgt.setIdentifier(src.getIdentifier()); tgt.setIdentifierElement((org.hl7.fhir.dstu2.model.IdType) VersionConvertor_10_40.convertType(src.getIdentifierElement()));
}
if (src.hasCode()) { if (src.hasCode()) {
tgt.setCode(convertResponseType(src.getCode())); tgt.setCode(convertResponseType(src.getCode()));
} }
@ -130,9 +126,8 @@ public class MessageHeader10_40 {
return null; return null;
org.hl7.fhir.r4.model.MessageHeader.MessageHeaderResponseComponent tgt = new org.hl7.fhir.r4.model.MessageHeader.MessageHeaderResponseComponent(); org.hl7.fhir.r4.model.MessageHeader.MessageHeaderResponseComponent tgt = new org.hl7.fhir.r4.model.MessageHeader.MessageHeaderResponseComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasIdentifier()) { if (src.hasIdentifierElement())
tgt.setIdentifier(src.getIdentifier()); tgt.setIdentifierElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_10_40.convertType(src.getIdentifierElement()));
}
if (src.hasCode()) { if (src.hasCode()) {
tgt.setCode(convertResponseType(src.getCode())); tgt.setCode(convertResponseType(src.getCode()));
} }
@ -147,21 +142,17 @@ public class MessageHeader10_40 {
return null; return null;
org.hl7.fhir.r4.model.MessageHeader.MessageSourceComponent tgt = new org.hl7.fhir.r4.model.MessageHeader.MessageSourceComponent(); org.hl7.fhir.r4.model.MessageHeader.MessageSourceComponent tgt = new org.hl7.fhir.r4.model.MessageHeader.MessageSourceComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
} if (src.hasSoftwareElement())
if (src.hasSoftware()) { tgt.setSoftwareElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getSoftwareElement()));
tgt.setSoftware(src.getSoftware()); if (src.hasVersionElement())
} tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement()));
if (src.hasVersion()) {
tgt.setVersion(src.getVersion());
}
if (src.hasContact()) { if (src.hasContact()) {
tgt.setContact(VersionConvertor_10_40.convertContactPoint(src.getContact())); tgt.setContact(VersionConvertor_10_40.convertContactPoint(src.getContact()));
} }
if (src.hasEndpoint()) { if (src.hasEndpointElement())
tgt.setEndpoint(src.getEndpoint()); tgt.setEndpointElement((org.hl7.fhir.r4.model.UrlType) VersionConvertor_10_40.convertType(src.getEndpointElement()));
}
return tgt; return tgt;
} }
@ -170,21 +161,17 @@ public class MessageHeader10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.MessageHeader.MessageSourceComponent tgt = new org.hl7.fhir.dstu2.model.MessageHeader.MessageSourceComponent(); org.hl7.fhir.dstu2.model.MessageHeader.MessageSourceComponent tgt = new org.hl7.fhir.dstu2.model.MessageHeader.MessageSourceComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
} if (src.hasSoftwareElement())
if (src.hasSoftware()) { tgt.setSoftwareElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getSoftwareElement()));
tgt.setSoftware(src.getSoftware()); if (src.hasVersionElement())
} tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement()));
if (src.hasVersion()) {
tgt.setVersion(src.getVersion());
}
if (src.hasContact()) { if (src.hasContact()) {
tgt.setContact(VersionConvertor_10_40.convertContactPoint(src.getContact())); tgt.setContact(VersionConvertor_10_40.convertContactPoint(src.getContact()));
} }
if (src.hasEndpoint()) { if (src.hasEndpointElement())
tgt.setEndpoint(src.getEndpoint()); tgt.setEndpointElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getEndpointElement()));
}
return tgt; return tgt;
} }

View File

@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import java.util.Collections;
public class NamingSystem10_40 { public class NamingSystem10_40 {
@ -10,39 +11,34 @@ public class NamingSystem10_40 {
return null; return null;
org.hl7.fhir.r4.model.NamingSystem tgt = new org.hl7.fhir.r4.model.NamingSystem(); org.hl7.fhir.r4.model.NamingSystem tgt = new org.hl7.fhir.r4.model.NamingSystem();
VersionConvertor_10_40.copyDomainResource(src, tgt); VersionConvertor_10_40.copyDomainResource(src, tgt);
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
}
if (src.hasStatus()) { if (src.hasStatus()) {
tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus())); tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus()));
} }
if (src.hasKind()) { if (src.hasKind()) {
tgt.setKind(convertNamingSystemType(src.getKind())); tgt.setKind(convertNamingSystemType(src.getKind()));
} }
if (src.hasDate()) if (src.hasDateElement())
tgt.setDate(src.getDate()); tgt.setDateElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement()));
if (src.hasPublisher()) { if (src.hasPublisherElement())
tgt.setPublisher(src.getPublisher()); tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getPublisherElement()));
}
if (src.hasContact()) { if (src.hasContact()) {
for (org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemContactComponent t : src.getContact()) tgt.addContact(convertNamingSystemContactComponent(t)); for (org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemContactComponent t : src.getContact()) tgt.addContact(convertNamingSystemContactComponent(t));
} }
if (src.hasResponsible()) { if (src.hasResponsibleElement())
tgt.setResponsible(src.getResponsible()); tgt.setResponsibleElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getResponsibleElement()));
}
if (src.hasType()) { if (src.hasType()) {
tgt.setType(VersionConvertor_10_40.convertCodeableConcept(src.getType())); tgt.setType(VersionConvertor_10_40.convertCodeableConcept(src.getType()));
} }
if (src.hasDescription()) { if (src.hasDescriptionElement())
tgt.setDescription(src.getDescription()); tgt.setDescriptionElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
}
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_40.isJurisdiction(t)) for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_40.isJurisdiction(t))
tgt.addJurisdiction(VersionConvertor_10_40.convertCodeableConcept(t)); tgt.addJurisdiction(VersionConvertor_10_40.convertCodeableConcept(t));
else else
tgt.addUseContext(VersionConvertor_10_40.convertCodeableConceptToUsageContext(t)); tgt.addUseContext(VersionConvertor_10_40.convertCodeableConceptToUsageContext(t));
if (src.hasUsage()) { if (src.hasUsageElement())
tgt.setUsage(src.getUsage()); tgt.setUsageElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getUsageElement()));
}
if (src.hasUniqueId()) { if (src.hasUniqueId()) {
for (org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemUniqueIdComponent t : src.getUniqueId()) tgt.addUniqueId(convertNamingSystemUniqueIdComponent(t)); for (org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemUniqueIdComponent t : src.getUniqueId()) tgt.addUniqueId(convertNamingSystemUniqueIdComponent(t));
} }
@ -54,40 +50,35 @@ public class NamingSystem10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.NamingSystem tgt = new org.hl7.fhir.dstu2.model.NamingSystem(); org.hl7.fhir.dstu2.model.NamingSystem tgt = new org.hl7.fhir.dstu2.model.NamingSystem();
VersionConvertor_10_40.copyDomainResource(src, tgt); VersionConvertor_10_40.copyDomainResource(src, tgt);
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
}
if (src.hasStatus()) { if (src.hasStatus()) {
tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus())); tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus()));
} }
if (src.hasKind()) { if (src.hasKind()) {
tgt.setKind(convertNamingSystemType(src.getKind())); tgt.setKind(convertNamingSystemType(src.getKind()));
} }
if (src.hasDate()) if (src.hasDateElement())
tgt.setDate(src.getDate()); tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement()));
if (src.hasPublisher()) { if (src.hasPublisherElement())
tgt.setPublisher(src.getPublisher()); tgt.setPublisherElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getPublisherElement()));
}
if (src.hasContact()) { if (src.hasContact()) {
for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(convertNamingSystemContactComponent(t)); for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(convertNamingSystemContactComponent(t));
} }
if (src.hasResponsible()) { if (src.hasResponsibleElement())
tgt.setResponsible(src.getResponsible()); tgt.setResponsibleElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getResponsibleElement()));
}
if (src.hasType()) { if (src.hasType()) {
tgt.setType(VersionConvertor_10_40.convertCodeableConcept(src.getType())); tgt.setType(VersionConvertor_10_40.convertCodeableConcept(src.getType()));
} }
if (src.hasDescription()) { if (src.hasDescriptionElement())
tgt.setDescription(src.getDescription()); tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
}
for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept())
tgt.addUseContext(VersionConvertor_10_40.convertCodeableConcept(t.getValueCodeableConcept())); tgt.addUseContext(VersionConvertor_10_40.convertCodeableConcept(t.getValueCodeableConcept()));
if (src.hasJurisdiction()) { if (src.hasJurisdiction()) {
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_10_40.convertCodeableConcept(t)); for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_10_40.convertCodeableConcept(t));
} }
if (src.hasUsage()) { if (src.hasUsageElement())
tgt.setUsage(src.getUsage()); tgt.setUsageElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getUsageElement()));
}
if (src.hasUniqueId()) { if (src.hasUniqueId()) {
for (org.hl7.fhir.r4.model.NamingSystem.NamingSystemUniqueIdComponent t : src.getUniqueId()) tgt.addUniqueId(convertNamingSystemUniqueIdComponent(t)); for (org.hl7.fhir.r4.model.NamingSystem.NamingSystemUniqueIdComponent t : src.getUniqueId()) tgt.addUniqueId(convertNamingSystemUniqueIdComponent(t));
} }
@ -99,9 +90,8 @@ public class NamingSystem10_40 {
return null; return null;
org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
}
if (src.hasTelecom()) { if (src.hasTelecom()) {
for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t));
} }
@ -113,9 +103,8 @@ public class NamingSystem10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemContactComponent tgt = new org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemContactComponent(); org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemContactComponent tgt = new org.hl7.fhir.dstu2.model.NamingSystem.NamingSystemContactComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
}
if (src.hasTelecom()) { if (src.hasTelecom()) {
for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t));
} }
@ -194,12 +183,10 @@ public class NamingSystem10_40 {
if (src.hasType()) { if (src.hasType()) {
tgt.setType(convertNamingSystemIdentifierType(src.getType())); tgt.setType(convertNamingSystemIdentifierType(src.getType()));
} }
if (src.hasValue()) { if (src.hasValueElement())
tgt.setValue(src.getValue()); tgt.setValueElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getValueElement()));
} if (src.hasPreferredElement())
if (src.hasPreferred()) { tgt.setPreferredElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getPreferredElement()));
tgt.setPreferred(src.getPreferred());
}
if (src.hasPeriod()) { if (src.hasPeriod()) {
tgt.setPeriod(VersionConvertor_10_40.convertPeriod(src.getPeriod())); tgt.setPeriod(VersionConvertor_10_40.convertPeriod(src.getPeriod()));
} }
@ -214,12 +201,10 @@ public class NamingSystem10_40 {
if (src.hasType()) { if (src.hasType()) {
tgt.setType(convertNamingSystemIdentifierType(src.getType())); tgt.setType(convertNamingSystemIdentifierType(src.getType()));
} }
if (src.hasValue()) { if (src.hasValueElement())
tgt.setValue(src.getValue()); tgt.setValueElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getValueElement()));
} if (src.hasPreferredElement())
if (src.hasPreferred()) { tgt.setPreferredElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getPreferredElement()));
tgt.setPreferred(src.getPreferred());
}
if (src.hasPeriod()) { if (src.hasPeriod()) {
tgt.setPeriod(VersionConvertor_10_40.convertPeriod(src.getPeriod())); tgt.setPeriod(VersionConvertor_10_40.convertPeriod(src.getPeriod()));
} }

View File

@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import java.util.Collections;
public class Observation10_40 { public class Observation10_40 {
@ -31,9 +32,8 @@ public class Observation10_40 {
if (src.hasEffective()) { if (src.hasEffective()) {
tgt.setEffective(VersionConvertor_10_40.convertType(src.getEffective())); tgt.setEffective(VersionConvertor_10_40.convertType(src.getEffective()));
} }
if (src.hasIssued()) { if (src.hasIssuedElement())
tgt.setIssued(src.getIssued()); tgt.setIssuedElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_40.convertType(src.getIssuedElement()));
}
if (src.hasPerformer()) { if (src.hasPerformer()) {
for (org.hl7.fhir.r4.model.Reference t : src.getPerformer()) tgt.addPerformer(VersionConvertor_10_40.convertReference(t)); for (org.hl7.fhir.r4.model.Reference t : src.getPerformer()) tgt.addPerformer(VersionConvertor_10_40.convertReference(t));
} }
@ -101,9 +101,8 @@ public class Observation10_40 {
if (src.hasEffective()) { if (src.hasEffective()) {
tgt.setEffective(VersionConvertor_10_40.convertType(src.getEffective())); tgt.setEffective(VersionConvertor_10_40.convertType(src.getEffective()));
} }
if (src.hasIssued()) { if (src.hasIssuedElement())
tgt.setIssued(src.getIssued()); tgt.setIssuedElement((org.hl7.fhir.r4.model.InstantType) VersionConvertor_10_40.convertType(src.getIssuedElement()));
}
if (src.hasPerformer()) { if (src.hasPerformer()) {
for (org.hl7.fhir.dstu2.model.Reference t : src.getPerformer()) tgt.addPerformer(VersionConvertor_10_40.convertReference(t)); for (org.hl7.fhir.dstu2.model.Reference t : src.getPerformer()) tgt.addPerformer(VersionConvertor_10_40.convertReference(t));
} }
@ -201,9 +200,8 @@ public class Observation10_40 {
if (src.hasAge()) { if (src.hasAge()) {
tgt.setAge(VersionConvertor_10_40.convertRange(src.getAge())); tgt.setAge(VersionConvertor_10_40.convertRange(src.getAge()));
} }
if (src.hasText()) { if (src.hasTextElement())
tgt.setText(src.getText()); tgt.setTextElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getTextElement()));
}
return tgt; return tgt;
} }
@ -224,9 +222,8 @@ public class Observation10_40 {
if (src.hasAge()) { if (src.hasAge()) {
tgt.setAge(VersionConvertor_10_40.convertRange(src.getAge())); tgt.setAge(VersionConvertor_10_40.convertRange(src.getAge()));
} }
if (src.hasText()) { if (src.hasTextElement())
tgt.setText(src.getText()); tgt.setTextElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getTextElement()));
}
return tgt; return tgt;
} }

View File

@ -7,6 +7,7 @@ import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r4.model.Enumerations.SearchParamType; import org.hl7.fhir.r4.model.Enumerations.SearchParamType;
import org.hl7.fhir.r4.model.Type; import org.hl7.fhir.r4.model.Type;
import org.hl7.fhir.utilities.Utilities; import org.hl7.fhir.utilities.Utilities;
import java.util.Collections;
public class OperationDefinition10_40 { public class OperationDefinition10_40 {
@ -15,58 +16,50 @@ public class OperationDefinition10_40 {
return null; return null;
org.hl7.fhir.r4.model.OperationDefinition tgt = new org.hl7.fhir.r4.model.OperationDefinition(); org.hl7.fhir.r4.model.OperationDefinition tgt = new org.hl7.fhir.r4.model.OperationDefinition();
VersionConvertor_10_40.copyDomainResource(src, tgt); VersionConvertor_10_40.copyDomainResource(src, tgt);
if (src.hasUrl()) { if (src.hasUrlElement())
tgt.setUrl(src.getUrl()); tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement()));
} if (src.hasVersionElement())
if (src.hasVersion()) { tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement()));
tgt.setVersion(src.getVersion()); if (src.hasNameElement())
} tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
if (src.hasName()) {
tgt.setName(src.getName());
}
if (src.hasStatus()) { if (src.hasStatus()) {
tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus())); tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus()));
} }
if (src.hasKind()) { if (src.hasKind()) {
tgt.setKind(convertOperationKind(src.getKind())); tgt.setKind(convertOperationKind(src.getKind()));
} }
if (src.hasExperimental()) if (src.hasExperimentalElement())
tgt.setExperimental(src.getExperimental()); tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getExperimentalElement()));
if (src.hasDate()) if (src.hasDateElement())
tgt.setDate(src.getDate()); tgt.setDateElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement()));
if (src.hasPublisher()) { if (src.hasPublisherElement())
tgt.setPublisher(src.getPublisher()); tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getPublisherElement()));
}
if (src.hasContact()) { if (src.hasContact()) {
for (org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionContactComponent t : src.getContact()) tgt.addContact(convertOperationDefinitionContactComponent(t)); for (org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionContactComponent t : src.getContact()) tgt.addContact(convertOperationDefinitionContactComponent(t));
} }
if (src.hasDescription()) { if (src.hasDescriptionElement())
tgt.setDescription(src.getDescription()); tgt.setDescriptionElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
}
if (src.hasRequirements()) { if (src.hasRequirements()) {
tgt.setPurpose(src.getRequirements()); tgt.setPurpose(src.getRequirements());
} }
if (src.hasIdempotent()) if (src.hasIdempotent())
tgt.setAffectsState(!src.getIdempotent()); tgt.setAffectsState(!src.getIdempotent());
if (src.hasCode()) { if (src.hasCodeElement())
tgt.setCode(src.getCode()); tgt.setCodeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_10_40.convertType(src.getCodeElement()));
}
if (src.hasNotes()) { if (src.hasNotes()) {
tgt.setComment(src.getNotes()); tgt.setComment(src.getNotes());
} }
if (src.hasBase()) { if (src.hasBase()) {
tgt.setBaseElement(VersionConvertor_10_40.convertReferenceToCanonical(src.getBase())); tgt.setBaseElement(VersionConvertor_10_40.convertReferenceToCanonical(src.getBase()));
} }
if (src.hasSystem()) { if (src.hasSystemElement())
tgt.setSystem(src.getSystem()); tgt.setSystemElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getSystemElement()));
}
if (src.hasType()) { if (src.hasType()) {
for (org.hl7.fhir.dstu2.model.CodeType t : src.getType()) tgt.addResource(t.getValue()); for (org.hl7.fhir.dstu2.model.CodeType t : src.getType()) tgt.addResource(t.getValue());
} }
tgt.setType(tgt.hasResource()); tgt.setType(tgt.hasResource());
if (src.hasInstance()) { if (src.hasInstanceElement())
tgt.setInstance(src.getInstance()); tgt.setInstanceElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getInstanceElement()));
}
if (src.hasParameter()) { if (src.hasParameter()) {
for (org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getParameter()) tgt.addParameter(convertOperationDefinitionParameterComponent(t)); for (org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getParameter()) tgt.addParameter(convertOperationDefinitionParameterComponent(t));
} }
@ -78,58 +71,50 @@ public class OperationDefinition10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.OperationDefinition tgt = new org.hl7.fhir.dstu2.model.OperationDefinition(); org.hl7.fhir.dstu2.model.OperationDefinition tgt = new org.hl7.fhir.dstu2.model.OperationDefinition();
VersionConvertor_10_40.copyDomainResource(src, tgt); VersionConvertor_10_40.copyDomainResource(src, tgt);
if (src.hasUrl()) { if (src.hasUrlElement())
tgt.setUrl(src.getUrl()); tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement()));
} if (src.hasVersionElement())
if (src.hasVersion()) { tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement()));
tgt.setVersion(src.getVersion()); if (src.hasNameElement())
} tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
if (src.hasName()) {
tgt.setName(src.getName());
}
if (src.hasStatus()) { if (src.hasStatus()) {
tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus())); tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus()));
} }
if (src.hasKind()) { if (src.hasKind()) {
tgt.setKind(convertOperationKind(src.getKind())); tgt.setKind(convertOperationKind(src.getKind()));
} }
if (src.hasExperimental()) if (src.hasExperimentalElement())
tgt.setExperimental(src.getExperimental()); tgt.setExperimentalElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getExperimentalElement()));
if (src.hasDate()) if (src.hasDateElement())
tgt.setDate(src.getDate()); tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement()));
if (src.hasPublisher()) { if (src.hasPublisherElement())
tgt.setPublisher(src.getPublisher()); tgt.setPublisherElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getPublisherElement()));
}
if (src.hasContact()) { if (src.hasContact()) {
for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(convertOperationDefinitionContactComponent(t)); for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(convertOperationDefinitionContactComponent(t));
} }
if (src.hasDescription()) { if (src.hasDescriptionElement())
tgt.setDescription(src.getDescription()); tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
}
if (src.hasPurpose()) { if (src.hasPurpose()) {
tgt.setRequirements(src.getPurpose()); tgt.setRequirements(src.getPurpose());
} }
if (src.hasAffectsState()) { if (src.hasAffectsState()) {
tgt.setIdempotent(!src.getAffectsState()); tgt.setIdempotent(!src.getAffectsState());
} }
if (src.hasCode()) { if (src.hasCodeElement())
tgt.setCode(src.getCode()); tgt.setCodeElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_40.convertType(src.getCodeElement()));
}
if (src.hasComment()) { if (src.hasComment()) {
tgt.setNotes(src.getComment()); tgt.setNotes(src.getComment());
} }
if (src.hasBase()) if (src.hasBase())
tgt.setBase(VersionConvertor_10_40.convertCanonicalToReference(src.getBaseElement())); tgt.setBase(VersionConvertor_10_40.convertCanonicalToReference(src.getBaseElement()));
if (src.hasSystem()) { if (src.hasSystemElement())
tgt.setSystem(src.getSystem()); tgt.setSystemElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getSystemElement()));
}
if (src.getType()) if (src.getType())
if (src.hasResource()) { if (src.hasResource()) {
for (org.hl7.fhir.r4.model.CodeType t : src.getResource()) tgt.addType(t.getValue()); for (org.hl7.fhir.r4.model.CodeType t : src.getResource()) tgt.addType(t.getValue());
} }
if (src.hasInstance()) { if (src.hasInstanceElement())
tgt.setInstance(src.getInstance()); tgt.setInstanceElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getInstanceElement()));
}
if (src.hasParameter()) { if (src.hasParameter()) {
for (org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getParameter()) tgt.addParameter(convertOperationDefinitionParameterComponent(t)); for (org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getParameter()) tgt.addParameter(convertOperationDefinitionParameterComponent(t));
} }
@ -141,9 +126,8 @@ public class OperationDefinition10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionContactComponent tgt = new org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionContactComponent(); org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionContactComponent tgt = new org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionContactComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
}
if (src.hasTelecom()) { if (src.hasTelecom()) {
for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t));
} }
@ -155,9 +139,8 @@ public class OperationDefinition10_40 {
return null; return null;
org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
}
if (src.hasTelecom()) { if (src.hasTelecom()) {
for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t));
} }
@ -202,27 +185,19 @@ public class OperationDefinition10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionParameterComponent tgt = new org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionParameterComponent(); org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionParameterComponent tgt = new org.hl7.fhir.dstu2.model.OperationDefinition.OperationDefinitionParameterComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_40.convertType(src.getNameElement()));
}
if (src.hasUse()) { if (src.hasUse()) {
tgt.setUse(convertOperationParameterUse(src.getUse())); tgt.setUse(convertOperationParameterUse(src.getUse()));
} }
if (src.hasMin()) { if (src.hasMinElement())
tgt.setMin(src.getMin()); tgt.setMinElement((org.hl7.fhir.dstu2.model.IntegerType) VersionConvertor_10_40.convertType(src.getMinElement()));
} if (src.hasMaxElement())
if (src.hasMax()) { tgt.setMaxElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getMaxElement()));
tgt.setMax(src.getMax()); if (src.hasDocumentationElement())
} tgt.setDocumentationElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDocumentationElement()));
if (src.hasDocumentation()) { if (src.hasTypeElement())
tgt.setDocumentation(src.getDocumentation()); tgt.setTypeElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_40.convertType(src.getTypeElement()));
}
if (src.hasSearchType()) {
if (src.hasSearchType()) {
tgt.setType(src.getSearchType().toCode());
}
} else
tgt.setType(src.getType());
if (src.hasTargetProfile()) { if (src.hasTargetProfile()) {
for (org.hl7.fhir.r4.model.UriType t : src.getTargetProfile()) tgt.setProfile(new Reference(t.getValue())); for (org.hl7.fhir.r4.model.UriType t : src.getTargetProfile()) tgt.setProfile(new Reference(t.getValue()));
} }
@ -239,31 +214,19 @@ public class OperationDefinition10_40 {
return null; return null;
org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterComponent tgt = new org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterComponent(); org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterComponent tgt = new org.hl7.fhir.r4.model.OperationDefinition.OperationDefinitionParameterComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_10_40.convertType(src.getNameElement()));
}
if (src.hasUse()) { if (src.hasUse()) {
tgt.setUse(convertOperationParameterUse(src.getUse())); tgt.setUse(convertOperationParameterUse(src.getUse()));
} }
if (src.hasMin()) { if (src.hasMinElement())
tgt.setMin(src.getMin()); tgt.setMinElement((org.hl7.fhir.r4.model.IntegerType) VersionConvertor_10_40.convertType(src.getMinElement()));
} if (src.hasMaxElement())
if (src.hasMax()) { tgt.setMaxElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getMaxElement()));
tgt.setMax(src.getMax()); if (src.hasDocumentationElement())
} tgt.setDocumentationElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDocumentationElement()));
if (src.hasDocumentation()) { if (Utilities.existsInList(src.getType(), "token", "reference", "composite", "number", "date", "quantity", "uri"))
tgt.setDocumentation(src.getDocumentation()); tgt.setTypeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_10_40.convertType(src.getTypeElement()));
}
if (Utilities.existsInList(src.getType(), "token", "reference", "composite", "number", "date", "quantity", "uri")) {
tgt.setType("string");
if (src.hasType()) {
tgt.setSearchType(SearchParamType.fromCode(src.getType()));
}
} else {
if (src.hasType()) {
tgt.setType(src.getType());
}
}
if (src.hasProfile()) { if (src.hasProfile()) {
tgt.addTargetProfile(src.getProfile().getReference()); tgt.addTargetProfile(src.getProfile().getReference());
} }

View File

@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import java.util.Collections;
public class OperationOutcome10_40 { public class OperationOutcome10_40 {
@ -209,9 +210,8 @@ public class OperationOutcome10_40 {
if (src.hasDetails()) { if (src.hasDetails()) {
tgt.setDetails(VersionConvertor_10_40.convertCodeableConcept(src.getDetails())); tgt.setDetails(VersionConvertor_10_40.convertCodeableConcept(src.getDetails()));
} }
if (src.hasDiagnostics()) { if (src.hasDiagnosticsElement())
tgt.setDiagnostics(src.getDiagnostics()); tgt.setDiagnosticsElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDiagnosticsElement()));
}
if (src.hasLocation()) { if (src.hasLocation()) {
for (org.hl7.fhir.dstu2.model.StringType t : src.getLocation()) tgt.addLocation(t.getValue()); for (org.hl7.fhir.dstu2.model.StringType t : src.getLocation()) tgt.addLocation(t.getValue());
} }
@ -232,9 +232,8 @@ public class OperationOutcome10_40 {
if (src.hasDetails()) { if (src.hasDetails()) {
tgt.setDetails(VersionConvertor_10_40.convertCodeableConcept(src.getDetails())); tgt.setDetails(VersionConvertor_10_40.convertCodeableConcept(src.getDetails()));
} }
if (src.hasDiagnostics()) { if (src.hasDiagnosticsElement())
tgt.setDiagnostics(src.getDiagnostics()); tgt.setDiagnosticsElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDiagnosticsElement()));
}
if (src.hasLocation()) { if (src.hasLocation()) {
for (org.hl7.fhir.r4.model.StringType t : src.getLocation()) tgt.addLocation(t.getValue()); for (org.hl7.fhir.r4.model.StringType t : src.getLocation()) tgt.addLocation(t.getValue());
} }

View File

@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import java.util.Collections;
public class Organization10_40 { public class Organization10_40 {
@ -13,15 +14,13 @@ public class Organization10_40 {
if (src.hasIdentifier()) { if (src.hasIdentifier()) {
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t)); for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t));
} }
if (src.hasActive()) { if (src.hasActiveElement())
tgt.setActive(src.getActive()); tgt.setActiveElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getActiveElement()));
}
if (src.hasType()) { if (src.hasType()) {
tgt.addType(VersionConvertor_10_40.convertCodeableConcept(src.getType())); tgt.addType(VersionConvertor_10_40.convertCodeableConcept(src.getType()));
} }
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
}
if (src.hasTelecom()) { if (src.hasTelecom()) {
for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t));
} }
@ -45,15 +44,13 @@ public class Organization10_40 {
if (src.hasIdentifier()) { if (src.hasIdentifier()) {
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t)); for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t));
} }
if (src.hasActive()) { if (src.hasActiveElement())
tgt.setActive(src.getActive()); tgt.setActiveElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getActiveElement()));
}
if (src.hasType()) { if (src.hasType()) {
tgt.setType(VersionConvertor_10_40.convertCodeableConcept(src.getTypeFirstRep())); tgt.setType(VersionConvertor_10_40.convertCodeableConcept(src.getTypeFirstRep()));
} }
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
}
if (src.hasTelecom()) { if (src.hasTelecom()) {
for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t));
} }

View File

@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import java.util.Collections;
public class Parameters10_40 { public class Parameters10_40 {
@ -32,9 +33,8 @@ public class Parameters10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.Parameters.ParametersParameterComponent tgt = new org.hl7.fhir.dstu2.model.Parameters.ParametersParameterComponent(); org.hl7.fhir.dstu2.model.Parameters.ParametersParameterComponent tgt = new org.hl7.fhir.dstu2.model.Parameters.ParametersParameterComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
}
if (src.hasValue()) { if (src.hasValue()) {
tgt.setValue(VersionConvertor_10_40.convertType(src.getValue())); tgt.setValue(VersionConvertor_10_40.convertType(src.getValue()));
} }
@ -52,9 +52,8 @@ public class Parameters10_40 {
return null; return null;
org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent tgt = new org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent(); org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent tgt = new org.hl7.fhir.r4.model.Parameters.ParametersParameterComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
}
if (src.hasValue()) { if (src.hasValue()) {
tgt.setValue(VersionConvertor_10_40.convertType(src.getValue())); tgt.setValue(VersionConvertor_10_40.convertType(src.getValue()));
} }

View File

@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import java.util.Collections;
public class Patient10_40 { public class Patient10_40 {
@ -132,9 +133,8 @@ public class Patient10_40 {
if (src.hasIdentifier()) { if (src.hasIdentifier()) {
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t)); for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t));
} }
if (src.hasActive()) { if (src.hasActiveElement())
tgt.setActive(src.getActive()); tgt.setActiveElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getActiveElement()));
}
if (src.hasName()) { if (src.hasName()) {
for (org.hl7.fhir.dstu2.model.HumanName t : src.getName()) tgt.addName(VersionConvertor_10_40.convertHumanName(t)); for (org.hl7.fhir.dstu2.model.HumanName t : src.getName()) tgt.addName(VersionConvertor_10_40.convertHumanName(t));
} }
@ -144,9 +144,8 @@ public class Patient10_40 {
if (src.hasGender()) { if (src.hasGender()) {
tgt.setGender(VersionConvertor_10_40.convertAdministrativeGender(src.getGender())); tgt.setGender(VersionConvertor_10_40.convertAdministrativeGender(src.getGender()));
} }
if (src.hasBirthDate()) { if (src.hasBirthDateElement())
tgt.setBirthDate(src.getBirthDate()); tgt.setBirthDateElement((org.hl7.fhir.r4.model.DateType) VersionConvertor_10_40.convertType(src.getBirthDateElement()));
}
if (src.hasDeceased()) { if (src.hasDeceased()) {
tgt.setDeceased(VersionConvertor_10_40.convertType(src.getDeceased())); tgt.setDeceased(VersionConvertor_10_40.convertType(src.getDeceased()));
} }
@ -190,9 +189,8 @@ public class Patient10_40 {
if (src.hasIdentifier()) { if (src.hasIdentifier()) {
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t)); for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t));
} }
if (src.hasActive()) { if (src.hasActiveElement())
tgt.setActive(src.getActive()); tgt.setActiveElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getActiveElement()));
}
if (src.hasName()) { if (src.hasName()) {
for (org.hl7.fhir.r4.model.HumanName t : src.getName()) tgt.addName(VersionConvertor_10_40.convertHumanName(t)); for (org.hl7.fhir.r4.model.HumanName t : src.getName()) tgt.addName(VersionConvertor_10_40.convertHumanName(t));
} }
@ -202,9 +200,8 @@ public class Patient10_40 {
if (src.hasGender()) { if (src.hasGender()) {
tgt.setGender(VersionConvertor_10_40.convertAdministrativeGender(src.getGender())); tgt.setGender(VersionConvertor_10_40.convertAdministrativeGender(src.getGender()));
} }
if (src.hasBirthDate()) { if (src.hasBirthDateElement())
tgt.setBirthDate(src.getBirthDate()); tgt.setBirthDateElement((org.hl7.fhir.dstu2.model.DateType) VersionConvertor_10_40.convertType(src.getBirthDateElement()));
}
if (src.hasDeceased()) { if (src.hasDeceased()) {
tgt.setDeceased(VersionConvertor_10_40.convertType(src.getDeceased())); tgt.setDeceased(VersionConvertor_10_40.convertType(src.getDeceased()));
} }
@ -248,9 +245,8 @@ public class Patient10_40 {
if (src.hasLanguage()) { if (src.hasLanguage()) {
tgt.setLanguage(VersionConvertor_10_40.convertCodeableConcept(src.getLanguage())); tgt.setLanguage(VersionConvertor_10_40.convertCodeableConcept(src.getLanguage()));
} }
if (src.hasPreferred()) { if (src.hasPreferredElement())
tgt.setPreferred(src.getPreferred()); tgt.setPreferredElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getPreferredElement()));
}
return tgt; return tgt;
} }
@ -262,9 +258,8 @@ public class Patient10_40 {
if (src.hasLanguage()) { if (src.hasLanguage()) {
tgt.setLanguage(VersionConvertor_10_40.convertCodeableConcept(src.getLanguage())); tgt.setLanguage(VersionConvertor_10_40.convertCodeableConcept(src.getLanguage()));
} }
if (src.hasPreferred()) { if (src.hasPreferredElement())
tgt.setPreferred(src.getPreferred()); tgt.setPreferredElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getPreferredElement()));
}
return tgt; return tgt;
} }

View File

@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import java.util.Collections;
public class Person10_40 { public class Person10_40 {
@ -56,9 +57,8 @@ public class Person10_40 {
if (src.hasGender()) { if (src.hasGender()) {
tgt.setGender(VersionConvertor_10_40.convertAdministrativeGender(src.getGender())); tgt.setGender(VersionConvertor_10_40.convertAdministrativeGender(src.getGender()));
} }
if (src.hasBirthDate()) { if (src.hasBirthDateElement())
tgt.setBirthDate(src.getBirthDate()); tgt.setBirthDateElement((org.hl7.fhir.r4.model.DateType) VersionConvertor_10_40.convertType(src.getBirthDateElement()));
}
if (src.hasAddress()) { if (src.hasAddress()) {
for (org.hl7.fhir.dstu2.model.Address t : src.getAddress()) tgt.addAddress(VersionConvertor_10_40.convertAddress(t)); for (org.hl7.fhir.dstu2.model.Address t : src.getAddress()) tgt.addAddress(VersionConvertor_10_40.convertAddress(t));
} }
@ -68,9 +68,8 @@ public class Person10_40 {
if (src.hasManagingOrganization()) { if (src.hasManagingOrganization()) {
tgt.setManagingOrganization(VersionConvertor_10_40.convertReference(src.getManagingOrganization())); tgt.setManagingOrganization(VersionConvertor_10_40.convertReference(src.getManagingOrganization()));
} }
if (src.hasActive()) { if (src.hasActiveElement())
tgt.setActive(src.getActive()); tgt.setActiveElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getActiveElement()));
}
if (src.hasLink()) { if (src.hasLink()) {
for (org.hl7.fhir.dstu2.model.Person.PersonLinkComponent t : src.getLink()) tgt.addLink(convertPersonLinkComponent(t)); for (org.hl7.fhir.dstu2.model.Person.PersonLinkComponent t : src.getLink()) tgt.addLink(convertPersonLinkComponent(t));
} }
@ -94,9 +93,8 @@ public class Person10_40 {
if (src.hasGender()) { if (src.hasGender()) {
tgt.setGender(VersionConvertor_10_40.convertAdministrativeGender(src.getGender())); tgt.setGender(VersionConvertor_10_40.convertAdministrativeGender(src.getGender()));
} }
if (src.hasBirthDate()) { if (src.hasBirthDateElement())
tgt.setBirthDate(src.getBirthDate()); tgt.setBirthDateElement((org.hl7.fhir.dstu2.model.DateType) VersionConvertor_10_40.convertType(src.getBirthDateElement()));
}
if (src.hasAddress()) { if (src.hasAddress()) {
for (org.hl7.fhir.r4.model.Address t : src.getAddress()) tgt.addAddress(VersionConvertor_10_40.convertAddress(t)); for (org.hl7.fhir.r4.model.Address t : src.getAddress()) tgt.addAddress(VersionConvertor_10_40.convertAddress(t));
} }
@ -106,9 +104,8 @@ public class Person10_40 {
if (src.hasManagingOrganization()) { if (src.hasManagingOrganization()) {
tgt.setManagingOrganization(VersionConvertor_10_40.convertReference(src.getManagingOrganization())); tgt.setManagingOrganization(VersionConvertor_10_40.convertReference(src.getManagingOrganization()));
} }
if (src.hasActive()) { if (src.hasActiveElement())
tgt.setActive(src.getActive()); tgt.setActiveElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getActiveElement()));
}
if (src.hasLink()) { if (src.hasLink()) {
for (org.hl7.fhir.r4.model.Person.PersonLinkComponent t : src.getLink()) tgt.addLink(convertPersonLinkComponent(t)); for (org.hl7.fhir.r4.model.Person.PersonLinkComponent t : src.getLink()) tgt.addLink(convertPersonLinkComponent(t));
} }

View File

@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import java.util.Collections;
public class Practitioner10_40 { public class Practitioner10_40 {
@ -13,9 +14,8 @@ public class Practitioner10_40 {
if (src.hasIdentifier()) { if (src.hasIdentifier()) {
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t)); for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t));
} }
if (src.hasActive()) { if (src.hasActiveElement())
tgt.setActive(src.getActive()); tgt.setActiveElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getActiveElement()));
}
if (src.hasName()) { if (src.hasName()) {
for (org.hl7.fhir.r4.model.HumanName t : src.getName()) tgt.setName(VersionConvertor_10_40.convertHumanName(t)); for (org.hl7.fhir.r4.model.HumanName t : src.getName()) tgt.setName(VersionConvertor_10_40.convertHumanName(t));
} }
@ -28,9 +28,8 @@ public class Practitioner10_40 {
if (src.hasGender()) { if (src.hasGender()) {
tgt.setGender(VersionConvertor_10_40.convertAdministrativeGender(src.getGender())); tgt.setGender(VersionConvertor_10_40.convertAdministrativeGender(src.getGender()));
} }
if (src.hasBirthDate()) { if (src.hasBirthDateElement())
tgt.setBirthDate(src.getBirthDate()); tgt.setBirthDateElement((org.hl7.fhir.dstu2.model.DateType) VersionConvertor_10_40.convertType(src.getBirthDateElement()));
}
if (src.hasPhoto()) { if (src.hasPhoto()) {
for (org.hl7.fhir.r4.model.Attachment t : src.getPhoto()) tgt.addPhoto(VersionConvertor_10_40.convertAttachment(t)); for (org.hl7.fhir.r4.model.Attachment t : src.getPhoto()) tgt.addPhoto(VersionConvertor_10_40.convertAttachment(t));
} }
@ -51,9 +50,8 @@ public class Practitioner10_40 {
if (src.hasIdentifier()) { if (src.hasIdentifier()) {
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t)); for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t));
} }
if (src.hasActive()) { if (src.hasActiveElement())
tgt.setActive(src.getActive()); tgt.setActiveElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getActiveElement()));
}
if (src.hasName()) if (src.hasName())
tgt.addName(VersionConvertor_10_40.convertHumanName(src.getName())); tgt.addName(VersionConvertor_10_40.convertHumanName(src.getName()));
if (src.hasTelecom()) { if (src.hasTelecom()) {
@ -65,9 +63,8 @@ public class Practitioner10_40 {
if (src.hasGender()) { if (src.hasGender()) {
tgt.setGender(VersionConvertor_10_40.convertAdministrativeGender(src.getGender())); tgt.setGender(VersionConvertor_10_40.convertAdministrativeGender(src.getGender()));
} }
if (src.hasBirthDate()) { if (src.hasBirthDateElement())
tgt.setBirthDate(src.getBirthDate()); tgt.setBirthDateElement((org.hl7.fhir.r4.model.DateType) VersionConvertor_10_40.convertType(src.getBirthDateElement()));
}
if (src.hasPhoto()) { if (src.hasPhoto()) {
for (org.hl7.fhir.dstu2.model.Attachment t : src.getPhoto()) tgt.addPhoto(VersionConvertor_10_40.convertAttachment(t)); for (org.hl7.fhir.dstu2.model.Attachment t : src.getPhoto()) tgt.addPhoto(VersionConvertor_10_40.convertAttachment(t));
} }

View File

@ -4,6 +4,7 @@ import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r4.model.ContactDetail; import org.hl7.fhir.r4.model.ContactDetail;
import org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemAnswerOptionComponent; import org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemAnswerOptionComponent;
import java.util.Collections;
public class Questionnaire10_40 { public class Questionnaire10_40 {
@ -15,17 +16,15 @@ public class Questionnaire10_40 {
if (src.hasIdentifier()) { if (src.hasIdentifier()) {
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t)); for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t));
} }
if (src.hasVersion()) { if (src.hasVersionElement())
tgt.setVersion(src.getVersion()); tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement()));
}
if (src.hasStatus()) { if (src.hasStatus()) {
tgt.setStatus(convertQuestionnaireStatus(src.getStatus())); tgt.setStatus(convertQuestionnaireStatus(src.getStatus()));
} }
if (src.hasDate()) if (src.hasDateElement())
tgt.setDate(src.getDate()); tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement()));
if (src.hasPublisher()) { if (src.hasPublisherElement())
tgt.setPublisher(src.getPublisher()); tgt.setPublisherElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getPublisherElement()));
}
if (src.hasContact()) { if (src.hasContact()) {
for (ContactDetail t : src.getContact()) for (org.hl7.fhir.r4.model.ContactPoint t1 : t.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t1)); for (ContactDetail t : src.getContact()) for (org.hl7.fhir.r4.model.ContactPoint t1 : t.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t1));
} }
@ -54,8 +53,8 @@ public class Questionnaire10_40 {
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t)); for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t));
tgt.setVersion(src.getVersion()); tgt.setVersion(src.getVersion());
tgt.setStatus(convertQuestionnaireStatus(src.getStatus())); tgt.setStatus(convertQuestionnaireStatus(src.getStatus()));
if (src.hasDate()) if (src.hasDateElement())
tgt.setDate(src.getDate()); tgt.setDateElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement()));
tgt.setPublisher(src.getPublisher()); tgt.setPublisher(src.getPublisher());
for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addContact(convertQuestionnaireContactComponent(t)); for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addContact(convertQuestionnaireContactComponent(t));
org.hl7.fhir.dstu2.model.Questionnaire.GroupComponent root = src.getGroup(); org.hl7.fhir.dstu2.model.Questionnaire.GroupComponent root = src.getGroup();
@ -80,21 +79,17 @@ public class Questionnaire10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.Questionnaire.GroupComponent tgt = new org.hl7.fhir.dstu2.model.Questionnaire.GroupComponent(); org.hl7.fhir.dstu2.model.Questionnaire.GroupComponent tgt = new org.hl7.fhir.dstu2.model.Questionnaire.GroupComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasLinkId()) { if (src.hasLinkIdElement())
tgt.setLinkId(src.getLinkId()); tgt.setLinkIdElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getLinkIdElement()));
}
if (src.hasCode()) { if (src.hasCode()) {
for (org.hl7.fhir.r4.model.Coding t : src.getCode()) tgt.addConcept(VersionConvertor_10_40.convertCoding(t)); for (org.hl7.fhir.r4.model.Coding t : src.getCode()) tgt.addConcept(VersionConvertor_10_40.convertCoding(t));
} }
if (src.hasText()) { if (src.hasTextElement())
tgt.setText(src.getText()); tgt.setTextElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getTextElement()));
} if (src.hasRequiredElement())
if (src.hasRequired()) { tgt.setRequiredElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getRequiredElement()));
tgt.setRequired(src.getRequired()); if (src.hasRepeatsElement())
} tgt.setRepeatsElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getRepeatsElement()));
if (src.hasRepeats()) {
tgt.setRepeats(src.getRepeats());
}
for (org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemComponent t : src.getItem()) if (t.getType() == org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemType.GROUP) for (org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemComponent t : src.getItem()) if (t.getType() == org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemType.GROUP)
tgt.addGroup(convertQuestionnaireGroupComponent(t)); tgt.addGroup(convertQuestionnaireGroupComponent(t));
else else
@ -107,22 +102,18 @@ public class Questionnaire10_40 {
return null; return null;
org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemComponent tgt = new org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemComponent(); org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemComponent tgt = new org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasLinkId()) { if (src.hasLinkIdElement())
tgt.setLinkId(src.getLinkId()); tgt.setLinkIdElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getLinkIdElement()));
}
if (src.hasConcept()) { if (src.hasConcept()) {
for (org.hl7.fhir.dstu2.model.Coding t : src.getConcept()) tgt.addCode(VersionConvertor_10_40.convertCoding(t)); for (org.hl7.fhir.dstu2.model.Coding t : src.getConcept()) tgt.addCode(VersionConvertor_10_40.convertCoding(t));
} }
if (src.hasText()) { if (src.hasTextElement())
tgt.setText(src.getText()); tgt.setTextElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getTextElement()));
}
tgt.setType(org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemType.GROUP); tgt.setType(org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemType.GROUP);
if (src.hasRequired()) { if (src.hasRequiredElement())
tgt.setRequired(src.getRequired()); tgt.setRequiredElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getRequiredElement()));
} if (src.hasRepeatsElement())
if (src.hasRepeats()) { tgt.setRepeatsElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getRepeatsElement()));
tgt.setRepeats(src.getRepeats());
}
if (src.hasGroup()) { if (src.hasGroup()) {
for (org.hl7.fhir.dstu2.model.Questionnaire.GroupComponent t : src.getGroup()) tgt.addItem(convertQuestionnaireGroupComponent(t)); for (org.hl7.fhir.dstu2.model.Questionnaire.GroupComponent t : src.getGroup()) tgt.addItem(convertQuestionnaireGroupComponent(t));
} }
@ -174,24 +165,20 @@ public class Questionnaire10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.Questionnaire.QuestionComponent tgt = new org.hl7.fhir.dstu2.model.Questionnaire.QuestionComponent(); org.hl7.fhir.dstu2.model.Questionnaire.QuestionComponent tgt = new org.hl7.fhir.dstu2.model.Questionnaire.QuestionComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasLinkId()) { if (src.hasLinkIdElement())
tgt.setLinkId(src.getLinkId()); tgt.setLinkIdElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getLinkIdElement()));
}
if (src.hasCode()) { if (src.hasCode()) {
for (org.hl7.fhir.r4.model.Coding t : src.getCode()) tgt.addConcept(VersionConvertor_10_40.convertCoding(t)); for (org.hl7.fhir.r4.model.Coding t : src.getCode()) tgt.addConcept(VersionConvertor_10_40.convertCoding(t));
} }
if (src.hasText()) { if (src.hasTextElement())
tgt.setText(src.getText()); tgt.setTextElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getTextElement()));
}
if (src.hasType()) { if (src.hasType()) {
tgt.setType(convertQuestionnaireItemType(src.getType())); tgt.setType(convertQuestionnaireItemType(src.getType()));
} }
if (src.hasRequired()) { if (src.hasRequiredElement())
tgt.setRequired(src.getRequired()); tgt.setRequiredElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getRequiredElement()));
} if (src.hasRepeatsElement())
if (src.hasRepeats()) { tgt.setRepeatsElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getRepeatsElement()));
tgt.setRepeats(src.getRepeats());
}
if (src.hasAnswerValueSetElement()) { if (src.hasAnswerValueSetElement()) {
tgt.setOptions(VersionConvertor_10_40.convertCanonicalToReference(src.getAnswerValueSetElement())); tgt.setOptions(VersionConvertor_10_40.convertCanonicalToReference(src.getAnswerValueSetElement()));
} }
@ -212,24 +199,20 @@ public class Questionnaire10_40 {
return null; return null;
org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemComponent tgt = new org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemComponent(); org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemComponent tgt = new org.hl7.fhir.r4.model.Questionnaire.QuestionnaireItemComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasLinkId()) { if (src.hasLinkIdElement())
tgt.setLinkId(src.getLinkId()); tgt.setLinkIdElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getLinkIdElement()));
}
if (src.hasConcept()) { if (src.hasConcept()) {
for (org.hl7.fhir.dstu2.model.Coding t : src.getConcept()) tgt.addCode(VersionConvertor_10_40.convertCoding(t)); for (org.hl7.fhir.dstu2.model.Coding t : src.getConcept()) tgt.addCode(VersionConvertor_10_40.convertCoding(t));
} }
if (src.hasText()) { if (src.hasTextElement())
tgt.setText(src.getText()); tgt.setTextElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getTextElement()));
}
if (src.hasType()) { if (src.hasType()) {
tgt.setType(convertQuestionnaireQuestionType(src.getType())); tgt.setType(convertQuestionnaireQuestionType(src.getType()));
} }
if (src.hasRequired()) { if (src.hasRequiredElement())
tgt.setRequired(src.getRequired()); tgt.setRequiredElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getRequiredElement()));
} if (src.hasRepeatsElement())
if (src.hasRepeats()) { tgt.setRepeatsElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getRepeatsElement()));
tgt.setRepeats(src.getRepeats());
}
if (src.hasOptions()) { if (src.hasOptions()) {
tgt.setAnswerValueSetElement(VersionConvertor_10_40.convertReferenceToCanonical(src.getOptions())); tgt.setAnswerValueSetElement(VersionConvertor_10_40.convertReferenceToCanonical(src.getOptions()));
} }

View File

@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import java.util.Collections;
public class QuestionnaireResponse10_40 { public class QuestionnaireResponse10_40 {
@ -10,12 +11,10 @@ public class QuestionnaireResponse10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.QuestionnaireResponse.GroupComponent tgt = new org.hl7.fhir.dstu2.model.QuestionnaireResponse.GroupComponent(); org.hl7.fhir.dstu2.model.QuestionnaireResponse.GroupComponent tgt = new org.hl7.fhir.dstu2.model.QuestionnaireResponse.GroupComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasLinkId()) { if (src.hasLinkIdElement())
tgt.setLinkId(src.getLinkId()); tgt.setLinkIdElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getLinkIdElement()));
} if (src.hasTextElement())
if (src.hasText()) { tgt.setTextElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getTextElement()));
tgt.setText(src.getText());
}
for (org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent t : src.getItem()) if (t.hasAnswer()) for (org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent t : src.getItem()) if (t.hasAnswer())
tgt.addQuestion(convertQuestionnaireItemToQuestion(t)); tgt.addQuestion(convertQuestionnaireItemToQuestion(t));
else else
@ -28,12 +27,10 @@ public class QuestionnaireResponse10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionComponent tgt = new org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionComponent(); org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionComponent tgt = new org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasLinkId()) { if (src.hasLinkIdElement())
tgt.setLinkId(src.getLinkId()); tgt.setLinkIdElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getLinkIdElement()));
} if (src.hasTextElement())
if (src.hasText()) { tgt.setTextElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getTextElement()));
tgt.setText(src.getText());
}
if (src.hasAnswer()) { if (src.hasAnswer()) {
for (org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent t : src.getAnswer()) tgt.addAnswer(convertQuestionnaireResponseItemAnswerComponent(t)); for (org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent t : src.getAnswer()) tgt.addAnswer(convertQuestionnaireResponseItemAnswerComponent(t));
} }
@ -60,9 +57,8 @@ public class QuestionnaireResponse10_40 {
if (src.hasAuthor()) { if (src.hasAuthor()) {
tgt.setAuthor(VersionConvertor_10_40.convertReference(src.getAuthor())); tgt.setAuthor(VersionConvertor_10_40.convertReference(src.getAuthor()));
} }
if (src.hasAuthored()) { if (src.hasAuthoredElement())
tgt.setAuthored(src.getAuthored()); tgt.setAuthoredElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getAuthoredElement()));
}
if (src.hasSource()) { if (src.hasSource()) {
tgt.setSource(VersionConvertor_10_40.convertReference(src.getSource())); tgt.setSource(VersionConvertor_10_40.convertReference(src.getSource()));
} }
@ -97,9 +93,8 @@ public class QuestionnaireResponse10_40 {
if (src.hasAuthor()) { if (src.hasAuthor()) {
tgt.setAuthor(VersionConvertor_10_40.convertReference(src.getAuthor())); tgt.setAuthor(VersionConvertor_10_40.convertReference(src.getAuthor()));
} }
if (src.hasAuthored()) { if (src.hasAuthoredElement())
tgt.setAuthored(src.getAuthored()); tgt.setAuthoredElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getAuthoredElement()));
}
if (src.hasSource()) { if (src.hasSource()) {
tgt.setSource(VersionConvertor_10_40.convertReference(src.getSource())); tgt.setSource(VersionConvertor_10_40.convertReference(src.getSource()));
} }
@ -116,12 +111,10 @@ public class QuestionnaireResponse10_40 {
return null; return null;
org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent tgt = new org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent(); org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent tgt = new org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasLinkId()) { if (src.hasLinkIdElement())
tgt.setLinkId(src.getLinkId()); tgt.setLinkIdElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getLinkIdElement()));
} if (src.hasTextElement())
if (src.hasText()) { tgt.setTextElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getTextElement()));
tgt.setText(src.getText());
}
if (src.hasGroup()) { if (src.hasGroup()) {
for (org.hl7.fhir.dstu2.model.QuestionnaireResponse.GroupComponent t : src.getGroup()) tgt.addItem(convertQuestionnaireResponseGroupComponent(t)); for (org.hl7.fhir.dstu2.model.QuestionnaireResponse.GroupComponent t : src.getGroup()) tgt.addItem(convertQuestionnaireResponseGroupComponent(t));
} }
@ -164,12 +157,10 @@ public class QuestionnaireResponse10_40 {
return null; return null;
org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent tgt = new org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent(); org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent tgt = new org.hl7.fhir.r4.model.QuestionnaireResponse.QuestionnaireResponseItemComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasLinkId()) { if (src.hasLinkIdElement())
tgt.setLinkId(src.getLinkId()); tgt.setLinkIdElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getLinkIdElement()));
} if (src.hasTextElement())
if (src.hasText()) { tgt.setTextElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getTextElement()));
tgt.setText(src.getText());
}
if (src.hasAnswer()) { if (src.hasAnswer()) {
for (org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionAnswerComponent t : src.getAnswer()) tgt.addAnswer(convertQuestionnaireResponseItemAnswerComponent(t)); for (org.hl7.fhir.dstu2.model.QuestionnaireResponse.QuestionAnswerComponent t : src.getAnswer()) tgt.addAnswer(convertQuestionnaireResponseItemAnswerComponent(t));
} }

View File

@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import java.util.Collections;
public class RiskAssessment10_40 { public class RiskAssessment10_40 {
@ -34,9 +35,8 @@ public class RiskAssessment10_40 {
if (src.hasPrediction()) { if (src.hasPrediction()) {
for (org.hl7.fhir.r4.model.RiskAssessment.RiskAssessmentPredictionComponent t : src.getPrediction()) tgt.addPrediction(convertRiskAssessmentPredictionComponent(t)); for (org.hl7.fhir.r4.model.RiskAssessment.RiskAssessmentPredictionComponent t : src.getPrediction()) tgt.addPrediction(convertRiskAssessmentPredictionComponent(t));
} }
if (src.hasMitigation()) { if (src.hasMitigationElement())
tgt.setMitigation(src.getMitigation()); tgt.setMitigationElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getMitigationElement()));
}
return tgt; return tgt;
} }
@ -69,9 +69,8 @@ public class RiskAssessment10_40 {
if (src.hasPrediction()) { if (src.hasPrediction()) {
for (org.hl7.fhir.dstu2.model.RiskAssessment.RiskAssessmentPredictionComponent t : src.getPrediction()) tgt.addPrediction(convertRiskAssessmentPredictionComponent(t)); for (org.hl7.fhir.dstu2.model.RiskAssessment.RiskAssessmentPredictionComponent t : src.getPrediction()) tgt.addPrediction(convertRiskAssessmentPredictionComponent(t));
} }
if (src.hasMitigation()) { if (src.hasMitigationElement())
tgt.setMitigation(src.getMitigation()); tgt.setMitigationElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getMitigationElement()));
}
return tgt; return tgt;
} }
@ -86,15 +85,13 @@ public class RiskAssessment10_40 {
if (src.hasProbability()) { if (src.hasProbability()) {
tgt.setProbability(VersionConvertor_10_40.convertType(src.getProbability())); tgt.setProbability(VersionConvertor_10_40.convertType(src.getProbability()));
} }
if (src.hasRelativeRisk()) { if (src.hasRelativeRiskElement())
tgt.setRelativeRisk(src.getRelativeRisk()); tgt.setRelativeRiskElement((org.hl7.fhir.dstu2.model.DecimalType) VersionConvertor_10_40.convertType(src.getRelativeRiskElement()));
}
if (src.hasWhen()) { if (src.hasWhen()) {
tgt.setWhen(VersionConvertor_10_40.convertType(src.getWhen())); tgt.setWhen(VersionConvertor_10_40.convertType(src.getWhen()));
} }
if (src.hasRationale()) { if (src.hasRationaleElement())
tgt.setRationale(src.getRationale()); tgt.setRationaleElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getRationaleElement()));
}
return tgt; return tgt;
} }
@ -109,15 +106,13 @@ public class RiskAssessment10_40 {
if (src.hasProbability()) { if (src.hasProbability()) {
tgt.setProbability(VersionConvertor_10_40.convertType(src.getProbability())); tgt.setProbability(VersionConvertor_10_40.convertType(src.getProbability()));
} }
if (src.hasRelativeRisk()) { if (src.hasRelativeRiskElement())
tgt.setRelativeRisk(src.getRelativeRisk()); tgt.setRelativeRiskElement((org.hl7.fhir.r4.model.DecimalType) VersionConvertor_10_40.convertType(src.getRelativeRiskElement()));
}
if (src.hasWhen()) { if (src.hasWhen()) {
tgt.setWhen(VersionConvertor_10_40.convertType(src.getWhen())); tgt.setWhen(VersionConvertor_10_40.convertType(src.getWhen()));
} }
if (src.hasRationale()) { if (src.hasRationaleElement())
tgt.setRationale(src.getRationale()); tgt.setRationaleElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getRationaleElement()));
}
return tgt; return tgt;
} }
} }

View File

@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import java.util.Collections;
public class Schedule10_40 { public class Schedule10_40 {
@ -22,9 +23,8 @@ public class Schedule10_40 {
if (src.hasPlanningHorizon()) { if (src.hasPlanningHorizon()) {
tgt.setPlanningHorizon(VersionConvertor_10_40.convertPeriod(src.getPlanningHorizon())); tgt.setPlanningHorizon(VersionConvertor_10_40.convertPeriod(src.getPlanningHorizon()));
} }
if (src.hasComment()) { if (src.hasCommentElement())
tgt.setComment(src.getComment()); tgt.setCommentElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getCommentElement()));
}
return tgt; return tgt;
} }
@ -45,9 +45,8 @@ public class Schedule10_40 {
if (src.hasPlanningHorizon()) { if (src.hasPlanningHorizon()) {
tgt.setPlanningHorizon(VersionConvertor_10_40.convertPeriod(src.getPlanningHorizon())); tgt.setPlanningHorizon(VersionConvertor_10_40.convertPeriod(src.getPlanningHorizon()));
} }
if (src.hasComment()) { if (src.hasCommentElement())
tgt.setComment(src.getComment()); tgt.setCommentElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getCommentElement()));
}
return tgt; return tgt;
} }
} }

View File

@ -1,8 +1,12 @@
package org.hl7.fhir.convertors.conv10_40; package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.dstu2.model.StringType;
import org.hl7.fhir.dstu2.utils.ToolingExtensions; import org.hl7.fhir.dstu2.utils.ToolingExtensions;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r4.model.MarkdownType;
import java.util.Collections;
public class SearchParameter10_40 { public class SearchParameter10_40 {
@ -11,46 +15,40 @@ public class SearchParameter10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.SearchParameter tgt = new org.hl7.fhir.dstu2.model.SearchParameter(); org.hl7.fhir.dstu2.model.SearchParameter tgt = new org.hl7.fhir.dstu2.model.SearchParameter();
VersionConvertor_10_40.copyDomainResource(src, tgt); VersionConvertor_10_40.copyDomainResource(src, tgt);
if (src.hasUrl()) { if (src.hasUrlElement())
tgt.setUrl(src.getUrl()); tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement()));
} if (src.hasNameElement())
if (src.hasName()) { tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
tgt.setName(src.getName());
}
if (src.hasStatus()) { if (src.hasStatus()) {
tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus())); tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus()));
} }
if (src.hasExperimental()) if (src.hasExperimentalElement())
tgt.setExperimental(src.getExperimental()); tgt.setExperimentalElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getExperimentalElement()));
if (src.hasDate()) if (src.hasDateElement())
tgt.setDate(src.getDate()); tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement()));
if (src.hasPublisher()) { if (src.hasPublisherElement())
tgt.setPublisher(src.getPublisher()); tgt.setPublisherElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getPublisherElement()));
}
if (src.hasContact()) { if (src.hasContact()) {
for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(convertSearchParameterContactComponent(t)); for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(convertSearchParameterContactComponent(t));
} }
if (src.hasPurpose()) { if (src.hasPurposeElement()) {
tgt.setRequirements(src.getPurpose()); tgt.setRequirementsElement((StringType) VersionConvertor_10_40.convertType(src.getPurposeElement()));
}
if (src.hasCode()) {
tgt.setCode(src.getCode());
} }
if (src.hasCodeElement())
tgt.setCodeElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_40.convertType(src.getCodeElement()));
if (src.hasBase()) { if (src.hasBase()) {
for (org.hl7.fhir.r4.model.CodeType t : src.getBase()) tgt.setBase(t.asStringValue()); for (org.hl7.fhir.r4.model.CodeType t : src.getBase()) tgt.setBase(t.asStringValue());
} }
if (src.hasType()) { if (src.hasType()) {
tgt.setType(VersionConvertor_10_40.convertSearchParamType(src.getType())); tgt.setType(VersionConvertor_10_40.convertSearchParamType(src.getType()));
} }
if (src.hasDescription()) { if (src.hasDescriptionElement())
tgt.setDescription(src.getDescription()); tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
}
if (src.hasExpression()) { if (src.hasExpression()) {
org.hl7.fhir.dstu2.utils.ToolingExtensions.setStringExtension(tgt, ToolingExtensions.EXT_EXPRESSION, src.getExpression()); org.hl7.fhir.dstu2.utils.ToolingExtensions.setStringExtension(tgt, ToolingExtensions.EXT_EXPRESSION, src.getExpression());
} }
if (src.hasXpath()) { if (src.hasXpathElement())
tgt.setXpath(src.getXpath()); tgt.setXpathElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getXpathElement()));
}
if (src.hasXpathUsage()) { if (src.hasXpathUsage()) {
tgt.setXpathUsage(convertXPathUsageType(src.getXpathUsage())); tgt.setXpathUsage(convertXPathUsageType(src.getXpathUsage()));
} }
@ -65,44 +63,37 @@ public class SearchParameter10_40 {
return null; return null;
org.hl7.fhir.r4.model.SearchParameter tgt = new org.hl7.fhir.r4.model.SearchParameter(); org.hl7.fhir.r4.model.SearchParameter tgt = new org.hl7.fhir.r4.model.SearchParameter();
VersionConvertor_10_40.copyDomainResource(src, tgt); VersionConvertor_10_40.copyDomainResource(src, tgt);
if (src.hasUrl()) { if (src.hasUrlElement())
tgt.setUrl(src.getUrl()); tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement()));
} if (src.hasNameElement())
if (src.hasName()) { tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
tgt.setName(src.getName());
}
if (src.hasStatus()) { if (src.hasStatus()) {
tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus())); tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus()));
} }
if (src.hasExperimental()) if (src.hasExperimentalElement())
tgt.setExperimental(src.getExperimental()); tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getExperimentalElement()));
if (src.hasDate()) if (src.hasDateElement())
tgt.setDate(src.getDate()); tgt.setDateElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement()));
if (src.hasPublisher()) { if (src.hasPublisherElement())
tgt.setPublisher(src.getPublisher()); tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getPublisherElement()));
}
if (src.hasContact()) { if (src.hasContact()) {
for (org.hl7.fhir.dstu2.model.SearchParameter.SearchParameterContactComponent t : src.getContact()) tgt.addContact(convertSearchParameterContactComponent(t)); for (org.hl7.fhir.dstu2.model.SearchParameter.SearchParameterContactComponent t : src.getContact()) tgt.addContact(convertSearchParameterContactComponent(t));
} }
if (src.hasRequirements()) { if (src.hasRequirementsElement()) {
tgt.setPurpose(src.getRequirements()); tgt.setPurposeElement((MarkdownType) VersionConvertor_10_40.convertType(src.getRequirementsElement()));
}
if (src.hasCode()) {
tgt.setCode(src.getCode());
}
if (src.hasBase()) {
tgt.addBase(src.getBase());
} }
if (src.hasCodeElement())
tgt.setCodeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_10_40.convertType(src.getCodeElement()));
if (src.hasBaseElement())
tgt.setBase(Collections.singletonList((org.hl7.fhir.r4.model.CodeType) VersionConvertor_10_40.convertType(src.getBaseElement())));
if (src.hasType()) { if (src.hasType()) {
tgt.setType(VersionConvertor_10_40.convertSearchParamType(src.getType())); tgt.setType(VersionConvertor_10_40.convertSearchParamType(src.getType()));
} }
if (src.hasDescription()) { if (src.hasDescriptionElement())
tgt.setDescription(src.getDescription()); tgt.setDescriptionElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
}
tgt.setExpression(ToolingExtensions.readStringExtension(src, ToolingExtensions.EXT_EXPRESSION)); tgt.setExpression(ToolingExtensions.readStringExtension(src, ToolingExtensions.EXT_EXPRESSION));
if (src.hasXpath()) { if (src.hasXpathElement())
tgt.setXpath(src.getXpath()); tgt.setXpathElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getXpathElement()));
}
if (src.hasXpathUsage()) { if (src.hasXpathUsage()) {
tgt.setXpathUsage(convertXPathUsageType(src.getXpathUsage())); tgt.setXpathUsage(convertXPathUsageType(src.getXpathUsage()));
} }
@ -117,9 +108,8 @@ public class SearchParameter10_40 {
return null; return null;
org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
}
if (src.hasTelecom()) { if (src.hasTelecom()) {
for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t));
} }
@ -131,9 +121,8 @@ public class SearchParameter10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.SearchParameter.SearchParameterContactComponent tgt = new org.hl7.fhir.dstu2.model.SearchParameter.SearchParameterContactComponent(); org.hl7.fhir.dstu2.model.SearchParameter.SearchParameterContactComponent tgt = new org.hl7.fhir.dstu2.model.SearchParameter.SearchParameterContactComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
}
if (src.hasTelecom()) { if (src.hasTelecom()) {
for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t));
} }

View File

@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import java.util.Collections;
public class Slot10_40 { public class Slot10_40 {
@ -18,18 +19,14 @@ public class Slot10_40 {
if (src.hasSchedule()) { if (src.hasSchedule()) {
tgt.setSchedule(VersionConvertor_10_40.convertReference(src.getSchedule())); tgt.setSchedule(VersionConvertor_10_40.convertReference(src.getSchedule()));
} }
if (src.hasStart()) { if (src.hasStartElement())
tgt.setStart(src.getStart()); tgt.setStartElement((org.hl7.fhir.r4.model.InstantType) VersionConvertor_10_40.convertType(src.getStartElement()));
} if (src.hasEndElement())
if (src.hasEnd()) { tgt.setEndElement((org.hl7.fhir.r4.model.InstantType) VersionConvertor_10_40.convertType(src.getEndElement()));
tgt.setEnd(src.getEnd()); if (src.hasOverbookedElement())
} tgt.setOverbookedElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getOverbookedElement()));
if (src.hasOverbooked()) { if (src.hasCommentElement())
tgt.setOverbooked(src.getOverbooked()); tgt.setCommentElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getCommentElement()));
}
if (src.hasComment()) {
tgt.setComment(src.getComment());
}
return tgt; return tgt;
} }
@ -47,18 +44,14 @@ public class Slot10_40 {
if (src.hasSchedule()) { if (src.hasSchedule()) {
tgt.setSchedule(VersionConvertor_10_40.convertReference(src.getSchedule())); tgt.setSchedule(VersionConvertor_10_40.convertReference(src.getSchedule()));
} }
if (src.hasStart()) { if (src.hasStartElement())
tgt.setStart(src.getStart()); tgt.setStartElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_40.convertType(src.getStartElement()));
} if (src.hasEndElement())
if (src.hasEnd()) { tgt.setEndElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_40.convertType(src.getEndElement()));
tgt.setEnd(src.getEnd()); if (src.hasOverbookedElement())
} tgt.setOverbookedElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getOverbookedElement()));
if (src.hasOverbooked()) { if (src.hasCommentElement())
tgt.setOverbooked(src.getOverbooked()); tgt.setCommentElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getCommentElement()));
}
if (src.hasComment()) {
tgt.setComment(src.getComment());
}
return tgt; return tgt;
} }
} }

View File

@ -1,13 +1,18 @@
package org.hl7.fhir.convertors.conv10_40; package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.dstu2.model.CodeType;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r4.model.CanonicalType;
import org.hl7.fhir.r4.model.ElementDefinition; import org.hl7.fhir.r4.model.ElementDefinition;
import org.hl7.fhir.r4.model.StringType;
import org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionKind; import org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionKind;
import org.hl7.fhir.r4.model.StructureDefinition.TypeDerivationRule; import org.hl7.fhir.r4.model.StructureDefinition.TypeDerivationRule;
import org.hl7.fhir.r4.model.UriType;
import org.hl7.fhir.utilities.Utilities; import org.hl7.fhir.utilities.Utilities;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Collections;
public class StructureDefinition10_40 { public class StructureDefinition10_40 {
@ -51,37 +56,32 @@ public class StructureDefinition10_40 {
return null; return null;
org.hl7.fhir.r4.model.StructureDefinition tgt = new org.hl7.fhir.r4.model.StructureDefinition(); org.hl7.fhir.r4.model.StructureDefinition tgt = new org.hl7.fhir.r4.model.StructureDefinition();
VersionConvertor_10_40.copyDomainResource(src, tgt); VersionConvertor_10_40.copyDomainResource(src, tgt);
if (src.hasUrl()) { if (src.hasUrlElement())
tgt.setUrl(src.getUrl()); tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement()));
}
if (src.hasIdentifier()) { if (src.hasIdentifier()) {
for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t)); for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t));
} }
if (src.hasVersion()) { if (src.hasVersionElement())
tgt.setVersion(src.getVersion()); tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement()));
} if (src.hasNameElement())
if (src.hasName()) { tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
tgt.setName(src.getName()); if (src.hasDisplayElement()) {
} tgt.setTitleElement((StringType) VersionConvertor_10_40.convertType(src.getDisplayElement()));
if (src.hasDisplay()) {
tgt.setTitle(src.getDisplay());
} }
if (src.hasStatus()) { if (src.hasStatus()) {
tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus())); tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus()));
} }
if (src.hasExperimental()) if (src.hasExperimentalElement())
tgt.setExperimental(src.getExperimental()); tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getExperimentalElement()));
if (src.hasPublisher()) { if (src.hasPublisherElement())
tgt.setPublisher(src.getPublisher()); tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getPublisherElement()));
}
if (src.hasContact()) { if (src.hasContact()) {
for (org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionContactComponent t : src.getContact()) tgt.addContact(convertStructureDefinitionContactComponent(t)); for (org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionContactComponent t : src.getContact()) tgt.addContact(convertStructureDefinitionContactComponent(t));
} }
if (src.hasDate()) if (src.hasDateElement())
tgt.setDate(src.getDate()); tgt.setDateElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement()));
if (src.hasDescription()) { if (src.hasDescriptionElement())
tgt.setDescription(src.getDescription()); tgt.setDescriptionElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
}
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_40.isJurisdiction(t)) for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_40.isJurisdiction(t))
tgt.addJurisdiction(VersionConvertor_10_40.convertCodeableConcept(t)); tgt.addJurisdiction(VersionConvertor_10_40.convertCodeableConcept(t));
else else
@ -89,9 +89,8 @@ public class StructureDefinition10_40 {
if (src.hasRequirements()) { if (src.hasRequirements()) {
tgt.setPurpose(src.getRequirements()); tgt.setPurpose(src.getRequirements());
} }
if (src.hasCopyright()) { if (src.hasCopyrightElement())
tgt.setCopyright(src.getCopyright()); tgt.setCopyrightElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_10_40.convertType(src.getCopyrightElement()));
}
if (src.hasCode()) { if (src.hasCode()) {
for (org.hl7.fhir.dstu2.model.Coding t : src.getCode()) tgt.addKeyword(VersionConvertor_10_40.convertCoding(t)); for (org.hl7.fhir.dstu2.model.Coding t : src.getCode()) tgt.addKeyword(VersionConvertor_10_40.convertCoding(t));
} }
@ -104,9 +103,8 @@ public class StructureDefinition10_40 {
if (src.hasKind()) { if (src.hasKind()) {
tgt.setKind(convertStructureDefinitionKind(src.getKind(), tgt.getId())); tgt.setKind(convertStructureDefinitionKind(src.getKind(), tgt.getId()));
} }
if (src.hasAbstract()) { if (src.hasAbstractElement())
tgt.setAbstract(src.getAbstract()); tgt.setAbstractElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getAbstractElement()));
}
for (org.hl7.fhir.dstu2.model.StringType t : src.getContext()) { for (org.hl7.fhir.dstu2.model.StringType t : src.getContext()) {
org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionContextComponent ec = tgt.addContext(); org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionContextComponent ec = tgt.addContext();
if (src.hasContextType()) { if (src.hasContextType()) {
@ -114,16 +112,16 @@ public class StructureDefinition10_40 {
} }
ec.setExpression("*".equals(t.getValue()) ? "Element" : t.getValue()); ec.setExpression("*".equals(t.getValue()) ? "Element" : t.getValue());
} }
if (src.hasConstrainedType()) if (src.hasConstrainedTypeElement())
tgt.setType(src.getConstrainedType()); tgt.setTypeElement((UriType) VersionConvertor_10_40.convertType(src.getConstrainedTypeElement()));
else if (src.getSnapshot().hasElement()) else if (src.getSnapshot().hasElement())
tgt.setType(src.getSnapshot().getElement().get(0).getPath()); tgt.setType(src.getSnapshot().getElement().get(0).getPath());
else if (src.getDifferential().hasElement() && !src.getDifferential().getElement().get(0).getPath().contains(".")) else if (src.getDifferential().hasElement() && !src.getDifferential().getElement().get(0).getPath().contains("."))
tgt.setType(src.getDifferential().getElement().get(0).getPath()); tgt.setType(src.getDifferential().getElement().get(0).getPath());
else else
tgt.setType(src.getDifferential().getElement().get(0).getPath().substring(0, src.getDifferential().getElement().get(0).getPath().indexOf("."))); tgt.setType(src.getDifferential().getElement().get(0).getPath().substring(0, src.getDifferential().getElement().get(0).getPath().indexOf(".")));
if (src.hasBase()) { if (src.hasBaseElement()) {
tgt.setBaseDefinition(src.getBase()); tgt.setBaseDefinitionElement((CanonicalType) VersionConvertor_10_40.convertType(src.getBaseElement()));
} }
tgt.setDerivation(src.hasConstrainedType() ? org.hl7.fhir.r4.model.StructureDefinition.TypeDerivationRule.CONSTRAINT : org.hl7.fhir.r4.model.StructureDefinition.TypeDerivationRule.SPECIALIZATION); tgt.setDerivation(src.hasConstrainedType() ? org.hl7.fhir.r4.model.StructureDefinition.TypeDerivationRule.CONSTRAINT : org.hl7.fhir.r4.model.StructureDefinition.TypeDerivationRule.SPECIALIZATION);
if (src.hasSnapshot()) { if (src.hasSnapshot()) {
@ -156,37 +154,32 @@ public class StructureDefinition10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.StructureDefinition tgt = new org.hl7.fhir.dstu2.model.StructureDefinition(); org.hl7.fhir.dstu2.model.StructureDefinition tgt = new org.hl7.fhir.dstu2.model.StructureDefinition();
VersionConvertor_10_40.copyDomainResource(src, tgt); VersionConvertor_10_40.copyDomainResource(src, tgt);
if (src.hasUrl()) { if (src.hasUrlElement())
tgt.setUrl(src.getUrl()); tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement()));
}
if (src.hasIdentifier()) { if (src.hasIdentifier()) {
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t)); for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(t));
} }
if (src.hasVersion()) { if (src.hasVersionElement())
tgt.setVersion(src.getVersion()); tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement()));
} if (src.hasNameElement())
if (src.hasName()) { tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
tgt.setName(src.getName()); if (src.hasTitleElement()) {
} tgt.setDisplayElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getTitleElement()));
if (src.hasTitle()) {
tgt.setDisplay(src.getTitle());
} }
if (src.hasStatus()) { if (src.hasStatus()) {
tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus())); tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus()));
} }
if (src.hasExperimental()) if (src.hasExperimentalElement())
tgt.setExperimental(src.getExperimental()); tgt.setExperimentalElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getExperimentalElement()));
if (src.hasPublisher()) { if (src.hasPublisherElement())
tgt.setPublisher(src.getPublisher()); tgt.setPublisherElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getPublisherElement()));
}
if (src.hasContact()) { if (src.hasContact()) {
for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(convertStructureDefinitionContactComponent(t)); for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(convertStructureDefinitionContactComponent(t));
} }
if (src.hasDate()) if (src.hasDateElement())
tgt.setDate(src.getDate()); tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement()));
if (src.hasDescription()) { if (src.hasDescriptionElement())
tgt.setDescription(src.getDescription()); tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
}
for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept())
tgt.addUseContext(VersionConvertor_10_40.convertCodeableConcept(t.getValueCodeableConcept())); tgt.addUseContext(VersionConvertor_10_40.convertCodeableConcept(t.getValueCodeableConcept()));
if (src.hasJurisdiction()) { if (src.hasJurisdiction()) {
@ -195,9 +188,8 @@ public class StructureDefinition10_40 {
if (src.hasPurpose()) { if (src.hasPurpose()) {
tgt.setRequirements(src.getPurpose()); tgt.setRequirements(src.getPurpose());
} }
if (src.hasCopyright()) { if (src.hasCopyrightElement())
tgt.setCopyright(src.getCopyright()); tgt.setCopyrightElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getCopyrightElement()));
}
if (src.hasKeyword()) { if (src.hasKeyword()) {
for (org.hl7.fhir.r4.model.Coding t : src.getKeyword()) tgt.addCode(VersionConvertor_10_40.convertCoding(t)); for (org.hl7.fhir.r4.model.Coding t : src.getKeyword()) tgt.addCode(VersionConvertor_10_40.convertCoding(t));
} }
@ -209,19 +201,18 @@ public class StructureDefinition10_40 {
if (src.hasKind()) { if (src.hasKind()) {
tgt.setKind(convertStructureDefinitionKind(src.getKind())); tgt.setKind(convertStructureDefinitionKind(src.getKind()));
} }
if (src.hasAbstract()) { if (src.hasAbstractElement())
tgt.setAbstract(src.getAbstract()); tgt.setAbstractElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getAbstractElement()));
}
for (org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionContextComponent t : src.getContext()) { for (org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionContextComponent t : src.getContext()) {
if (!tgt.hasContextType()) if (!tgt.hasContextType())
tgt.setContextType(convertExtensionContext(t.getType(), t.getExpression())); tgt.setContextType(convertExtensionContext(t.getType(), t.getExpression()));
tgt.addContext("Element".equals(t.getExpression()) ? "*" : t.getExpression()); tgt.addContext("Element".equals(t.getExpression()) ? "*" : t.getExpression());
} }
if (src.hasType()) { if (src.hasTypeElement()) {
tgt.setConstrainedType(src.getType()); tgt.setConstrainedTypeElement((CodeType) VersionConvertor_10_40.convertType(src.getTypeElement()));
} }
if (src.hasBaseDefinition()) { if (src.hasBaseDefinitionElement()) {
tgt.setBase(src.getBaseDefinition()); tgt.setBaseElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getBaseDefinitionElement()));
} }
if (src.hasSnapshot()) { if (src.hasSnapshot()) {
tgt.setSnapshot(convertStructureDefinitionSnapshotComponent(src.getSnapshot())); tgt.setSnapshot(convertStructureDefinitionSnapshotComponent(src.getSnapshot()));
@ -243,9 +234,8 @@ public class StructureDefinition10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionContactComponent tgt = new org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionContactComponent(); org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionContactComponent tgt = new org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionContactComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
}
if (src.hasTelecom()) { if (src.hasTelecom()) {
for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t));
} }
@ -257,9 +247,8 @@ public class StructureDefinition10_40 {
return null; return null;
org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
}
if (src.hasTelecom()) { if (src.hasTelecom()) {
for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t));
} }
@ -333,17 +322,14 @@ public class StructureDefinition10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionMappingComponent tgt = new org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionMappingComponent(); org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionMappingComponent tgt = new org.hl7.fhir.dstu2.model.StructureDefinition.StructureDefinitionMappingComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasIdentity()) { if (src.hasIdentityElement())
tgt.setIdentity(src.getIdentity()); tgt.setIdentityElement((org.hl7.fhir.dstu2.model.IdType) VersionConvertor_10_40.convertType(src.getIdentityElement()));
} if (src.hasUriElement())
if (src.hasUri()) { tgt.setUriElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getUriElement()));
tgt.setUri(src.getUri()); if (src.hasNameElement())
} tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
if (src.hasName()) { if (src.hasCommentElement()) {
tgt.setName(src.getName()); tgt.setCommentsElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getCommentElement()));
}
if (src.hasComment()) {
tgt.setComments(src.getComment());
} }
return tgt; return tgt;
} }
@ -353,17 +339,14 @@ public class StructureDefinition10_40 {
return null; return null;
org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionMappingComponent tgt = new org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionMappingComponent(); org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionMappingComponent tgt = new org.hl7.fhir.r4.model.StructureDefinition.StructureDefinitionMappingComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasIdentity()) { if (src.hasIdentityElement())
tgt.setIdentity(src.getIdentity()); tgt.setIdentityElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_10_40.convertType(src.getIdentityElement()));
} if (src.hasUriElement())
if (src.hasUri()) { tgt.setUriElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_10_40.convertType(src.getUriElement()));
tgt.setUri(src.getUri()); if (src.hasNameElement())
} tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
if (src.hasName()) { if (src.hasCommentsElement()) {
tgt.setName(src.getName()); tgt.setCommentElement((StringType) VersionConvertor_10_40.convertType(src.getCommentsElement()));
}
if (src.hasComments()) {
tgt.setComment(src.getComments());
} }
return tgt; return tgt;
} }

View File

@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import java.util.Collections;
public class Subscription10_40 { public class Subscription10_40 {
@ -10,27 +11,23 @@ public class Subscription10_40 {
return null; return null;
org.hl7.fhir.r4.model.Subscription tgt = new org.hl7.fhir.r4.model.Subscription(); org.hl7.fhir.r4.model.Subscription tgt = new org.hl7.fhir.r4.model.Subscription();
VersionConvertor_10_40.copyDomainResource(src, tgt); VersionConvertor_10_40.copyDomainResource(src, tgt);
if (src.hasCriteria()) { if (src.hasCriteriaElement())
tgt.setCriteria(src.getCriteria()); tgt.setCriteriaElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getCriteriaElement()));
}
if (src.hasContact()) { if (src.hasContact()) {
for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getContact()) tgt.addContact(VersionConvertor_10_40.convertContactPoint(t)); for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getContact()) tgt.addContact(VersionConvertor_10_40.convertContactPoint(t));
} }
if (src.hasReason()) { if (src.hasReasonElement())
tgt.setReason(src.getReason()); tgt.setReasonElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getReasonElement()));
}
if (src.hasStatus()) { if (src.hasStatus()) {
tgt.setStatus(convertSubscriptionStatus(src.getStatus())); tgt.setStatus(convertSubscriptionStatus(src.getStatus()));
} }
if (src.hasError()) { if (src.hasErrorElement())
tgt.setError(src.getError()); tgt.setErrorElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getErrorElement()));
}
if (src.hasChannel()) { if (src.hasChannel()) {
tgt.setChannel(convertSubscriptionChannelComponent(src.getChannel())); tgt.setChannel(convertSubscriptionChannelComponent(src.getChannel()));
} }
if (src.hasEnd()) { if (src.hasEndElement())
tgt.setEnd(src.getEnd()); tgt.setEndElement((org.hl7.fhir.r4.model.InstantType) VersionConvertor_10_40.convertType(src.getEndElement()));
}
return tgt; return tgt;
} }
@ -39,27 +36,23 @@ public class Subscription10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.Subscription tgt = new org.hl7.fhir.dstu2.model.Subscription(); org.hl7.fhir.dstu2.model.Subscription tgt = new org.hl7.fhir.dstu2.model.Subscription();
VersionConvertor_10_40.copyDomainResource(src, tgt); VersionConvertor_10_40.copyDomainResource(src, tgt);
if (src.hasCriteria()) { if (src.hasCriteriaElement())
tgt.setCriteria(src.getCriteria()); tgt.setCriteriaElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getCriteriaElement()));
}
if (src.hasContact()) { if (src.hasContact()) {
for (org.hl7.fhir.r4.model.ContactPoint t : src.getContact()) tgt.addContact(VersionConvertor_10_40.convertContactPoint(t)); for (org.hl7.fhir.r4.model.ContactPoint t : src.getContact()) tgt.addContact(VersionConvertor_10_40.convertContactPoint(t));
} }
if (src.hasReason()) { if (src.hasReasonElement())
tgt.setReason(src.getReason()); tgt.setReasonElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getReasonElement()));
}
if (src.hasStatus()) { if (src.hasStatus()) {
tgt.setStatus(convertSubscriptionStatus(src.getStatus())); tgt.setStatus(convertSubscriptionStatus(src.getStatus()));
} }
if (src.hasError()) { if (src.hasErrorElement())
tgt.setError(src.getError()); tgt.setErrorElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getErrorElement()));
}
if (src.hasChannel()) { if (src.hasChannel()) {
tgt.setChannel(convertSubscriptionChannelComponent(src.getChannel())); tgt.setChannel(convertSubscriptionChannelComponent(src.getChannel()));
} }
if (src.hasEnd()) { if (src.hasEndElement())
tgt.setEnd(src.getEnd()); tgt.setEndElement((org.hl7.fhir.dstu2.model.InstantType) VersionConvertor_10_40.convertType(src.getEndElement()));
}
return tgt; return tgt;
} }
@ -71,15 +64,12 @@ public class Subscription10_40 {
if (src.hasType()) { if (src.hasType()) {
tgt.setType(convertSubscriptionChannelType(src.getType())); tgt.setType(convertSubscriptionChannelType(src.getType()));
} }
if (src.hasEndpoint()) { if (src.hasEndpointElement())
tgt.setEndpoint(src.getEndpoint()); tgt.setEndpointElement((org.hl7.fhir.r4.model.UrlType) VersionConvertor_10_40.convertType(src.getEndpointElement()));
} if (src.hasPayloadElement())
if (src.hasPayload()) { tgt.setPayloadElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_10_40.convertType(src.getPayloadElement()));
tgt.setPayload(src.getPayload()); if (src.hasHeaderElement())
} tgt.setHeader(Collections.singletonList((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getHeaderElement())));
if (src.hasHeader()) {
tgt.addHeader(src.getHeader());
}
return tgt; return tgt;
} }
@ -91,12 +81,10 @@ public class Subscription10_40 {
if (src.hasType()) { if (src.hasType()) {
tgt.setType(convertSubscriptionChannelType(src.getType())); tgt.setType(convertSubscriptionChannelType(src.getType()));
} }
if (src.hasEndpoint()) { if (src.hasEndpointElement())
tgt.setEndpoint(src.getEndpoint()); tgt.setEndpointElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getEndpointElement()));
} if (src.hasPayloadElement())
if (src.hasPayload()) { tgt.setPayloadElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getPayloadElement()));
tgt.setPayload(src.getPayload());
}
if (src.hasHeader()) if (src.hasHeader())
tgt.setHeaderElement(VersionConvertor_10_40.convertString(src.getHeader().get(0))); tgt.setHeaderElement(VersionConvertor_10_40.convertString(src.getHeader().get(0)));
return tgt; return tgt;

View File

@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import java.util.Collections;
public class Substance10_40 { public class Substance10_40 {
@ -19,9 +20,8 @@ public class Substance10_40 {
if (src.hasCode()) { if (src.hasCode()) {
tgt.setCode(VersionConvertor_10_40.convertCodeableConcept(src.getCode())); tgt.setCode(VersionConvertor_10_40.convertCodeableConcept(src.getCode()));
} }
if (src.hasDescription()) { if (src.hasDescriptionElement())
tgt.setDescription(src.getDescription()); tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
}
if (src.hasInstance()) { if (src.hasInstance()) {
for (org.hl7.fhir.dstu2.model.Substance.SubstanceInstanceComponent t : src.getInstance()) tgt.addInstance(convertSubstanceInstanceComponent(t)); for (org.hl7.fhir.dstu2.model.Substance.SubstanceInstanceComponent t : src.getInstance()) tgt.addInstance(convertSubstanceInstanceComponent(t));
} }
@ -45,9 +45,8 @@ public class Substance10_40 {
if (src.hasCode()) { if (src.hasCode()) {
tgt.setCode(VersionConvertor_10_40.convertCodeableConcept(src.getCode())); tgt.setCode(VersionConvertor_10_40.convertCodeableConcept(src.getCode()));
} }
if (src.hasDescription()) { if (src.hasDescriptionElement())
tgt.setDescription(src.getDescription()); tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
}
if (src.hasInstance()) { if (src.hasInstance()) {
for (org.hl7.fhir.r4.model.Substance.SubstanceInstanceComponent t : src.getInstance()) tgt.addInstance(convertSubstanceInstanceComponent(t)); for (org.hl7.fhir.r4.model.Substance.SubstanceInstanceComponent t : src.getInstance()) tgt.addInstance(convertSubstanceInstanceComponent(t));
} }
@ -90,9 +89,8 @@ public class Substance10_40 {
if (src.hasIdentifier()) { if (src.hasIdentifier()) {
tgt.setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifier())); tgt.setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifier()));
} }
if (src.hasExpiry()) { if (src.hasExpiryElement())
tgt.setExpiry(src.getExpiry()); tgt.setExpiryElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getExpiryElement()));
}
if (src.hasQuantity()) { if (src.hasQuantity()) {
tgt.setQuantity(VersionConvertor_10_40.convertSimpleQuantity(src.getQuantity())); tgt.setQuantity(VersionConvertor_10_40.convertSimpleQuantity(src.getQuantity()));
} }
@ -107,9 +105,8 @@ public class Substance10_40 {
if (src.hasIdentifier()) { if (src.hasIdentifier()) {
tgt.setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifier())); tgt.setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifier()));
} }
if (src.hasExpiry()) { if (src.hasExpiryElement())
tgt.setExpiry(src.getExpiry()); tgt.setExpiryElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getExpiryElement()));
}
if (src.hasQuantity()) { if (src.hasQuantity()) {
tgt.setQuantity(VersionConvertor_10_40.convertSimpleQuantity(src.getQuantity())); tgt.setQuantity(VersionConvertor_10_40.convertSimpleQuantity(src.getQuantity()));
} }

View File

@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import java.util.Collections;
public class SupplyDelivery10_40 { public class SupplyDelivery10_40 {

View File

@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import java.util.Collections;
public class SupplyRequest10_40 { public class SupplyRequest10_40 {

View File

@ -1,7 +1,12 @@
package org.hl7.fhir.convertors.conv10_40; package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.dstu2.model.IdType;
import org.hl7.fhir.dstu2.model.StringType;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r4.model.MarkdownType;
import java.util.Collections;
public class TestScript10_40 { public class TestScript10_40 {
@ -183,60 +188,46 @@ public class TestScript10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionAssertComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionAssertComponent(); org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionAssertComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionAssertComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasLabel()) { if (src.hasLabelElement())
tgt.setLabel(src.getLabel()); tgt.setLabelElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getLabelElement()));
} if (src.hasDescriptionElement())
if (src.hasDescription()) { tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
tgt.setDescription(src.getDescription());
}
if (src.hasDirection()) { if (src.hasDirection()) {
tgt.setDirection(convertAssertionDirectionType(src.getDirection())); tgt.setDirection(convertAssertionDirectionType(src.getDirection()));
} }
if (src.hasCompareToSourceId()) { if (src.hasCompareToSourceIdElement())
tgt.setCompareToSourceId(src.getCompareToSourceId()); tgt.setCompareToSourceIdElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getCompareToSourceIdElement()));
} if (src.hasCompareToSourcePathElement())
if (src.hasCompareToSourcePath()) { tgt.setCompareToSourcePathElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getCompareToSourcePathElement()));
tgt.setCompareToSourcePath(src.getCompareToSourcePath());
}
if (src.hasContentType()) { if (src.hasContentType()) {
tgt.setContentType(convertContentType(src.getContentType())); tgt.setContentType(convertContentType(src.getContentType()));
} }
if (src.hasHeaderField()) { if (src.hasHeaderFieldElement())
tgt.setHeaderField(src.getHeaderField()); tgt.setHeaderFieldElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getHeaderFieldElement()));
} if (src.hasMinimumIdElement())
if (src.hasMinimumId()) { tgt.setMinimumIdElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getMinimumIdElement()));
tgt.setMinimumId(src.getMinimumId()); if (src.hasNavigationLinksElement())
} tgt.setNavigationLinksElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getNavigationLinksElement()));
if (src.hasNavigationLinks()) {
tgt.setNavigationLinks(src.getNavigationLinks());
}
if (src.hasOperator()) { if (src.hasOperator()) {
tgt.setOperator(convertAssertionOperatorType(src.getOperator())); tgt.setOperator(convertAssertionOperatorType(src.getOperator()));
} }
if (src.hasPath()) { if (src.hasPathElement())
tgt.setPath(src.getPath()); tgt.setPathElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getPathElement()));
} if (src.hasResourceElement())
if (src.hasResource()) { tgt.setResourceElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_40.convertType(src.getResourceElement()));
tgt.setResource(src.getResource());
}
if (src.hasResponse()) { if (src.hasResponse()) {
tgt.setResponse(convertAssertionResponseTypes(src.getResponse())); tgt.setResponse(convertAssertionResponseTypes(src.getResponse()));
} }
if (src.hasResponseCode()) { if (src.hasResponseCodeElement())
tgt.setResponseCode(src.getResponseCode()); tgt.setResponseCodeElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getResponseCodeElement()));
} if (src.hasSourceIdElement())
if (src.hasSourceId()) { tgt.setSourceIdElement((org.hl7.fhir.dstu2.model.IdType) VersionConvertor_10_40.convertType(src.getSourceIdElement()));
tgt.setSourceId(src.getSourceId()); if (src.hasValidateProfileIdElement())
} tgt.setValidateProfileIdElement((org.hl7.fhir.dstu2.model.IdType) VersionConvertor_10_40.convertType(src.getValidateProfileIdElement()));
if (src.hasValidateProfileId()) { if (src.hasValueElement())
tgt.setValidateProfileId(src.getValidateProfileId()); tgt.setValueElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getValueElement()));
} if (src.hasWarningOnlyElement())
if (src.hasValue()) { tgt.setWarningOnlyElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getWarningOnlyElement()));
tgt.setValue(src.getValue());
}
if (src.hasWarningOnly()) {
tgt.setWarningOnly(src.getWarningOnly());
}
return tgt; return tgt;
} }
@ -245,60 +236,46 @@ public class TestScript10_40 {
return null; return null;
org.hl7.fhir.r4.model.TestScript.SetupActionAssertComponent tgt = new org.hl7.fhir.r4.model.TestScript.SetupActionAssertComponent(); org.hl7.fhir.r4.model.TestScript.SetupActionAssertComponent tgt = new org.hl7.fhir.r4.model.TestScript.SetupActionAssertComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasLabel()) { if (src.hasLabelElement())
tgt.setLabel(src.getLabel()); tgt.setLabelElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getLabelElement()));
} if (src.hasDescriptionElement())
if (src.hasDescription()) { tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
tgt.setDescription(src.getDescription());
}
if (src.hasDirection()) { if (src.hasDirection()) {
tgt.setDirection(convertAssertionDirectionType(src.getDirection())); tgt.setDirection(convertAssertionDirectionType(src.getDirection()));
} }
if (src.hasCompareToSourceId()) { if (src.hasCompareToSourceIdElement())
tgt.setCompareToSourceId(src.getCompareToSourceId()); tgt.setCompareToSourceIdElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getCompareToSourceIdElement()));
} if (src.hasCompareToSourcePathElement())
if (src.hasCompareToSourcePath()) { tgt.setCompareToSourcePathElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getCompareToSourcePathElement()));
tgt.setCompareToSourcePath(src.getCompareToSourcePath());
}
if (src.hasContentType()) { if (src.hasContentType()) {
tgt.setContentType(convertContentType(src.getContentType())); tgt.setContentType(convertContentType(src.getContentType()));
} }
if (src.hasHeaderField()) { if (src.hasHeaderFieldElement())
tgt.setHeaderField(src.getHeaderField()); tgt.setHeaderFieldElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getHeaderFieldElement()));
} if (src.hasMinimumIdElement())
if (src.hasMinimumId()) { tgt.setMinimumIdElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getMinimumIdElement()));
tgt.setMinimumId(src.getMinimumId()); if (src.hasNavigationLinksElement())
} tgt.setNavigationLinksElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getNavigationLinksElement()));
if (src.hasNavigationLinks()) {
tgt.setNavigationLinks(src.getNavigationLinks());
}
if (src.hasOperator()) { if (src.hasOperator()) {
tgt.setOperator(convertAssertionOperatorType(src.getOperator())); tgt.setOperator(convertAssertionOperatorType(src.getOperator()));
} }
if (src.hasPath()) { if (src.hasPathElement())
tgt.setPath(src.getPath()); tgt.setPathElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getPathElement()));
} if (src.hasResourceElement())
if (src.hasResource()) { tgt.setResourceElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_10_40.convertType(src.getResourceElement()));
tgt.setResource(src.getResource());
}
if (src.hasResponse()) { if (src.hasResponse()) {
tgt.setResponse(convertAssertionResponseTypes(src.getResponse())); tgt.setResponse(convertAssertionResponseTypes(src.getResponse()));
} }
if (src.hasResponseCode()) { if (src.hasResponseCodeElement())
tgt.setResponseCode(src.getResponseCode()); tgt.setResponseCodeElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getResponseCodeElement()));
} if (src.hasSourceIdElement())
if (src.hasSourceId()) { tgt.setSourceIdElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_10_40.convertType(src.getSourceIdElement()));
tgt.setSourceId(src.getSourceId()); if (src.hasValidateProfileIdElement())
} tgt.setValidateProfileIdElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_10_40.convertType(src.getValidateProfileIdElement()));
if (src.hasValidateProfileId()) { if (src.hasValueElement())
tgt.setValidateProfileId(src.getValidateProfileId()); tgt.setValueElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getValueElement()));
} if (src.hasWarningOnlyElement())
if (src.hasValue()) { tgt.setWarningOnlyElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getWarningOnlyElement()));
tgt.setValue(src.getValue());
}
if (src.hasWarningOnly()) {
tgt.setWarningOnly(src.getWarningOnly());
}
return tgt; return tgt;
} }
@ -338,45 +315,36 @@ public class TestScript10_40 {
if (src.hasType()) { if (src.hasType()) {
tgt.setType(VersionConvertor_10_40.convertCoding(src.getType())); tgt.setType(VersionConvertor_10_40.convertCoding(src.getType()));
} }
if (src.hasResource()) { if (src.hasResourceElement())
tgt.setResource(src.getResource()); tgt.setResourceElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_40.convertType(src.getResourceElement()));
} if (src.hasLabelElement())
if (src.hasLabel()) { tgt.setLabelElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getLabelElement()));
tgt.setLabel(src.getLabel()); if (src.hasDescriptionElement())
} tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
if (src.hasDescription()) {
tgt.setDescription(src.getDescription());
}
if (src.hasAccept()) { if (src.hasAccept()) {
tgt.setAccept(convertContentType(src.getAccept())); tgt.setAccept(convertContentType(src.getAccept()));
} }
if (src.hasContentType()) { if (src.hasContentType()) {
tgt.setContentType(convertContentType(src.getContentType())); tgt.setContentType(convertContentType(src.getContentType()));
} }
if (src.hasDestination()) { if (src.hasDestinationElement())
tgt.setDestination(src.getDestination()); tgt.setDestinationElement((org.hl7.fhir.dstu2.model.IntegerType) VersionConvertor_10_40.convertType(src.getDestinationElement()));
} if (src.hasEncodeRequestUrlElement())
if (src.hasEncodeRequestUrl()) { tgt.setEncodeRequestUrlElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getEncodeRequestUrlElement()));
tgt.setEncodeRequestUrl(src.getEncodeRequestUrl()); if (src.hasParamsElement())
} tgt.setParamsElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getParamsElement()));
if (src.hasParams()) {
tgt.setParams(src.getParams());
}
if (src.hasRequestHeader()) { if (src.hasRequestHeader()) {
for (org.hl7.fhir.r4.model.TestScript.SetupActionOperationRequestHeaderComponent t : src.getRequestHeader()) tgt.addRequestHeader(convertSetupActionOperationRequestHeaderComponent(t)); for (org.hl7.fhir.r4.model.TestScript.SetupActionOperationRequestHeaderComponent t : src.getRequestHeader()) tgt.addRequestHeader(convertSetupActionOperationRequestHeaderComponent(t));
} }
if (src.hasResponseId()) { if (src.hasResponseIdElement())
tgt.setResponseId(src.getResponseId()); tgt.setResponseIdElement((org.hl7.fhir.dstu2.model.IdType) VersionConvertor_10_40.convertType(src.getResponseIdElement()));
} if (src.hasSourceIdElement())
if (src.hasSourceId()) { tgt.setSourceIdElement((org.hl7.fhir.dstu2.model.IdType) VersionConvertor_10_40.convertType(src.getSourceIdElement()));
tgt.setSourceId(src.getSourceId()); if (src.hasTargetIdElement()) {
} tgt.setTargetIdElement((IdType) VersionConvertor_10_40.convertType(src.getTargetIdElement()));
if (src.hasTargetId()) {
tgt.setTargetId(src.getTargetId());
}
if (src.hasUrl()) {
tgt.setUrl(src.getUrl());
} }
if (src.hasUrlElement())
tgt.setUrlElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getUrlElement()));
return tgt; return tgt;
} }
@ -388,45 +356,36 @@ public class TestScript10_40 {
if (src.hasType()) { if (src.hasType()) {
tgt.setType(VersionConvertor_10_40.convertCoding(src.getType())); tgt.setType(VersionConvertor_10_40.convertCoding(src.getType()));
} }
if (src.hasResource()) { if (src.hasResourceElement())
tgt.setResource(src.getResource()); tgt.setResourceElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_10_40.convertType(src.getResourceElement()));
} if (src.hasLabelElement())
if (src.hasLabel()) { tgt.setLabelElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getLabelElement()));
tgt.setLabel(src.getLabel()); if (src.hasDescriptionElement())
} tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
if (src.hasDescription()) {
tgt.setDescription(src.getDescription());
}
if (src.hasAccept()) { if (src.hasAccept()) {
tgt.setAccept(convertContentType(src.getAccept())); tgt.setAccept(convertContentType(src.getAccept()));
} }
if (src.hasContentType()) { if (src.hasContentType()) {
tgt.setContentType(convertContentType(src.getContentType())); tgt.setContentType(convertContentType(src.getContentType()));
} }
if (src.hasDestination()) { if (src.hasDestinationElement())
tgt.setDestination(src.getDestination()); tgt.setDestinationElement((org.hl7.fhir.r4.model.IntegerType) VersionConvertor_10_40.convertType(src.getDestinationElement()));
} if (src.hasEncodeRequestUrlElement())
if (src.hasEncodeRequestUrl()) { tgt.setEncodeRequestUrlElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getEncodeRequestUrlElement()));
tgt.setEncodeRequestUrl(src.getEncodeRequestUrl()); if (src.hasParamsElement())
} tgt.setParamsElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getParamsElement()));
if (src.hasParams()) {
tgt.setParams(src.getParams());
}
if (src.hasRequestHeader()) { if (src.hasRequestHeader()) {
for (org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionOperationRequestHeaderComponent t : src.getRequestHeader()) tgt.addRequestHeader(convertSetupActionOperationRequestHeaderComponent(t)); for (org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionOperationRequestHeaderComponent t : src.getRequestHeader()) tgt.addRequestHeader(convertSetupActionOperationRequestHeaderComponent(t));
} }
if (src.hasResponseId()) { if (src.hasResponseIdElement())
tgt.setResponseId(src.getResponseId()); tgt.setResponseIdElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_10_40.convertType(src.getResponseIdElement()));
} if (src.hasSourceIdElement())
if (src.hasSourceId()) { tgt.setSourceIdElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_10_40.convertType(src.getSourceIdElement()));
tgt.setSourceId(src.getSourceId()); if (src.hasTargetIdElement()) {
} tgt.setTargetIdElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_10_40.convertType(src.getTargetIdElement()));
if (src.hasTargetId()) {
tgt.setTargetId(src.getTargetId());
}
if (src.hasUrl()) {
tgt.setUrl(src.getUrl());
} }
if (src.hasUrlElement())
tgt.setUrlElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getUrlElement()));
return tgt; return tgt;
} }
@ -435,12 +394,10 @@ public class TestScript10_40 {
return null; return null;
org.hl7.fhir.r4.model.TestScript.SetupActionOperationRequestHeaderComponent tgt = new org.hl7.fhir.r4.model.TestScript.SetupActionOperationRequestHeaderComponent(); org.hl7.fhir.r4.model.TestScript.SetupActionOperationRequestHeaderComponent tgt = new org.hl7.fhir.r4.model.TestScript.SetupActionOperationRequestHeaderComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasField()) { if (src.hasFieldElement())
tgt.setField(src.getField()); tgt.setFieldElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getFieldElement()));
} if (src.hasValueElement())
if (src.hasValue()) { tgt.setValueElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getValueElement()));
tgt.setValue(src.getValue());
}
return tgt; return tgt;
} }
@ -449,12 +406,10 @@ public class TestScript10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionOperationRequestHeaderComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionOperationRequestHeaderComponent(); org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionOperationRequestHeaderComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptSetupActionOperationRequestHeaderComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasField()) { if (src.hasFieldElement())
tgt.setField(src.getField()); tgt.setFieldElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getFieldElement()));
} if (src.hasValueElement())
if (src.hasValue()) { tgt.setValueElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getValueElement()));
tgt.setValue(src.getValue());
}
return tgt; return tgt;
} }
@ -513,45 +468,39 @@ public class TestScript10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.TestScript tgt = new org.hl7.fhir.dstu2.model.TestScript(); org.hl7.fhir.dstu2.model.TestScript tgt = new org.hl7.fhir.dstu2.model.TestScript();
VersionConvertor_10_40.copyDomainResource(src, tgt); VersionConvertor_10_40.copyDomainResource(src, tgt);
if (src.hasUrl()) { if (src.hasUrlElement())
tgt.setUrl(src.getUrl()); tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement()));
} if (src.hasVersionElement())
if (src.hasVersion()) { tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement()));
tgt.setVersion(src.getVersion()); if (src.hasNameElement())
} tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
if (src.hasName()) {
tgt.setName(src.getName());
}
if (src.hasStatus()) { if (src.hasStatus()) {
tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus())); tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus()));
} }
if (src.hasIdentifier()) { if (src.hasIdentifier()) {
tgt.setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifier())); tgt.setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifier()));
} }
if (src.hasExperimental()) if (src.hasExperimentalElement())
tgt.setExperimental(src.getExperimental()); tgt.setExperimentalElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getExperimentalElement()));
if (src.hasPublisher()) { if (src.hasPublisherElement())
tgt.setPublisher(src.getPublisher()); tgt.setPublisherElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getPublisherElement()));
}
if (src.hasContact()) { if (src.hasContact()) {
for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(convertTestScriptContactComponent(t)); for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(convertTestScriptContactComponent(t));
} }
if (src.hasDate()) if (src.hasDateElement())
tgt.setDate(src.getDate()); tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement()));
if (src.hasDescription()) { if (src.hasDescriptionElement())
tgt.setDescription(src.getDescription()); tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
}
for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept())
tgt.addUseContext(VersionConvertor_10_40.convertCodeableConcept(t.getValueCodeableConcept())); tgt.addUseContext(VersionConvertor_10_40.convertCodeableConcept(t.getValueCodeableConcept()));
if (src.hasJurisdiction()) { if (src.hasJurisdiction()) {
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_10_40.convertCodeableConcept(t)); for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_10_40.convertCodeableConcept(t));
} }
if (src.hasPurpose()) { if (src.hasPurposeElement()) {
tgt.setRequirements(src.getPurpose()); tgt.setRequirementsElement((StringType) VersionConvertor_10_40.convertType(src.getPurposeElement()));
}
if (src.hasCopyright()) {
tgt.setCopyright(src.getCopyright());
} }
if (src.hasCopyrightElement())
tgt.setCopyrightElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getCopyrightElement()));
if (src.hasMetadata()) { if (src.hasMetadata()) {
tgt.setMetadata(convertTestScriptMetadataComponent(src.getMetadata())); tgt.setMetadata(convertTestScriptMetadataComponent(src.getMetadata()));
} }
@ -581,44 +530,38 @@ public class TestScript10_40 {
return null; return null;
org.hl7.fhir.r4.model.TestScript tgt = new org.hl7.fhir.r4.model.TestScript(); org.hl7.fhir.r4.model.TestScript tgt = new org.hl7.fhir.r4.model.TestScript();
VersionConvertor_10_40.copyDomainResource(src, tgt); VersionConvertor_10_40.copyDomainResource(src, tgt);
if (src.hasUrl()) { if (src.hasUrlElement())
tgt.setUrl(src.getUrl()); tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement()));
} if (src.hasVersionElement())
if (src.hasVersion()) { tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement()));
tgt.setVersion(src.getVersion()); if (src.hasNameElement())
} tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
if (src.hasName()) {
tgt.setName(src.getName());
}
if (src.hasStatus()) { if (src.hasStatus()) {
tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus())); tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus()));
} }
if (src.hasIdentifier()) { if (src.hasIdentifier()) {
tgt.setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifier())); tgt.setIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifier()));
} }
if (src.hasExperimental()) if (src.hasExperimentalElement())
tgt.setExperimental(src.getExperimental()); tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getExperimentalElement()));
if (src.hasPublisher()) { if (src.hasPublisherElement())
tgt.setPublisher(src.getPublisher()); tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getPublisherElement()));
}
if (src.hasContact()) { if (src.hasContact()) {
for (org.hl7.fhir.dstu2.model.TestScript.TestScriptContactComponent t : src.getContact()) tgt.addContact(convertTestScriptContactComponent(t)); for (org.hl7.fhir.dstu2.model.TestScript.TestScriptContactComponent t : src.getContact()) tgt.addContact(convertTestScriptContactComponent(t));
} }
if (src.hasDate()) if (src.hasDateElement())
tgt.setDate(src.getDate()); tgt.setDateElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement()));
if (src.hasDescription()) { if (src.hasDescriptionElement())
tgt.setDescription(src.getDescription()); tgt.setDescriptionElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
}
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_40.isJurisdiction(t)) for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_40.isJurisdiction(t))
tgt.addJurisdiction(VersionConvertor_10_40.convertCodeableConcept(t)); tgt.addJurisdiction(VersionConvertor_10_40.convertCodeableConcept(t));
else else
tgt.addUseContext(VersionConvertor_10_40.convertCodeableConceptToUsageContext(t)); tgt.addUseContext(VersionConvertor_10_40.convertCodeableConceptToUsageContext(t));
if (src.hasRequirements()) { if (src.hasRequirementsElement()) {
tgt.setPurpose(src.getRequirements()); tgt.setPurposeElement((MarkdownType) VersionConvertor_10_40.convertType(src.getRequirementsElement()));
}
if (src.hasCopyright()) {
tgt.setCopyright(src.getCopyright());
} }
if (src.hasCopyrightElement())
tgt.setCopyrightElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_10_40.convertType(src.getCopyrightElement()));
if (src.hasMetadata()) { if (src.hasMetadata()) {
tgt.setMetadata(convertTestScriptMetadataComponent(src.getMetadata())); tgt.setMetadata(convertTestScriptMetadataComponent(src.getMetadata()));
} }
@ -648,9 +591,8 @@ public class TestScript10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.TestScript.TestScriptContactComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptContactComponent(); org.hl7.fhir.dstu2.model.TestScript.TestScriptContactComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptContactComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
}
if (src.hasTelecom()) { if (src.hasTelecom()) {
for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t));
} }
@ -662,9 +604,8 @@ public class TestScript10_40 {
return null; return null;
org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
}
if (src.hasTelecom()) { if (src.hasTelecom()) {
for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t));
} }
@ -676,12 +617,10 @@ public class TestScript10_40 {
return null; return null;
org.hl7.fhir.r4.model.TestScript.TestScriptFixtureComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptFixtureComponent(); org.hl7.fhir.r4.model.TestScript.TestScriptFixtureComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptFixtureComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasAutocreate()) { if (src.hasAutocreateElement())
tgt.setAutocreate(src.getAutocreate()); tgt.setAutocreateElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getAutocreateElement()));
} if (src.hasAutodeleteElement())
if (src.hasAutodelete()) { tgt.setAutodeleteElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getAutodeleteElement()));
tgt.setAutodelete(src.getAutodelete());
}
if (src.hasResource()) { if (src.hasResource()) {
tgt.setResource(VersionConvertor_10_40.convertReference(src.getResource())); tgt.setResource(VersionConvertor_10_40.convertReference(src.getResource()));
} }
@ -693,12 +632,10 @@ public class TestScript10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.TestScript.TestScriptFixtureComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptFixtureComponent(); org.hl7.fhir.dstu2.model.TestScript.TestScriptFixtureComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptFixtureComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasAutocreate()) { if (src.hasAutocreateElement())
tgt.setAutocreate(src.getAutocreate()); tgt.setAutocreateElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getAutocreateElement()));
} if (src.hasAutodeleteElement())
if (src.hasAutodelete()) { tgt.setAutodeleteElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getAutodeleteElement()));
tgt.setAutodelete(src.getAutodelete());
}
if (src.hasResource()) { if (src.hasResource()) {
tgt.setResource(VersionConvertor_10_40.convertReference(src.getResource())); tgt.setResource(VersionConvertor_10_40.convertReference(src.getResource()));
} }
@ -710,18 +647,14 @@ public class TestScript10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.TestScript.TestScriptMetadataCapabilityComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptMetadataCapabilityComponent(); org.hl7.fhir.dstu2.model.TestScript.TestScriptMetadataCapabilityComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptMetadataCapabilityComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasRequired()) { if (src.hasRequiredElement())
tgt.setRequired(src.getRequired()); tgt.setRequiredElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getRequiredElement()));
} if (src.hasValidatedElement())
if (src.hasValidated()) { tgt.setValidatedElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getValidatedElement()));
tgt.setValidated(src.getValidated()); if (src.hasDescriptionElement())
} tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
if (src.hasDescription()) { if (src.hasDestinationElement())
tgt.setDescription(src.getDescription()); tgt.setDestinationElement((org.hl7.fhir.dstu2.model.IntegerType) VersionConvertor_10_40.convertType(src.getDestinationElement()));
}
if (src.hasDestination()) {
tgt.setDestination(src.getDestination());
}
if (src.hasLink()) { if (src.hasLink()) {
for (org.hl7.fhir.r4.model.UriType t : src.getLink()) tgt.addLink(t.getValue()); for (org.hl7.fhir.r4.model.UriType t : src.getLink()) tgt.addLink(t.getValue());
} }
@ -736,18 +669,14 @@ public class TestScript10_40 {
return null; return null;
org.hl7.fhir.r4.model.TestScript.TestScriptMetadataCapabilityComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptMetadataCapabilityComponent(); org.hl7.fhir.r4.model.TestScript.TestScriptMetadataCapabilityComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptMetadataCapabilityComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasRequired()) { if (src.hasRequiredElement())
tgt.setRequired(src.getRequired()); tgt.setRequiredElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getRequiredElement()));
} if (src.hasValidatedElement())
if (src.hasValidated()) { tgt.setValidatedElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getValidatedElement()));
tgt.setValidated(src.getValidated()); if (src.hasDescriptionElement())
} tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
if (src.hasDescription()) { if (src.hasDestinationElement())
tgt.setDescription(src.getDescription()); tgt.setDestinationElement((org.hl7.fhir.r4.model.IntegerType) VersionConvertor_10_40.convertType(src.getDestinationElement()));
}
if (src.hasDestination()) {
tgt.setDestination(src.getDestination());
}
if (src.hasLink()) { if (src.hasLink()) {
for (org.hl7.fhir.dstu2.model.UriType t : src.getLink()) tgt.addLink(t.getValue()); for (org.hl7.fhir.dstu2.model.UriType t : src.getLink()) tgt.addLink(t.getValue());
} }
@ -790,12 +719,10 @@ public class TestScript10_40 {
return null; return null;
org.hl7.fhir.r4.model.TestScript.TestScriptMetadataLinkComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptMetadataLinkComponent(); org.hl7.fhir.r4.model.TestScript.TestScriptMetadataLinkComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptMetadataLinkComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasUrl()) { if (src.hasUrlElement())
tgt.setUrl(src.getUrl()); tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement()));
} if (src.hasDescriptionElement())
if (src.hasDescription()) { tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
tgt.setDescription(src.getDescription());
}
return tgt; return tgt;
} }
@ -804,12 +731,10 @@ public class TestScript10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.TestScript.TestScriptMetadataLinkComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptMetadataLinkComponent(); org.hl7.fhir.dstu2.model.TestScript.TestScriptMetadataLinkComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptMetadataLinkComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasUrl()) { if (src.hasUrlElement())
tgt.setUrl(src.getUrl()); tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement()));
} if (src.hasDescriptionElement())
if (src.hasDescription()) { tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
tgt.setDescription(src.getDescription());
}
return tgt; return tgt;
} }
@ -862,12 +787,10 @@ public class TestScript10_40 {
return null; return null;
org.hl7.fhir.r4.model.TestScript.TestScriptTestComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptTestComponent(); org.hl7.fhir.r4.model.TestScript.TestScriptTestComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptTestComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
} if (src.hasDescriptionElement())
if (src.hasDescription()) { tgt.setDescriptionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
tgt.setDescription(src.getDescription());
}
if (src.hasAction()) { if (src.hasAction()) {
for (org.hl7.fhir.dstu2.model.TestScript.TestScriptTestActionComponent t : src.getAction()) tgt.addAction(convertTestActionComponent(t)); for (org.hl7.fhir.dstu2.model.TestScript.TestScriptTestActionComponent t : src.getAction()) tgt.addAction(convertTestActionComponent(t));
} }
@ -879,12 +802,10 @@ public class TestScript10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.TestScript.TestScriptTestComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptTestComponent(); org.hl7.fhir.dstu2.model.TestScript.TestScriptTestComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptTestComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
} if (src.hasDescriptionElement())
if (src.hasDescription()) { tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
tgt.setDescription(src.getDescription());
}
if (src.hasAction()) { if (src.hasAction()) {
for (org.hl7.fhir.r4.model.TestScript.TestActionComponent t : src.getAction()) tgt.addAction(convertTestActionComponent(t)); for (org.hl7.fhir.r4.model.TestScript.TestActionComponent t : src.getAction()) tgt.addAction(convertTestActionComponent(t));
} }
@ -896,18 +817,14 @@ public class TestScript10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.TestScript.TestScriptVariableComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptVariableComponent(); org.hl7.fhir.dstu2.model.TestScript.TestScriptVariableComponent tgt = new org.hl7.fhir.dstu2.model.TestScript.TestScriptVariableComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
} if (src.hasHeaderFieldElement())
if (src.hasHeaderField()) { tgt.setHeaderFieldElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getHeaderFieldElement()));
tgt.setHeaderField(src.getHeaderField()); if (src.hasPathElement())
} tgt.setPathElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getPathElement()));
if (src.hasPath()) { if (src.hasSourceIdElement())
tgt.setPath(src.getPath()); tgt.setSourceIdElement((org.hl7.fhir.dstu2.model.IdType) VersionConvertor_10_40.convertType(src.getSourceIdElement()));
}
if (src.hasSourceId()) {
tgt.setSourceId(src.getSourceId());
}
return tgt; return tgt;
} }
@ -916,18 +833,14 @@ public class TestScript10_40 {
return null; return null;
org.hl7.fhir.r4.model.TestScript.TestScriptVariableComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptVariableComponent(); org.hl7.fhir.r4.model.TestScript.TestScriptVariableComponent tgt = new org.hl7.fhir.r4.model.TestScript.TestScriptVariableComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
} if (src.hasHeaderFieldElement())
if (src.hasHeaderField()) { tgt.setHeaderFieldElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getHeaderFieldElement()));
tgt.setHeaderField(src.getHeaderField()); if (src.hasPathElement())
} tgt.setPathElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getPathElement()));
if (src.hasPath()) { if (src.hasSourceIdElement())
tgt.setPath(src.getPath()); tgt.setSourceIdElement((org.hl7.fhir.r4.model.IdType) VersionConvertor_10_40.convertType(src.getSourceIdElement()));
}
if (src.hasSourceId()) {
tgt.setSourceId(src.getSourceId());
}
return tgt; return tgt;
} }
} }

View File

@ -3,12 +3,12 @@ package org.hl7.fhir.convertors.conv10_40;
import org.hl7.fhir.convertors.VersionConvertorAdvisor40; import org.hl7.fhir.convertors.VersionConvertorAdvisor40;
import org.hl7.fhir.convertors.VersionConvertor_10_40; import org.hl7.fhir.convertors.VersionConvertor_10_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r4.model.BooleanType; import org.hl7.fhir.r4.model.*;
import org.hl7.fhir.r4.model.CodeSystem;
import org.hl7.fhir.r4.model.CodeSystem.CodeSystemContentMode; import org.hl7.fhir.r4.model.CodeSystem.CodeSystemContentMode;
import org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionComponent; import org.hl7.fhir.r4.model.CodeSystem.ConceptDefinitionComponent;
import org.hl7.fhir.r4.terminologies.CodeSystemUtilities; import org.hl7.fhir.r4.terminologies.CodeSystemUtilities;
import java.util.List; import java.util.List;
import java.util.Collections;
public class ValueSet10_40 { public class ValueSet10_40 {
@ -17,12 +17,10 @@ public class ValueSet10_40 {
return null; return null;
org.hl7.fhir.r4.model.ValueSet.ConceptReferenceComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ConceptReferenceComponent(); org.hl7.fhir.r4.model.ValueSet.ConceptReferenceComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ConceptReferenceComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasCode()) { if (src.hasCodeElement())
tgt.setCode(src.getCode()); tgt.setCodeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_10_40.convertType(src.getCodeElement()));
} if (src.hasDisplayElement())
if (src.hasDisplay()) { tgt.setDisplayElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDisplayElement()));
tgt.setDisplay(src.getDisplay());
}
if (src.hasDesignation()) { if (src.hasDesignation()) {
for (org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionDesignationComponent t : src.getDesignation()) tgt.addDesignation(convertConceptReferenceDesignationComponent(t)); for (org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionDesignationComponent t : src.getDesignation()) tgt.addDesignation(convertConceptReferenceDesignationComponent(t));
} }
@ -34,12 +32,10 @@ public class ValueSet10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.ValueSet.ConceptReferenceComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ConceptReferenceComponent(); org.hl7.fhir.dstu2.model.ValueSet.ConceptReferenceComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ConceptReferenceComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasCode()) { if (src.hasCodeElement())
tgt.setCode(src.getCode()); tgt.setCodeElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_40.convertType(src.getCodeElement()));
} if (src.hasDisplayElement())
if (src.hasDisplay()) { tgt.setDisplayElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDisplayElement()));
tgt.setDisplay(src.getDisplay());
}
if (src.hasDesignation()) { if (src.hasDesignation()) {
for (org.hl7.fhir.r4.model.ValueSet.ConceptReferenceDesignationComponent t : src.getDesignation()) tgt.addDesignation(convertConceptReferenceDesignationComponent(t)); for (org.hl7.fhir.r4.model.ValueSet.ConceptReferenceDesignationComponent t : src.getDesignation()) tgt.addDesignation(convertConceptReferenceDesignationComponent(t));
} }
@ -51,15 +47,13 @@ public class ValueSet10_40 {
return null; return null;
org.hl7.fhir.r4.model.ValueSet.ConceptReferenceDesignationComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ConceptReferenceDesignationComponent(); org.hl7.fhir.r4.model.ValueSet.ConceptReferenceDesignationComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ConceptReferenceDesignationComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasLanguage()) { if (src.hasLanguageElement())
tgt.setLanguage(src.getLanguage()); tgt.setLanguageElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_10_40.convertType(src.getLanguageElement()));
}
if (src.hasUse()) { if (src.hasUse()) {
tgt.setUse(VersionConvertor_10_40.convertCoding(src.getUse())); tgt.setUse(VersionConvertor_10_40.convertCoding(src.getUse()));
} }
if (src.hasValue()) { if (src.hasValueElement())
tgt.setValue(src.getValue()); tgt.setValueElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getValueElement()));
}
return tgt; return tgt;
} }
@ -68,15 +62,13 @@ public class ValueSet10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionDesignationComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionDesignationComponent(); org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionDesignationComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ConceptDefinitionDesignationComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasLanguage()) { if (src.hasLanguageElement())
tgt.setLanguage(src.getLanguage()); tgt.setLanguageElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_40.convertType(src.getLanguageElement()));
}
if (src.hasUse()) { if (src.hasUse()) {
tgt.setUse(VersionConvertor_10_40.convertCoding(src.getUse())); tgt.setUse(VersionConvertor_10_40.convertCoding(src.getUse()));
} }
if (src.hasValue()) { if (src.hasValueElement())
tgt.setValue(src.getValue()); tgt.setValueElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getValueElement()));
}
return tgt; return tgt;
} }
@ -85,12 +77,10 @@ public class ValueSet10_40 {
return null; return null;
org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent(); org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ConceptSetComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasSystem()) { if (src.hasSystemElement())
tgt.setSystem(src.getSystem()); tgt.setSystemElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_10_40.convertType(src.getSystemElement()));
} if (src.hasVersionElement())
if (src.hasVersion()) { tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement()));
tgt.setVersion(src.getVersion());
}
if (src.hasConcept()) { if (src.hasConcept()) {
for (org.hl7.fhir.dstu2.model.ValueSet.ConceptReferenceComponent t : src.getConcept()) tgt.addConcept(convertConceptReferenceComponent(t)); for (org.hl7.fhir.dstu2.model.ValueSet.ConceptReferenceComponent t : src.getConcept()) tgt.addConcept(convertConceptReferenceComponent(t));
} }
@ -105,12 +95,10 @@ public class ValueSet10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.ValueSet.ConceptSetComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ConceptSetComponent(); org.hl7.fhir.dstu2.model.ValueSet.ConceptSetComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ConceptSetComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasSystem()) { if (src.hasSystemElement())
tgt.setSystem(src.getSystem()); tgt.setSystemElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getSystemElement()));
} if (src.hasVersionElement())
if (src.hasVersion()) { tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement()));
tgt.setVersion(src.getVersion());
}
if (src.hasConcept()) { if (src.hasConcept()) {
for (org.hl7.fhir.r4.model.ValueSet.ConceptReferenceComponent t : src.getConcept()) tgt.addConcept(convertConceptReferenceComponent(t)); for (org.hl7.fhir.r4.model.ValueSet.ConceptReferenceComponent t : src.getConcept()) tgt.addConcept(convertConceptReferenceComponent(t));
} }
@ -125,15 +113,13 @@ public class ValueSet10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.ValueSet.ConceptSetFilterComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ConceptSetFilterComponent(); org.hl7.fhir.dstu2.model.ValueSet.ConceptSetFilterComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ConceptSetFilterComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasProperty()) { if (src.hasPropertyElement())
tgt.setProperty(src.getProperty()); tgt.setPropertyElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_40.convertType(src.getPropertyElement()));
}
if (src.hasOp()) { if (src.hasOp()) {
tgt.setOp(convertFilterOperator(src.getOp())); tgt.setOp(convertFilterOperator(src.getOp()));
} }
if (src.hasValue()) { if (src.hasValueElement())
tgt.setValue(src.getValue()); tgt.setValueElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_40.convertType(src.getValueElement()));
}
return tgt; return tgt;
} }
@ -142,15 +128,13 @@ public class ValueSet10_40 {
return null; return null;
org.hl7.fhir.r4.model.ValueSet.ConceptSetFilterComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ConceptSetFilterComponent(); org.hl7.fhir.r4.model.ValueSet.ConceptSetFilterComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ConceptSetFilterComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasProperty()) { if (src.hasPropertyElement())
tgt.setProperty(src.getProperty()); tgt.setPropertyElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_10_40.convertType(src.getPropertyElement()));
}
if (src.hasOp()) { if (src.hasOp()) {
tgt.setOp(convertFilterOperator(src.getOp())); tgt.setOp(convertFilterOperator(src.getOp()));
} }
if (src.hasValue()) { if (src.hasValueElement())
tgt.setValue(src.getValue()); tgt.setValueElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getValueElement()));
}
return tgt; return tgt;
} }
@ -205,55 +189,48 @@ public class ValueSet10_40 {
return null; return null;
org.hl7.fhir.r4.model.ValueSet tgt = new org.hl7.fhir.r4.model.ValueSet(); org.hl7.fhir.r4.model.ValueSet tgt = new org.hl7.fhir.r4.model.ValueSet();
VersionConvertor_10_40.copyDomainResource(src, tgt); VersionConvertor_10_40.copyDomainResource(src, tgt);
if (src.hasUrl()) { if (src.hasUrlElement())
tgt.setUrl(src.getUrl()); tgt.setUrlElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement()));
}
if (src.hasIdentifier()) { if (src.hasIdentifier()) {
tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifier())); tgt.addIdentifier(VersionConvertor_10_40.convertIdentifier(src.getIdentifier()));
} }
if (src.hasVersion()) { if (src.hasVersionElement())
tgt.setVersion(src.getVersion()); tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement()));
} if (src.hasNameElement())
if (src.hasName()) { tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
tgt.setName(src.getName());
}
if (src.hasStatus()) { if (src.hasStatus()) {
tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus())); tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus()));
} }
if (src.hasExperimental()) if (src.hasExperimentalElement())
tgt.setExperimental(src.getExperimental()); tgt.setExperimentalElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getExperimentalElement()));
if (src.hasPublisher()) { if (src.hasPublisherElement())
tgt.setPublisher(src.getPublisher()); tgt.setPublisherElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getPublisherElement()));
}
if (src.hasContact()) { if (src.hasContact()) {
for (org.hl7.fhir.dstu2.model.ValueSet.ValueSetContactComponent t : src.getContact()) tgt.addContact(convertValueSetContactComponent(t)); for (org.hl7.fhir.dstu2.model.ValueSet.ValueSetContactComponent t : src.getContact()) tgt.addContact(convertValueSetContactComponent(t));
} }
if (src.hasDate()) if (src.hasDateElement())
tgt.setDate(src.getDate()); tgt.setDateElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement()));
if (src.hasDescription()) { if (src.hasDescriptionElement())
tgt.setDescription(src.getDescription()); tgt.setDescriptionElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
}
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_40.isJurisdiction(t)) for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_40.isJurisdiction(t))
tgt.addJurisdiction(VersionConvertor_10_40.convertCodeableConcept(t)); tgt.addJurisdiction(VersionConvertor_10_40.convertCodeableConcept(t));
else else
tgt.addUseContext(VersionConvertor_10_40.convertCodeableConceptToUsageContext(t)); tgt.addUseContext(VersionConvertor_10_40.convertCodeableConceptToUsageContext(t));
if (src.hasImmutable()) { if (src.hasImmutableElement())
tgt.setImmutable(src.getImmutable()); tgt.setImmutableElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getImmutableElement()));
}
if (src.hasRequirements()) { if (src.hasRequirements()) {
tgt.setPurpose(src.getRequirements()); tgt.setPurpose(src.getRequirements());
} }
if (src.hasCopyright()) { if (src.hasCopyrightElement())
tgt.setCopyright(src.getCopyright()); tgt.setCopyrightElement((org.hl7.fhir.r4.model.MarkdownType) VersionConvertor_10_40.convertType(src.getCopyrightElement()));
}
if (src.hasExtensible()) if (src.hasExtensible())
tgt.addExtension("http://hl7.org/fhir/StructureDefinition/valueset-extensible", new BooleanType(src.getExtensible())); tgt.addExtension("http://hl7.org/fhir/StructureDefinition/valueset-extensible", new BooleanType(src.getExtensible()));
if (src.hasCompose()) { if (src.hasCompose()) {
if (src.hasCompose()) { if (src.hasCompose()) {
tgt.setCompose(convertValueSetComposeComponent(src.getCompose())); tgt.setCompose(convertValueSetComposeComponent(src.getCompose()));
} }
if (src.hasLockedDate()) { if (src.hasLockedDateElement()) {
tgt.getCompose().setLockedDate(src.getLockedDate()); tgt.getCompose().setLockedDateElement((DateType) VersionConvertor_10_40.convertType(src.getLockedDateElement()));
} }
} }
if (src.hasCodeSystem() && advisor != null) { if (src.hasCodeSystem() && advisor != null) {
@ -274,18 +251,18 @@ public class ValueSet10_40 {
if (src.hasStatus()) { if (src.hasStatus()) {
tgtcs.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus())); tgtcs.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus()));
} }
if (src.hasExperimental()) if (src.hasExperimentalElement())
tgtcs.setExperimental(src.getExperimental()); tgtcs.setExperimentalElement((BooleanType) VersionConvertor_10_40.convertType(src.getExperimentalElement()));
if (src.hasPublisher()) { if (src.hasPublisherElement()) {
tgtcs.setPublisher(src.getPublisher()); tgtcs.setPublisherElement((StringType) VersionConvertor_10_40.convertType(src.getPublisherElement()));
} }
if (src.hasContact()) { if (src.hasContact()) {
for (org.hl7.fhir.dstu2.model.ValueSet.ValueSetContactComponent t : src.getContact()) tgtcs.addContact(convertValueSetContactComponent(t)); for (org.hl7.fhir.dstu2.model.ValueSet.ValueSetContactComponent t : src.getContact()) tgtcs.addContact(convertValueSetContactComponent(t));
} }
if (src.hasDate()) if (src.hasDateElement())
tgtcs.setDate(src.getDate()); tgtcs.setDateElement((DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement()));
if (src.hasDescription()) { if (src.hasDescriptionElement()) {
tgtcs.setDescription(src.getDescription()); tgtcs.setDescriptionElement((MarkdownType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
} }
for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_40.isJurisdiction(t)) for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getUseContext()) if (VersionConvertor_10_40.isJurisdiction(t))
tgtcs.addJurisdiction(VersionConvertor_10_40.convertCodeableConcept(t)); tgtcs.addJurisdiction(VersionConvertor_10_40.convertCodeableConcept(t));
@ -319,24 +296,24 @@ public class ValueSet10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.ValueSet tgt = new org.hl7.fhir.dstu2.model.ValueSet(); org.hl7.fhir.dstu2.model.ValueSet tgt = new org.hl7.fhir.dstu2.model.ValueSet();
VersionConvertor_10_40.copyDomainResource(src, tgt); VersionConvertor_10_40.copyDomainResource(src, tgt);
tgt.setUrl(src.getUrl()); tgt.setUrlElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getUrlElement()));
for (org.hl7.fhir.r4.model.Identifier i : src.getIdentifier()) tgt.setIdentifier(VersionConvertor_10_40.convertIdentifier(i)); for (org.hl7.fhir.r4.model.Identifier i : src.getIdentifier()) tgt.setIdentifier(VersionConvertor_10_40.convertIdentifier(i));
tgt.setVersion(src.getVersion()); tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement()));
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus())); tgt.setStatus(VersionConvertor_10_40.convertConformanceResourceStatus(src.getStatus()));
if (src.hasExperimental()) if (src.hasExperimentalElement())
tgt.setExperimental(src.getExperimental()); tgt.setExperimentalElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getExperimentalElement()));
tgt.setPublisher(src.getPublisher()); tgt.setPublisherElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getPublisherElement()));
for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(convertValueSetContactComponent(t)); for (org.hl7.fhir.r4.model.ContactDetail t : src.getContact()) tgt.addContact(convertValueSetContactComponent(t));
if (src.hasDate()) if (src.hasDateElement())
tgt.setDate(src.getDate()); tgt.setDateElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getDateElement()));
tgt.setLockedDate(src.getCompose().getLockedDate()); tgt.setLockedDateElement((org.hl7.fhir.dstu2.model.DateType) VersionConvertor_10_40.convertType(src.getCompose().getLockedDateElement()));
tgt.setDescription(src.getDescription()); tgt.setDescriptionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDescriptionElement()));
for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept()) for (org.hl7.fhir.r4.model.UsageContext t : src.getUseContext()) if (t.hasValueCodeableConcept())
tgt.addUseContext(VersionConvertor_10_40.convertCodeableConcept(t.getValueCodeableConcept())); tgt.addUseContext(VersionConvertor_10_40.convertCodeableConcept(t.getValueCodeableConcept()));
for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_10_40.convertCodeableConcept(t)); for (org.hl7.fhir.r4.model.CodeableConcept t : src.getJurisdiction()) tgt.addUseContext(VersionConvertor_10_40.convertCodeableConcept(t));
tgt.setImmutable(src.getImmutable()); tgt.setImmutableElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getImmutableElement()));
tgt.setRequirements(src.getPurpose()); tgt.setRequirementsElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getPurposeElement()));
tgt.setCopyright(src.getCopyright()); tgt.setCopyright(src.getCopyright());
if (src.hasExtension("http://hl7.org/fhir/StructureDefinition/valueset-extensible")) if (src.hasExtension("http://hl7.org/fhir/StructureDefinition/valueset-extensible"))
tgt.setExtensible(((BooleanType) src.getExtensionByUrl("http://hl7.org/fhir/StructureDefinition/valueset-extensible").getValue()).booleanValue()); tgt.setExtensible(((BooleanType) src.getExtensionByUrl("http://hl7.org/fhir/StructureDefinition/valueset-extensible").getValue()).booleanValue());
@ -396,9 +373,8 @@ public class ValueSet10_40 {
return null; return null;
org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail(); org.hl7.fhir.r4.model.ContactDetail tgt = new org.hl7.fhir.r4.model.ContactDetail();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
}
if (src.hasTelecom()) { if (src.hasTelecom()) {
for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); for (org.hl7.fhir.dstu2.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t));
} }
@ -410,9 +386,8 @@ public class ValueSet10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.ValueSet.ValueSetContactComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ValueSetContactComponent(); org.hl7.fhir.dstu2.model.ValueSet.ValueSetContactComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ValueSetContactComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
}
if (src.hasTelecom()) { if (src.hasTelecom()) {
for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t)); for (org.hl7.fhir.r4.model.ContactPoint t : src.getTelecom()) tgt.addTelecom(VersionConvertor_10_40.convertContactPoint(t));
} }
@ -424,18 +399,14 @@ public class ValueSet10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionComponent(); org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasIdentifier()) { if (src.hasIdentifierElement())
tgt.setIdentifier(src.getIdentifier()); tgt.setIdentifierElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getIdentifierElement()));
} if (src.hasTimestampElement())
if (src.hasTimestamp()) { tgt.setTimestampElement((org.hl7.fhir.dstu2.model.DateTimeType) VersionConvertor_10_40.convertType(src.getTimestampElement()));
tgt.setTimestamp(src.getTimestamp()); if (src.hasTotalElement())
} tgt.setTotalElement((org.hl7.fhir.dstu2.model.IntegerType) VersionConvertor_10_40.convertType(src.getTotalElement()));
if (src.hasTotal()) { if (src.hasOffsetElement())
tgt.setTotal(src.getTotal()); tgt.setOffsetElement((org.hl7.fhir.dstu2.model.IntegerType) VersionConvertor_10_40.convertType(src.getOffsetElement()));
}
if (src.hasOffset()) {
tgt.setOffset(src.getOffset());
}
if (src.hasParameter()) { if (src.hasParameter()) {
for (org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent t : src.getParameter()) tgt.addParameter(convertValueSetExpansionParameterComponent(t)); for (org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent t : src.getParameter()) tgt.addParameter(convertValueSetExpansionParameterComponent(t));
} }
@ -450,18 +421,14 @@ public class ValueSet10_40 {
return null; return null;
org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionComponent(); org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasIdentifier()) { if (src.hasIdentifierElement())
tgt.setIdentifier(src.getIdentifier()); tgt.setIdentifierElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_10_40.convertType(src.getIdentifierElement()));
} if (src.hasTimestampElement())
if (src.hasTimestamp()) { tgt.setTimestampElement((org.hl7.fhir.r4.model.DateTimeType) VersionConvertor_10_40.convertType(src.getTimestampElement()));
tgt.setTimestamp(src.getTimestamp()); if (src.hasTotalElement())
} tgt.setTotalElement((org.hl7.fhir.r4.model.IntegerType) VersionConvertor_10_40.convertType(src.getTotalElement()));
if (src.hasTotal()) { if (src.hasOffsetElement())
tgt.setTotal(src.getTotal()); tgt.setOffsetElement((org.hl7.fhir.r4.model.IntegerType) VersionConvertor_10_40.convertType(src.getOffsetElement()));
}
if (src.hasOffset()) {
tgt.setOffset(src.getOffset());
}
if (src.hasParameter()) { if (src.hasParameter()) {
for (org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionParameterComponent t : src.getParameter()) tgt.addParameter(convertValueSetExpansionParameterComponent(t)); for (org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionParameterComponent t : src.getParameter()) tgt.addParameter(convertValueSetExpansionParameterComponent(t));
} }
@ -476,21 +443,16 @@ public class ValueSet10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionContainsComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionContainsComponent(); org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionContainsComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionContainsComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasSystem()) { if (src.hasSystemElement())
tgt.setSystem(src.getSystem()); tgt.setSystemElement((org.hl7.fhir.dstu2.model.UriType) VersionConvertor_10_40.convertType(src.getSystemElement()));
} if (src.hasAbstractElement())
if (src.hasAbstract()) { tgt.setAbstractElement((org.hl7.fhir.dstu2.model.BooleanType) VersionConvertor_10_40.convertType(src.getAbstractElement()));
tgt.setAbstract(src.getAbstract()); if (src.hasVersionElement())
} tgt.setVersionElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement()));
if (src.hasVersion()) { if (src.hasCodeElement())
tgt.setVersion(src.getVersion()); tgt.setCodeElement((org.hl7.fhir.dstu2.model.CodeType) VersionConvertor_10_40.convertType(src.getCodeElement()));
} if (src.hasDisplayElement())
if (src.hasCode()) { tgt.setDisplayElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getDisplayElement()));
tgt.setCode(src.getCode());
}
if (src.hasDisplay()) {
tgt.setDisplay(src.getDisplay());
}
if (src.hasContains()) { if (src.hasContains()) {
for (org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionContainsComponent t : src.getContains()) tgt.addContains(convertValueSetExpansionContainsComponent(t)); for (org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionContainsComponent t : src.getContains()) tgt.addContains(convertValueSetExpansionContainsComponent(t));
} }
@ -502,21 +464,16 @@ public class ValueSet10_40 {
return null; return null;
org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionContainsComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionContainsComponent(); org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionContainsComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionContainsComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasSystem()) { if (src.hasSystemElement())
tgt.setSystem(src.getSystem()); tgt.setSystemElement((org.hl7.fhir.r4.model.UriType) VersionConvertor_10_40.convertType(src.getSystemElement()));
} if (src.hasAbstractElement())
if (src.hasAbstract()) { tgt.setAbstractElement((org.hl7.fhir.r4.model.BooleanType) VersionConvertor_10_40.convertType(src.getAbstractElement()));
tgt.setAbstract(src.getAbstract()); if (src.hasVersionElement())
} tgt.setVersionElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getVersionElement()));
if (src.hasVersion()) { if (src.hasCodeElement())
tgt.setVersion(src.getVersion()); tgt.setCodeElement((org.hl7.fhir.r4.model.CodeType) VersionConvertor_10_40.convertType(src.getCodeElement()));
} if (src.hasDisplayElement())
if (src.hasCode()) { tgt.setDisplayElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getDisplayElement()));
tgt.setCode(src.getCode());
}
if (src.hasDisplay()) {
tgt.setDisplay(src.getDisplay());
}
if (src.hasContains()) { if (src.hasContains()) {
for (org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionContainsComponent t : src.getContains()) tgt.addContains(convertValueSetExpansionContainsComponent(t)); for (org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionContainsComponent t : src.getContains()) tgt.addContains(convertValueSetExpansionContainsComponent(t));
} }
@ -528,9 +485,8 @@ public class ValueSet10_40 {
return null; return null;
org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent(); org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent tgt = new org.hl7.fhir.r4.model.ValueSet.ValueSetExpansionParameterComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.r4.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
}
if (src.hasValue()) { if (src.hasValue()) {
tgt.setValue(VersionConvertor_10_40.convertType(src.getValue())); tgt.setValue(VersionConvertor_10_40.convertType(src.getValue()));
} }
@ -542,9 +498,8 @@ public class ValueSet10_40 {
return null; return null;
org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionParameterComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionParameterComponent(); org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionParameterComponent tgt = new org.hl7.fhir.dstu2.model.ValueSet.ValueSetExpansionParameterComponent();
VersionConvertor_10_40.copyElement(src, tgt); VersionConvertor_10_40.copyElement(src, tgt);
if (src.hasName()) { if (src.hasNameElement())
tgt.setName(src.getName()); tgt.setNameElement((org.hl7.fhir.dstu2.model.StringType) VersionConvertor_10_40.convertType(src.getNameElement()));
}
if (src.hasValue()) { if (src.hasValue()) {
tgt.setValue(VersionConvertor_10_40.convertType(src.getValue())); tgt.setValue(VersionConvertor_10_40.convertType(src.getValue()));
} }

View File

@ -47,8 +47,8 @@ public class Parser {
public static final String ELEMENT = "Element"; public static final String ELEMENT = "Element";
private static final String RESOURCE_FILE_FORMAT = "_%s"; //TODO fix private static final String RESOURCE_FILE_FORMAT = "_%s"; //TODO fix
private static final List<String> VERSION_FILES = Arrays.asList("10_30", "10_40", "10_50", "14_30", "14_40", "14_50", "30_40", "30_50", "40_50"); private static final List<String> VERSION_FILES = Arrays.asList("10_30", "10_40", "10_50", "14_30", "14_40", "14_50", "30_40", "30_50", "40_50");
private static final List<String> BASE_TYPES = Arrays.asList("Base64Binary", "Boolean", "Canonical", "Code", private static final List<String> BASE_TYPES = Arrays.asList("Base64Binary", "Boolean", "boolean", "Canonical", "Code",
"Enumeration", "Date", "DateType", "Decimal", "Id", "Instant", "Integer", "Integer64", "Enumeration", "Date", "DateTime", "DateType", "Decimal", "BigDecimal", "Id", "Instant", "Integer", "int", "Integer64",
"Markdown", "Oid", "PositiveInt", "String", "Time", "UnsignedInt", "Uri", "Url", "Markdown", "Oid", "PositiveInt", "String", "Time", "UnsignedInt", "Uri", "Url",
"Uuid", "XhtmlNode"); "Uuid", "XhtmlNode");
@ -92,22 +92,22 @@ public class Parser {
// VERSION_FILES.forEach(version -> { // VERSION_FILES.forEach(version -> {
String version = "10_30"; // String version = "10_40";
List<String> filenames = listAllJavaFilesInDirectory(new File("").getAbsolutePath() + "/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv" + version + "/"); // List<String> filenames = listAllJavaFilesInDirectory(new File("").getAbsolutePath() + "/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv" + version + "/");
System.out.println("Checking the following files:"); // System.out.println("Checking the following files:");
Collections.sort(filenames); // Collections.sort(filenames);
filenames.forEach(System.out::println); // filenames.forEach(System.out::println);
filenames.forEach(name -> { // filenames.forEach(name -> {
try { // try {
modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv" + version + "/", name, ".java", listOfPrimitiveTypes, version); // modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv" + version + "/", name, ".java", listOfPrimitiveTypes, version);
} catch (FileNotFoundException e) { // } catch (FileNotFoundException e) {
e.printStackTrace(); // e.printStackTrace();
} // }
}); // });
// }); // });
// //
try { try {
// modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/", "Subscription10_30", ".java", listOfPrimitiveTypes, "10_30"); modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/", "DataElement10_40", ".java", listOfPrimitiveTypes, "10_40");
// modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/", "AuditEvent10_30", ".java", listOfPrimitiveTypes, "10_30"); // modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/", "AuditEvent10_30", ".java", listOfPrimitiveTypes, "10_30");
// modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/", "Binary10_30", ".java", listOfPrimitiveTypes, "10_30"); // modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/", "Binary10_30", ".java", listOfPrimitiveTypes, "10_30");
// modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/", "Bundle10_30", ".java", listOfPrimitiveTypes, "10_30"); // modifyElementNotField("/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_30/", "Bundle10_30", ".java", listOfPrimitiveTypes, "10_30");