Temporary Support for MedicationStatement in R5 (going to be renamed again)

This commit is contained in:
Grahame Grieve 2023-01-31 07:22:33 +11:00
parent 2afe12051c
commit d859e0b4bd
4 changed files with 20 additions and 12 deletions

View File

@ -405,6 +405,8 @@ public class VersionConvertorResourceNameMapper {
return org.hl7.fhir.dstu3.model.MedicationRequest.class.getSimpleName(); return org.hl7.fhir.dstu3.model.MedicationRequest.class.getSimpleName();
case "MedicationUsage": case "MedicationUsage":
return org.hl7.fhir.dstu3.model.MedicationStatement.class.getSimpleName(); return org.hl7.fhir.dstu3.model.MedicationStatement.class.getSimpleName();
case "MedicationStatement":
return org.hl7.fhir.dstu3.model.MedicationStatement.class.getSimpleName();
case "MessageDefinition": case "MessageDefinition":
return org.hl7.fhir.dstu3.model.MessageDefinition.class.getSimpleName(); return org.hl7.fhir.dstu3.model.MessageDefinition.class.getSimpleName();
case "MessageHeader": case "MessageHeader":

View File

@ -53,9 +53,6 @@ public class DataRequirement40_50 {
private static String convertResourceName4to5(String name) { private static String convertResourceName4to5(String name) {
if (name == null) return null; if (name == null) return null;
if (name.equals("MedicationStatement")) {
return "MedicationUsage";
}
if (name.equals("DeviceUseStatement")) { if (name.equals("DeviceUseStatement")) {
return "DeviceUsage"; return "DeviceUsage";
} }
@ -64,9 +61,6 @@ public class DataRequirement40_50 {
private static String convertResourceName5to4(String name) { private static String convertResourceName5to4(String name) {
if (name == null) return null; if (name == null) return null;
if (name.equals("MedicationUsage")) {
return "MedicationStatement";
}
if (name.equals("DeviceUsage")) { if (name.equals("DeviceUsage")) {
return "DeviceUseStatement"; return "DeviceUseStatement";
} }

View File

@ -53,9 +53,6 @@ public class DataRequirement43_50 {
private static String convertResourceName4to5(String name) { private static String convertResourceName4to5(String name) {
if (name == null) return null; if (name == null) return null;
if (name.equals("MedicationStatement")) {
return "MedicationUsage";
}
if (name.equals("DeviceUseStatement")) { if (name.equals("DeviceUseStatement")) {
return "DeviceUsage"; return "DeviceUsage";
} }
@ -64,9 +61,6 @@ public class DataRequirement43_50 {
private static String convertResourceName5to4(String name) { private static String convertResourceName5to4(String name) {
if (name == null) return null; if (name == null) return null;
if (name.equals("MedicationUsage")) {
return "MedicationStatement";
}
if (name.equals("DeviceUsage")) { if (name.equals("DeviceUsage")) {
return "DeviceUseStatement"; return "DeviceUseStatement";
} }

View File

@ -2135,6 +2135,8 @@ The primary difference between a medicationusage and a medicationadministration
return MEDICATIONREQUEST; return MEDICATIONREQUEST;
if ("MedicationUsage".equals(codeString)) if ("MedicationUsage".equals(codeString))
return MEDICATIONUSAGE; return MEDICATIONUSAGE;
if ("MedicationStatement".equals(codeString))
return MEDICATIONUSAGE;
if ("MedicinalProductDefinition".equals(codeString)) if ("MedicinalProductDefinition".equals(codeString))
return MEDICINALPRODUCTDEFINITION; return MEDICINALPRODUCTDEFINITION;
if ("MessageDefinition".equals(codeString)) if ("MessageDefinition".equals(codeString))
@ -3116,6 +3118,8 @@ The primary difference between a medicationusage and a medicationadministration
return AllResourceTypes.MEDICATIONREQUEST; return AllResourceTypes.MEDICATIONREQUEST;
if ("MedicationUsage".equals(codeString)) if ("MedicationUsage".equals(codeString))
return AllResourceTypes.MEDICATIONUSAGE; return AllResourceTypes.MEDICATIONUSAGE;
if ("MedicationStatement".equals(codeString))
return AllResourceTypes.MEDICATIONUSAGE;
if ("MedicinalProductDefinition".equals(codeString)) if ("MedicinalProductDefinition".equals(codeString))
return AllResourceTypes.MEDICINALPRODUCTDEFINITION; return AllResourceTypes.MEDICINALPRODUCTDEFINITION;
if ("MessageDefinition".equals(codeString)) if ("MessageDefinition".equals(codeString))
@ -3442,6 +3446,8 @@ The primary difference between a medicationusage and a medicationadministration
return new Enumeration<AllResourceTypes>(this, AllResourceTypes.MEDICATIONREQUEST, code); return new Enumeration<AllResourceTypes>(this, AllResourceTypes.MEDICATIONREQUEST, code);
if ("MedicationUsage".equals(codeString)) if ("MedicationUsage".equals(codeString))
return new Enumeration<AllResourceTypes>(this, AllResourceTypes.MEDICATIONUSAGE, code); return new Enumeration<AllResourceTypes>(this, AllResourceTypes.MEDICATIONUSAGE, code);
if ("MedicationStatement".equals(codeString))
return new Enumeration<AllResourceTypes>(this, AllResourceTypes.MEDICATIONUSAGE, code);
if ("MedicinalProductDefinition".equals(codeString)) if ("MedicinalProductDefinition".equals(codeString))
return new Enumeration<AllResourceTypes>(this, AllResourceTypes.MEDICINALPRODUCTDEFINITION, code); return new Enumeration<AllResourceTypes>(this, AllResourceTypes.MEDICINALPRODUCTDEFINITION, code);
if ("MessageDefinition".equals(codeString)) if ("MessageDefinition".equals(codeString))
@ -10016,6 +10022,8 @@ The primary difference between a medicationusage and a medicationadministration
return MEDICATIONREQUEST; return MEDICATIONREQUEST;
if ("MedicationUsage".equals(codeString)) if ("MedicationUsage".equals(codeString))
return MEDICATIONUSAGE; return MEDICATIONUSAGE;
if ("MedicationStatement".equals(codeString))
return MEDICATIONUSAGE;
if ("MedicinalProductDefinition".equals(codeString)) if ("MedicinalProductDefinition".equals(codeString))
return MEDICINALPRODUCTDEFINITION; return MEDICINALPRODUCTDEFINITION;
if ("MessageDefinition".equals(codeString)) if ("MessageDefinition".equals(codeString))
@ -11419,6 +11427,8 @@ The primary difference between a medicationusage and a medicationadministration
return FHIRTypes.MEDICATIONREQUEST; return FHIRTypes.MEDICATIONREQUEST;
if ("MedicationUsage".equals(codeString)) if ("MedicationUsage".equals(codeString))
return FHIRTypes.MEDICATIONUSAGE; return FHIRTypes.MEDICATIONUSAGE;
if ("MedicationStatement".equals(codeString))
return FHIRTypes.MEDICATIONUSAGE;
if ("MedicinalProductDefinition".equals(codeString)) if ("MedicinalProductDefinition".equals(codeString))
return FHIRTypes.MEDICINALPRODUCTDEFINITION; return FHIRTypes.MEDICINALPRODUCTDEFINITION;
if ("MessageDefinition".equals(codeString)) if ("MessageDefinition".equals(codeString))
@ -11887,6 +11897,8 @@ The primary difference between a medicationusage and a medicationadministration
return new Enumeration<FHIRTypes>(this, FHIRTypes.MEDICATIONREQUEST, code); return new Enumeration<FHIRTypes>(this, FHIRTypes.MEDICATIONREQUEST, code);
if ("MedicationUsage".equals(codeString)) if ("MedicationUsage".equals(codeString))
return new Enumeration<FHIRTypes>(this, FHIRTypes.MEDICATIONUSAGE, code); return new Enumeration<FHIRTypes>(this, FHIRTypes.MEDICATIONUSAGE, code);
if ("MedicationStatement".equals(codeString))
return new Enumeration<FHIRTypes>(this, FHIRTypes.MEDICATIONUSAGE, code);
if ("MedicinalProductDefinition".equals(codeString)) if ("MedicinalProductDefinition".equals(codeString))
return new Enumeration<FHIRTypes>(this, FHIRTypes.MEDICINALPRODUCTDEFINITION, code); return new Enumeration<FHIRTypes>(this, FHIRTypes.MEDICINALPRODUCTDEFINITION, code);
if ("MessageDefinition".equals(codeString)) if ("MessageDefinition".equals(codeString))
@ -16282,6 +16294,8 @@ The primary difference between a medicationusage and a medicationadministration
return MEDICATIONREQUEST; return MEDICATIONREQUEST;
if ("MedicationUsage".equals(codeString)) if ("MedicationUsage".equals(codeString))
return MEDICATIONUSAGE; return MEDICATIONUSAGE;
if ("MedicationStatement".equals(codeString))
return MEDICATIONUSAGE;
if ("MedicinalProductDefinition".equals(codeString)) if ("MedicinalProductDefinition".equals(codeString))
return MEDICINALPRODUCTDEFINITION; return MEDICINALPRODUCTDEFINITION;
if ("MessageDefinition".equals(codeString)) if ("MessageDefinition".equals(codeString))
@ -17239,6 +17253,8 @@ The primary difference between a medicationusage and a medicationadministration
return ResourceTypeEnum.MEDICATIONREQUEST; return ResourceTypeEnum.MEDICATIONREQUEST;
if ("MedicationUsage".equals(codeString)) if ("MedicationUsage".equals(codeString))
return ResourceTypeEnum.MEDICATIONUSAGE; return ResourceTypeEnum.MEDICATIONUSAGE;
if ("MedicationStatement".equals(codeString))
return ResourceTypeEnum.MEDICATIONUSAGE;
if ("MedicinalProductDefinition".equals(codeString)) if ("MedicinalProductDefinition".equals(codeString))
return ResourceTypeEnum.MEDICINALPRODUCTDEFINITION; return ResourceTypeEnum.MEDICINALPRODUCTDEFINITION;
if ("MessageDefinition".equals(codeString)) if ("MessageDefinition".equals(codeString))
@ -17557,6 +17573,8 @@ The primary difference between a medicationusage and a medicationadministration
return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.MEDICATIONREQUEST, code); return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.MEDICATIONREQUEST, code);
if ("MedicationUsage".equals(codeString)) if ("MedicationUsage".equals(codeString))
return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.MEDICATIONUSAGE, code); return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.MEDICATIONUSAGE, code);
if ("MedicationStatement".equals(codeString))
return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.MEDICATIONUSAGE, code);
if ("MedicinalProductDefinition".equals(codeString)) if ("MedicinalProductDefinition".equals(codeString))
return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.MEDICINALPRODUCTDEFINITION, code); return new Enumeration<ResourceTypeEnum>(this, ResourceTypeEnum.MEDICINALPRODUCTDEFINITION, code);
if ("MessageDefinition".equals(codeString)) if ("MessageDefinition".equals(codeString))