WIP Mark places for change
This commit is contained in:
parent
8ba62413ff
commit
b87d450cb4
|
@ -82,6 +82,7 @@ public class Immunization30_40 {
|
||||||
if (src == null)
|
if (src == null)
|
||||||
return null;
|
return null;
|
||||||
org.hl7.fhir.dstu3.model.Immunization tgt = new org.hl7.fhir.dstu3.model.Immunization();
|
org.hl7.fhir.dstu3.model.Immunization tgt = new org.hl7.fhir.dstu3.model.Immunization();
|
||||||
|
//FIXME add ignore
|
||||||
ConversionContext30_40.INSTANCE.getVersionConvertor_30_40().copyDomainResource(src, tgt);
|
ConversionContext30_40.INSTANCE.getVersionConvertor_30_40().copyDomainResource(src, tgt);
|
||||||
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier())
|
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier())
|
||||||
tgt.addIdentifier(Identifier30_40.convertIdentifier(t));
|
tgt.addIdentifier(Identifier30_40.convertIdentifier(t));
|
||||||
|
|
|
@ -57,6 +57,7 @@ public class ActorDefinition30_50 {
|
||||||
throw new FHIRException("Error in logic: this basic resource is not an ActorDefinition");
|
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();
|
org.hl7.fhir.r5.model.ActorDefinition tgt = new org.hl7.fhir.r5.model.ActorDefinition();
|
||||||
|
//FIXME add ignore
|
||||||
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyDomainResource(src, tgt);
|
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyDomainResource(src, tgt);
|
||||||
|
|
||||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())
|
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())
|
||||||
|
|
|
@ -63,6 +63,7 @@ public class Requirements30_50 {
|
||||||
throw new FHIRException("Error in logic: this basic resource is not an Requirements");
|
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();
|
org.hl7.fhir.r5.model.Requirements tgt = new org.hl7.fhir.r5.model.Requirements();
|
||||||
|
//FIXME add ignore
|
||||||
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyDomainResource(src, tgt);
|
ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyDomainResource(src, tgt);
|
||||||
|
|
||||||
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())
|
for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier())
|
||||||
|
|
|
@ -59,6 +59,7 @@ public class ActorDefinition40_50 {
|
||||||
throw new FHIRException("Error in logic: this basic resource is not an ActorDefinition");
|
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();
|
org.hl7.fhir.r5.model.ActorDefinition tgt = new org.hl7.fhir.r5.model.ActorDefinition();
|
||||||
|
//FIXME add ignore
|
||||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyDomainResource(src, tgt);
|
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyDomainResource(src, tgt);
|
||||||
|
|
||||||
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier())
|
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier())
|
||||||
|
|
|
@ -65,6 +65,7 @@ public class Requirements40_50 {
|
||||||
throw new FHIRException("Error in logic: this basic resource is not an Requirements");
|
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();
|
org.hl7.fhir.r5.model.Requirements tgt = new org.hl7.fhir.r5.model.Requirements();
|
||||||
|
//FIXME add ignore
|
||||||
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyDomainResource(src, tgt);
|
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyDomainResource(src, tgt);
|
||||||
|
|
||||||
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier())
|
for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier())
|
||||||
|
|
|
@ -59,6 +59,7 @@ public class ActorDefinition43_50 {
|
||||||
throw new FHIRException("Error in logic: this basic resource is not an ActorDefinition");
|
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();
|
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);
|
||||||
|
|
||||||
for (org.hl7.fhir.r4b.model.Identifier t : src.getIdentifier())
|
for (org.hl7.fhir.r4b.model.Identifier t : src.getIdentifier())
|
||||||
|
|
|
@ -65,6 +65,7 @@ public class Requirements43_50 {
|
||||||
throw new FHIRException("Error in logic: this basic resource is not an Requirements");
|
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();
|
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);
|
||||||
|
|
||||||
for (org.hl7.fhir.r4b.model.Identifier t : src.getIdentifier())
|
for (org.hl7.fhir.r4b.model.Identifier t : src.getIdentifier())
|
||||||
|
|
|
@ -10,6 +10,8 @@ import org.hl7.fhir.convertors.conv43_50.datatypes43_50.special43_50.Meta43_50;
|
||||||
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.special43_50.Narrative43_50;
|
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.special43_50.Narrative43_50;
|
||||||
import org.hl7.fhir.exceptions.FHIRException;
|
import org.hl7.fhir.exceptions.FHIRException;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
public class Resource43_50 {
|
public class Resource43_50 {
|
||||||
|
|
||||||
public final BaseAdvisor_43_50 advisor;
|
public final BaseAdvisor_43_50 advisor;
|
||||||
|
@ -512,7 +514,7 @@ public class Resource43_50 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void copyDomainResource(org.hl7.fhir.r4b.model.DomainResource src, org.hl7.fhir.r5.model.DomainResource tgt) throws FHIRException {
|
public void copyDomainResource(org.hl7.fhir.r4b.model.DomainResource src, org.hl7.fhir.r5.model.DomainResource tgt, String ... ignoredExtensions) throws FHIRException {
|
||||||
copyResource(src, tgt);
|
copyResource(src, tgt);
|
||||||
if (src.hasText()) tgt.setText(Narrative43_50.convertNarrative(src.getText()));
|
if (src.hasText()) tgt.setText(Narrative43_50.convertNarrative(src.getText()));
|
||||||
src.getContained().stream()
|
src.getContained().stream()
|
||||||
|
@ -523,7 +525,7 @@ public class Resource43_50 {
|
||||||
org.hl7.fhir.r5.model.Extension convertExtension = new org.hl7.fhir.r5.model.Extension();
|
org.hl7.fhir.r5.model.Extension convertExtension = new org.hl7.fhir.r5.model.Extension();
|
||||||
advisor.handleExtension(ConversionContext43_50.INSTANCE.path(), extension, convertExtension);
|
advisor.handleExtension(ConversionContext43_50.INSTANCE.path(), extension, convertExtension);
|
||||||
tgt.addExtension(convertExtension);
|
tgt.addExtension(convertExtension);
|
||||||
} else if (!advisor.ignoreExtension(ConversionContext43_50.INSTANCE.path(), extension)) {
|
} else if (!advisor.ignoreExtension(ConversionContext43_50.INSTANCE.path(), extension) && !Arrays.asList(ignoredExtensions).contains(extension.getUrl())) {
|
||||||
tgt.addExtension(Extension43_50.convertExtension(extension));
|
tgt.addExtension(Extension43_50.convertExtension(extension));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -533,7 +535,7 @@ public class Resource43_50 {
|
||||||
.forEach(tgt::addModifierExtension);
|
.forEach(tgt::addModifierExtension);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void copyDomainResource(org.hl7.fhir.r5.model.DomainResource src, org.hl7.fhir.r4b.model.DomainResource tgt) throws FHIRException {
|
public void copyDomainResource(org.hl7.fhir.r5.model.DomainResource src, org.hl7.fhir.r4b.model.DomainResource tgt, String ... ignoredExtensions) throws FHIRException {
|
||||||
copyResource(src, tgt);
|
copyResource(src, tgt);
|
||||||
if (src.hasText()) tgt.setText(Narrative43_50.convertNarrative(src.getText()));
|
if (src.hasText()) tgt.setText(Narrative43_50.convertNarrative(src.getText()));
|
||||||
src.getContained().stream()
|
src.getContained().stream()
|
||||||
|
@ -544,7 +546,7 @@ public class Resource43_50 {
|
||||||
org.hl7.fhir.r4b.model.Extension convertExtension = new org.hl7.fhir.r4b.model.Extension();
|
org.hl7.fhir.r4b.model.Extension convertExtension = new org.hl7.fhir.r4b.model.Extension();
|
||||||
advisor.handleExtension(ConversionContext43_50.INSTANCE.path(), extension, convertExtension);
|
advisor.handleExtension(ConversionContext43_50.INSTANCE.path(), extension, convertExtension);
|
||||||
tgt.addExtension(convertExtension);
|
tgt.addExtension(convertExtension);
|
||||||
} else if (!advisor.ignoreExtension(ConversionContext43_50.INSTANCE.path(), extension)) {
|
} else if (!advisor.ignoreExtension(ConversionContext43_50.INSTANCE.path(), extension) && !Arrays.asList(ignoredExtensions).contains(extension.getUrl())) {
|
||||||
tgt.addExtension(Extension43_50.convertExtension(extension));
|
tgt.addExtension(Extension43_50.convertExtension(extension));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -9,11 +9,14 @@ 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.convertors.conv43_50.datatypes43_50.primitive43_50.*;
|
||||||
import org.hl7.fhir.r4b.model.SubscriptionTopic;
|
import org.hl7.fhir.r4b.model.SubscriptionTopic;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
public class SubscriptionTopic43_50 {
|
public class SubscriptionTopic43_50 {
|
||||||
|
|
||||||
|
private static final List<String> ignoredExtensionUrls = Arrays.asList("http://hl7.org/fhir/5.0/StructureDefinition/extension-TestScript.scope");
|
||||||
public static org.hl7.fhir.r4b.model.SubscriptionTopic convertSubscriptionTopic(org.hl7.fhir.r5.model.SubscriptionTopic src) {
|
public static org.hl7.fhir.r4b.model.SubscriptionTopic convertSubscriptionTopic(org.hl7.fhir.r5.model.SubscriptionTopic src) {
|
||||||
if (src == null)
|
if (src == null)
|
||||||
return null;
|
return null;
|
||||||
|
@ -243,6 +246,7 @@ public class SubscriptionTopic43_50 {
|
||||||
return null;
|
return null;
|
||||||
org.hl7.fhir.r5.model.SubscriptionTopic tgt = new org.hl7.fhir.r5.model.SubscriptionTopic();
|
org.hl7.fhir.r5.model.SubscriptionTopic tgt = new org.hl7.fhir.r5.model.SubscriptionTopic();
|
||||||
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyResource(src, tgt);
|
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyResource(src, tgt);
|
||||||
|
//FIXME add ignore
|
||||||
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyDomainResource(src, tgt);
|
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyDomainResource(src, tgt);
|
||||||
|
|
||||||
if (src.hasExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-SubscriptionTopic.name")) {
|
if (src.hasExtension("http://hl7.org/fhir/5.0/StructureDefinition/extension-SubscriptionTopic.name")) {
|
||||||
|
|
Loading…
Reference in New Issue