Move ignore extension logic in 43_50 convertors
This commit is contained in:
parent
b87d450cb4
commit
9b1d46f488
|
@ -27,12 +27,6 @@ public class BaseAdvisor_43_50 extends BaseAdvisor50<org.hl7.fhir.r4b.model.Exte
|
|||
final String lastPath = paths.get(paths.size() - 1);
|
||||
if ((lastPath.equals("TestScript")) && (TestScriptIgnoredUrls.contains(url))) {
|
||||
return true;
|
||||
} else if (lastPath.equals("Basic") && url.startsWith("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.")) {
|
||||
return true;
|
||||
} else if (lastPath.equals("Basic") && url.startsWith("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.")) {
|
||||
return true;
|
||||
} else if (lastPath.equals("SubscriptionTopic") && url.startsWith("http://hl7.org/fhir/5.0/StructureDefinition/extension-SubscriptionTopic.")) {
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
|
|
|
@ -108,13 +108,15 @@ public class VersionConvertor_43_50 {
|
|||
}
|
||||
|
||||
public void copyDomainResource(@Nonnull org.hl7.fhir.r4b.model.DomainResource src,
|
||||
@Nonnull org.hl7.fhir.r5.model.DomainResource tgt) throws FHIRException {
|
||||
resourceConvertor.copyDomainResource(src, tgt);
|
||||
@Nonnull org.hl7.fhir.r5.model.DomainResource tgt,
|
||||
String... extensionUrlToIgnore) throws FHIRException {
|
||||
resourceConvertor.copyDomainResource(src, tgt, extensionUrlToIgnore);
|
||||
}
|
||||
|
||||
public void copyDomainResource(@Nonnull org.hl7.fhir.r5.model.DomainResource src,
|
||||
@Nonnull org.hl7.fhir.r4b.model.DomainResource tgt) throws FHIRException {
|
||||
resourceConvertor.copyDomainResource(src, tgt);
|
||||
@Nonnull org.hl7.fhir.r4b.model.DomainResource tgt,
|
||||
String... extensionUrlToIgnore) throws FHIRException {
|
||||
resourceConvertor.copyDomainResource(src, tgt, extensionUrlToIgnore);
|
||||
}
|
||||
|
||||
public void copyElement(@Nonnull org.hl7.fhir.r4b.model.Element src,
|
||||
|
|
|
@ -52,6 +52,50 @@ import org.hl7.fhir.r5.model.UsageContext;
|
|||
// Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0
|
||||
public class ActorDefinition43_50 {
|
||||
|
||||
public static final String URL_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.url";
|
||||
public static final String VERSION_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.version";
|
||||
public static final String NAME_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.name";
|
||||
public static final String TITLE_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.title";
|
||||
public static final String STATUS_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.status";
|
||||
public static final String EXPERIMENTAL_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.experimental";
|
||||
public static final String DATE_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.date";
|
||||
public static final String PUBLISHER_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.publisher";
|
||||
public static final String CONTACT_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.contact";
|
||||
public static final String DESCRIPTION_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.description";
|
||||
public static final String USE_CONTEXT_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.useContext";
|
||||
public static final String JURISDICTION_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.jurisdiction";
|
||||
public static final String PURPOSE_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.purpose";
|
||||
public static final String COPYRIGHT_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.copyright";
|
||||
public static final String COPYRIGHT_LABEL_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.copyrightLabel";
|
||||
public static final String TYPE_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.type";
|
||||
public static final String DOCUMENTATION_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.documentation";
|
||||
public static final String REFERENCE_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.reference";
|
||||
public static final String CAPABILITIES_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.capabilities";
|
||||
public static final String DERIVED_FROM_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.derivedFrom";
|
||||
|
||||
private static final String[] IGNORED_EXTENSION_URLS = new String[]{
|
||||
URL_EXTENSION_URL,
|
||||
VERSION_EXTENSION_URL,
|
||||
NAME_EXTENSION_URL,
|
||||
TITLE_EXTENSION_URL,
|
||||
STATUS_EXTENSION_URL,
|
||||
EXPERIMENTAL_EXTENSION_URL,
|
||||
DATE_EXTENSION_URL,
|
||||
PUBLISHER_EXTENSION_URL,
|
||||
CONTACT_EXTENSION_URL,
|
||||
DESCRIPTION_EXTENSION_URL,
|
||||
USE_CONTEXT_EXTENSION_URL,
|
||||
JURISDICTION_EXTENSION_URL,
|
||||
PURPOSE_EXTENSION_URL,
|
||||
COPYRIGHT_EXTENSION_URL,
|
||||
COPYRIGHT_LABEL_EXTENSION_URL,
|
||||
TYPE_EXTENSION_URL,
|
||||
DOCUMENTATION_EXTENSION_URL,
|
||||
REFERENCE_EXTENSION_URL,
|
||||
CAPABILITIES_EXTENSION_URL,
|
||||
DERIVED_FROM_EXTENSION_URL
|
||||
};
|
||||
|
||||
public static org.hl7.fhir.r5.model.ActorDefinition convertActorDefinition(org.hl7.fhir.r4b.model.Basic src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
|
@ -59,70 +103,70 @@ public class ActorDefinition43_50 {
|
|||
throw new FHIRException("Error in logic: this basic resource is not an ActorDefinition");
|
||||
}
|
||||
org.hl7.fhir.r5.model.ActorDefinition tgt = new org.hl7.fhir.r5.model.ActorDefinition();
|
||||
//FIXME add ignore
|
||||
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyDomainResource(src, tgt);
|
||||
|
||||
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyDomainResource(src, tgt, IGNORED_EXTENSION_URLS);
|
||||
|
||||
for (org.hl7.fhir.r4b.model.Identifier t : src.getIdentifier())
|
||||
tgt.addIdentifier(Identifier43_50.convertIdentifier(t));
|
||||
|
||||
if (src.hasExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.url")) {
|
||||
tgt.setUrlElement(Uri43_50.convertUri((org.hl7.fhir.r4b.model.UriType) src.getExtensionByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.url").getValue()));
|
||||
if (src.hasExtension(URL_EXTENSION_URL)) {
|
||||
tgt.setUrlElement(Uri43_50.convertUri((org.hl7.fhir.r4b.model.UriType) src.getExtensionByUrl(URL_EXTENSION_URL).getValue()));
|
||||
}
|
||||
if (src.hasExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.version")) {
|
||||
tgt.setVersionElement(String43_50.convertString((org.hl7.fhir.r4b.model.StringType) src.getExtensionByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.version").getValue()));
|
||||
if (src.hasExtension(VERSION_EXTENSION_URL)) {
|
||||
tgt.setVersionElement(String43_50.convertString((org.hl7.fhir.r4b.model.StringType) src.getExtensionByUrl(VERSION_EXTENSION_URL).getValue()));
|
||||
}
|
||||
if (src.hasExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.name")) {
|
||||
tgt.setNameElement(String43_50.convertString((org.hl7.fhir.r4b.model.StringType) src.getExtensionByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.name").getValue()));
|
||||
if (src.hasExtension(NAME_EXTENSION_URL)) {
|
||||
tgt.setNameElement(String43_50.convertString((org.hl7.fhir.r4b.model.StringType) src.getExtensionByUrl(NAME_EXTENSION_URL).getValue()));
|
||||
}
|
||||
if (src.hasExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.title")) {
|
||||
tgt.setTitleElement(String43_50.convertString((org.hl7.fhir.r4b.model.StringType) src.getExtensionByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.title").getValue()));
|
||||
if (src.hasExtension(TITLE_EXTENSION_URL)) {
|
||||
tgt.setTitleElement(String43_50.convertString((org.hl7.fhir.r4b.model.StringType) src.getExtensionByUrl(TITLE_EXTENSION_URL).getValue()));
|
||||
}
|
||||
if (src.hasExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.status")) {
|
||||
tgt.setStatus(PublicationStatus.fromCode(src.getExtensionByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.status").getValue().primitiveValue()));
|
||||
if (src.hasExtension(STATUS_EXTENSION_URL)) {
|
||||
tgt.setStatus(PublicationStatus.fromCode(src.getExtensionByUrl(STATUS_EXTENSION_URL).getValue().primitiveValue()));
|
||||
}
|
||||
if (src.hasExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.experimental")) {
|
||||
tgt.setExperimentalElement(Boolean43_50.convertBoolean((org.hl7.fhir.r4b.model.BooleanType) src.getExtensionByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.experimental").getValue()));
|
||||
if (src.hasExtension(EXPERIMENTAL_EXTENSION_URL)) {
|
||||
tgt.setExperimentalElement(Boolean43_50.convertBoolean((org.hl7.fhir.r4b.model.BooleanType) src.getExtensionByUrl(EXPERIMENTAL_EXTENSION_URL).getValue()));
|
||||
}
|
||||
if (src.hasExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.date")) {
|
||||
tgt.setDateElement(DateTime43_50.convertDateTime((org.hl7.fhir.r4b.model.DateTimeType) src.getExtensionByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.date").getValue()));
|
||||
if (src.hasExtension(DATE_EXTENSION_URL)) {
|
||||
tgt.setDateElement(DateTime43_50.convertDateTime((org.hl7.fhir.r4b.model.DateTimeType) src.getExtensionByUrl(DATE_EXTENSION_URL).getValue()));
|
||||
}
|
||||
if (src.hasExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.publisher")) {
|
||||
tgt.setPublisherElement(String43_50.convertString((org.hl7.fhir.r4b.model.StringType) src.getExtensionByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.publisher").getValue()));
|
||||
if (src.hasExtension(PUBLISHER_EXTENSION_URL)) {
|
||||
tgt.setPublisherElement(String43_50.convertString((org.hl7.fhir.r4b.model.StringType) src.getExtensionByUrl(PUBLISHER_EXTENSION_URL).getValue()));
|
||||
}
|
||||
for (org.hl7.fhir.r4b.model.Extension ext : src.getExtensionsByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.contact")) {
|
||||
for (org.hl7.fhir.r4b.model.Extension ext : src.getExtensionsByUrl(CONTACT_EXTENSION_URL)) {
|
||||
tgt.addContact(ContactDetail43_50.convertContactDetail((org.hl7.fhir.r4b.model.ContactDetail) ext.getValue()));
|
||||
}
|
||||
if (src.hasExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.description")) {
|
||||
tgt.setPublisherElement(MarkDown43_50.convertMarkdown((org.hl7.fhir.r4b.model.MarkdownType) src.getExtensionByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.description").getValue()));
|
||||
if (src.hasExtension(DESCRIPTION_EXTENSION_URL)) {
|
||||
tgt.setPublisherElement(MarkDown43_50.convertMarkdown((org.hl7.fhir.r4b.model.MarkdownType) src.getExtensionByUrl(DESCRIPTION_EXTENSION_URL).getValue()));
|
||||
}
|
||||
for (org.hl7.fhir.r4b.model.Extension ext : src.getExtensionsByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.useContext")) {
|
||||
for (org.hl7.fhir.r4b.model.Extension ext : src.getExtensionsByUrl(USE_CONTEXT_EXTENSION_URL)) {
|
||||
tgt.addUseContext(UsageContext43_50.convertUsageContext((org.hl7.fhir.r4b.model.UsageContext) ext.getValue()));
|
||||
}
|
||||
for (org.hl7.fhir.r4b.model.Extension ext : src.getExtensionsByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.jurisdiction")) {
|
||||
for (org.hl7.fhir.r4b.model.Extension ext : src.getExtensionsByUrl(JURISDICTION_EXTENSION_URL)) {
|
||||
tgt.addJurisdiction(CodeableConcept43_50.convertCodeableConcept((org.hl7.fhir.r4b.model.CodeableConcept) ext.getValue()));
|
||||
}
|
||||
if (src.hasExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.purpose")) {
|
||||
tgt.setPurposeElement(MarkDown43_50.convertMarkdown((org.hl7.fhir.r4b.model.MarkdownType) src.getExtensionByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.purpose").getValue()));
|
||||
if (src.hasExtension(PURPOSE_EXTENSION_URL)) {
|
||||
tgt.setPurposeElement(MarkDown43_50.convertMarkdown((org.hl7.fhir.r4b.model.MarkdownType) src.getExtensionByUrl(PURPOSE_EXTENSION_URL).getValue()));
|
||||
}
|
||||
if (src.hasExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.copyright")) {
|
||||
tgt.setCopyrightElement(MarkDown43_50.convertMarkdown((org.hl7.fhir.r4b.model.MarkdownType) src.getExtensionByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.copyright").getValue()));
|
||||
if (src.hasExtension(COPYRIGHT_EXTENSION_URL)) {
|
||||
tgt.setCopyrightElement(MarkDown43_50.convertMarkdown((org.hl7.fhir.r4b.model.MarkdownType) src.getExtensionByUrl(COPYRIGHT_EXTENSION_URL).getValue()));
|
||||
}
|
||||
if (src.hasExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.copyrightLabel")) {
|
||||
tgt.setCopyrightLabelElement(String43_50.convertString((org.hl7.fhir.r4b.model.StringType) src.getExtensionByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.copyrightLabel").getValue()));
|
||||
if (src.hasExtension(COPYRIGHT_LABEL_EXTENSION_URL)) {
|
||||
tgt.setCopyrightLabelElement(String43_50.convertString((org.hl7.fhir.r4b.model.StringType) src.getExtensionByUrl(COPYRIGHT_LABEL_EXTENSION_URL).getValue()));
|
||||
}
|
||||
if (src.hasExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.type")) {
|
||||
tgt.setType(ExampleScenarioActorType.fromCode(src.getExtensionByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.type").getValue().primitiveValue()));
|
||||
if (src.hasExtension(TYPE_EXTENSION_URL)) {
|
||||
tgt.setType(ExampleScenarioActorType.fromCode(src.getExtensionByUrl(TYPE_EXTENSION_URL).getValue().primitiveValue()));
|
||||
}
|
||||
if (src.hasExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.documentation")) {
|
||||
tgt.setDocumentationElement(MarkDown43_50.convertMarkdown((org.hl7.fhir.r4b.model.MarkdownType) src.getExtensionByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.documentation").getValue()));
|
||||
if (src.hasExtension(DOCUMENTATION_EXTENSION_URL)) {
|
||||
tgt.setDocumentationElement(MarkDown43_50.convertMarkdown((org.hl7.fhir.r4b.model.MarkdownType) src.getExtensionByUrl(DOCUMENTATION_EXTENSION_URL).getValue()));
|
||||
}
|
||||
for (org.hl7.fhir.r4b.model.Extension ext : src.getExtensionsByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.reference")) {
|
||||
for (org.hl7.fhir.r4b.model.Extension ext : src.getExtensionsByUrl(REFERENCE_EXTENSION_URL)) {
|
||||
tgt.getReference().add(Url43_50.convertUrl((org.hl7.fhir.r4b.model.UrlType) ext.getValue()));
|
||||
}
|
||||
if (src.hasExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.capabilities")) {
|
||||
tgt.setCapabilitiesElement(Canonical43_50.convertCanonical((org.hl7.fhir.r4b.model.CanonicalType) src.getExtensionByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.capabilities").getValue()));
|
||||
if (src.hasExtension(CAPABILITIES_EXTENSION_URL)) {
|
||||
tgt.setCapabilitiesElement(Canonical43_50.convertCanonical((org.hl7.fhir.r4b.model.CanonicalType) src.getExtensionByUrl(CAPABILITIES_EXTENSION_URL).getValue()));
|
||||
}
|
||||
for (org.hl7.fhir.r4b.model.Extension ext : src.getExtensionsByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.derivedFrom")) {
|
||||
for (org.hl7.fhir.r4b.model.Extension ext : src.getExtensionsByUrl(DERIVED_FROM_EXTENSION_URL)) {
|
||||
tgt.getDerivedFrom().add(Canonical43_50.convertCanonical((org.hl7.fhir.r4b.model.CanonicalType) ext.getValue()));
|
||||
}
|
||||
return tgt;
|
||||
|
@ -138,64 +182,64 @@ public class ActorDefinition43_50 {
|
|||
for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier())
|
||||
tgt.addIdentifier(Identifier43_50.convertIdentifier(t));
|
||||
if (src.hasUrl()) {
|
||||
tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.url", Uri43_50.convertUri(src.getUrlElement()));
|
||||
tgt.addExtension(URL_EXTENSION_URL, Uri43_50.convertUri(src.getUrlElement()));
|
||||
}
|
||||
if (src.hasVersion()) {
|
||||
tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.version", String43_50.convertString(src.getVersionElement()));
|
||||
tgt.addExtension(VERSION_EXTENSION_URL, String43_50.convertString(src.getVersionElement()));
|
||||
}
|
||||
if (src.hasName()) {
|
||||
tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.name", String43_50.convertString(src.getNameElement()));
|
||||
tgt.addExtension(NAME_EXTENSION_URL, String43_50.convertString(src.getNameElement()));
|
||||
}
|
||||
if (src.hasTitle()) {
|
||||
tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.title", String43_50.convertString(src.getTitleElement()));
|
||||
tgt.addExtension(TITLE_EXTENSION_URL, String43_50.convertString(src.getTitleElement()));
|
||||
}
|
||||
if (src.hasStatus()) {
|
||||
tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.status", new org.hl7.fhir.r4b.model.CodeType(src.getStatus().toCode()));
|
||||
tgt.addExtension(STATUS_EXTENSION_URL, new org.hl7.fhir.r4b.model.CodeType(src.getStatus().toCode()));
|
||||
}
|
||||
if (src.hasExperimental()) {
|
||||
tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.experimental", Boolean43_50.convertBoolean(src.getExperimentalElement()));
|
||||
tgt.addExtension(EXPERIMENTAL_EXTENSION_URL, Boolean43_50.convertBoolean(src.getExperimentalElement()));
|
||||
}
|
||||
if (src.hasDate()) {
|
||||
tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.date", DateTime43_50.convertDateTime(src.getDateElement()));
|
||||
tgt.addExtension(DATE_EXTENSION_URL, DateTime43_50.convertDateTime(src.getDateElement()));
|
||||
}
|
||||
if (src.hasPublisher()) {
|
||||
tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.publisher", String43_50.convertString(src.getPublisherElement()));
|
||||
tgt.addExtension(PUBLISHER_EXTENSION_URL, String43_50.convertString(src.getPublisherElement()));
|
||||
}
|
||||
for (ContactDetail cd : src.getContact()) {
|
||||
tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.contact", ContactDetail43_50.convertContactDetail(cd));
|
||||
tgt.addExtension(CONTACT_EXTENSION_URL, ContactDetail43_50.convertContactDetail(cd));
|
||||
}
|
||||
if (src.hasDescription()) {
|
||||
tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.description", MarkDown43_50.convertMarkdown(src.getDescriptionElement()));
|
||||
tgt.addExtension(DESCRIPTION_EXTENSION_URL, MarkDown43_50.convertMarkdown(src.getDescriptionElement()));
|
||||
}
|
||||
for (UsageContext cd : src.getUseContext()) {
|
||||
tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.useContext", UsageContext43_50.convertUsageContext(cd));
|
||||
tgt.addExtension(USE_CONTEXT_EXTENSION_URL, UsageContext43_50.convertUsageContext(cd));
|
||||
}
|
||||
for (CodeableConcept cd : src.getJurisdiction()) {
|
||||
tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.jurisdiction", CodeableConcept43_50.convertCodeableConcept(cd));
|
||||
tgt.addExtension(JURISDICTION_EXTENSION_URL, CodeableConcept43_50.convertCodeableConcept(cd));
|
||||
}
|
||||
if (src.hasPurpose()) {
|
||||
tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.purpose", MarkDown43_50.convertMarkdown(src.getPurposeElement()));
|
||||
tgt.addExtension(PURPOSE_EXTENSION_URL, MarkDown43_50.convertMarkdown(src.getPurposeElement()));
|
||||
}
|
||||
if (src.hasCopyright()) {
|
||||
tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.copyright", MarkDown43_50.convertMarkdown(src.getCopyrightElement()));
|
||||
tgt.addExtension(COPYRIGHT_EXTENSION_URL, MarkDown43_50.convertMarkdown(src.getCopyrightElement()));
|
||||
}
|
||||
if (src.hasCopyrightLabel()) {
|
||||
tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.copyrightLabel", String43_50.convertString(src.getCopyrightLabelElement()));
|
||||
tgt.addExtension(COPYRIGHT_LABEL_EXTENSION_URL, String43_50.convertString(src.getCopyrightLabelElement()));
|
||||
}
|
||||
if (src.hasType()) {
|
||||
tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.type", new org.hl7.fhir.r4b.model.CodeType(src.getType().toCode()));
|
||||
tgt.addExtension(TYPE_EXTENSION_URL, new org.hl7.fhir.r4b.model.CodeType(src.getType().toCode()));
|
||||
}
|
||||
if (src.hasDocumentation()) {
|
||||
tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.documentation", MarkDown43_50.convertMarkdown(src.getDocumentationElement()));
|
||||
tgt.addExtension(DOCUMENTATION_EXTENSION_URL, MarkDown43_50.convertMarkdown(src.getDocumentationElement()));
|
||||
}
|
||||
for (UrlType ref : src.getReference()) {
|
||||
tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.reference", Url43_50.convertUrl(ref));
|
||||
tgt.addExtension(REFERENCE_EXTENSION_URL, Url43_50.convertUrl(ref));
|
||||
}
|
||||
if (src.hasCapabilities()) {
|
||||
tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.capabilities", Canonical43_50.convertCanonical(src.getCapabilitiesElement()));
|
||||
tgt.addExtension(CAPABILITIES_EXTENSION_URL, Canonical43_50.convertCanonical(src.getCapabilitiesElement()));
|
||||
}
|
||||
for (CanonicalType ct : src.getDerivedFrom()) {
|
||||
tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-ActorDefinition.derivedFrom", Canonical43_50.convertCanonical(ct));
|
||||
tgt.addExtension(DERIVED_FROM_EXTENSION_URL, Canonical43_50.convertCanonical(ct));
|
||||
}
|
||||
|
||||
return tgt;
|
||||
|
|
|
@ -58,6 +58,46 @@ import org.hl7.fhir.r5.model.UsageContext;
|
|||
// Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0
|
||||
public class Requirements43_50 {
|
||||
|
||||
public static final String URL_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.url";
|
||||
public static final String VERSION_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.version";
|
||||
public static final String NAME_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.name";
|
||||
public static final String TITLE_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.title";
|
||||
public static final String STATUS_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.status";
|
||||
public static final String EXPERIMENTAL_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.experimental";
|
||||
public static final String DATE_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.date";
|
||||
public static final String PUBLISHER_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.publisher";
|
||||
public static final String CONTACT_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.contact";
|
||||
public static final String DESCRIPTION_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.description";
|
||||
public static final String USE_CONTEXT_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.useContext";
|
||||
public static final String JURISDICTION_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.jurisdiction";
|
||||
public static final String PURPOSE_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.purpose";
|
||||
public static final String COPYRIGHT_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.copyright";
|
||||
public static final String COPYRIGHT_LABEL_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.copyrightLabel";
|
||||
public static final String DERIVED_FROM_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.derivedFrom";
|
||||
public static final String ACTOR_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.actor";
|
||||
public static final String REQUIREMENTS_STATEMENT_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.statement";
|
||||
|
||||
private static final String[] IGNORED_EXTENSION_URLS = new String[]{
|
||||
URL_EXTENSION_URL,
|
||||
VERSION_EXTENSION_URL,
|
||||
NAME_EXTENSION_URL,
|
||||
TITLE_EXTENSION_URL,
|
||||
STATUS_EXTENSION_URL,
|
||||
STATUS_EXTENSION_URL,
|
||||
EXPERIMENTAL_EXTENSION_URL,
|
||||
DATE_EXTENSION_URL,
|
||||
PUBLISHER_EXTENSION_URL,
|
||||
CONTACT_EXTENSION_URL,
|
||||
DESCRIPTION_EXTENSION_URL,
|
||||
USE_CONTEXT_EXTENSION_URL,
|
||||
JURISDICTION_EXTENSION_URL,
|
||||
PURPOSE_EXTENSION_URL,
|
||||
COPYRIGHT_EXTENSION_URL,
|
||||
COPYRIGHT_LABEL_EXTENSION_URL,
|
||||
DERIVED_FROM_EXTENSION_URL,
|
||||
ACTOR_EXTENSION_URL,
|
||||
REQUIREMENTS_STATEMENT_EXTENSION_URL
|
||||
};
|
||||
public static org.hl7.fhir.r5.model.Requirements convertRequirements(org.hl7.fhir.r4b.model.Basic src) throws FHIRException {
|
||||
if (src == null)
|
||||
return null;
|
||||
|
@ -65,64 +105,63 @@ public class Requirements43_50 {
|
|||
throw new FHIRException("Error in logic: this basic resource is not an Requirements");
|
||||
}
|
||||
org.hl7.fhir.r5.model.Requirements tgt = new org.hl7.fhir.r5.model.Requirements();
|
||||
//FIXME add ignore
|
||||
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyDomainResource(src, tgt);
|
||||
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyDomainResource(src, tgt, IGNORED_EXTENSION_URLS);
|
||||
|
||||
for (org.hl7.fhir.r4b.model.Identifier t : src.getIdentifier())
|
||||
tgt.addIdentifier(Identifier43_50.convertIdentifier(t));
|
||||
|
||||
if (src.hasExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.url")) {
|
||||
tgt.setUrlElement(Uri43_50.convertUri((org.hl7.fhir.r4b.model.UriType) src.getExtensionByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.url").getValue()));
|
||||
if (src.hasExtension(URL_EXTENSION_URL)) {
|
||||
tgt.setUrlElement(Uri43_50.convertUri((org.hl7.fhir.r4b.model.UriType) src.getExtensionByUrl(URL_EXTENSION_URL).getValue()));
|
||||
}
|
||||
if (src.hasExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.version")) {
|
||||
tgt.setVersionElement(String43_50.convertString((org.hl7.fhir.r4b.model.StringType) src.getExtensionByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.version").getValue()));
|
||||
if (src.hasExtension(VERSION_EXTENSION_URL)) {
|
||||
tgt.setVersionElement(String43_50.convertString((org.hl7.fhir.r4b.model.StringType) src.getExtensionByUrl(VERSION_EXTENSION_URL).getValue()));
|
||||
}
|
||||
if (src.hasExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.name")) {
|
||||
tgt.setNameElement(String43_50.convertString((org.hl7.fhir.r4b.model.StringType) src.getExtensionByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.name").getValue()));
|
||||
if (src.hasExtension(NAME_EXTENSION_URL)) {
|
||||
tgt.setNameElement(String43_50.convertString((org.hl7.fhir.r4b.model.StringType) src.getExtensionByUrl(NAME_EXTENSION_URL).getValue()));
|
||||
}
|
||||
if (src.hasExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.title")) {
|
||||
tgt.setTitleElement(String43_50.convertString((org.hl7.fhir.r4b.model.StringType) src.getExtensionByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.title").getValue()));
|
||||
if (src.hasExtension(TITLE_EXTENSION_URL)) {
|
||||
tgt.setTitleElement(String43_50.convertString((org.hl7.fhir.r4b.model.StringType) src.getExtensionByUrl(TITLE_EXTENSION_URL).getValue()));
|
||||
}
|
||||
if (src.hasExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.status")) {
|
||||
tgt.setStatus(PublicationStatus.fromCode(src.getExtensionByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.status").getValue().primitiveValue()));
|
||||
if (src.hasExtension(STATUS_EXTENSION_URL)) {
|
||||
tgt.setStatus(PublicationStatus.fromCode(src.getExtensionByUrl(STATUS_EXTENSION_URL).getValue().primitiveValue()));
|
||||
}
|
||||
if (src.hasExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.experimental")) {
|
||||
tgt.setExperimentalElement(Boolean43_50.convertBoolean((org.hl7.fhir.r4b.model.BooleanType) src.getExtensionByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.experimental").getValue()));
|
||||
if (src.hasExtension(EXPERIMENTAL_EXTENSION_URL)) {
|
||||
tgt.setExperimentalElement(Boolean43_50.convertBoolean((org.hl7.fhir.r4b.model.BooleanType) src.getExtensionByUrl(EXPERIMENTAL_EXTENSION_URL).getValue()));
|
||||
}
|
||||
if (src.hasExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.date")) {
|
||||
tgt.setDateElement(DateTime43_50.convertDateTime((org.hl7.fhir.r4b.model.DateTimeType) src.getExtensionByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.date").getValue()));
|
||||
if (src.hasExtension(DATE_EXTENSION_URL)) {
|
||||
tgt.setDateElement(DateTime43_50.convertDateTime((org.hl7.fhir.r4b.model.DateTimeType) src.getExtensionByUrl(DATE_EXTENSION_URL).getValue()));
|
||||
}
|
||||
if (src.hasExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.publisher")) {
|
||||
tgt.setPublisherElement(String43_50.convertString((org.hl7.fhir.r4b.model.StringType) src.getExtensionByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.publisher").getValue()));
|
||||
if (src.hasExtension(PUBLISHER_EXTENSION_URL)) {
|
||||
tgt.setPublisherElement(String43_50.convertString((org.hl7.fhir.r4b.model.StringType) src.getExtensionByUrl(PUBLISHER_EXTENSION_URL).getValue()));
|
||||
}
|
||||
for (org.hl7.fhir.r4b.model.Extension ext : src.getExtensionsByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.contact")) {
|
||||
for (org.hl7.fhir.r4b.model.Extension ext : src.getExtensionsByUrl(CONTACT_EXTENSION_URL)) {
|
||||
tgt.addContact(ContactDetail43_50.convertContactDetail((org.hl7.fhir.r4b.model.ContactDetail) ext.getValue()));
|
||||
}
|
||||
if (src.hasExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.description")) {
|
||||
tgt.setPublisherElement(MarkDown43_50.convertMarkdown((org.hl7.fhir.r4b.model.MarkdownType) src.getExtensionByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.description").getValue()));
|
||||
if (src.hasExtension(DESCRIPTION_EXTENSION_URL)) {
|
||||
tgt.setPublisherElement(MarkDown43_50.convertMarkdown((org.hl7.fhir.r4b.model.MarkdownType) src.getExtensionByUrl(DESCRIPTION_EXTENSION_URL).getValue()));
|
||||
}
|
||||
for (org.hl7.fhir.r4b.model.Extension ext : src.getExtensionsByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.useContext")) {
|
||||
for (org.hl7.fhir.r4b.model.Extension ext : src.getExtensionsByUrl(USE_CONTEXT_EXTENSION_URL)) {
|
||||
tgt.addUseContext(UsageContext43_50.convertUsageContext((org.hl7.fhir.r4b.model.UsageContext) ext.getValue()));
|
||||
}
|
||||
for (org.hl7.fhir.r4b.model.Extension ext : src.getExtensionsByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.jurisdiction")) {
|
||||
for (org.hl7.fhir.r4b.model.Extension ext : src.getExtensionsByUrl(JURISDICTION_EXTENSION_URL)) {
|
||||
tgt.addJurisdiction(CodeableConcept43_50.convertCodeableConcept((org.hl7.fhir.r4b.model.CodeableConcept) ext.getValue()));
|
||||
}
|
||||
if (src.hasExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.purpose")) {
|
||||
tgt.setPurposeElement(MarkDown43_50.convertMarkdown((org.hl7.fhir.r4b.model.MarkdownType) src.getExtensionByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.purpose").getValue()));
|
||||
if (src.hasExtension(PURPOSE_EXTENSION_URL)) {
|
||||
tgt.setPurposeElement(MarkDown43_50.convertMarkdown((org.hl7.fhir.r4b.model.MarkdownType) src.getExtensionByUrl(PURPOSE_EXTENSION_URL).getValue()));
|
||||
}
|
||||
if (src.hasExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.copyright")) {
|
||||
tgt.setCopyrightElement(MarkDown43_50.convertMarkdown((org.hl7.fhir.r4b.model.MarkdownType) src.getExtensionByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.copyright").getValue()));
|
||||
if (src.hasExtension(COPYRIGHT_EXTENSION_URL)) {
|
||||
tgt.setCopyrightElement(MarkDown43_50.convertMarkdown((org.hl7.fhir.r4b.model.MarkdownType) src.getExtensionByUrl(COPYRIGHT_EXTENSION_URL).getValue()));
|
||||
}
|
||||
if (src.hasExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.copyrightLabel")) {
|
||||
tgt.setCopyrightLabelElement(String43_50.convertString((org.hl7.fhir.r4b.model.StringType) src.getExtensionByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.copyrightLabel").getValue()));
|
||||
if (src.hasExtension(COPYRIGHT_LABEL_EXTENSION_URL)) {
|
||||
tgt.setCopyrightLabelElement(String43_50.convertString((org.hl7.fhir.r4b.model.StringType) src.getExtensionByUrl(COPYRIGHT_LABEL_EXTENSION_URL).getValue()));
|
||||
}
|
||||
for (org.hl7.fhir.r4b.model.Extension ext : src.getExtensionsByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.derivedFrom")) {
|
||||
for (org.hl7.fhir.r4b.model.Extension ext : src.getExtensionsByUrl(DERIVED_FROM_EXTENSION_URL)) {
|
||||
tgt.getDerivedFrom().add(Canonical43_50.convertCanonical((org.hl7.fhir.r4b.model.CanonicalType) ext.getValue()));
|
||||
}
|
||||
for (org.hl7.fhir.r4b.model.Extension ext : src.getExtensionsByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.actor")) {
|
||||
for (org.hl7.fhir.r4b.model.Extension ext : src.getExtensionsByUrl(ACTOR_EXTENSION_URL)) {
|
||||
tgt.getActor().add(Canonical43_50.convertCanonical((org.hl7.fhir.r4b.model.CanonicalType) ext.getValue()));
|
||||
}
|
||||
for (org.hl7.fhir.r4b.model.Extension ext : src.getExtensionsByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.statement")) {
|
||||
for (org.hl7.fhir.r4b.model.Extension ext : src.getExtensionsByUrl(REQUIREMENTS_STATEMENT_EXTENSION_URL)) {
|
||||
convertRequirementsStatement(ext, tgt.addStatement());
|
||||
}
|
||||
return tgt;
|
||||
|
@ -139,58 +178,58 @@ public class Requirements43_50 {
|
|||
for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier())
|
||||
tgt.addIdentifier(Identifier43_50.convertIdentifier(t));
|
||||
if (src.hasUrl()) {
|
||||
tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.url", Uri43_50.convertUri(src.getUrlElement()));
|
||||
tgt.addExtension(URL_EXTENSION_URL, Uri43_50.convertUri(src.getUrlElement()));
|
||||
}
|
||||
if (src.hasVersion()) {
|
||||
tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.version", String43_50.convertString(src.getVersionElement()));
|
||||
tgt.addExtension(VERSION_EXTENSION_URL, String43_50.convertString(src.getVersionElement()));
|
||||
}
|
||||
if (src.hasName()) {
|
||||
tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.name", String43_50.convertString(src.getNameElement()));
|
||||
tgt.addExtension(NAME_EXTENSION_URL, String43_50.convertString(src.getNameElement()));
|
||||
}
|
||||
if (src.hasTitle()) {
|
||||
tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.title", String43_50.convertString(src.getTitleElement()));
|
||||
tgt.addExtension(TITLE_EXTENSION_URL, String43_50.convertString(src.getTitleElement()));
|
||||
}
|
||||
if (src.hasStatus()) {
|
||||
tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.status", new org.hl7.fhir.r4b.model.CodeType(src.getStatus().toCode()));
|
||||
tgt.addExtension(STATUS_EXTENSION_URL, new org.hl7.fhir.r4b.model.CodeType(src.getStatus().toCode()));
|
||||
}
|
||||
if (src.hasExperimental()) {
|
||||
tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.experimental", Boolean43_50.convertBoolean(src.getExperimentalElement()));
|
||||
tgt.addExtension(EXPERIMENTAL_EXTENSION_URL, Boolean43_50.convertBoolean(src.getExperimentalElement()));
|
||||
}
|
||||
if (src.hasDate()) {
|
||||
tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.date", DateTime43_50.convertDateTime(src.getDateElement()));
|
||||
tgt.addExtension(DATE_EXTENSION_URL, DateTime43_50.convertDateTime(src.getDateElement()));
|
||||
}
|
||||
if (src.hasPublisher()) {
|
||||
tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.publisher", String43_50.convertString(src.getPublisherElement()));
|
||||
tgt.addExtension(PUBLISHER_EXTENSION_URL, String43_50.convertString(src.getPublisherElement()));
|
||||
}
|
||||
for (ContactDetail cd : src.getContact()) {
|
||||
tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.contact", ContactDetail43_50.convertContactDetail(cd));
|
||||
tgt.addExtension(CONTACT_EXTENSION_URL, ContactDetail43_50.convertContactDetail(cd));
|
||||
}
|
||||
if (src.hasDescription()) {
|
||||
tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.description", MarkDown43_50.convertMarkdown(src.getDescriptionElement()));
|
||||
tgt.addExtension(DESCRIPTION_EXTENSION_URL, MarkDown43_50.convertMarkdown(src.getDescriptionElement()));
|
||||
}
|
||||
for (UsageContext cd : src.getUseContext()) {
|
||||
tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.useContext", UsageContext43_50.convertUsageContext(cd));
|
||||
tgt.addExtension(USE_CONTEXT_EXTENSION_URL, UsageContext43_50.convertUsageContext(cd));
|
||||
}
|
||||
for (CodeableConcept cd : src.getJurisdiction()) {
|
||||
tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.jurisdiction", CodeableConcept43_50.convertCodeableConcept(cd));
|
||||
tgt.addExtension(JURISDICTION_EXTENSION_URL, CodeableConcept43_50.convertCodeableConcept(cd));
|
||||
}
|
||||
if (src.hasPurpose()) {
|
||||
tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.purpose", MarkDown43_50.convertMarkdown(src.getPurposeElement()));
|
||||
tgt.addExtension(PURPOSE_EXTENSION_URL, MarkDown43_50.convertMarkdown(src.getPurposeElement()));
|
||||
}
|
||||
if (src.hasCopyright()) {
|
||||
tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.copyright", MarkDown43_50.convertMarkdown(src.getCopyrightElement()));
|
||||
tgt.addExtension(COPYRIGHT_EXTENSION_URL, MarkDown43_50.convertMarkdown(src.getCopyrightElement()));
|
||||
}
|
||||
if (src.hasCopyrightLabel()) {
|
||||
tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.copyrightLabel", String43_50.convertString(src.getCopyrightLabelElement()));
|
||||
tgt.addExtension(COPYRIGHT_LABEL_EXTENSION_URL, String43_50.convertString(src.getCopyrightLabelElement()));
|
||||
}
|
||||
for (CanonicalType ref : src.getDerivedFrom()) {
|
||||
tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.derivedFrom", Canonical43_50.convertCanonical(ref));
|
||||
tgt.addExtension(DERIVED_FROM_EXTENSION_URL, Canonical43_50.convertCanonical(ref));
|
||||
}
|
||||
for (CanonicalType ref : src.getActor()) {
|
||||
tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.actor", Canonical43_50.convertCanonical(ref));
|
||||
tgt.addExtension(ACTOR_EXTENSION_URL, Canonical43_50.convertCanonical(ref));
|
||||
}
|
||||
for (RequirementsStatementComponent ref : src.getStatement()) {
|
||||
org.hl7.fhir.r4b.model.Extension tgte = new org.hl7.fhir.r4b.model.Extension("http://hl7.org/fhir/5.0/StructureDefinition/extension-Requirements.statement");
|
||||
org.hl7.fhir.r4b.model.Extension tgte = new org.hl7.fhir.r4b.model.Extension(REQUIREMENTS_STATEMENT_EXTENSION_URL);
|
||||
tgt.addExtension(tgte);
|
||||
convertRequirementsStatement(ref, tgte);
|
||||
}
|
||||
|
|
|
@ -9,14 +9,21 @@ import org.hl7.fhir.convertors.conv43_50.datatypes43_50.metadata43_50.UsageConte
|
|||
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.*;
|
||||
import org.hl7.fhir.r4b.model.SubscriptionTopic;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public class SubscriptionTopic43_50 {
|
||||
|
||||
private static final List<String> ignoredExtensionUrls = Arrays.asList("http://hl7.org/fhir/5.0/StructureDefinition/extension-TestScript.scope");
|
||||
|
||||
public static final String NAME_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-SubscriptionTopic.name";
|
||||
public static final String COPYRIGHT_LABEL_EXTENSION_URL = "http://hl7.org/fhir/5.0/StructureDefinition/extension-SubscriptionTopic.copyrightLabel";
|
||||
|
||||
private static final String[] IGNORED_EXTENSION_URLS = new String[]{
|
||||
NAME_EXTENSION_URL,
|
||||
COPYRIGHT_LABEL_EXTENSION_URL
|
||||
};
|
||||
|
||||
public static org.hl7.fhir.r4b.model.SubscriptionTopic convertSubscriptionTopic(org.hl7.fhir.r5.model.SubscriptionTopic src) {
|
||||
if (src == null)
|
||||
return null;
|
||||
|
@ -58,10 +65,10 @@ public class SubscriptionTopic43_50 {
|
|||
if (src.hasCopyright())
|
||||
tgt.setCopyrightElement(MarkDown43_50.convertMarkdown(src.getCopyrightElement()));
|
||||
if (src.hasCopyrightLabel()) {
|
||||
tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-SubscriptionTopic.copyrightLabel", String43_50.convertString(src.getCopyrightLabelElement()));
|
||||
tgt.addExtension(COPYRIGHT_LABEL_EXTENSION_URL, String43_50.convertString(src.getCopyrightLabelElement()));
|
||||
}
|
||||
if (src.hasName()) {
|
||||
tgt.addExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-SubscriptionTopic.name", String43_50.convertString(src.getNameElement()));
|
||||
tgt.addExtension(NAME_EXTENSION_URL, String43_50.convertString(src.getNameElement()));
|
||||
}
|
||||
if (src.hasApprovalDate())
|
||||
tgt.setApprovalDateElement(Date43_50.convertDate(src.getApprovalDateElement()));
|
||||
|
@ -246,14 +253,14 @@ public class SubscriptionTopic43_50 {
|
|||
return null;
|
||||
org.hl7.fhir.r5.model.SubscriptionTopic tgt = new org.hl7.fhir.r5.model.SubscriptionTopic();
|
||||
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyResource(src, tgt);
|
||||
//FIXME add ignore
|
||||
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyDomainResource(src, tgt);
|
||||
|
||||
if (src.hasExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-SubscriptionTopic.name")) {
|
||||
tgt.setNameElement(String43_50.convertString((org.hl7.fhir.r4b.model.StringType) src.getExtensionByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-SubscriptionTopic.name").getValue()));
|
||||
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyDomainResource(src, tgt, IGNORED_EXTENSION_URLS);
|
||||
|
||||
if (src.hasExtension(NAME_EXTENSION_URL)) {
|
||||
tgt.setNameElement(String43_50.convertString((org.hl7.fhir.r4b.model.StringType) src.getExtensionByUrl(NAME_EXTENSION_URL).getValue()));
|
||||
}
|
||||
if (src.hasExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-SubscriptionTopic.copyrightLabel")) {
|
||||
tgt.setCopyrightLabelElement(String43_50.convertString((org.hl7.fhir.r4b.model.StringType) src.getExtensionByUrl("http://hl7.org/fhir/5.0/StructureDefinition/extension-SubscriptionTopic.copyrightLabel").getValue()));
|
||||
if (src.hasExtension(COPYRIGHT_LABEL_EXTENSION_URL)) {
|
||||
tgt.setCopyrightLabelElement(String43_50.convertString((org.hl7.fhir.r4b.model.StringType) src.getExtensionByUrl(COPYRIGHT_LABEL_EXTENSION_URL).getValue()));
|
||||
}
|
||||
if (src.hasUrl())
|
||||
tgt.setUrlElement(Uri43_50.convertUri(src.getUrlElement()));
|
||||
|
|
Loading…
Reference in New Issue