From 7cf15f248d1770aeb225d6f3422781bc52af4991 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Wed, 1 Mar 2023 21:50:02 +1100 Subject: [PATCH] update version conversions for new version of R5 --- .../VersionConvertorResourceNameMapper.java | 8 +- .../ElementDefinition10_50.java | 8 +- .../resources10_50/Appointment10_50.java | 16 +- .../AppointmentResponse10_50.java | 22 +- .../resources10_50/CarePlan10_50.java | 264 +++++----- .../resources10_50/ConceptMap10_50.java | 34 +- .../resources10_50/Conformance10_50.java | 2 +- .../resources10_50/DetectedIssue10_50.java | 2 +- .../resources10_50/DeviceMetric10_50.java | 20 +- .../resources10_50/DiagnosticReport10_50.java | 2 +- .../resources10_50/DocumentManifest10_50.java | 26 - .../DocumentReference10_50.java | 14 +- .../resources10_50/Encounter10_50.java | 52 +- .../HealthcareService10_50.java | 2 +- .../conv10_50/resources10_50/List10_50.java | 4 +- .../resources10_50/Location10_50.java | 2 +- .../MedicationStatement10_50.java | 22 +- .../resources10_50/MessageHeader10_50.java | 22 +- .../resources10_50/Observation10_50.java | 2 +- .../OperationDefinition10_50.java | 8 +- .../resources10_50/Practitioner10_50.java | 7 +- .../resources10_50/Resource10_50.java | 4 +- .../resources10_50/Schedule10_50.java | 2 +- .../resources10_50/SearchParameter10_50.java | 11 +- .../resources10_50/Substance10_50.java | 2 +- .../resources10_50/TestScript10_50.java | 8 +- .../ElementDefinition14_50.java | 8 +- .../primitivetypes14_50/Id14_50.java | 16 + .../resources14_50/ConceptMap14_50.java | 34 +- .../resources14_50/Conformance14_50.java | 2 +- .../OperationDefinition14_50.java | 8 +- .../resources14_50/SearchParameter14_50.java | 11 +- .../resources14_50/StructureMap14_50.java | 2 +- .../convertors/conv30_50/Resource30_50.java | 4 +- .../ElementDefinition30_50.java | 10 +- .../primitivetypes30_50/Code30_50.java | 15 +- .../primitivetypes30_50/Id30_50.java | 15 + .../ActivityDefinition30_50.java | 8 +- .../resources30_50/Appointment30_50.java | 16 +- .../AppointmentResponse30_50.java | 18 +- .../resources30_50/BodySite30_50.java | 2 +- .../CapabilityStatement30_50.java | 2 +- .../resources30_50/CarePlan30_50.java | 432 ++++++++-------- .../resources30_50/ConceptMap30_50.java | 43 +- .../resources30_50/DetectedIssue30_50.java | 2 +- .../resources30_50/DiagnosticReport30_50.java | 2 +- .../resources30_50/DocumentManifest30_50.java | 26 - .../DocumentReference30_50.java | 14 +- .../resources30_50/Encounter30_50.java | 178 +++---- .../resources30_50/Endpoint30_50.java | 16 +- .../resources30_50/EpisodeOfCare30_50.java | 12 +- .../HealthcareService30_50.java | 2 +- .../resources30_50/ImagingStudy30_50.java | 12 +- .../resources30_50/Library30_50.java | 2 +- .../conv30_50/resources30_50/List30_50.java | 4 +- .../resources30_50/Location30_50.java | 2 +- .../resources30_50/Measure30_50.java | 10 +- .../MedicationAdministration30_50.java | 12 +- .../MedicationRequest30_50.java | 4 +- .../MedicationStatement30_50.java | 26 +- .../resources30_50/MessageHeader30_50.java | 23 +- .../resources30_50/Observation30_50.java | 2 +- .../OperationDefinition30_50.java | 8 +- .../resources30_50/PaymentNotice30_50.java | 6 +- .../resources30_50/PlanDefinition30_50.java | 6 +- .../resources30_50/Practitioner30_50.java | 7 +- .../resources30_50/Schedule30_50.java | 2 +- .../resources30_50/SearchParameter30_50.java | 65 +-- .../resources30_50/StructureMap30_50.java | 6 +- .../resources30_50/Substance30_50.java | 2 +- .../resources30_50/TestScript30_50.java | 8 +- .../metadata40_50/Expression40_50.java | 2 +- .../primitive40_50/Code40_50.java | 17 +- .../primitive40_50/Decimal40_50.java | 11 + .../primitive40_50/Id40_50.java | 30 ++ .../special40_50/ElementDefinition40_50.java | 9 +- .../resources40_50/Account40_50.java | 2 +- .../ActivityDefinition40_50.java | 8 +- .../resources40_50/Appointment40_50.java | 16 +- .../AppointmentResponse40_50.java | 18 +- .../resources40_50/BodyStructure40_50.java | 2 +- .../CapabilityStatement40_50.java | 2 +- .../resources40_50/CarePlan40_50.java | 480 +++++++++--------- .../resources40_50/ClaimResponse40_50.java | 12 +- .../resources40_50/ConceptMap40_50.java | 44 +- .../resources40_50/Consent40_50.java | 12 +- .../resources40_50/DetectedIssue40_50.java | 2 +- .../conv40_50/resources40_50/Device40_50.java | 24 +- .../resources40_50/DeviceDefinition40_50.java | 8 +- .../resources40_50/DeviceMetric40_50.java | 22 +- .../resources40_50/DeviceRequest40_50.java | 14 +- .../resources40_50/DiagnosticReport40_50.java | 2 +- .../resources40_50/DocumentManifest40_50.java | 124 ----- .../resources40_50/Encounter40_50.java | 195 +++---- .../resources40_50/Endpoint40_50.java | 17 +- .../resources40_50/Enumerations40_50.java | 36 +- .../resources40_50/EpisodeOfCare40_50.java | 18 +- .../resources40_50/EventDefinition40_50.java | 2 +- .../ExplanationOfBenefit40_50.java | 12 +- .../resources40_50/GuidanceResponse40_50.java | 11 +- .../HealthcareService40_50.java | 2 +- .../resources40_50/ImagingStudy40_50.java | 8 +- .../ImmunizationEvaluation40_50.java | 2 +- .../ImmunizationRecommendation40_50.java | 2 +- .../resources40_50/Library40_50.java | 2 +- .../resources40_50/ListResource40_50.java | 4 +- .../resources40_50/Location40_50.java | 2 +- .../resources40_50/Measure40_50.java | 16 +- .../resources40_50/Medication40_50.java | 8 +- .../MedicationAdministration40_50.java | 12 +- .../MedicationRequest40_50.java | 4 +- .../MedicationStatement40_50.java | 30 +- .../resources40_50/MessageHeader40_50.java | 22 +- .../resources40_50/NutritionOrder40_50.java | 2 +- .../resources40_50/Observation40_50.java | 2 +- .../OperationDefinition40_50.java | 8 +- .../resources40_50/PaymentNotice40_50.java | 6 +- .../resources40_50/PlanDefinition40_50.java | 6 +- .../resources40_50/Practitioner40_50.java | 7 +- .../resources40_50/Resource40_50.java | 12 +- .../resources40_50/Schedule40_50.java | 2 +- .../resources40_50/SearchParameter40_50.java | 69 +-- .../resources40_50/ServiceRequest40_50.java | 25 +- .../SpecimenDefinition40_50.java | 8 +- .../resources40_50/StructureMap40_50.java | 6 +- .../resources40_50/Substance40_50.java | 2 +- .../TerminologyCapabilities40_50.java | 4 +- .../resources40_50/TestScript40_50.java | 8 +- .../metadata43_50/Expression43_50.java | 2 +- .../primitive43_50/Code43_50.java | 18 +- .../primitive43_50/Decimal43_50.java | 14 + .../primitive43_50/Id43_50.java | 26 + .../special43_50/ElementDefinition43_50.java | 10 +- .../resources43_50/Account43_50.java | 2 +- .../ActivityDefinition43_50.java | 8 +- .../resources43_50/Appointment43_50.java | 16 +- .../AppointmentResponse43_50.java | 18 +- .../resources43_50/BodyStructure43_50.java | 2 +- .../CapabilityStatement43_50.java | 2 +- .../resources43_50/CarePlan43_50.java | 478 ++++++++--------- .../resources43_50/ClaimResponse43_50.java | 12 +- .../resources43_50/ConceptMap43_50.java | 42 +- .../resources43_50/Consent43_50.java | 12 +- .../resources43_50/DetectedIssue43_50.java | 2 +- .../conv43_50/resources43_50/Device43_50.java | 24 +- .../resources43_50/DeviceDefinition43_50.java | 8 +- .../resources43_50/DeviceMetric43_50.java | 22 +- .../resources43_50/DeviceRequest43_50.java | 14 +- .../resources43_50/DiagnosticReport43_50.java | 2 +- .../resources43_50/DocumentManifest43_50.java | 124 ----- .../resources43_50/Encounter43_50.java | 197 +++---- .../resources43_50/Endpoint43_50.java | 16 +- .../resources43_50/Enumerations43_50.java | 28 +- .../resources43_50/EpisodeOfCare43_50.java | 18 +- .../resources43_50/EventDefinition43_50.java | 2 +- .../ExplanationOfBenefit43_50.java | 12 +- .../resources43_50/GuidanceResponse43_50.java | 10 +- .../HealthcareService43_50.java | 2 +- .../resources43_50/ImagingStudy43_50.java | 8 +- .../ImmunizationEvaluation43_50.java | 2 +- .../ImmunizationRecommendation43_50.java | 2 +- .../resources43_50/Library43_50.java | 2 +- .../resources43_50/ListResource43_50.java | 4 +- .../resources43_50/Location43_50.java | 2 +- .../resources43_50/Measure43_50.java | 16 +- .../resources43_50/Medication43_50.java | 8 +- .../MedicationAdministration43_50.java | 12 +- .../MedicationRequest43_50.java | 4 +- .../MedicationStatement43_50.java | 30 +- .../resources43_50/MessageHeader43_50.java | 20 +- .../resources43_50/NutritionOrder43_50.java | 2 +- .../resources43_50/Observation43_50.java | 2 +- .../OperationDefinition43_50.java | 7 +- .../resources43_50/PaymentNotice43_50.java | 6 +- .../resources43_50/PlanDefinition43_50.java | 6 +- .../resources43_50/Practitioner43_50.java | 7 +- .../resources43_50/Resource43_50.java | 12 +- .../resources43_50/Schedule43_50.java | 2 +- .../resources43_50/SearchParameter43_50.java | 69 +-- .../resources43_50/ServiceRequest43_50.java | 24 +- .../SpecimenDefinition43_50.java | 8 +- .../resources43_50/StructureMap43_50.java | 6 +- .../resources43_50/Substance43_50.java | 2 +- .../TerminologyCapabilities43_50.java | 4 +- .../resources43_50/TestScript43_50.java | 8 +- .../src/test/resources/test_script_r5.json | 2 +- .../hl7/fhir/validation/ValidationEngine.java | 7 + .../tests/SnapShotGenerationXTests.java | 3 + .../txCache/org.hl7.fhir.r5/lang.cache | 23 + .../txCache/org.hl7.fhir.r5/mimetypes.cache | 5 + .../toolsCodeSystemobligation.cache | 31 ++ .../txCache/org.hl7.fhir.r5/ucum.cache | 5 + .../5.0.0/all-systems.cache | 94 ++++ .../5.0.0/animal-genderstatus.cache | 11 + .../5.0.0/animal-species.cache | 12 + .../org.hl7.fhir.validation/5.0.0/lang.cache | 40 ++ .../org.hl7.fhir.validation/5.0.0/loinc.cache | 107 ++++ .../5.0.0/snomed.cache | 137 +++++ .../org.hl7.fhir.validation/5.0.0/ucum.cache | 30 ++ 199 files changed, 2719 insertions(+), 2310 deletions(-) delete mode 100644 org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/DocumentManifest10_50.java delete mode 100644 org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/DocumentManifest30_50.java delete mode 100644 org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/DocumentManifest40_50.java delete mode 100644 org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/DocumentManifest43_50.java create mode 100644 org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.r5/toolsCodeSystemobligation.cache create mode 100644 org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/5.0.0/animal-genderstatus.cache create mode 100644 org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/5.0.0/animal-species.cache diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/VersionConvertorResourceNameMapper.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/VersionConvertorResourceNameMapper.java index 776c2b684..846e494a1 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/VersionConvertorResourceNameMapper.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/VersionConvertorResourceNameMapper.java @@ -85,8 +85,8 @@ public class VersionConvertorResourceNameMapper { return org.hl7.fhir.r5.model.DeviceUsage.class.getSimpleName(); case "DiagnosticReport": return org.hl7.fhir.r5.model.DiagnosticReport.class.getSimpleName(); - case "DocumentManifest": - return org.hl7.fhir.r5.model.DocumentManifest.class.getSimpleName(); +// case "DocumentManifest": +// return org.hl7.fhir.r5.model.DocumentManifest.class.getSimpleName(); case "DocumentReference": return org.hl7.fhir.r5.model.DocumentReference.class.getSimpleName(); case "Encounter": @@ -150,7 +150,7 @@ public class VersionConvertorResourceNameMapper { case "MedicationRequest": return org.hl7.fhir.r5.model.MedicationRequest.class.getSimpleName(); case "MedicationStatement": - return org.hl7.fhir.r5.model.MedicationUsage.class.getSimpleName(); + return org.hl7.fhir.r5.model.MedicationStatement.class.getSimpleName(); case "MessageDefinition": return org.hl7.fhir.r5.model.MessageDefinition.class.getSimpleName(); case "MessageHeader": @@ -403,8 +403,6 @@ public class VersionConvertorResourceNameMapper { return null; case "MedicationRequest": return org.hl7.fhir.dstu3.model.MedicationRequest.class.getSimpleName(); - case "MedicationUsage": - return org.hl7.fhir.dstu3.model.MedicationStatement.class.getSimpleName(); case "MedicationStatement": return org.hl7.fhir.dstu3.model.MedicationStatement.class.getSimpleName(); case "MessageDefinition": diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/datatypes10_50/ElementDefinition10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/datatypes10_50/ElementDefinition10_50.java index 058a901ea..809ecc380 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/datatypes10_50/ElementDefinition10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/datatypes10_50/ElementDefinition10_50.java @@ -381,7 +381,9 @@ public class ElementDefinition10_50 { if (src.hasSeverity()) tgt.setSeverityElement(convertConstraintSeverity(src.getSeverityElement())); if (src.hasHumanElement()) tgt.setHumanElement(String10_50.convertString(src.getHumanElement())); tgt.setExpression(ToolingExtensions.readStringExtension(src, ToolingExtensions.EXT_EXPRESSION)); - if (src.hasXpathElement()) tgt.setXpathElement(String10_50.convertString(src.getXpathElement())); + if (src.hasXpath()) { + tgt.addExtension(new org.hl7.fhir.r5.model.Extension(org.hl7.fhir.r5.utils.ToolingExtensions.EXT_XPATH_CONSTRAINT, new org.hl7.fhir.r5.model.StringType(src.getXpath()))); + } return tgt; } @@ -396,7 +398,9 @@ public class ElementDefinition10_50 { if (src.hasHumanElement()) tgt.setHumanElement(String10_50.convertString(src.getHumanElement())); if (src.hasExpression()) ToolingExtensions.addStringExtension(tgt, ToolingExtensions.EXT_EXPRESSION, src.getExpression()); - if (src.hasXpathElement()) tgt.setXpathElement(String10_50.convertString(src.getXpathElement())); + if (org.hl7.fhir.r5.utils.ToolingExtensions.hasExtension(src, org.hl7.fhir.r5.utils.ToolingExtensions.EXT_XPATH_CONSTRAINT)) { + tgt.setXpath(org.hl7.fhir.r5.utils.ToolingExtensions.readStringExtension(src, org.hl7.fhir.r5.utils.ToolingExtensions.EXT_XPATH_CONSTRAINT)); + } return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/Appointment10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/Appointment10_50.java index 318ef9c07..2b02ed001 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/Appointment10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/Appointment10_50.java @@ -227,32 +227,32 @@ public class Appointment10_50 { return tgt; } - static public org.hl7.fhir.r5.model.Enumeration convertParticipationStatus(org.hl7.fhir.dstu2.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r5.model.Enumeration convertParticipationStatus(org.hl7.fhir.dstu2.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; - org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.ParticipationStatusEnumFactory()); + org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Appointment.ParticipationStatusEnumFactory()); ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt); switch (src.getValue()) { case ACCEPTED: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.ACCEPTED); + tgt.setValue(org.hl7.fhir.r5.model.Appointment.ParticipationStatus.ACCEPTED); break; case DECLINED: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.DECLINED); + tgt.setValue(org.hl7.fhir.r5.model.Appointment.ParticipationStatus.DECLINED); break; case TENTATIVE: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.TENTATIVE); + tgt.setValue(org.hl7.fhir.r5.model.Appointment.ParticipationStatus.TENTATIVE); break; case NEEDSACTION: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.NEEDSACTION); + tgt.setValue(org.hl7.fhir.r5.model.Appointment.ParticipationStatus.NEEDSACTION); break; default: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.NULL); + tgt.setValue(org.hl7.fhir.r5.model.Appointment.ParticipationStatus.NULL); break; } return tgt; } - static public org.hl7.fhir.dstu2.model.Enumeration convertParticipationStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.dstu2.model.Enumeration convertParticipationStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2.model.Enumeration tgt = new org.hl7.fhir.dstu2.model.Enumeration<>(new org.hl7.fhir.dstu2.model.Appointment.ParticipationStatusEnumFactory()); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/AppointmentResponse10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/AppointmentResponse10_50.java index 589fde8c6..1d36529b0 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/AppointmentResponse10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/AppointmentResponse10_50.java @@ -54,11 +54,11 @@ public class AppointmentResponse10_50 { if (src.hasParticipantStatus()) tgt.setParticipantStatusElement(convertParticipantStatus(src.getParticipantStatusElement())); if (src.hasCommentElement()) - tgt.setCommentElement(String10_50.convertString(src.getCommentElement())); + tgt.setCommentElement(String10_50.convertStringToMarkdown(src.getCommentElement())); return tgt; } - static public org.hl7.fhir.dstu2.model.Enumeration convertParticipantStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.dstu2.model.Enumeration convertParticipantStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2.model.Enumeration tgt = new org.hl7.fhir.dstu2.model.Enumeration<>(new org.hl7.fhir.dstu2.model.AppointmentResponse.ParticipantStatusEnumFactory()); @@ -83,32 +83,32 @@ public class AppointmentResponse10_50 { return tgt; } - static public org.hl7.fhir.r5.model.Enumeration convertParticipantStatus(org.hl7.fhir.dstu2.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r5.model.Enumeration convertParticipantStatus(org.hl7.fhir.dstu2.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; - org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.ParticipationStatusEnumFactory()); + org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatusEnumFactory()); ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt); switch (src.getValue()) { case ACCEPTED: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.ACCEPTED); + tgt.setValue(org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus.ACCEPTED); break; case DECLINED: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.DECLINED); + tgt.setValue(org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus.DECLINED); break; case TENTATIVE: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.TENTATIVE); + tgt.setValue(org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus.TENTATIVE); break; case INPROCESS: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.ACCEPTED); + tgt.setValue(org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus.ACCEPTED); break; case COMPLETED: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.ACCEPTED); + tgt.setValue(org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus.ACCEPTED); break; case NEEDSACTION: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.NEEDSACTION); + tgt.setValue(org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus.NEEDSACTION); break; default: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.NULL); + tgt.setValue(org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus.NULL); break; } return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/CarePlan10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/CarePlan10_50.java index 0367dfd6b..95da9db0a 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/CarePlan10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/CarePlan10_50.java @@ -88,8 +88,8 @@ public class CarePlan10_50 { for (org.hl7.fhir.r5.model.Annotation t : src.getProgress()) tgt.addProgress(Annotation10_50.convertAnnotation(t)); if (src.hasPlannedActivityReference()) tgt.setReference(Reference10_50.convertReference(src.getPlannedActivityReference())); - if (src.hasPlannedActivityDetail()) - tgt.setDetail(convertCarePlanActivityDetailComponent(src.getPlannedActivityDetail())); +// if (src.hasPlannedActivityDetail()) +// tgt.setDetail(convertCarePlanActivityDetailComponent(src.getPlannedActivityDetail())); return tgt; } @@ -102,139 +102,139 @@ public class CarePlan10_50 { tgt.addProgress(Annotation10_50.convertAnnotation(t)); if (src.hasReference()) tgt.setPlannedActivityReference(Reference10_50.convertReference(src.getReference())); - if (src.hasDetail()) - tgt.setPlannedActivityDetail(convertCarePlanActivityDetailComponent(src.getDetail())); +// if (src.hasDetail()) +// tgt.setPlannedActivityDetail(convertCarePlanActivityDetailComponent(src.getDetail())); return tgt; } - public static org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent convertCarePlanActivityDetailComponent(org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityDetailComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent tgt = new org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent(); - ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyBackboneElement(src,tgt); - if (src.hasCode()) - tgt.setCode(CodeableConcept10_50.convertCodeableConcept(src.getCode())); - for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getReasonCode()) - tgt.addReason(CodeableConcept10_50.convertCodeableConceptToCodableReference(t)); - for (org.hl7.fhir.dstu2.model.Reference t : src.getReasonReference()) - tgt.addReason(convertReferenceToCodableReference(t)); - for (org.hl7.fhir.dstu2.model.Reference t : src.getGoal()) tgt.addGoal(Reference10_50.convertReference(t)); - if (src.hasStatus()) - tgt.setStatusElement(convertCarePlanActivityStatus(src.getStatusElement())); - if (src.hasProhibitedElement()) - tgt.setDoNotPerformElement(Boolean10_50.convertBoolean(src.getProhibitedElement())); - if (src.hasScheduled()) - tgt.setScheduled(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getScheduled())); - if (src.hasLocation()) - tgt.getLocation().setReference(Reference10_50.convertReference(src.getLocation())); - for (org.hl7.fhir.dstu2.model.Reference t : src.getPerformer()) - tgt.addPerformer(Reference10_50.convertReference(t)); - if (src.hasProduct()) - tgt.setProduct(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getProduct())); - if (src.hasDailyAmount()) - tgt.setDailyAmount(SimpleQuantity10_50.convertSimpleQuantity(src.getDailyAmount())); - if (src.hasQuantity()) - tgt.setQuantity(SimpleQuantity10_50.convertSimpleQuantity(src.getQuantity())); - if (src.hasDescriptionElement()) - tgt.setDescriptionElement(String10_50.convertString(src.getDescriptionElement())); - return tgt; - } - - public static org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityDetailComponent convertCarePlanActivityDetailComponent(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityDetailComponent tgt = new org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityDetailComponent(); - ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyBackboneElement(src,tgt); - if (src.hasCode()) - tgt.setCode(CodeableConcept10_50.convertCodeableConcept(src.getCode())); - for (CodeableReference t : src.getReason()) - if (t.hasConcept()) - tgt.addReasonCode(CodeableConcept10_50.convertCodeableConcept(t.getConcept())); - for (CodeableReference t : src.getReason()) - if (t.hasReference()) - tgt.addReasonReference(Reference10_50.convertReference(t.getReference())); - for (org.hl7.fhir.r5.model.Reference t : src.getGoal()) tgt.addGoal(Reference10_50.convertReference(t)); - if (src.hasStatus()) - tgt.setStatusElement(convertCarePlanActivityStatus(src.getStatusElement())); - if (src.hasDoNotPerformElement()) - tgt.setProhibitedElement(Boolean10_50.convertBoolean(src.getDoNotPerformElement())); - if (src.hasScheduled()) - tgt.setScheduled(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getScheduled())); - if (src.getLocation().hasReference()) - tgt.setLocation(Reference10_50.convertReference(src.getLocation().getReference())); - for (org.hl7.fhir.r5.model.Reference t : src.getPerformer()) tgt.addPerformer(Reference10_50.convertReference(t)); - if (src.hasProduct()) - tgt.setProduct(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getProduct())); - if (src.hasDailyAmount()) - tgt.setDailyAmount(SimpleQuantity10_50.convertSimpleQuantity(src.getDailyAmount())); - if (src.hasQuantity()) - tgt.setQuantity(SimpleQuantity10_50.convertSimpleQuantity(src.getQuantity())); - if (src.hasDescriptionElement()) - tgt.setDescriptionElement(String10_50.convertString(src.getDescriptionElement())); - return tgt; - } - - static public org.hl7.fhir.r5.model.Enumeration convertCarePlanActivityStatus(org.hl7.fhir.dstu2.model.Enumeration src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatusEnumFactory()); - ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt); - switch (src.getValue()) { - case NOTSTARTED: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.NOTSTARTED); - break; - case SCHEDULED: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.SCHEDULED); - break; - case INPROGRESS: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.INPROGRESS); - break; - case ONHOLD: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.ONHOLD); - break; - case COMPLETED: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.COMPLETED); - break; - case CANCELLED: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.CANCELLED); - break; - default: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.NULL); - break; - } - return tgt; - } - - static public org.hl7.fhir.dstu2.model.Enumeration convertCarePlanActivityStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.dstu2.model.Enumeration tgt = new org.hl7.fhir.dstu2.model.Enumeration<>(new org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatusEnumFactory()); - ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt); - switch (src.getValue()) { - case NOTSTARTED: - tgt.setValue(org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.NOTSTARTED); - break; - case SCHEDULED: - tgt.setValue(org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.SCHEDULED); - break; - case INPROGRESS: - tgt.setValue(org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.INPROGRESS); - break; - case ONHOLD: - tgt.setValue(org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.ONHOLD); - break; - case COMPLETED: - tgt.setValue(org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.COMPLETED); - break; - case CANCELLED: - tgt.setValue(org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.CANCELLED); - break; - default: - tgt.setValue(org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.NULL); - break; - } - return tgt; - } +// public static org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent convertCarePlanActivityDetailComponent(org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityDetailComponent src) throws FHIRException { +// if (src == null || src.isEmpty()) +// return null; +// org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent tgt = new org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent(); +// ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyBackboneElement(src,tgt); +// if (src.hasCode()) +// tgt.setCode(CodeableConcept10_50.convertCodeableConcept(src.getCode())); +// for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getReasonCode()) +// tgt.addReason(CodeableConcept10_50.convertCodeableConceptToCodableReference(t)); +// for (org.hl7.fhir.dstu2.model.Reference t : src.getReasonReference()) +// tgt.addReason(convertReferenceToCodableReference(t)); +// for (org.hl7.fhir.dstu2.model.Reference t : src.getGoal()) tgt.addGoal(Reference10_50.convertReference(t)); +// if (src.hasStatus()) +// tgt.setStatusElement(convertCarePlanActivityStatus(src.getStatusElement())); +// if (src.hasProhibitedElement()) +// tgt.setDoNotPerformElement(Boolean10_50.convertBoolean(src.getProhibitedElement())); +// if (src.hasScheduled()) +// tgt.setScheduled(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getScheduled())); +// if (src.hasLocation()) +// tgt.getLocation().setReference(Reference10_50.convertReference(src.getLocation())); +// for (org.hl7.fhir.dstu2.model.Reference t : src.getPerformer()) +// tgt.addPerformer(Reference10_50.convertReference(t)); +// if (src.hasProduct()) +// tgt.setProduct(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getProduct())); +// if (src.hasDailyAmount()) +// tgt.setDailyAmount(SimpleQuantity10_50.convertSimpleQuantity(src.getDailyAmount())); +// if (src.hasQuantity()) +// tgt.setQuantity(SimpleQuantity10_50.convertSimpleQuantity(src.getQuantity())); +// if (src.hasDescriptionElement()) +// tgt.setDescriptionElement(String10_50.convertString(src.getDescriptionElement())); +// return tgt; +// } +// +// public static org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityDetailComponent convertCarePlanActivityDetailComponent(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent src) throws FHIRException { +// if (src == null || src.isEmpty()) +// return null; +// org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityDetailComponent tgt = new org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityDetailComponent(); +// ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyBackboneElement(src,tgt); +// if (src.hasCode()) +// tgt.setCode(CodeableConcept10_50.convertCodeableConcept(src.getCode())); +// for (CodeableReference t : src.getReason()) +// if (t.hasConcept()) +// tgt.addReasonCode(CodeableConcept10_50.convertCodeableConcept(t.getConcept())); +// for (CodeableReference t : src.getReason()) +// if (t.hasReference()) +// tgt.addReasonReference(Reference10_50.convertReference(t.getReference())); +// for (org.hl7.fhir.r5.model.Reference t : src.getGoal()) tgt.addGoal(Reference10_50.convertReference(t)); +// if (src.hasStatus()) +// tgt.setStatusElement(convertCarePlanActivityStatus(src.getStatusElement())); +// if (src.hasDoNotPerformElement()) +// tgt.setProhibitedElement(Boolean10_50.convertBoolean(src.getDoNotPerformElement())); +// if (src.hasScheduled()) +// tgt.setScheduled(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getScheduled())); +// if (src.getLocation().hasReference()) +// tgt.setLocation(Reference10_50.convertReference(src.getLocation().getReference())); +// for (org.hl7.fhir.r5.model.Reference t : src.getPerformer()) tgt.addPerformer(Reference10_50.convertReference(t)); +// if (src.hasProduct()) +// tgt.setProduct(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getProduct())); +// if (src.hasDailyAmount()) +// tgt.setDailyAmount(SimpleQuantity10_50.convertSimpleQuantity(src.getDailyAmount())); +// if (src.hasQuantity()) +// tgt.setQuantity(SimpleQuantity10_50.convertSimpleQuantity(src.getQuantity())); +// if (src.hasDescriptionElement()) +// tgt.setDescriptionElement(String10_50.convertString(src.getDescriptionElement())); +// return tgt; +// } +// +// static public org.hl7.fhir.r5.model.Enumeration convertCarePlanActivityStatus(org.hl7.fhir.dstu2.model.Enumeration src) throws FHIRException { +// if (src == null || src.isEmpty()) +// return null; +// org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatusEnumFactory()); +// ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt); +// switch (src.getValue()) { +// case NOTSTARTED: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.NOTSTARTED); +// break; +// case SCHEDULED: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.SCHEDULED); +// break; +// case INPROGRESS: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.INPROGRESS); +// break; +// case ONHOLD: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.ONHOLD); +// break; +// case COMPLETED: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.COMPLETED); +// break; +// case CANCELLED: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.CANCELLED); +// break; +// default: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.NULL); +// break; +// } +// return tgt; +// } +// +// static public org.hl7.fhir.dstu2.model.Enumeration convertCarePlanActivityStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { +// if (src == null || src.isEmpty()) +// return null; +// org.hl7.fhir.dstu2.model.Enumeration tgt = new org.hl7.fhir.dstu2.model.Enumeration<>(new org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatusEnumFactory()); +// ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt); +// switch (src.getValue()) { +// case NOTSTARTED: +// tgt.setValue(org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.NOTSTARTED); +// break; +// case SCHEDULED: +// tgt.setValue(org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.SCHEDULED); +// break; +// case INPROGRESS: +// tgt.setValue(org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.INPROGRESS); +// break; +// case ONHOLD: +// tgt.setValue(org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.ONHOLD); +// break; +// case COMPLETED: +// tgt.setValue(org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.COMPLETED); +// break; +// case CANCELLED: +// tgt.setValue(org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.CANCELLED); +// break; +// default: +// tgt.setValue(org.hl7.fhir.dstu2.model.CarePlan.CarePlanActivityStatus.NULL); +// break; +// } +// return tgt; +// } static public org.hl7.fhir.dstu2.model.Enumeration convertCarePlanStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/ConceptMap10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/ConceptMap10_50.java index 9b72d5d80..6ef0e9909 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/ConceptMap10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/ConceptMap10_50.java @@ -72,7 +72,7 @@ public class ConceptMap10_50 { tgt.setTargetScope(r instanceof org.hl7.fhir.r5.model.Reference ? new CanonicalType(((org.hl7.fhir.r5.model.Reference) r).getReference()) : r); } for (org.hl7.fhir.dstu2.model.ConceptMap.SourceElementComponent t : src.getElement()) { - List> ws = convertSourceElementComponent(t); + List> ws = convertSourceElementComponent(t, tgt); for (SourceElementComponentWrapper w : ws) getGroup(tgt, w.getSource(), w.getTarget()).addElement(w.getComp()); } @@ -120,7 +120,7 @@ public class ConceptMap10_50 { tgt.setTarget(ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getTargetScope())); for (org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent g : src.getGroup()) for (org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent t : g.getElement()) - tgt.addElement(convertSourceElementComponent(t, g)); + tgt.addElement(convertSourceElementComponent(t, g, src)); return tgt; } @@ -218,13 +218,13 @@ public class ConceptMap10_50 { return tgt; } - public static org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent src) throws FHIRException { + public static org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent src, org.hl7.fhir.r5.model.ConceptMap srcMap) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent(); ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyBackboneElement(src,tgt); - if (src.hasPropertyElement()) - tgt.setElementElement(Uri10_50.convertUri(src.getPropertyElement())); + if (src.hasAttribute()) + tgt.setElement(srcMap.getAttributeUri(src.getAttribute())); if (src.hasValueCoding()) { tgt.setCode(src.getValueCoding().getCode()); } else if (src.hasValue()) { @@ -233,18 +233,18 @@ public class ConceptMap10_50 { return tgt; } - public static org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent src) throws FHIRException { + public static org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent src, org.hl7.fhir.r5.model.ConceptMap tgtMap) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent(); ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyBackboneElement(src,tgt); if (src.hasElementElement()) - tgt.setPropertyElement(Uri10_50.convertUri(src.getElementElement())); + tgt.setAttribute(tgtMap.registerAttribute(src.getElement())); tgt.setValue(String10_50.convertString(src.getCodeElement())); return tgt; } - public static org.hl7.fhir.dstu2.model.ConceptMap.SourceElementComponent convertSourceElementComponent(org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent src, org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent g) throws FHIRException { + public static org.hl7.fhir.dstu2.model.ConceptMap.SourceElementComponent convertSourceElementComponent(org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent src, org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent g, org.hl7.fhir.r5.model.ConceptMap srcMap) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.dstu2.model.ConceptMap.SourceElementComponent(); @@ -256,12 +256,12 @@ public class ConceptMap10_50 { tgt.addTarget(new org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent().setEquivalence(org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence.UNMATCHED)); } else { for (org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent t : src.getTarget()) - tgt.addTarget(convertTargetElementComponent(t, g)); + tgt.addTarget(convertTargetElementComponent(t, g, srcMap)); } return tgt; } - public static List> convertSourceElementComponent(org.hl7.fhir.dstu2.model.ConceptMap.SourceElementComponent src) throws FHIRException { + public static List> convertSourceElementComponent(org.hl7.fhir.dstu2.model.ConceptMap.SourceElementComponent src, org.hl7.fhir.r5.model.ConceptMap tgtMap) throws FHIRException { List> res = new ArrayList<>(); if (src == null || src.isEmpty()) return res; @@ -272,14 +272,14 @@ public class ConceptMap10_50 { if (t.getEquivalence() == org.hl7.fhir.dstu2.model.Enumerations.ConceptMapEquivalence.UNMATCHED) { tgt.setNoMap(true); } else { - tgt.addTarget(convertTargetElementComponent(t)); + tgt.addTarget(convertTargetElementComponent(t, tgtMap)); } res.add(new SourceElementComponentWrapper<>(tgt, src.getCodeSystem(), t.getCodeSystem())); } return res; } - public static org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent src, org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent g) throws FHIRException { + public static org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent src, org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent g, org.hl7.fhir.r5.model.ConceptMap srcMap) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent(); @@ -292,13 +292,13 @@ public class ConceptMap10_50 { if (src.hasCommentElement()) tgt.setCommentsElement(String10_50.convertString(src.getCommentElement())); for (org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) - tgt.addDependsOn(convertOtherElementComponent(t)); + tgt.addDependsOn(convertOtherElementComponent(t, srcMap)); for (org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent t : src.getProduct()) - tgt.addProduct(convertOtherElementComponent(t)); + tgt.addProduct(convertOtherElementComponent(t, srcMap)); return tgt; } - public static org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent src) throws FHIRException { + public static org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.dstu2.model.ConceptMap.TargetElementComponent src, org.hl7.fhir.r5.model.ConceptMap tgtMap) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent(); @@ -310,9 +310,9 @@ public class ConceptMap10_50 { if (src.hasCommentsElement()) tgt.setCommentElement(String10_50.convertString(src.getCommentsElement())); for (org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) - tgt.addDependsOn(convertOtherElementComponent(t)); + tgt.addDependsOn(convertOtherElementComponent(t, tgtMap)); for (org.hl7.fhir.dstu2.model.ConceptMap.OtherElementComponent t : src.getProduct()) - tgt.addProduct(convertOtherElementComponent(t)); + tgt.addProduct(convertOtherElementComponent(t, tgtMap)); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/Conformance10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/Conformance10_50.java index a65328e4d..3660c1ccb 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/Conformance10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/Conformance10_50.java @@ -236,7 +236,7 @@ public class Conformance10_50 { org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementImplementationComponent tgt = new org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementImplementationComponent(); ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyBackboneElement(src,tgt); if (src.hasDescriptionElement()) - tgt.setDescriptionElement(String10_50.convertString(src.getDescriptionElement())); + tgt.setDescriptionElement(String10_50.convertStringToMarkdown(src.getDescriptionElement())); if (src.hasUrl()) tgt.setUrl(src.getUrl()); return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/DetectedIssue10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/DetectedIssue10_50.java index f7c98e686..bd4e9ea6e 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/DetectedIssue10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/DetectedIssue10_50.java @@ -52,7 +52,7 @@ public class DetectedIssue10_50 { for (org.hl7.fhir.dstu2.model.Reference t : src.getImplicated()) tgt.addImplicated(Reference10_50.convertReference(t)); if (src.hasDetailElement()) - tgt.setDetailElement(String10_50.convertString(src.getDetailElement())); + tgt.setDetailElement(String10_50.convertStringToMarkdown(src.getDetailElement())); if (src.hasDate()) tgt.setIdentified(DateTime10_50.convertDateTime(src.getDateElement())); if (src.hasAuthor()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/DeviceMetric10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/DeviceMetric10_50.java index f3960f8f1..37c0e6115 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/DeviceMetric10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/DeviceMetric10_50.java @@ -21,18 +21,18 @@ public class DeviceMetric10_50 { tgt.setIdentifier(Identifier10_50.convertIdentifier(src.getIdentifierFirstRep())); if (src.hasUnit()) tgt.setUnit(CodeableConcept10_50.convertCodeableConcept(src.getUnit())); - if (src.hasSource()) - tgt.setSource(Reference10_50.convertReference(src.getSource())); - if (src.hasParent()) - tgt.setParent(Reference10_50.convertReference(src.getParent())); + if (src.hasDevice()) + tgt.setSource(Reference10_50.convertReference(src.getDevice())); +// if (src.hasDevice()) +// tgt.setParent(Reference10_50.convertReference(src.getDevice())); if (src.hasOperationalStatus()) tgt.setOperationalStatusElement(convertDeviceMetricOperationalStatus(src.getOperationalStatusElement())); if (src.hasColor()) tgt.setColorElement(convertDeviceMetricColor(src.getColorElement())); if (src.hasCategory()) tgt.setCategoryElement(convertDeviceMetricCategory(src.getCategoryElement())); - if (src.hasMeasurementPeriod()) - tgt.setMeasurementPeriod(Timing10_50.convertTiming(src.getMeasurementPeriod())); +// if (src.hasMeasurementPeriod()) +// tgt.setMeasurementPeriod(Timing10_50.convertTiming(src.getMeasurementPeriod())); for (org.hl7.fhir.r5.model.DeviceMetric.DeviceMetricCalibrationComponent t : src.getCalibration()) tgt.addCalibration(convertDeviceMetricCalibrationComponent(t)); return tgt; @@ -50,17 +50,17 @@ public class DeviceMetric10_50 { if (src.hasUnit()) tgt.setUnit(CodeableConcept10_50.convertCodeableConcept(src.getUnit())); if (src.hasSource()) - tgt.setSource(Reference10_50.convertReference(src.getSource())); + tgt.setDevice(Reference10_50.convertReference(src.getSource())); if (src.hasParent()) - tgt.setParent(Reference10_50.convertReference(src.getParent())); + tgt.setDevice(Reference10_50.convertReference(src.getParent())); if (src.hasOperationalStatus()) tgt.setOperationalStatusElement(convertDeviceMetricOperationalStatus(src.getOperationalStatusElement())); if (src.hasColor()) tgt.setColorElement(convertDeviceMetricColor(src.getColorElement())); if (src.hasCategory()) tgt.setCategoryElement(convertDeviceMetricCategory(src.getCategoryElement())); - if (src.hasMeasurementPeriod()) - tgt.setMeasurementPeriod(Timing10_50.convertTiming(src.getMeasurementPeriod())); +// if (src.hasMeasurementPeriod()) +// tgt.setMeasurementPeriod(Timing10_50.convertTiming(src.getMeasurementPeriod())); for (org.hl7.fhir.dstu2.model.DeviceMetric.DeviceMetricCalibrationComponent t : src.getCalibration()) tgt.addCalibration(convertDeviceMetricCalibrationComponent(t)); return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/DiagnosticReport10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/DiagnosticReport10_50.java index d19be176f..6ede38b48 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/DiagnosticReport10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/DiagnosticReport10_50.java @@ -37,7 +37,7 @@ public class DiagnosticReport10_50 { for (org.hl7.fhir.dstu2.model.DiagnosticReport.DiagnosticReportImageComponent t : src.getImage()) tgt.addMedia(convertDiagnosticReportImageComponent(t)); if (src.hasConclusionElement()) - tgt.setConclusionElement(String10_50.convertString(src.getConclusionElement())); + tgt.setConclusionElement(String10_50.convertStringToMarkdown(src.getConclusionElement())); for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getCodedDiagnosis()) tgt.addConclusionCode(CodeableConcept10_50.convertCodeableConcept(t)); for (org.hl7.fhir.dstu2.model.Attachment t : src.getPresentedForm()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/DocumentManifest10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/DocumentManifest10_50.java deleted file mode 100644 index 161201b8c..000000000 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/DocumentManifest10_50.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.hl7.fhir.convertors.conv10_50.resources10_50; - -import org.hl7.fhir.convertors.context.ConversionContext10_50; -import org.hl7.fhir.convertors.conv10_50.datatypes10_50.Reference10_50; -import org.hl7.fhir.convertors.conv10_50.datatypes10_50.complextypes10_50.Identifier10_50; -import org.hl7.fhir.exceptions.FHIRException; - -public class DocumentManifest10_50 { - public static org.hl7.fhir.r5.model.DocumentManifest.DocumentManifestRelatedComponent convertDocumentManifestRelatedComponent(org.hl7.fhir.dstu2.model.DocumentManifest.DocumentManifestRelatedComponent src) throws FHIRException { - if (src == null || src.isEmpty()) return null; - org.hl7.fhir.r5.model.DocumentManifest.DocumentManifestRelatedComponent tgt = new org.hl7.fhir.r5.model.DocumentManifest.DocumentManifestRelatedComponent(); - ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyBackboneElement(src,tgt); - if (src.hasIdentifier()) tgt.setIdentifier(Identifier10_50.convertIdentifier(src.getIdentifier())); - if (src.hasRef()) tgt.setRef(Reference10_50.convertReference(src.getRef())); - return tgt; - } - - public static org.hl7.fhir.dstu2.model.DocumentManifest.DocumentManifestRelatedComponent convertDocumentManifestRelatedComponent(org.hl7.fhir.r5.model.DocumentManifest.DocumentManifestRelatedComponent src) throws FHIRException { - if (src == null || src.isEmpty()) return null; - org.hl7.fhir.dstu2.model.DocumentManifest.DocumentManifestRelatedComponent tgt = new org.hl7.fhir.dstu2.model.DocumentManifest.DocumentManifestRelatedComponent(); - ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyBackboneElement(src,tgt); - if (src.hasIdentifier()) tgt.setIdentifier(Identifier10_50.convertIdentifier(src.getIdentifier())); - if (src.hasRef()) tgt.setRef(Reference10_50.convertReference(src.getRef())); - return tgt; - } -} diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/DocumentReference10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/DocumentReference10_50.java index 10d8a4c11..f9ce186c4 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/DocumentReference10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/DocumentReference10_50.java @@ -226,29 +226,29 @@ public class DocumentReference10_50 { return tgt; } - static public org.hl7.fhir.r5.model.Enumeration convertDocumentReferenceStatus(org.hl7.fhir.dstu2.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r5.model.Enumeration convertDocumentReferenceStatus(org.hl7.fhir.dstu2.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; - org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatusEnumFactory()); + org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatusEnumFactory()); ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt); switch (src.getValue()) { case CURRENT: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatus.CURRENT); + tgt.setValue(org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus.CURRENT); break; case SUPERSEDED: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatus.SUPERSEDED); + tgt.setValue(org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus.SUPERSEDED); break; case ENTEREDINERROR: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatus.ENTEREDINERROR); + tgt.setValue(org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus.ENTEREDINERROR); break; default: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatus.NULL); + tgt.setValue(org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus.NULL); break; } return tgt; } - static public org.hl7.fhir.dstu2.model.Enumeration convertDocumentReferenceStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.dstu2.model.Enumeration convertDocumentReferenceStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2.model.Enumeration tgt = new org.hl7.fhir.dstu2.model.Enumeration<>(new org.hl7.fhir.dstu2.model.Enumerations.DocumentReferenceStatusEnumFactory()); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/Encounter10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/Encounter10_50.java index c78219419..2dbfc59f6 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/Encounter10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/Encounter10_50.java @@ -8,6 +8,7 @@ import org.hl7.fhir.convertors.conv10_50.datatypes10_50.complextypes10_50.Identi import org.hl7.fhir.convertors.conv10_50.datatypes10_50.complextypes10_50.Period10_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CodeableReference; +import org.hl7.fhir.r5.model.Encounter.ReasonComponent; public class Encounter10_50 { @@ -40,11 +41,12 @@ public class Encounter10_50 { tgt.setPeriod(Period10_50.convertPeriod(src.getActualPeriod())); if (src.hasLength()) tgt.setLength(Duration10_50.convertDuration(src.getLength())); - for (CodeableReference t : src.getReason()) - if (t.hasConcept()) - tgt.addReason(CodeableConcept10_50.convertCodeableConcept(t.getConcept())); - if (src.hasAdmission()) - tgt.setHospitalization(convertEncounterHospitalizationComponent(src.getAdmission())); + for (ReasonComponent t1 : src.getReason()) + for (CodeableReference t : t1.getValue()) + if (t.hasConcept()) + tgt.addReason(CodeableConcept10_50.convertCodeableConcept(t.getConcept())); + if (src.hasAdmission() || src.hasDietPreference() || src.hasSpecialArrangement() || src.hasSpecialCourtesy()) + tgt.setHospitalization(convertEncounterHospitalizationComponent(src.getAdmission(), src)); for (org.hl7.fhir.r5.model.Encounter.EncounterLocationComponent t : src.getLocation()) tgt.addLocation(convertEncounterLocationComponent(t)); if (src.hasServiceProvider()) @@ -84,9 +86,9 @@ public class Encounter10_50 { if (src.hasLength()) tgt.setLength(Duration10_50.convertDuration(src.getLength())); for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getReason()) - tgt.addReason(CodeableConcept10_50.convertCodeableConceptToCodableReference(t)); + tgt.addReason().addValue(CodeableConcept10_50.convertCodeableConceptToCodableReference(t)); if (src.hasHospitalization()) - tgt.setAdmission(convertEncounterHospitalizationComponent(src.getHospitalization())); + tgt.setAdmission(convertEncounterHospitalizationComponent(src.getHospitalization(), tgt)); for (org.hl7.fhir.dstu2.model.Encounter.EncounterLocationComponent t : src.getLocation()) tgt.addLocation(convertEncounterLocationComponent(t)); if (src.hasServiceProvider()) @@ -143,7 +145,7 @@ public class Encounter10_50 { } } - public static org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent convertEncounterHospitalizationComponent(org.hl7.fhir.dstu2.model.Encounter.EncounterHospitalizationComponent src) throws FHIRException { + public static org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent convertEncounterHospitalizationComponent(org.hl7.fhir.dstu2.model.Encounter.EncounterHospitalizationComponent src, org.hl7.fhir.r5.model.Encounter tgte) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent tgt = new org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent(); @@ -157,11 +159,11 @@ public class Encounter10_50 { if (src.hasReAdmission()) tgt.setReAdmission(CodeableConcept10_50.convertCodeableConcept(src.getReAdmission())); for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getDietPreference()) - tgt.addDietPreference(CodeableConcept10_50.convertCodeableConcept(t)); + tgte.addDietPreference(CodeableConcept10_50.convertCodeableConcept(t)); for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getSpecialCourtesy()) - tgt.addSpecialCourtesy(CodeableConcept10_50.convertCodeableConcept(t)); + tgte.addSpecialCourtesy(CodeableConcept10_50.convertCodeableConcept(t)); for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getSpecialArrangement()) - tgt.addSpecialArrangement(CodeableConcept10_50.convertCodeableConcept(t)); + tgte.addSpecialArrangement(CodeableConcept10_50.convertCodeableConcept(t)); if (src.hasDestination()) tgt.setDestination(Reference10_50.convertReference(src.getDestination())); if (src.hasDischargeDisposition()) @@ -169,7 +171,7 @@ public class Encounter10_50 { return tgt; } - public static org.hl7.fhir.dstu2.model.Encounter.EncounterHospitalizationComponent convertEncounterHospitalizationComponent(org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent src) throws FHIRException { + public static org.hl7.fhir.dstu2.model.Encounter.EncounterHospitalizationComponent convertEncounterHospitalizationComponent(org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent src, org.hl7.fhir.r5.model.Encounter srce) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2.model.Encounter.EncounterHospitalizationComponent tgt = new org.hl7.fhir.dstu2.model.Encounter.EncounterHospitalizationComponent(); @@ -182,11 +184,11 @@ public class Encounter10_50 { tgt.setAdmitSource(CodeableConcept10_50.convertCodeableConcept(src.getAdmitSource())); if (src.hasReAdmission()) tgt.setReAdmission(CodeableConcept10_50.convertCodeableConcept(src.getReAdmission())); - for (org.hl7.fhir.r5.model.CodeableConcept t : src.getDietPreference()) + for (org.hl7.fhir.r5.model.CodeableConcept t : srce.getDietPreference()) tgt.addDietPreference(CodeableConcept10_50.convertCodeableConcept(t)); - for (org.hl7.fhir.r5.model.CodeableConcept t : src.getSpecialCourtesy()) + for (org.hl7.fhir.r5.model.CodeableConcept t : srce.getSpecialCourtesy()) tgt.addSpecialCourtesy(CodeableConcept10_50.convertCodeableConcept(t)); - for (org.hl7.fhir.r5.model.CodeableConcept t : src.getSpecialArrangement()) + for (org.hl7.fhir.r5.model.CodeableConcept t : srce.getSpecialArrangement()) tgt.addSpecialArrangement(CodeableConcept10_50.convertCodeableConcept(t)); if (src.hasDestination()) tgt.setDestination(Reference10_50.convertReference(src.getDestination())); @@ -301,7 +303,7 @@ public class Encounter10_50 { return tgt; } - static public org.hl7.fhir.dstu2.model.Enumeration convertEncounterState(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.dstu2.model.Enumeration convertEncounterState(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2.model.Enumeration tgt = new org.hl7.fhir.dstu2.model.Enumeration<>(new org.hl7.fhir.dstu2.model.Encounter.EncounterStateEnumFactory()); @@ -326,32 +328,32 @@ public class Encounter10_50 { return tgt; } - static public org.hl7.fhir.r5.model.Enumeration convertEncounterState(org.hl7.fhir.dstu2.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r5.model.Enumeration convertEncounterState(org.hl7.fhir.dstu2.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; - org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Encounter.EncounterStatusEnumFactory()); + org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.EncounterStatusEnumFactory()); ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt); switch (src.getValue()) { case PLANNED: - tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.PLANNED); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.PLANNED); break; case ARRIVED: - tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.INPROGRESS); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.INPROGRESS); break; case INPROGRESS: - tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.INPROGRESS); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.INPROGRESS); break; case ONLEAVE: - tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.INPROGRESS); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.INPROGRESS); break; case FINISHED: - tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.COMPLETED); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.COMPLETED); break; case CANCELLED: - tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.CANCELLED); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.CANCELLED); break; default: - tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.NULL); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.NULL); break; } return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/HealthcareService10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/HealthcareService10_50.java index 85950a50b..827e34296 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/HealthcareService10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/HealthcareService10_50.java @@ -146,7 +146,7 @@ public class HealthcareService10_50 { if (src.hasLocation()) tgt.addLocation(Reference10_50.convertReference(src.getLocation())); if (src.hasCommentElement()) - tgt.setCommentElement(String10_50.convertString(src.getCommentElement())); + tgt.setCommentElement(String10_50.convertStringToMarkdown(src.getCommentElement())); if (src.hasExtraDetails()) tgt.setExtraDetails(src.getExtraDetails()); if (src.hasPhoto()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/List10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/List10_50.java index 4207c582e..de685edc7 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/List10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/List10_50.java @@ -24,7 +24,7 @@ public class List10_50 { if (src.hasCode()) tgt.setCode(CodeableConcept10_50.convertCodeableConcept(src.getCode())); if (src.hasSubject()) - tgt.setSubject(Reference10_50.convertReference(src.getSubject())); + tgt.setSubject(Reference10_50.convertReference(src.getSubjectFirstRep())); if (src.hasSource()) tgt.setSource(Reference10_50.convertReference(src.getSource())); if (src.hasEncounter()) @@ -55,7 +55,7 @@ public class List10_50 { if (src.hasCode()) tgt.setCode(CodeableConcept10_50.convertCodeableConcept(src.getCode())); if (src.hasSubject()) - tgt.setSubject(Reference10_50.convertReference(src.getSubject())); + tgt.addSubject(Reference10_50.convertReference(src.getSubject())); if (src.hasSource()) tgt.setSource(Reference10_50.convertReference(src.getSource())); if (src.hasEncounter()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/Location10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/Location10_50.java index 911cb3f59..32fca2e8c 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/Location10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/Location10_50.java @@ -59,7 +59,7 @@ public class Location10_50 { if (src.hasNameElement()) tgt.setNameElement(String10_50.convertString(src.getNameElement())); if (src.hasDescriptionElement()) - tgt.setDescriptionElement(String10_50.convertString(src.getDescriptionElement())); + tgt.setDescriptionElement(String10_50.convertStringToMarkdown(src.getDescriptionElement())); if (src.hasMode()) tgt.setModeElement(convertLocationMode(src.getModeElement())); if (src.hasType()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/MedicationStatement10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/MedicationStatement10_50.java index 6efaef783..bca217c84 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/MedicationStatement10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/MedicationStatement10_50.java @@ -14,7 +14,7 @@ import org.hl7.fhir.r5.model.Dosage.DosageDoseAndRateComponent; public class MedicationStatement10_50 { - public static org.hl7.fhir.dstu2.model.MedicationStatement convertMedicationStatement(org.hl7.fhir.r5.model.MedicationUsage src) throws FHIRException { + public static org.hl7.fhir.dstu2.model.MedicationStatement convertMedicationStatement(org.hl7.fhir.r5.model.MedicationStatement src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2.model.MedicationStatement tgt = new org.hl7.fhir.dstu2.model.MedicationStatement(); @@ -44,10 +44,10 @@ public class MedicationStatement10_50 { return tgt; } - public static org.hl7.fhir.r5.model.MedicationUsage convertMedicationStatement(org.hl7.fhir.dstu2.model.MedicationStatement src) throws FHIRException { + public static org.hl7.fhir.r5.model.MedicationStatement convertMedicationStatement(org.hl7.fhir.dstu2.model.MedicationStatement src) throws FHIRException { if (src == null || src.isEmpty()) return null; - org.hl7.fhir.r5.model.MedicationUsage tgt = new org.hl7.fhir.r5.model.MedicationUsage(); + org.hl7.fhir.r5.model.MedicationStatement tgt = new org.hl7.fhir.r5.model.MedicationStatement(); ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyDomainResource(src, tgt); for (org.hl7.fhir.dstu2.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(Identifier10_50.convertIdentifier(t)); @@ -127,32 +127,32 @@ public class MedicationStatement10_50 { return tgt; } - static public org.hl7.fhir.r5.model.Enumeration convertMedicationStatementStatus(org.hl7.fhir.dstu2.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r5.model.Enumeration convertMedicationStatementStatus(org.hl7.fhir.dstu2.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; - org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodesEnumFactory()); + org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodesEnumFactory()); ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().copyElement(src, tgt); switch (src.getValue()) { case ACTIVE: - tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.RECORDED); + tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.RECORDED); break; case COMPLETED: - tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.RECORDED); + tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.RECORDED); break; case ENTEREDINERROR: - tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.ENTEREDINERROR); + tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.ENTEREDINERROR); break; case INTENDED: - tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.RECORDED); + tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.RECORDED); break; default: - tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.NULL); + tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.NULL); break; } return tgt; } - static public org.hl7.fhir.dstu2.model.Enumeration convertMedicationStatementStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.dstu2.model.Enumeration convertMedicationStatementStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2.model.Enumeration tgt = new org.hl7.fhir.dstu2.model.Enumeration<>(new org.hl7.fhir.dstu2.model.MedicationStatement.MedicationStatementStatusEnumFactory()); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/MessageHeader10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/MessageHeader10_50.java index 42307a975..1aec4ace4 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/MessageHeader10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/MessageHeader10_50.java @@ -6,6 +6,8 @@ import org.hl7.fhir.convertors.conv10_50.datatypes10_50.complextypes10_50.Codeab import org.hl7.fhir.convertors.conv10_50.datatypes10_50.complextypes10_50.Coding10_50; import org.hl7.fhir.convertors.conv10_50.datatypes10_50.complextypes10_50.ContactPoint10_50; import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.String10_50; +import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.Uri10_50; +import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Uri30_50; import org.hl7.fhir.exceptions.FHIRException; public class MessageHeader10_50 { @@ -19,8 +21,8 @@ public class MessageHeader10_50 { tgt.setNameElement(String10_50.convertString(src.getNameElement())); if (src.hasTarget()) tgt.setTarget(Reference10_50.convertReference(src.getTarget())); - if (src.hasEndpoint()) - tgt.setEndpoint(src.getEndpoint()); + if (src.hasEndpointUrlType()) + tgt.setEndpointElement(Uri10_50.convertUri(src.getEndpointUrlType())); return tgt; } @@ -34,7 +36,7 @@ public class MessageHeader10_50 { if (src.hasTarget()) tgt.setTarget(Reference10_50.convertReference(src.getTarget())); if (src.hasEndpoint()) - tgt.setEndpoint(src.getEndpoint()); + tgt.setEndpoint(Uri10_50.convertUri(src.getEndpointElement())); return tgt; } @@ -51,8 +53,8 @@ public class MessageHeader10_50 { tgt.setSource(convertMessageSourceComponent(src.getSource())); for (org.hl7.fhir.r5.model.MessageHeader.MessageDestinationComponent t : src.getDestination()) tgt.addDestination(convertMessageDestinationComponent(t)); - if (src.hasEnterer()) - tgt.setEnterer(Reference10_50.convertReference(src.getEnterer())); +// if (src.hasEnterer()) +// tgt.setEnterer(Reference10_50.convertReference(src.getEnterer())); if (src.hasAuthor()) tgt.setAuthor(Reference10_50.convertReference(src.getAuthor())); if (src.hasResponsible()) @@ -76,8 +78,8 @@ public class MessageHeader10_50 { tgt.setSource(convertMessageSourceComponent(src.getSource())); for (org.hl7.fhir.dstu2.model.MessageHeader.MessageDestinationComponent t : src.getDestination()) tgt.addDestination(convertMessageDestinationComponent(t)); - if (src.hasEnterer()) - tgt.setEnterer(Reference10_50.convertReference(src.getEnterer())); +// if (src.hasEnterer()) +// tgt.setEnterer(Reference10_50.convertReference(src.getEnterer())); if (src.hasAuthor()) tgt.setAuthor(Reference10_50.convertReference(src.getAuthor())); if (src.hasResponsible()) @@ -129,8 +131,8 @@ public class MessageHeader10_50 { tgt.setVersionElement(String10_50.convertString(src.getVersionElement())); if (src.hasContact()) tgt.setContact(ContactPoint10_50.convertContactPoint(src.getContact())); - if (src.hasEndpoint()) - tgt.setEndpoint(src.getEndpoint()); + if (src.hasEndpointUrlType()) + tgt.setEndpointElement(Uri10_50.convertUri(src.getEndpointUrlType())); return tgt; } @@ -148,7 +150,7 @@ public class MessageHeader10_50 { if (src.hasContact()) tgt.setContact(ContactPoint10_50.convertContactPoint(src.getContact())); if (src.hasEndpoint()) - tgt.setEndpoint(src.getEndpoint()); + tgt.setEndpoint(Uri10_50.convertUri(src.getEndpointElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/Observation10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/Observation10_50.java index f621eee54..f162266aa 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/Observation10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/Observation10_50.java @@ -158,7 +158,7 @@ public class Observation10_50 { if (src.hasAge()) tgt.setAge(Range10_50.convertRange(src.getAge())); if (src.hasTextElement()) - tgt.setTextElement(String10_50.convertString(src.getTextElement())); + tgt.setTextElement(String10_50.convertStringToMarkdown(src.getTextElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/OperationDefinition10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/OperationDefinition10_50.java index 140fa49c5..006f283a4 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/OperationDefinition10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/OperationDefinition10_50.java @@ -10,12 +10,16 @@ import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.Date import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.Integer10_50; import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.String10_50; import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.Uri10_50; +import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Code43_50; import org.hl7.fhir.dstu2.model.Reference; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CodeType; import org.hl7.fhir.r5.model.DataType; +import org.hl7.fhir.r5.model.Enumeration; import org.hl7.fhir.r5.model.Enumerations; import org.hl7.fhir.r5.model.Enumerations.SearchParamType; +import org.hl7.fhir.r5.model.Enumerations.VersionIndependentResourceTypesAll; +import org.hl7.fhir.r5.model.Enumerations.VersionIndependentResourceTypesAllEnumFactory; import org.hl7.fhir.utilities.Utilities; public class OperationDefinition10_50 { @@ -57,7 +61,7 @@ public class OperationDefinition10_50 { if (src.hasSystemElement()) tgt.setSystemElement(Boolean10_50.convertBoolean(src.getSystemElement())); if (src.getType()) - for (CodeType t : src.getResource()) tgt.addType(t.getValue()); + for (Enumeration t : src.getResource()) tgt.addType(t.getCode()); if (src.hasInstanceElement()) tgt.setInstanceElement(Boolean10_50.convertBoolean(src.getInstanceElement())); for (org.hl7.fhir.r5.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getParameter()) @@ -102,7 +106,7 @@ public class OperationDefinition10_50 { tgt.setBaseElement(Reference10_50.convertReferenceToCanonical(src.getBase())); if (src.hasSystemElement()) tgt.setSystemElement(Boolean10_50.convertBoolean(src.getSystemElement())); - 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.getResource().add(new Enumeration(new VersionIndependentResourceTypesAllEnumFactory(), Code10_50.convertCode(t))); tgt.setType(tgt.hasResource()); if (src.hasInstanceElement()) tgt.setInstanceElement(Boolean10_50.convertBoolean(src.getInstanceElement())); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/Practitioner10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/Practitioner10_50.java index cdcb15a9d..931598cc7 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/Practitioner10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/Practitioner10_50.java @@ -12,6 +12,7 @@ import org.hl7.fhir.convertors.conv10_50.datatypes10_50.complextypes10_50.Period import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.Boolean10_50; import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.Date10_50; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r5.model.Practitioner.PractitionerCommunicationComponent; public class Practitioner10_50 { @@ -37,7 +38,7 @@ public class Practitioner10_50 { for (org.hl7.fhir.dstu2.model.Practitioner.PractitionerQualificationComponent t : src.getQualification()) tgt.addQualification(convertPractitionerQualificationComponent(t)); for (org.hl7.fhir.dstu2.model.CodeableConcept t : src.getCommunication()) - tgt.addCommunication(CodeableConcept10_50.convertCodeableConcept(t)); + tgt.addCommunication().setLanguage(CodeableConcept10_50.convertCodeableConcept(t)); return tgt; } @@ -61,8 +62,8 @@ public class Practitioner10_50 { for (org.hl7.fhir.r5.model.Attachment t : src.getPhoto()) tgt.addPhoto(Attachment10_50.convertAttachment(t)); for (org.hl7.fhir.r5.model.Practitioner.PractitionerQualificationComponent t : src.getQualification()) tgt.addQualification(convertPractitionerQualificationComponent(t)); - for (org.hl7.fhir.r5.model.CodeableConcept t : src.getCommunication()) - tgt.addCommunication(CodeableConcept10_50.convertCodeableConcept(t)); + for (PractitionerCommunicationComponent t : src.getCommunication()) + tgt.addCommunication(CodeableConcept10_50.convertCodeableConcept(t.getLanguage())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/Resource10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/Resource10_50.java index 350de9f70..cf75c332d 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/Resource10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/Resource10_50.java @@ -212,8 +212,8 @@ public class Resource10_50 { return Location10_50.convertLocation((org.hl7.fhir.r5.model.Location) src); if (src instanceof org.hl7.fhir.r5.model.MedicationDispense) return MedicationDispense10_50.convertMedicationDispense((org.hl7.fhir.r5.model.MedicationDispense) src); - if (src instanceof org.hl7.fhir.r5.model.MedicationUsage) - return MedicationStatement10_50.convertMedicationStatement((org.hl7.fhir.r5.model.MedicationUsage) src); + if (src instanceof org.hl7.fhir.r5.model.MedicationStatement) + return MedicationStatement10_50.convertMedicationStatement((org.hl7.fhir.r5.model.MedicationStatement) src); if (src instanceof org.hl7.fhir.r5.model.MessageHeader) return MessageHeader10_50.convertMessageHeader((org.hl7.fhir.r5.model.MessageHeader) src); if (src instanceof org.hl7.fhir.r5.model.NamingSystem) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/Schedule10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/Schedule10_50.java index c65b2a682..0fae2e237 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/Schedule10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/Schedule10_50.java @@ -44,7 +44,7 @@ public class Schedule10_50 { if (src.hasPlanningHorizon()) tgt.setPlanningHorizon(Period10_50.convertPeriod(src.getPlanningHorizon())); if (src.hasCommentElement()) - tgt.setCommentElement(String10_50.convertString(src.getCommentElement())); + tgt.setCommentElement(String10_50.convertStringToMarkdown(src.getCommentElement())); return tgt; } } \ No newline at end of file diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/SearchParameter10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/SearchParameter10_50.java index fbdb5c66e..e50dbed52 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/SearchParameter10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/SearchParameter10_50.java @@ -10,6 +10,9 @@ import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.Uri1 import org.hl7.fhir.dstu2.utils.ToolingExtensions; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CodeType; +import org.hl7.fhir.r5.model.Enumeration; +import org.hl7.fhir.r5.model.Enumerations.VersionIndependentResourceTypesAll; +import org.hl7.fhir.r5.model.Enumerations.VersionIndependentResourceTypesAllEnumFactory; public class SearchParameter10_50 { @@ -36,7 +39,7 @@ public class SearchParameter10_50 { tgt.setRequirements(src.getPurpose()); if (src.hasCodeElement()) tgt.setCodeElement(Code10_50.convertCode(src.getCodeElement())); - for (CodeType t : src.getBase()) tgt.setBaseElement(Code10_50.convertCode(t)); + for (Enumeration t : src.getBase()) tgt.setBaseElement(Code10_50.convertCode(t.getCodeType())); if (src.hasType()) tgt.setTypeElement(Enumerations10_50.convertSearchParamType(src.getTypeElement())); if (src.hasDescription()) @@ -46,7 +49,7 @@ public class SearchParameter10_50 { // tgt.setXpathElement(String10_50.convertString(src.getXpathElement())); if (src.hasProcessingMode()) tgt.setXpathUsageElement(convertXPathUsageType(src.getProcessingModeElement())); - for (CodeType t : src.getTarget()) tgt.addTarget(t.getValue()); + for (Enumeration t : src.getTarget()) tgt.getTarget().add(Code10_50.convertCode(t.getCodeType())); return tgt; } @@ -73,7 +76,7 @@ public class SearchParameter10_50 { tgt.setPurpose(src.getRequirements()); if (src.hasCodeElement()) tgt.setCodeElement(Code10_50.convertCode(src.getCodeElement())); - tgt.getBase().add(Code10_50.convertCode(src.getBaseElement())); + tgt.getBase().add(new Enumeration(new VersionIndependentResourceTypesAllEnumFactory(), Code10_50.convertCode(src.getBaseElement()))); if (src.hasType()) tgt.setTypeElement(Enumerations10_50.convertSearchParamType(src.getTypeElement())); if (src.hasDescription()) @@ -83,7 +86,7 @@ public class SearchParameter10_50 { // tgt.setXpathElement(String10_50.convertString(src.getXpathElement())); if (src.hasXpathUsage()) tgt.setProcessingModeElement(convertXPathUsageType(src.getXpathUsageElement())); - for (org.hl7.fhir.dstu2.model.CodeType t : src.getTarget()) tgt.addTarget(t.getValue()); + for (org.hl7.fhir.dstu2.model.CodeType t : src.getTarget()) tgt.getTarget().add(new Enumeration(new VersionIndependentResourceTypesAllEnumFactory(), t.getValue())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/Substance10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/Substance10_50.java index e4948a11b..34279f3ae 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/Substance10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/Substance10_50.java @@ -25,7 +25,7 @@ public class Substance10_50 { if (src.hasCode()) tgt.getCode().setConcept(CodeableConcept10_50.convertCodeableConcept(src.getCode())); if (src.hasDescriptionElement()) - tgt.setDescriptionElement(String10_50.convertString(src.getDescriptionElement())); + tgt.setDescriptionElement(String10_50.convertStringToMarkdown(src.getDescriptionElement())); for (org.hl7.fhir.dstu2.model.Substance.SubstanceInstanceComponent t : src.getInstance()) convertSubstanceInstanceComponent(t, tgt); for (org.hl7.fhir.dstu2.model.Substance.SubstanceIngredientComponent t : src.getIngredient()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/TestScript10_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/TestScript10_50.java index 9c601d2b8..6546c5c5d 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/TestScript10_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/resources10_50/TestScript10_50.java @@ -161,7 +161,7 @@ public class TestScript10_50 { tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.NOTMODIFIED); break; case BAD: - tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.BAD); + tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.BADREQUEST); break; case FORBIDDEN: tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.FORBIDDEN); @@ -182,7 +182,7 @@ public class TestScript10_50 { tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.PRECONDITIONFAILED); break; case UNPROCESSABLE: - tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.UNPROCESSABLE); + tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.UNPROCESSABLECONTENT); break; default: tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.NULL); @@ -209,7 +209,7 @@ public class TestScript10_50 { case NOTMODIFIED: tgt.setValue(org.hl7.fhir.dstu2.model.TestScript.AssertionResponseTypes.NOTMODIFIED); break; - case BAD: + case BADREQUEST: tgt.setValue(org.hl7.fhir.dstu2.model.TestScript.AssertionResponseTypes.BAD); break; case FORBIDDEN: @@ -230,7 +230,7 @@ public class TestScript10_50 { case PRECONDITIONFAILED: tgt.setValue(org.hl7.fhir.dstu2.model.TestScript.AssertionResponseTypes.PRECONDITIONFAILED); break; - case UNPROCESSABLE: + case UNPROCESSABLECONTENT: tgt.setValue(org.hl7.fhir.dstu2.model.TestScript.AssertionResponseTypes.UNPROCESSABLE); break; default: diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/datatypes14_50/ElementDefinition14_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/datatypes14_50/ElementDefinition14_50.java index 169512b70..8cf9ee56b 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/datatypes14_50/ElementDefinition14_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/datatypes14_50/ElementDefinition14_50.java @@ -496,7 +496,9 @@ public class ElementDefinition14_50 { if (src.hasSeverity()) tgt.setSeverityElement(convertConstraintSeverity(src.getSeverityElement())); if (src.hasHumanElement()) tgt.setHumanElement(String14_50.convertString(src.getHumanElement())); if (src.hasExpression()) tgt.setExpression(convertToR4Expression(src.getExpression())); - if (src.hasXpathElement()) tgt.setXpathElement(String14_50.convertString(src.getXpathElement())); + if (src.hasXpath()) { + tgt.addExtension(new org.hl7.fhir.r5.model.Extension(org.hl7.fhir.r5.utils.ToolingExtensions.EXT_XPATH_CONSTRAINT, new org.hl7.fhir.r5.model.StringType(src.getXpath()))); + } return tgt; } @@ -509,7 +511,9 @@ public class ElementDefinition14_50 { if (src.hasSeverity()) tgt.setSeverityElement(convertConstraintSeverity(src.getSeverityElement())); if (src.hasHumanElement()) tgt.setHumanElement(String14_50.convertString(src.getHumanElement())); if (src.hasExpression()) tgt.setExpression(convertTo2016MayExpression(src.getExpression())); - if (src.hasXpathElement()) tgt.setXpathElement(String14_50.convertString(src.getXpathElement())); + if (org.hl7.fhir.r5.utils.ToolingExtensions.hasExtension(src, org.hl7.fhir.r5.utils.ToolingExtensions.EXT_XPATH_CONSTRAINT)) { + tgt.setXpath(org.hl7.fhir.r5.utils.ToolingExtensions.readStringExtension(src, org.hl7.fhir.r5.utils.ToolingExtensions.EXT_XPATH_CONSTRAINT)); + } return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/datatypes14_50/primitivetypes14_50/Id14_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/datatypes14_50/primitivetypes14_50/Id14_50.java index 8033112df..9f7ad8d21 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/datatypes14_50/primitivetypes14_50/Id14_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/datatypes14_50/primitivetypes14_50/Id14_50.java @@ -1,5 +1,6 @@ package org.hl7.fhir.convertors.conv14_50.datatypes14_50.primitivetypes14_50; +import org.hl7.fhir.convertors.context.ConversionContext14_50; import org.hl7.fhir.convertors.context.ConversionContext14_50; import org.hl7.fhir.exceptions.FHIRException; @@ -15,4 +16,19 @@ public class Id14_50 { ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().copyElement(src, tgt); return tgt; } + + public static org.hl7.fhir.r5.model.StringType convertIdToString(org.hl7.fhir.dstu2016may.model.IdType src) { + org.hl7.fhir.r5.model.StringType tgt = src.hasValue() ? new org.hl7.fhir.r5.model.StringType(src.getValueAsString()) : new org.hl7.fhir.r5.model.StringType(); + ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().copyElement(src, tgt); + return tgt; + } + + + public static org.hl7.fhir.dstu2016may.model.IdType convertId(org.hl7.fhir.r5.model.StringType src) throws FHIRException { + org.hl7.fhir.dstu2016may.model.IdType tgt = src.hasValue() ? new org.hl7.fhir.dstu2016may.model.IdType(src.getValueAsString()) : new org.hl7.fhir.dstu2016may.model.IdType(); + ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().copyElement(src, tgt); + return tgt; + } + + } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/resources14_50/ConceptMap14_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/resources14_50/ConceptMap14_50.java index 7e73a5ba0..a80148454 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/resources14_50/ConceptMap14_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/resources14_50/ConceptMap14_50.java @@ -67,7 +67,7 @@ public class ConceptMap14_50 { tt = ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().convertType(src.getTarget()); tgt.setTargetScope(tt instanceof org.hl7.fhir.r5.model.Reference ? new CanonicalType(((org.hl7.fhir.r5.model.Reference) tt).getReference()) : tt); for (org.hl7.fhir.dstu2016may.model.ConceptMap.SourceElementComponent t : src.getElement()) { - List> ws = convertSourceElementComponent(t); + List> ws = convertSourceElementComponent(t, tgt); for (SourceElementComponentWrapper w : ws) getGroup(tgt, w.getSource(), w.getTarget()).addElement(w.getComp()); } @@ -123,7 +123,7 @@ public class ConceptMap14_50 { tgt.setTarget(ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().convertType(src.getTargetScope())); for (org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent g : src.getGroup()) for (org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent t : g.getElement()) - tgt.addElement(convertSourceElementComponent(t, g)); + tgt.addElement(convertSourceElementComponent(t, g, src)); return tgt; } @@ -221,13 +221,13 @@ public class ConceptMap14_50 { return tgt; } - public static org.hl7.fhir.dstu2016may.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent src) throws FHIRException { + public static org.hl7.fhir.dstu2016may.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent src, org.hl7.fhir.r5.model.ConceptMap srcMap) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2016may.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.dstu2016may.model.ConceptMap.OtherElementComponent(); ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().copyBackboneElement(src,tgt); - if (src.hasPropertyElement()) - tgt.setElementElement(Uri14_50.convertUri(src.getPropertyElement())); + if (src.hasAttribute()) + tgt.setElement(srcMap.getAttributeUri(src.getAttribute())); if (src.hasValueCoding()) { tgt.setSystem(src.getValueCoding().getSystem()); tgt.setCode(src.getValueCoding().getCode()); @@ -237,13 +237,13 @@ public class ConceptMap14_50 { return tgt; } - public static org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.dstu2016may.model.ConceptMap.OtherElementComponent src) throws FHIRException { + public static org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.dstu2016may.model.ConceptMap.OtherElementComponent src, org.hl7.fhir.r5.model.ConceptMap tgtMap) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent(); ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().copyBackboneElement(src,tgt); if (src.hasElementElement()) - tgt.setPropertyElement(Uri14_50.convertUri(src.getElementElement())); + tgt.setAttribute(tgtMap.registerAttribute(src.getElement())); if (src.hasSystem()) { tgt.setValue(new Coding().setSystem(src.getSystem()).setCode(src.getCode())); } else if (src.hasCodeElement()) { @@ -252,7 +252,7 @@ public class ConceptMap14_50 { return tgt; } - public static List> convertSourceElementComponent(org.hl7.fhir.dstu2016may.model.ConceptMap.SourceElementComponent src) throws FHIRException { + public static List> convertSourceElementComponent(org.hl7.fhir.dstu2016may.model.ConceptMap.SourceElementComponent src, org.hl7.fhir.r5.model.ConceptMap tgtMap) throws FHIRException { List> res = new ArrayList<>(); if (src == null || src.isEmpty()) return res; @@ -264,14 +264,14 @@ public class ConceptMap14_50 { if (t.getEquivalence() == org.hl7.fhir.dstu2016may.model.Enumerations.ConceptMapEquivalence.UNMATCHED) { tgt.setNoMap(true); } else { - tgt.addTarget(convertTargetElementComponent(t)); + tgt.addTarget(convertTargetElementComponent(t, tgtMap)); } res.add(new SourceElementComponentWrapper<>(tgt, src.getSystem(), t.getSystem())); } return res; } - public static org.hl7.fhir.dstu2016may.model.ConceptMap.SourceElementComponent convertSourceElementComponent(org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent src, org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent g) throws FHIRException { + public static org.hl7.fhir.dstu2016may.model.ConceptMap.SourceElementComponent convertSourceElementComponent(org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent src, org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent g, org.hl7.fhir.r5.model.ConceptMap srcMap) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2016may.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.dstu2016may.model.ConceptMap.SourceElementComponent(); @@ -284,12 +284,12 @@ public class ConceptMap14_50 { tgt.addTarget(new org.hl7.fhir.dstu2016may.model.ConceptMap.TargetElementComponent().setEquivalence(org.hl7.fhir.dstu2016may.model.Enumerations.ConceptMapEquivalence.UNMATCHED)); } else { for (org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent t : src.getTarget()) - tgt.addTarget(convertTargetElementComponent(t, g)); + tgt.addTarget(convertTargetElementComponent(t, g, srcMap)); } return tgt; } - public static org.hl7.fhir.dstu2016may.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent src, org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent g) throws FHIRException { + public static org.hl7.fhir.dstu2016may.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent src, org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent g, org.hl7.fhir.r5.model.ConceptMap srcMap) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu2016may.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.dstu2016may.model.ConceptMap.TargetElementComponent(); @@ -303,13 +303,13 @@ public class ConceptMap14_50 { if (src.hasComment()) tgt.setCommentsElement(String14_50.convertString(src.getCommentElement())); for (org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) - tgt.addDependsOn(convertOtherElementComponent(t)); + tgt.addDependsOn(convertOtherElementComponent(t, srcMap)); for (org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent t : src.getProduct()) - tgt.addProduct(convertOtherElementComponent(t)); + tgt.addProduct(convertOtherElementComponent(t, srcMap)); return tgt; } - public static org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.dstu2016may.model.ConceptMap.TargetElementComponent src) throws FHIRException { + public static org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.dstu2016may.model.ConceptMap.TargetElementComponent src, org.hl7.fhir.r5.model.ConceptMap tgtMap) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent(); @@ -321,9 +321,9 @@ public class ConceptMap14_50 { if (src.hasComments()) tgt.setCommentElement(String14_50.convertString(src.getCommentsElement())); for (org.hl7.fhir.dstu2016may.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) - tgt.addDependsOn(convertOtherElementComponent(t)); + tgt.addDependsOn(convertOtherElementComponent(t, tgtMap)); for (org.hl7.fhir.dstu2016may.model.ConceptMap.OtherElementComponent t : src.getProduct()) - tgt.addProduct(convertOtherElementComponent(t)); + tgt.addProduct(convertOtherElementComponent(t, tgtMap)); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/resources14_50/Conformance14_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/resources14_50/Conformance14_50.java index 196b28c71..c98e72650 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/resources14_50/Conformance14_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/resources14_50/Conformance14_50.java @@ -227,7 +227,7 @@ public class Conformance14_50 { org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementImplementationComponent tgt = new org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementImplementationComponent(); ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().copyBackboneElement(src,tgt); if (src.hasDescriptionElement()) - tgt.setDescriptionElement(String14_50.convertString(src.getDescriptionElement())); + tgt.setDescriptionElement(String14_50.convertStringToMarkdown(src.getDescriptionElement())); if (src.hasUrl()) tgt.setUrl(src.getUrl()); return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/resources14_50/OperationDefinition14_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/resources14_50/OperationDefinition14_50.java index 0ad42990a..8bc3b7e8e 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/resources14_50/OperationDefinition14_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/resources14_50/OperationDefinition14_50.java @@ -11,10 +11,14 @@ import org.hl7.fhir.convertors.conv14_50.datatypes14_50.primitivetypes14_50.Date import org.hl7.fhir.convertors.conv14_50.datatypes14_50.primitivetypes14_50.Integer14_50; import org.hl7.fhir.convertors.conv14_50.datatypes14_50.primitivetypes14_50.String14_50; import org.hl7.fhir.convertors.conv14_50.datatypes14_50.primitivetypes14_50.Uri14_50; +import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Code43_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CodeType; import org.hl7.fhir.r5.model.DataType; +import org.hl7.fhir.r5.model.Enumeration; import org.hl7.fhir.r5.model.Enumerations; +import org.hl7.fhir.r5.model.Enumerations.VersionIndependentResourceTypesAll; +import org.hl7.fhir.r5.model.Enumerations.VersionIndependentResourceTypesAllEnumFactory; public class OperationDefinition14_50 { @@ -61,7 +65,7 @@ public class OperationDefinition14_50 { if (src.hasSystemElement()) tgt.setSystemElement(Boolean14_50.convertBoolean(src.getSystemElement())); if (src.getType()) - for (CodeType t : src.getResource()) tgt.addType(t.getValue()); + for (Enumeration t : src.getResource()) tgt.addType(t.getCode()); if (src.hasInstanceElement()) tgt.setInstanceElement(Boolean14_50.convertBoolean(src.getInstanceElement())); for (org.hl7.fhir.r5.model.OperationDefinition.OperationDefinitionParameterComponent t : src.getParameter()) @@ -111,7 +115,7 @@ public class OperationDefinition14_50 { tgt.setBaseElement(Reference14_50.convertReferenceToCanonical(src.getBase())); if (src.hasSystemElement()) tgt.setSystemElement(Boolean14_50.convertBoolean(src.getSystemElement())); - for (org.hl7.fhir.dstu2016may.model.CodeType t : src.getType()) tgt.addResource(t.getValue()); + for (org.hl7.fhir.dstu2016may.model.CodeType t : src.getType()) tgt.getResource().add(new Enumeration(new VersionIndependentResourceTypesAllEnumFactory(), Code14_50.convertCode(t))); tgt.setType(tgt.hasResource()); if (src.hasInstanceElement()) tgt.setInstanceElement(Boolean14_50.convertBoolean(src.getInstanceElement())); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/resources14_50/SearchParameter14_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/resources14_50/SearchParameter14_50.java index 66fef5020..2f70cb3c4 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/resources14_50/SearchParameter14_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/resources14_50/SearchParameter14_50.java @@ -11,6 +11,9 @@ import org.hl7.fhir.convertors.conv14_50.datatypes14_50.primitivetypes14_50.Stri import org.hl7.fhir.convertors.conv14_50.datatypes14_50.primitivetypes14_50.Uri14_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CodeType; +import org.hl7.fhir.r5.model.Enumeration; +import org.hl7.fhir.r5.model.Enumerations.VersionIndependentResourceTypesAll; +import org.hl7.fhir.r5.model.Enumerations.VersionIndependentResourceTypesAllEnumFactory; public class SearchParameter14_50 { @@ -42,7 +45,7 @@ public class SearchParameter14_50 { tgt.setRequirements(src.getPurpose()); if (src.hasCodeElement()) tgt.setCodeElement(Code14_50.convertCode(src.getCodeElement())); - for (CodeType t : src.getBase()) tgt.setBase(t.asStringValue()); + for (Enumeration t : src.getBase()) tgt.setBaseElement(Code14_50.convertCode(t.getCodeType())); if (src.hasType()) tgt.setTypeElement(Enumerations14_50.convertSearchParamType(src.getTypeElement())); if (src.hasDescription()) @@ -53,7 +56,7 @@ public class SearchParameter14_50 { // tgt.setXpathElement(String14_50.convertString(src.getXpathElement())); if (src.hasProcessingMode()) tgt.setXpathUsageElement(convertXPathUsageType(src.getProcessingModeElement())); - for (CodeType t : src.getTarget()) tgt.addTarget(t.getValue()); + for (Enumeration t : src.getTarget()) tgt.getTarget().add(Code14_50.convertCode(t.getCodeType())); return tgt; } @@ -85,7 +88,7 @@ public class SearchParameter14_50 { tgt.setPurpose(src.getRequirements()); if (src.hasCodeElement()) tgt.setCodeElement(Code14_50.convertCode(src.getCodeElement())); - tgt.getBase().add(Code14_50.convertCode(src.getBaseElement())); + tgt.getBase().add(new Enumeration(new VersionIndependentResourceTypesAllEnumFactory(), Code14_50.convertCode(src.getBaseElement()))); if (src.hasType()) tgt.setTypeElement(Enumerations14_50.convertSearchParamType(src.getTypeElement())); if (src.hasDescription()) @@ -96,7 +99,7 @@ public class SearchParameter14_50 { // tgt.setXpathElement(String14_50.convertString(src.getXpathElement())); if (src.hasXpathUsage()) tgt.setProcessingModeElement(convertXPathUsageType(src.getXpathUsageElement())); - for (org.hl7.fhir.dstu2016may.model.CodeType t : src.getTarget()) tgt.addTarget(t.getValue()); + for (org.hl7.fhir.dstu2016may.model.CodeType t : src.getTarget()) tgt.getTarget().add(new Enumeration(new VersionIndependentResourceTypesAllEnumFactory(), t.getValue())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/resources14_50/StructureMap14_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/resources14_50/StructureMap14_50.java index c0ad74018..ee7f8a6c0 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/resources14_50/StructureMap14_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv14_50/resources14_50/StructureMap14_50.java @@ -330,7 +330,7 @@ public class StructureMap14_50 { org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleTargetComponent tgt = new org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleTargetComponent(); ConversionContext14_50.INSTANCE.getVersionConvertor_14_50().copyBackboneElement(src,tgt); if (src.hasContext()) - tgt.setContextElement(Id14_50.convertId(src.getContextElement())); + tgt.setContextElement(Id14_50.convertIdToString(src.getContextElement())); if (src.hasContextType() && src.getContextType() == org.hl7.fhir.dstu2016may.model.StructureMap.StructureMapContextType.VARIABLE) throw new Error("This conversion is not supported. Consult code maintainers"); // this should never happens - no one knows what the intent was here. if (src.hasElement()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Resource30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Resource30_50.java index 6c7e8cb59..b64e7b715 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Resource30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/Resource30_50.java @@ -380,8 +380,8 @@ public class Resource30_50 { return MedicationDispense30_50.convertMedicationDispense((org.hl7.fhir.r5.model.MedicationDispense) src); if (src instanceof org.hl7.fhir.r5.model.MedicationRequest) return MedicationRequest30_50.convertMedicationRequest((org.hl7.fhir.r5.model.MedicationRequest) src); - if (src instanceof org.hl7.fhir.r5.model.MedicationUsage) - return MedicationStatement30_50.convertMedicationStatement((org.hl7.fhir.r5.model.MedicationUsage) src); + if (src instanceof org.hl7.fhir.r5.model.MedicationStatement) + return MedicationStatement30_50.convertMedicationStatement((org.hl7.fhir.r5.model.MedicationStatement) src); if (src instanceof org.hl7.fhir.r5.model.MessageDefinition) return MessageDefinition30_50.convertMessageDefinition((org.hl7.fhir.r5.model.MessageDefinition) src); if (src instanceof org.hl7.fhir.r5.model.MessageHeader) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/datatypes30_50/ElementDefinition30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/datatypes30_50/ElementDefinition30_50.java index 30506c147..f92cc6390 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/datatypes30_50/ElementDefinition30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/datatypes30_50/ElementDefinition30_50.java @@ -558,7 +558,9 @@ public class ElementDefinition30_50 { if (src.hasSeverity()) tgt.setSeverityElement(convertConstraintSeverity(src.getSeverityElement())); if (src.hasHuman()) tgt.setHumanElement(String30_50.convertString(src.getHumanElement())); if (src.hasExpression()) tgt.setExpressionElement(String30_50.convertString(src.getExpressionElement())); - if (src.hasXpath()) tgt.setXpathElement(String30_50.convertString(src.getXpathElement())); + if (src.hasXpath()) { + tgt.addExtension(new org.hl7.fhir.r5.model.Extension(org.hl7.fhir.r5.utils.ToolingExtensions.EXT_XPATH_CONSTRAINT, new org.hl7.fhir.r5.model.StringType(src.getXpath()))); + } if (src.hasSource()) tgt.setSource(src.getSource()); return tgt; } @@ -566,13 +568,15 @@ public class ElementDefinition30_50 { public static org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionConstraintComponent convertElementDefinitionConstraintComponent(ElementDefinition.ElementDefinitionConstraintComponent src) throws FHIRException { if (src == null) return null; org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionConstraintComponent tgt = new org.hl7.fhir.dstu3.model.ElementDefinition.ElementDefinitionConstraintComponent(); - ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); + ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt, org.hl7.fhir.r5.utils.ToolingExtensions.EXT_XPATH_CONSTRAINT); if (src.hasKey()) tgt.setKeyElement(Id30_50.convertId(src.getKeyElement())); if (src.hasRequirements()) tgt.setRequirementsElement(String30_50.convertString(src.getRequirementsElement())); if (src.hasSeverity()) tgt.setSeverityElement(convertConstraintSeverity(src.getSeverityElement())); if (src.hasHuman()) tgt.setHumanElement(String30_50.convertString(src.getHumanElement())); if (src.hasExpression()) tgt.setExpressionElement(String30_50.convertString(src.getExpressionElement())); - if (src.hasXpath()) tgt.setXpathElement(String30_50.convertString(src.getXpathElement())); + if (org.hl7.fhir.r5.utils.ToolingExtensions.hasExtension(src, org.hl7.fhir.r5.utils.ToolingExtensions.EXT_XPATH_CONSTRAINT)) { + tgt.setXpath(org.hl7.fhir.r5.utils.ToolingExtensions.readStringExtension(src, org.hl7.fhir.r5.utils.ToolingExtensions.EXT_XPATH_CONSTRAINT)); + } if (src.hasSource()) tgt.setSource(src.getSource()); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/datatypes30_50/primitivetypes30_50/Code30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/datatypes30_50/primitivetypes30_50/Code30_50.java index 1aaeeaab7..61cfed78f 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/datatypes30_50/primitivetypes30_50/Code30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/datatypes30_50/primitivetypes30_50/Code30_50.java @@ -3,7 +3,6 @@ package org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50; import org.hl7.fhir.convertors.context.ConversionContext30_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.Enumeration; -import org.hl7.fhir.r5.model.Enumerations.AllResourceTypes; public class Code30_50 { public static org.hl7.fhir.r5.model.CodeType convertCode(org.hl7.fhir.dstu3.model.CodeType src) throws FHIRException { @@ -43,12 +42,12 @@ public class Code30_50 { } - public static org.hl7.fhir.r5.model.Enumeration convertResourceEnum(org.hl7.fhir.dstu3.model.CodeType src) { - return new Enumeration(new org.hl7.fhir.r5.model.Enumerations.AllResourceTypesEnumFactory(), src.getValue()); - } - - public static org.hl7.fhir.dstu3.model.CodeType convertResourceEnum(org.hl7.fhir.r5.model.Enumeration src) { - return new org.hl7.fhir.dstu3.model.CodeType(src.getCode()); - } +// public static org.hl7.fhir.r5.model.Enumeration convertResourceEnum(org.hl7.fhir.dstu3.model.CodeType src) { +// return new Enumeration(new org.hl7.fhir.r5.model.Enumerations.AllResourceTypesEnumFactory(), src.getValue()); +// } +// +// public static org.hl7.fhir.dstu3.model.CodeType convertResourceEnum(org.hl7.fhir.r5.model.Enumeration src) { +// return new org.hl7.fhir.dstu3.model.CodeType(src.getCode()); +// } } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/datatypes30_50/primitivetypes30_50/Id30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/datatypes30_50/primitivetypes30_50/Id30_50.java index c5c60acc5..277fc98b4 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/datatypes30_50/primitivetypes30_50/Id30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/datatypes30_50/primitivetypes30_50/Id30_50.java @@ -1,5 +1,6 @@ package org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50; +import org.hl7.fhir.convertors.context.ConversionContext30_50; import org.hl7.fhir.convertors.context.ConversionContext30_50; import org.hl7.fhir.exceptions.FHIRException; @@ -15,4 +16,18 @@ public class Id30_50 { ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); return tgt; } + public static org.hl7.fhir.r5.model.StringType convertIdToString(org.hl7.fhir.dstu3.model.IdType src) { + org.hl7.fhir.r5.model.StringType tgt = src.hasValue() ? new org.hl7.fhir.r5.model.StringType(src.getValueAsString()) : new org.hl7.fhir.r5.model.StringType(); + ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); + return tgt; + } + + + public static org.hl7.fhir.dstu3.model.IdType convertId(org.hl7.fhir.r5.model.StringType src) throws FHIRException { + org.hl7.fhir.dstu3.model.IdType tgt = src.hasValue() ? new org.hl7.fhir.dstu3.model.IdType(src.getValueAsString()) : new org.hl7.fhir.dstu3.model.IdType(); + ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); + return tgt; + } + + } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/ActivityDefinition30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/ActivityDefinition30_50.java index 064aecc22..40d5253df 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/ActivityDefinition30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/ActivityDefinition30_50.java @@ -51,7 +51,7 @@ public class ActivityDefinition30_50 { if (src.hasPurpose()) tgt.setPurposeElement(MarkDown30_50.convertMarkdown(src.getPurposeElement())); if (src.hasUsage()) - tgt.setUsageElement(String30_50.convertString(src.getUsageElement())); + tgt.setUsageElement(String30_50.convertStringToMarkdown(src.getUsageElement())); if (src.hasApprovalDate()) tgt.setApprovalDateElement(Date30_50.convertDate(src.getApprovalDateElement())); if (src.hasLastReviewDate()) @@ -256,9 +256,6 @@ public class ActivityDefinition30_50 { case COMMUNICATIONREQUEST: tgt.setValue(org.hl7.fhir.r5.model.ActivityDefinition.RequestResourceTypes.COMMUNICATIONREQUEST); break; - case CONTRACT: - tgt.setValue(org.hl7.fhir.r5.model.ActivityDefinition.RequestResourceTypes.CONTRACT); - break; case DEVICEREQUEST: tgt.setValue(org.hl7.fhir.r5.model.ActivityDefinition.RequestResourceTypes.DEVICEREQUEST); break; @@ -317,9 +314,6 @@ public class ActivityDefinition30_50 { case COMMUNICATIONREQUEST: tgt.setValue(org.hl7.fhir.dstu3.model.ActivityDefinition.ActivityDefinitionKind.COMMUNICATIONREQUEST); break; - case CONTRACT: - tgt.setValue(org.hl7.fhir.dstu3.model.ActivityDefinition.ActivityDefinitionKind.CONTRACT); - break; case DEVICEREQUEST: tgt.setValue(org.hl7.fhir.dstu3.model.ActivityDefinition.ActivityDefinitionKind.DEVICEREQUEST); break; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/Appointment30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/Appointment30_50.java index b912a2429..94be56b58 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/Appointment30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/Appointment30_50.java @@ -273,7 +273,7 @@ public class Appointment30_50 { return tgt; } - static public org.hl7.fhir.dstu3.model.Enumeration convertParticipationStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.dstu3.model.Enumeration convertParticipationStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.Enumeration tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.Appointment.ParticipationStatusEnumFactory()); @@ -298,26 +298,26 @@ public class Appointment30_50 { return tgt; } - static public org.hl7.fhir.r5.model.Enumeration convertParticipationStatus(org.hl7.fhir.dstu3.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r5.model.Enumeration convertParticipationStatus(org.hl7.fhir.dstu3.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; - org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.ParticipationStatusEnumFactory()); + org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Appointment.ParticipationStatusEnumFactory()); ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); switch (src.getValue()) { case ACCEPTED: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.ACCEPTED); + tgt.setValue(org.hl7.fhir.r5.model.Appointment.ParticipationStatus.ACCEPTED); break; case DECLINED: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.DECLINED); + tgt.setValue(org.hl7.fhir.r5.model.Appointment.ParticipationStatus.DECLINED); break; case TENTATIVE: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.TENTATIVE); + tgt.setValue(org.hl7.fhir.r5.model.Appointment.ParticipationStatus.TENTATIVE); break; case NEEDSACTION: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.NEEDSACTION); + tgt.setValue(org.hl7.fhir.r5.model.Appointment.ParticipationStatus.NEEDSACTION); break; default: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.NULL); + tgt.setValue(org.hl7.fhir.r5.model.Appointment.ParticipationStatus.NULL); break; } return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/AppointmentResponse30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/AppointmentResponse30_50.java index 9c02fd6cb..9ea7fc226 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/AppointmentResponse30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/AppointmentResponse30_50.java @@ -30,7 +30,7 @@ public class AppointmentResponse30_50 { if (src.hasParticipantStatus()) tgt.setParticipantStatusElement(convertParticipantStatus(src.getParticipantStatusElement())); if (src.hasComment()) - tgt.setCommentElement(String30_50.convertString(src.getCommentElement())); + tgt.setCommentElement(String30_50.convertStringToMarkdown(src.getCommentElement())); return tgt; } @@ -58,7 +58,7 @@ public class AppointmentResponse30_50 { return tgt; } - static public org.hl7.fhir.dstu3.model.Enumeration convertParticipantStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.dstu3.model.Enumeration convertParticipantStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.Enumeration tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.AppointmentResponse.ParticipantStatusEnumFactory()); @@ -83,26 +83,26 @@ public class AppointmentResponse30_50 { return tgt; } - static public org.hl7.fhir.r5.model.Enumeration convertParticipantStatus(org.hl7.fhir.dstu3.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r5.model.Enumeration convertParticipantStatus(org.hl7.fhir.dstu3.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; - org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.ParticipationStatusEnumFactory()); + org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatusEnumFactory()); ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); switch (src.getValue()) { case ACCEPTED: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.ACCEPTED); + tgt.setValue(org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus.ACCEPTED); break; case DECLINED: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.DECLINED); + tgt.setValue(org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus.DECLINED); break; case TENTATIVE: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.TENTATIVE); + tgt.setValue(org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus.TENTATIVE); break; case NEEDSACTION: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.NEEDSACTION); + tgt.setValue(org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus.NEEDSACTION); break; default: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.NULL); + tgt.setValue(org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus.NULL); break; } return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/BodySite30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/BodySite30_50.java index 9e15a97ce..d7ccd3c18 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/BodySite30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/BodySite30_50.java @@ -20,7 +20,7 @@ public class BodySite30_50 { if (src.hasActive()) tgt.setActiveElement(Boolean30_50.convertBoolean(src.getActiveElement())); if (src.hasDescription()) - tgt.setDescriptionElement(String30_50.convertString(src.getDescriptionElement())); + tgt.setDescriptionElement(String30_50.convertStringToMarkdown(src.getDescriptionElement())); for (org.hl7.fhir.dstu3.model.Attachment t : src.getImage()) tgt.addImage(Attachment30_50.convertAttachment(t)); if (src.hasPatient()) tgt.setPatient(Reference30_50.convertReference(src.getPatient())); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/CapabilityStatement30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/CapabilityStatement30_50.java index dea8bd622..19ea47cde 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/CapabilityStatement30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/CapabilityStatement30_50.java @@ -185,7 +185,7 @@ public class CapabilityStatement30_50 { org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementImplementationComponent tgt = new org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementImplementationComponent(); ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt); if (src.hasDescription()) - tgt.setDescriptionElement(String30_50.convertString(src.getDescriptionElement())); + tgt.setDescriptionElement(String30_50.convertStringToMarkdown(src.getDescriptionElement())); if (src.hasUrl()) tgt.setUrl(src.getUrl()); return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/CarePlan30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/CarePlan30_50.java index 4f6150b19..fec345e50 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/CarePlan30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/CarePlan30_50.java @@ -186,10 +186,10 @@ public class CarePlan30_50 { if (src.hasPlannedActivityReference()) tgt.setReference(Reference30_50.convertReference(src.getPlannedActivityReference())); } - if (src.hasPlannedActivityDetail()) { - if (src.hasPlannedActivityDetail()) - tgt.setDetail(convertCarePlanActivityDetailComponent(src.getPlannedActivityDetail())); - } +// if (src.hasPlannedActivityDetail()) { +// if (src.hasPlannedActivityDetail()) +// tgt.setDetail(convertCarePlanActivityDetailComponent(src.getPlannedActivityDetail())); +// } return tgt; } @@ -211,221 +211,221 @@ public class CarePlan30_50 { if (src.hasReference()) tgt.setPlannedActivityReference(Reference30_50.convertReference(src.getReference())); } - if (src.hasDetail()) { - if (src.hasDetail()) - tgt.setPlannedActivityDetail(convertCarePlanActivityDetailComponent(src.getDetail())); - } +// if (src.hasDetail()) { +// if (src.hasDetail()) +// tgt.setPlannedActivityDetail(convertCarePlanActivityDetailComponent(src.getDetail())); +// } return tgt; } - public static org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityDetailComponent convertCarePlanActivityDetailComponent(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityDetailComponent tgt = new org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityDetailComponent(); - ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt); - if (src.hasExtension()) { - org.hl7.fhir.r5.model.Extension extension = src.getExtensionByUrl(CarePlanActivityDetailComponentExtension); - if (extension != null) { - org.hl7.fhir.r5.model.DataType value = extension.getValue(); - if (value instanceof org.hl7.fhir.r5.model.CodeableConcept) { - tgt.setCategory(CodeableConcept30_50.convertCodeableConcept((org.hl7.fhir.r5.model.CodeableConcept) value)); - } - } - } - if (src.hasCode()) { - if (src.hasCode()) - tgt.setCode(CodeableConcept30_50.convertCodeableConcept(src.getCode())); - } - for (CodeableReference t : src.getReason()) { - if (t.hasConcept()) - tgt.addReasonCode(CodeableConcept30_50.convertCodeableConcept(t.getConcept())); - } - for (CodeableReference t : src.getReason()) { - if (t.hasReference()) - tgt.addReasonReference(Reference30_50.convertReference(t.getReference())); - } - for (org.hl7.fhir.r5.model.Reference t : src.getGoal()) { - tgt.addGoal(Reference30_50.convertReference(t)); - } - if (src.hasStatus()) { - if (src.hasStatus()) - tgt.setStatusElement(convertCarePlanActivityStatus(src.getStatusElement())); - } - if (src.hasStatusReason()) { - List coding = src.getStatusReason().getCoding(); - if (coding.size() > 0) { - tgt.setStatusReason(coding.get(0).getCode()); - } - } - if (src.hasDoNotPerform()) { - if (src.hasDoNotPerformElement()) - tgt.setProhibitedElement(Boolean30_50.convertBoolean(src.getDoNotPerformElement())); - } - if (src.hasScheduled()) { - if (src.hasScheduled()) - tgt.setScheduled(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getScheduled())); - } - if (src.hasLocation()) { - if (src.getLocation().hasReference()) - tgt.setLocation(Reference30_50.convertReference(src.getLocation().getReference())); - } - for (org.hl7.fhir.r5.model.Reference t : src.getPerformer()) { - tgt.addPerformer(Reference30_50.convertReference(t)); - } - if (src.hasProduct()) { - if (src.hasProduct()) - tgt.setProduct(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getProduct())); - } - if (src.hasDailyAmount()) { - if (src.hasDailyAmount()) - tgt.setDailyAmount(SimpleQuantity30_50.convertSimpleQuantity(src.getDailyAmount())); - } - if (src.hasQuantity()) { - if (src.hasQuantity()) - tgt.setQuantity(SimpleQuantity30_50.convertSimpleQuantity(src.getQuantity())); - } - if (src.hasDescription()) { - if (src.hasDescriptionElement()) - tgt.setDescriptionElement(String30_50.convertString(src.getDescriptionElement())); - } - return tgt; - } - - public static org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent convertCarePlanActivityDetailComponent(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityDetailComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent tgt = new org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent(); - ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt); - if (src.hasCategory()) { - org.hl7.fhir.r5.model.Extension t = new org.hl7.fhir.r5.model.Extension(); - t.setUrl(CarePlanActivityDetailComponentExtension); - t.setValue(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getCategory())); - tgt.addExtension(t); - } - if (src.hasCode()) { - if (src.hasCode()) - tgt.setCode(CodeableConcept30_50.convertCodeableConcept(src.getCode())); - } - for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReasonCode()) { - tgt.addReason(Reference30_50.convertCodeableConceptToCodableReference(t)); - } - for (org.hl7.fhir.dstu3.model.Reference t : src.getReasonReference()) { - tgt.addReason(Reference30_50.convertReferenceToCodableReference(t)); - } - for (org.hl7.fhir.dstu3.model.Reference t : src.getGoal()) { - tgt.addGoal(Reference30_50.convertReference(t)); - } - if (src.hasStatus()) { - if (src.hasStatus()) - tgt.setStatusElement(convertCarePlanActivityStatus(src.getStatusElement())); - } - if (src.hasStatusReason()) { - org.hl7.fhir.r5.model.Coding code = new org.hl7.fhir.r5.model.Coding(); - code.setCode(src.getStatusReason()); - org.hl7.fhir.r5.model.CodeableConcept t = new org.hl7.fhir.r5.model.CodeableConcept(code); - tgt.setStatusReason(t); - } - if (src.hasProhibited()) { - if (src.hasProhibitedElement()) - tgt.setDoNotPerformElement(Boolean30_50.convertBoolean(src.getProhibitedElement())); - } - if (src.hasScheduled()) { - if (src.hasScheduled()) - tgt.setScheduled(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getScheduled())); - } - if (src.hasLocation()) { - if (src.hasLocation()) - tgt.getLocation().setReference(Reference30_50.convertReference(src.getLocation())); - } - for (org.hl7.fhir.dstu3.model.Reference t : src.getPerformer()) { - tgt.addPerformer(Reference30_50.convertReference(t)); - } - if (src.hasProduct()) { - if (src.hasProduct()) - tgt.setProduct(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getProduct())); - } - if (src.hasDailyAmount()) { - if (src.hasDailyAmount()) - tgt.setDailyAmount(SimpleQuantity30_50.convertSimpleQuantity(src.getDailyAmount())); - } - if (src.hasQuantity()) { - if (src.hasQuantity()) - tgt.setQuantity(SimpleQuantity30_50.convertSimpleQuantity(src.getQuantity())); - } - if (src.hasDescription()) { - if (src.hasDescriptionElement()) - tgt.setDescriptionElement(String30_50.convertString(src.getDescriptionElement())); - } - return tgt; - } - - static public org.hl7.fhir.r5.model.Enumeration convertCarePlanActivityStatus(org.hl7.fhir.dstu3.model.Enumeration src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatusEnumFactory()); - ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); - switch (src.getValue()) { - case CANCELLED: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.CANCELLED); - break; - case COMPLETED: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.COMPLETED); - break; - case INPROGRESS: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.INPROGRESS); - break; - case NOTSTARTED: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.NOTSTARTED); - break; - case ONHOLD: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.ONHOLD); - break; - case SCHEDULED: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.SCHEDULED); - break; - case UNKNOWN: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.UNKNOWN); - break; - default: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.NULL); - break; - } - return tgt; - } - - static public org.hl7.fhir.dstu3.model.Enumeration convertCarePlanActivityStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.dstu3.model.Enumeration tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatusEnumFactory()); - ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); - switch (src.getValue()) { - case CANCELLED: - tgt.setValue(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus.CANCELLED); - break; - case COMPLETED: - tgt.setValue(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus.COMPLETED); - break; - case INPROGRESS: - tgt.setValue(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus.INPROGRESS); - break; - case NOTSTARTED: - tgt.setValue(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus.NOTSTARTED); - break; - case ONHOLD: - tgt.setValue(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus.ONHOLD); - break; - case SCHEDULED: - tgt.setValue(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus.SCHEDULED); - break; - case UNKNOWN: - tgt.setValue(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus.UNKNOWN); - break; - default: - tgt.setValue(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus.NULL); - break; - } - return tgt; - } +// public static org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityDetailComponent convertCarePlanActivityDetailComponent(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent src) throws FHIRException { +// if (src == null) +// return null; +// org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityDetailComponent tgt = new org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityDetailComponent(); +// ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt); +// if (src.hasExtension()) { +// org.hl7.fhir.r5.model.Extension extension = src.getExtensionByUrl(CarePlanActivityDetailComponentExtension); +// if (extension != null) { +// org.hl7.fhir.r5.model.DataType value = extension.getValue(); +// if (value instanceof org.hl7.fhir.r5.model.CodeableConcept) { +// tgt.setCategory(CodeableConcept30_50.convertCodeableConcept((org.hl7.fhir.r5.model.CodeableConcept) value)); +// } +// } +// } +// if (src.hasCode()) { +// if (src.hasCode()) +// tgt.setCode(CodeableConcept30_50.convertCodeableConcept(src.getCode())); +// } +// for (CodeableReference t : src.getReason()) { +// if (t.hasConcept()) +// tgt.addReasonCode(CodeableConcept30_50.convertCodeableConcept(t.getConcept())); +// } +// for (CodeableReference t : src.getReason()) { +// if (t.hasReference()) +// tgt.addReasonReference(Reference30_50.convertReference(t.getReference())); +// } +// for (org.hl7.fhir.r5.model.Reference t : src.getGoal()) { +// tgt.addGoal(Reference30_50.convertReference(t)); +// } +// if (src.hasStatus()) { +// if (src.hasStatus()) +// tgt.setStatusElement(convertCarePlanActivityStatus(src.getStatusElement())); +// } +// if (src.hasStatusReason()) { +// List coding = src.getStatusReason().getCoding(); +// if (coding.size() > 0) { +// tgt.setStatusReason(coding.get(0).getCode()); +// } +// } +// if (src.hasDoNotPerform()) { +// if (src.hasDoNotPerformElement()) +// tgt.setProhibitedElement(Boolean30_50.convertBoolean(src.getDoNotPerformElement())); +// } +// if (src.hasScheduled()) { +// if (src.hasScheduled()) +// tgt.setScheduled(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getScheduled())); +// } +// if (src.hasLocation()) { +// if (src.getLocation().hasReference()) +// tgt.setLocation(Reference30_50.convertReference(src.getLocation().getReference())); +// } +// for (org.hl7.fhir.r5.model.Reference t : src.getPerformer()) { +// tgt.addPerformer(Reference30_50.convertReference(t)); +// } +// if (src.hasProduct()) { +// if (src.hasProduct()) +// tgt.setProduct(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getProduct())); +// } +// if (src.hasDailyAmount()) { +// if (src.hasDailyAmount()) +// tgt.setDailyAmount(SimpleQuantity30_50.convertSimpleQuantity(src.getDailyAmount())); +// } +// if (src.hasQuantity()) { +// if (src.hasQuantity()) +// tgt.setQuantity(SimpleQuantity30_50.convertSimpleQuantity(src.getQuantity())); +// } +// if (src.hasDescription()) { +// if (src.hasDescriptionElement()) +// tgt.setDescriptionElement(String30_50.convertString(src.getDescriptionElement())); +// } +// return tgt; +// } +// +// public static org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent convertCarePlanActivityDetailComponent(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityDetailComponent src) throws FHIRException { +// if (src == null) +// return null; +// org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent tgt = new org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent(); +// ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt); +// if (src.hasCategory()) { +// org.hl7.fhir.r5.model.Extension t = new org.hl7.fhir.r5.model.Extension(); +// t.setUrl(CarePlanActivityDetailComponentExtension); +// t.setValue(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getCategory())); +// tgt.addExtension(t); +// } +// if (src.hasCode()) { +// if (src.hasCode()) +// tgt.setCode(CodeableConcept30_50.convertCodeableConcept(src.getCode())); +// } +// for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReasonCode()) { +// tgt.addReason(Reference30_50.convertCodeableConceptToCodableReference(t)); +// } +// for (org.hl7.fhir.dstu3.model.Reference t : src.getReasonReference()) { +// tgt.addReason(Reference30_50.convertReferenceToCodableReference(t)); +// } +// for (org.hl7.fhir.dstu3.model.Reference t : src.getGoal()) { +// tgt.addGoal(Reference30_50.convertReference(t)); +// } +// if (src.hasStatus()) { +// if (src.hasStatus()) +// tgt.setStatusElement(convertCarePlanActivityStatus(src.getStatusElement())); +// } +// if (src.hasStatusReason()) { +// org.hl7.fhir.r5.model.Coding code = new org.hl7.fhir.r5.model.Coding(); +// code.setCode(src.getStatusReason()); +// org.hl7.fhir.r5.model.CodeableConcept t = new org.hl7.fhir.r5.model.CodeableConcept(code); +// tgt.setStatusReason(t); +// } +// if (src.hasProhibited()) { +// if (src.hasProhibitedElement()) +// tgt.setDoNotPerformElement(Boolean30_50.convertBoolean(src.getProhibitedElement())); +// } +// if (src.hasScheduled()) { +// if (src.hasScheduled()) +// tgt.setScheduled(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getScheduled())); +// } +// if (src.hasLocation()) { +// if (src.hasLocation()) +// tgt.getLocation().setReference(Reference30_50.convertReference(src.getLocation())); +// } +// for (org.hl7.fhir.dstu3.model.Reference t : src.getPerformer()) { +// tgt.addPerformer(Reference30_50.convertReference(t)); +// } +// if (src.hasProduct()) { +// if (src.hasProduct()) +// tgt.setProduct(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getProduct())); +// } +// if (src.hasDailyAmount()) { +// if (src.hasDailyAmount()) +// tgt.setDailyAmount(SimpleQuantity30_50.convertSimpleQuantity(src.getDailyAmount())); +// } +// if (src.hasQuantity()) { +// if (src.hasQuantity()) +// tgt.setQuantity(SimpleQuantity30_50.convertSimpleQuantity(src.getQuantity())); +// } +// if (src.hasDescription()) { +// if (src.hasDescriptionElement()) +// tgt.setDescriptionElement(String30_50.convertString(src.getDescriptionElement())); +// } +// return tgt; +// } +// +// static public org.hl7.fhir.r5.model.Enumeration convertCarePlanActivityStatus(org.hl7.fhir.dstu3.model.Enumeration src) throws FHIRException { +// if (src == null || src.isEmpty()) +// return null; +// org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatusEnumFactory()); +// ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); +// switch (src.getValue()) { +// case CANCELLED: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.CANCELLED); +// break; +// case COMPLETED: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.COMPLETED); +// break; +// case INPROGRESS: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.INPROGRESS); +// break; +// case NOTSTARTED: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.NOTSTARTED); +// break; +// case ONHOLD: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.ONHOLD); +// break; +// case SCHEDULED: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.SCHEDULED); +// break; +// case UNKNOWN: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.UNKNOWN); +// break; +// default: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.NULL); +// break; +// } +// return tgt; +// } +// +// static public org.hl7.fhir.dstu3.model.Enumeration convertCarePlanActivityStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { +// if (src == null || src.isEmpty()) +// return null; +// org.hl7.fhir.dstu3.model.Enumeration tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatusEnumFactory()); +// ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); +// switch (src.getValue()) { +// case CANCELLED: +// tgt.setValue(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus.CANCELLED); +// break; +// case COMPLETED: +// tgt.setValue(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus.COMPLETED); +// break; +// case INPROGRESS: +// tgt.setValue(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus.INPROGRESS); +// break; +// case NOTSTARTED: +// tgt.setValue(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus.NOTSTARTED); +// break; +// case ONHOLD: +// tgt.setValue(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus.ONHOLD); +// break; +// case SCHEDULED: +// tgt.setValue(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus.SCHEDULED); +// break; +// case UNKNOWN: +// tgt.setValue(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus.UNKNOWN); +// break; +// default: +// tgt.setValue(org.hl7.fhir.dstu3.model.CarePlan.CarePlanActivityStatus.NULL); +// break; +// } +// return tgt; +// } static public org.hl7.fhir.dstu3.model.Enumeration convertCarePlanIntent(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/ConceptMap30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/ConceptMap30_50.java index 931e5aa90..b5a088758 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/ConceptMap30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/ConceptMap30_50.java @@ -64,7 +64,7 @@ public class ConceptMap30_50 { if (src.hasTargetScope()) tgt.setTarget(ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().convertType(src.getTargetScope())); for (org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent t : src.getGroup()) - tgt.addGroup(convertConceptMapGroupComponent(t)); + tgt.addGroup(convertConceptMapGroupComponent(t, src)); return tgt; } @@ -112,11 +112,11 @@ public class ConceptMap30_50 { tgt.setTargetScope(t instanceof org.hl7.fhir.r5.model.Reference ? new org.hl7.fhir.r5.model.CanonicalType(((org.hl7.fhir.r5.model.Reference) t).getReference()) : t); } for (org.hl7.fhir.dstu3.model.ConceptMap.ConceptMapGroupComponent t : src.getGroup()) - tgt.addGroup(convertConceptMapGroupComponent(t)); + tgt.addGroup(convertConceptMapGroupComponent(t, tgt)); return tgt; } - public static org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent convertConceptMapGroupComponent(org.hl7.fhir.dstu3.model.ConceptMap.ConceptMapGroupComponent src) throws FHIRException { + public static org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent convertConceptMapGroupComponent(org.hl7.fhir.dstu3.model.ConceptMap.ConceptMapGroupComponent src, org.hl7.fhir.r5.model.ConceptMap tgtMap) throws FHIRException { if (src == null) return null; org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent tgt = new org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent(); @@ -127,13 +127,13 @@ public class ConceptMap30_50 { tgt.setSourceElement(convertUriAndVersionToCanonical(src.getTargetElement(), src.getTargetVersionElement())); for (org.hl7.fhir.dstu3.model.ConceptMap.SourceElementComponent t : src.getElement()) - tgt.addElement(convertSourceElementComponent(t)); + tgt.addElement(convertSourceElementComponent(t, tgtMap)); if (src.hasUnmapped()) tgt.setUnmapped(convertConceptMapGroupUnmappedComponent(src.getUnmapped())); return tgt; } - public static org.hl7.fhir.dstu3.model.ConceptMap.ConceptMapGroupComponent convertConceptMapGroupComponent(org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.ConceptMap.ConceptMapGroupComponent convertConceptMapGroupComponent(org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent src, org.hl7.fhir.r5.model.ConceptMap srcMap) throws FHIRException { if (src == null) return null; org.hl7.fhir.dstu3.model.ConceptMap.ConceptMapGroupComponent tgt = new org.hl7.fhir.dstu3.model.ConceptMap.ConceptMapGroupComponent(); @@ -149,7 +149,7 @@ public class ConceptMap30_50 { tgt.setTargetVersion(cp.getVersion()); } for (org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent t : src.getElement()) - tgt.addElement(convertSourceElementComponent(t)); + tgt.addElement(convertSourceElementComponent(t, srcMap)); if (src.hasUnmapped()) tgt.setUnmapped(convertConceptMapGroupUnmappedComponent(src.getUnmapped())); return tgt; @@ -317,13 +317,13 @@ public class ConceptMap30_50 { return tgt; } - public static org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent src) throws FHIRException { + public static org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent src, org.hl7.fhir.r5.model.ConceptMap tgtMap) throws FHIRException { if (src == null) return null; org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent(); ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt); if (src.hasProperty()) - tgt.setPropertyElement(Uri30_50.convertUri(src.getPropertyElement())); + tgt.setAttribute(tgtMap.registerAttribute(src.getProperty())); if (src.hasSystem()) { tgt.setValue(new Coding().setSystem(src.getSystem()).setCode(src.getCode()).setDisplay(src.getDisplay())); @@ -333,14 +333,13 @@ public class ConceptMap30_50 { return tgt; } - public static org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent src, org.hl7.fhir.r5.model.ConceptMap srcMap) throws FHIRException { if (src == null) return null; org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent(); ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt); - if (src.hasProperty()) - tgt.setPropertyElement(Uri30_50.convertUri(src.getPropertyElement())); - + if (src.hasAttribute()) + tgt.setProperty(srcMap.getAttributeUri(src.getAttribute())); if (src.hasValueCoding()) { tgt.setSystem(src.getValueCoding().getSystem()); tgt.setCode(src.getValueCoding().getCode()); @@ -351,7 +350,7 @@ public class ConceptMap30_50 { return tgt; } - public static org.hl7.fhir.dstu3.model.ConceptMap.SourceElementComponent convertSourceElementComponent(org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.ConceptMap.SourceElementComponent convertSourceElementComponent(org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent src, org.hl7.fhir.r5.model.ConceptMap srcMap) throws FHIRException { if (src == null) return null; org.hl7.fhir.dstu3.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.dstu3.model.ConceptMap.SourceElementComponent(); @@ -364,12 +363,12 @@ public class ConceptMap30_50 { tgt.addTarget(new org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent().setEquivalence(org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.UNMATCHED)); } else { for (org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent t : src.getTarget()) - tgt.addTarget(convertTargetElementComponent(t)); + tgt.addTarget(convertTargetElementComponent(t, srcMap)); } return tgt; } - public static org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent convertSourceElementComponent(org.hl7.fhir.dstu3.model.ConceptMap.SourceElementComponent src) throws FHIRException { + public static org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent convertSourceElementComponent(org.hl7.fhir.dstu3.model.ConceptMap.SourceElementComponent src, org.hl7.fhir.r5.model.ConceptMap tgtMap) throws FHIRException { if (src == null) return null; org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent(); @@ -382,12 +381,12 @@ public class ConceptMap30_50 { if (t.getEquivalence() == org.hl7.fhir.dstu3.model.Enumerations.ConceptMapEquivalence.UNMATCHED) { tgt.setNoMap(true); } else { - tgt.addTarget(convertTargetElementComponent(t)); + tgt.addTarget(convertTargetElementComponent(t, tgtMap)); } return tgt; } - public static org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent src) throws FHIRException { + public static org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent src, org.hl7.fhir.r5.model.ConceptMap tgtMap) throws FHIRException { if (src == null) return null; org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent(); @@ -401,13 +400,13 @@ public class ConceptMap30_50 { if (src.hasComment()) tgt.setCommentElement(String30_50.convertString(src.getCommentElement())); for (org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) - tgt.addDependsOn(convertOtherElementComponent(t)); + tgt.addDependsOn(convertOtherElementComponent(t, tgtMap)); for (org.hl7.fhir.dstu3.model.ConceptMap.OtherElementComponent t : src.getProduct()) - tgt.addProduct(convertOtherElementComponent(t)); + tgt.addProduct(convertOtherElementComponent(t, tgtMap)); return tgt; } - public static org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent src, org.hl7.fhir.r5.model.ConceptMap srcMap) throws FHIRException { if (src == null) return null; org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.dstu3.model.ConceptMap.TargetElementComponent(); @@ -421,9 +420,9 @@ public class ConceptMap30_50 { if (src.hasComment()) tgt.setCommentElement(String30_50.convertString(src.getCommentElement())); for (org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) - tgt.addDependsOn(convertOtherElementComponent(t)); + tgt.addDependsOn(convertOtherElementComponent(t, srcMap)); for (org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent t : src.getProduct()) - tgt.addProduct(convertOtherElementComponent(t)); + tgt.addProduct(convertOtherElementComponent(t, srcMap)); return tgt; } } \ No newline at end of file diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/DetectedIssue30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/DetectedIssue30_50.java index d990fbefc..c874124fa 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/DetectedIssue30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/DetectedIssue30_50.java @@ -62,7 +62,7 @@ public class DetectedIssue30_50 { for (org.hl7.fhir.dstu3.model.Reference t : src.getImplicated()) tgt.addImplicated(Reference30_50.convertReference(t)); if (src.hasDetail()) - tgt.setDetailElement(String30_50.convertString(src.getDetailElement())); + tgt.setDetailElement(String30_50.convertStringToMarkdown(src.getDetailElement())); if (src.hasReference()) tgt.setReferenceElement(Uri30_50.convertUri(src.getReferenceElement())); for (org.hl7.fhir.dstu3.model.DetectedIssue.DetectedIssueMitigationComponent t : src.getMitigation()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/DiagnosticReport30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/DiagnosticReport30_50.java index f71ef01cf..99109c16c 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/DiagnosticReport30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/DiagnosticReport30_50.java @@ -38,7 +38,7 @@ public class DiagnosticReport30_50 { for (org.hl7.fhir.dstu3.model.DiagnosticReport.DiagnosticReportImageComponent t : src.getImage()) tgt.addMedia(convertDiagnosticReportImageComponent(t)); if (src.hasConclusion()) - tgt.setConclusionElement(String30_50.convertString(src.getConclusionElement())); + tgt.setConclusionElement(String30_50.convertStringToMarkdown(src.getConclusionElement())); for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getCodedDiagnosis()) tgt.addConclusionCode(CodeableConcept30_50.convertCodeableConcept(t)); for (org.hl7.fhir.dstu3.model.Attachment t : src.getPresentedForm()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/DocumentManifest30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/DocumentManifest30_50.java deleted file mode 100644 index e2418af8f..000000000 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/DocumentManifest30_50.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.hl7.fhir.convertors.conv30_50.resources30_50; - -import org.hl7.fhir.convertors.context.ConversionContext30_50; -import org.hl7.fhir.convertors.conv30_50.datatypes30_50.Reference30_50; -import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.Identifier30_50; -import org.hl7.fhir.exceptions.FHIRException; - -public class DocumentManifest30_50 { - public static org.hl7.fhir.r5.model.DocumentManifest.DocumentManifestRelatedComponent convertDocumentManifestRelatedComponent(org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestRelatedComponent src) throws FHIRException { - if (src == null) return null; - org.hl7.fhir.r5.model.DocumentManifest.DocumentManifestRelatedComponent tgt = new org.hl7.fhir.r5.model.DocumentManifest.DocumentManifestRelatedComponent(); - ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt); - if (src.hasIdentifier()) tgt.setIdentifier(Identifier30_50.convertIdentifier(src.getIdentifier())); - if (src.hasRef()) tgt.setRef(Reference30_50.convertReference(src.getRef())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestRelatedComponent convertDocumentManifestRelatedComponent(org.hl7.fhir.r5.model.DocumentManifest.DocumentManifestRelatedComponent src) throws FHIRException { - if (src == null) return null; - org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestRelatedComponent tgt = new org.hl7.fhir.dstu3.model.DocumentManifest.DocumentManifestRelatedComponent(); - ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt); - if (src.hasIdentifier()) tgt.setIdentifier(Identifier30_50.convertIdentifier(src.getIdentifier())); - if (src.hasRef()) tgt.setRef(Reference30_50.convertReference(src.getRef())); - return tgt; - } -} diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/DocumentReference30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/DocumentReference30_50.java index ee80876bf..d8ca4b646 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/DocumentReference30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/DocumentReference30_50.java @@ -195,7 +195,7 @@ public class DocumentReference30_50 { return tgt; } - static public org.hl7.fhir.dstu3.model.Enumeration convertDocumentReferenceStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.dstu3.model.Enumeration convertDocumentReferenceStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.Enumeration tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.Enumerations.DocumentReferenceStatusEnumFactory()); @@ -217,23 +217,23 @@ public class DocumentReference30_50 { return tgt; } - static public org.hl7.fhir.r5.model.Enumeration convertDocumentReferenceStatus(org.hl7.fhir.dstu3.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r5.model.Enumeration convertDocumentReferenceStatus(org.hl7.fhir.dstu3.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; - org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatusEnumFactory()); + org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatusEnumFactory()); ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); switch (src.getValue()) { case CURRENT: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatus.CURRENT); + tgt.setValue(org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus.CURRENT); break; case SUPERSEDED: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatus.SUPERSEDED); + tgt.setValue(org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus.SUPERSEDED); break; case ENTEREDINERROR: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatus.ENTEREDINERROR); + tgt.setValue(org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus.ENTEREDINERROR); break; default: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatus.NULL); + tgt.setValue(org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus.NULL); break; } return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/Encounter30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/Encounter30_50.java index 125edde21..8e9415ee2 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/Encounter30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/Encounter30_50.java @@ -10,32 +10,33 @@ import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.Period import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.PositiveInt30_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CodeableReference; +import org.hl7.fhir.r5.model.Encounter.ReasonComponent; public class Encounter30_50 { - public static org.hl7.fhir.dstu3.model.Encounter.ClassHistoryComponent convertClassHistoryComponent(org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Encounter.ClassHistoryComponent tgt = new org.hl7.fhir.dstu3.model.Encounter.ClassHistoryComponent(); - ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt); - if (src.hasClass_()) - tgt.setClass_(Coding30_50.convertCoding(src.getClass_())); - if (src.hasPeriod()) - tgt.setPeriod(Period30_50.convertPeriod(src.getPeriod())); - return tgt; - } - - public static org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent convertClassHistoryComponent(org.hl7.fhir.dstu3.model.Encounter.ClassHistoryComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent tgt = new org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent(); - ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt); - if (src.hasClass_()) - tgt.setClass_(Coding30_50.convertCoding(src.getClass_())); - if (src.hasPeriod()) - tgt.setPeriod(Period30_50.convertPeriod(src.getPeriod())); - return tgt; - } +// public static org.hl7.fhir.dstu3.model.Encounter.ClassHistoryComponent convertClassHistoryComponent(org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent src) throws FHIRException { +// if (src == null) +// return null; +// org.hl7.fhir.dstu3.model.Encounter.ClassHistoryComponent tgt = new org.hl7.fhir.dstu3.model.Encounter.ClassHistoryComponent(); +// ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt); +// if (src.hasClass_()) +// tgt.setClass_(Coding30_50.convertCoding(src.getClass_())); +// if (src.hasPeriod()) +// tgt.setPeriod(Period30_50.convertPeriod(src.getPeriod())); +// return tgt; +// } +// +// public static org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent convertClassHistoryComponent(org.hl7.fhir.dstu3.model.Encounter.ClassHistoryComponent src) throws FHIRException { +// if (src == null) +// return null; +// org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent tgt = new org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent(); +// ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt); +// if (src.hasClass_()) +// tgt.setClass_(Coding30_50.convertCoding(src.getClass_())); +// if (src.hasPeriod()) +// tgt.setPeriod(Period30_50.convertPeriod(src.getPeriod())); +// return tgt; +// } public static org.hl7.fhir.r5.model.Encounter convertEncounter(org.hl7.fhir.dstu3.model.Encounter src) throws FHIRException { if (src == null) @@ -46,12 +47,12 @@ public class Encounter30_50 { tgt.addIdentifier(Identifier30_50.convertIdentifier(t)); if (src.hasStatus()) tgt.setStatusElement(convertEncounterStatus(src.getStatusElement())); - for (org.hl7.fhir.dstu3.model.Encounter.StatusHistoryComponent t : src.getStatusHistory()) - tgt.addStatusHistory(convertStatusHistoryComponent(t)); +// for (org.hl7.fhir.dstu3.model.Encounter.StatusHistoryComponent t : src.getStatusHistory()) +// tgt.addStatusHistory(convertStatusHistoryComponent(t)); if (src.hasClass_()) tgt.addClass_(new org.hl7.fhir.r5.model.CodeableConcept().addCoding(Coding30_50.convertCoding(src.getClass_()))); - for (org.hl7.fhir.dstu3.model.Encounter.ClassHistoryComponent t : src.getClassHistory()) - tgt.addClassHistory(convertClassHistoryComponent(t)); +// for (org.hl7.fhir.dstu3.model.Encounter.ClassHistoryComponent t : src.getClassHistory()) +// tgt.addClassHistory(convertClassHistoryComponent(t)); for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getType()) tgt.addType(CodeableConcept30_50.convertCodeableConcept(t)); if (src.hasPriority()) @@ -71,12 +72,12 @@ public class Encounter30_50 { if (src.hasLength()) tgt.setLength(Duration30_50.convertDuration(src.getLength())); for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReason()) - tgt.addReason(Reference30_50.convertCodeableConceptToCodableReference(t)); + tgt.addReason().addValue(Reference30_50.convertCodeableConceptToCodableReference(t)); for (org.hl7.fhir.dstu3.model.Encounter.DiagnosisComponent t : src.getDiagnosis()) tgt.addDiagnosis(convertDiagnosisComponent(t)); for (org.hl7.fhir.dstu3.model.Reference t : src.getAccount()) tgt.addAccount(Reference30_50.convertReference(t)); if (src.hasHospitalization()) - tgt.setAdmission(convertEncounterHospitalizationComponent(src.getHospitalization())); + tgt.setAdmission(convertEncounterHospitalizationComponent(src.getHospitalization(), tgt)); for (org.hl7.fhir.dstu3.model.Encounter.EncounterLocationComponent t : src.getLocation()) tgt.addLocation(convertEncounterLocationComponent(t)); if (src.hasServiceProvider()) @@ -95,12 +96,12 @@ public class Encounter30_50 { tgt.addIdentifier(Identifier30_50.convertIdentifier(t)); if (src.hasStatus()) tgt.setStatusElement(convertEncounterStatus(src.getStatusElement())); - for (org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent t : src.getStatusHistory()) - tgt.addStatusHistory(convertStatusHistoryComponent(t)); +// for (org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent t : src.getStatusHistory()) +// tgt.addStatusHistory(convertStatusHistoryComponent(t)); if (src.hasClass_()) tgt.setClass_(Coding30_50.convertCoding(src.getClass_FirstRep())); - for (org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent t : src.getClassHistory()) - tgt.addClassHistory(convertClassHistoryComponent(t)); +// for (org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent t : src.getClassHistory()) +// tgt.addClassHistory(convertClassHistoryComponent(t)); for (org.hl7.fhir.r5.model.CodeableConcept t : src.getType()) tgt.addType(CodeableConcept30_50.convertCodeableConcept(t)); if (src.hasPriority()) @@ -119,14 +120,15 @@ public class Encounter30_50 { tgt.setPeriod(Period30_50.convertPeriod(src.getActualPeriod())); if (src.hasLength()) tgt.setLength(Duration30_50.convertDuration(src.getLength())); - for (CodeableReference t : src.getReason()) - if (t.hasConcept()) - tgt.addReason(CodeableConcept30_50.convertCodeableConcept(t.getConcept())); + for (ReasonComponent t1 : src.getReason()) + for (CodeableReference t : t1.getValue()) + if (t.hasConcept()) + tgt.addReason(CodeableConcept30_50.convertCodeableConcept(t.getConcept())); for (org.hl7.fhir.r5.model.Encounter.DiagnosisComponent t : src.getDiagnosis()) tgt.addDiagnosis(convertDiagnosisComponent(t)); for (org.hl7.fhir.r5.model.Reference t : src.getAccount()) tgt.addAccount(Reference30_50.convertReference(t)); - if (src.hasAdmission()) - tgt.setHospitalization(convertEncounterHospitalizationComponent(src.getAdmission())); + if (src.hasAdmission() || src.hasDietPreference() || src.hasSpecialArrangement() || src.hasSpecialCourtesy()) + tgt.setHospitalization(convertEncounterHospitalizationComponent(src.getAdmission(), src)); for (org.hl7.fhir.r5.model.Encounter.EncounterLocationComponent t : src.getLocation()) tgt.addLocation(convertEncounterLocationComponent(t)); if (src.hasServiceProvider()) @@ -136,7 +138,7 @@ public class Encounter30_50 { return tgt; } - public static org.hl7.fhir.dstu3.model.Encounter.EncounterHospitalizationComponent convertEncounterHospitalizationComponent(org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.Encounter.EncounterHospitalizationComponent convertEncounterHospitalizationComponent(org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent src, org.hl7.fhir.r5.model.Encounter srce) throws FHIRException { if (src == null) return null; org.hl7.fhir.dstu3.model.Encounter.EncounterHospitalizationComponent tgt = new org.hl7.fhir.dstu3.model.Encounter.EncounterHospitalizationComponent(); @@ -149,11 +151,11 @@ public class Encounter30_50 { tgt.setAdmitSource(CodeableConcept30_50.convertCodeableConcept(src.getAdmitSource())); if (src.hasReAdmission()) tgt.setReAdmission(CodeableConcept30_50.convertCodeableConcept(src.getReAdmission())); - for (org.hl7.fhir.r5.model.CodeableConcept t : src.getDietPreference()) + for (org.hl7.fhir.r5.model.CodeableConcept t : srce.getDietPreference()) tgt.addDietPreference(CodeableConcept30_50.convertCodeableConcept(t)); - for (org.hl7.fhir.r5.model.CodeableConcept t : src.getSpecialCourtesy()) + for (org.hl7.fhir.r5.model.CodeableConcept t : srce.getSpecialCourtesy()) tgt.addSpecialCourtesy(CodeableConcept30_50.convertCodeableConcept(t)); - for (org.hl7.fhir.r5.model.CodeableConcept t : src.getSpecialArrangement()) + for (org.hl7.fhir.r5.model.CodeableConcept t : srce.getSpecialArrangement()) tgt.addSpecialArrangement(CodeableConcept30_50.convertCodeableConcept(t)); if (src.hasDestination()) tgt.setDestination(Reference30_50.convertReference(src.getDestination())); @@ -162,7 +164,7 @@ public class Encounter30_50 { return tgt; } - public static org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent convertEncounterHospitalizationComponent(org.hl7.fhir.dstu3.model.Encounter.EncounterHospitalizationComponent src) throws FHIRException { + public static org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent convertEncounterHospitalizationComponent(org.hl7.fhir.dstu3.model.Encounter.EncounterHospitalizationComponent src, org.hl7.fhir.r5.model.Encounter tgte) throws FHIRException { if (src == null) return null; org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent tgt = new org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent(); @@ -176,11 +178,11 @@ public class Encounter30_50 { if (src.hasReAdmission()) tgt.setReAdmission(CodeableConcept30_50.convertCodeableConcept(src.getReAdmission())); for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getDietPreference()) - tgt.addDietPreference(CodeableConcept30_50.convertCodeableConcept(t)); + tgte.addDietPreference(CodeableConcept30_50.convertCodeableConcept(t)); for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getSpecialCourtesy()) - tgt.addSpecialCourtesy(CodeableConcept30_50.convertCodeableConcept(t)); + tgte.addSpecialCourtesy(CodeableConcept30_50.convertCodeableConcept(t)); for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getSpecialArrangement()) - tgt.addSpecialArrangement(CodeableConcept30_50.convertCodeableConcept(t)); + tgte.addSpecialArrangement(CodeableConcept30_50.convertCodeableConcept(t)); if (src.hasDestination()) tgt.setDestination(Reference30_50.convertReference(src.getDestination())); if (src.hasDischargeDisposition()) @@ -294,7 +296,7 @@ public class Encounter30_50 { return tgt; } - static public org.hl7.fhir.dstu3.model.Enumeration convertEncounterStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.dstu3.model.Enumeration convertEncounterStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.Enumeration tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.Encounter.EncounterStatusEnumFactory()); @@ -325,77 +327,77 @@ public class Encounter30_50 { return tgt; } - static public org.hl7.fhir.r5.model.Enumeration convertEncounterStatus(org.hl7.fhir.dstu3.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r5.model.Enumeration convertEncounterStatus(org.hl7.fhir.dstu3.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; - org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Encounter.EncounterStatusEnumFactory()); + org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.EncounterStatusEnumFactory()); ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); switch (src.getValue()) { case PLANNED: - tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.PLANNED); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.PLANNED); break; case ARRIVED: - tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.INPROGRESS); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.INPROGRESS); break; case TRIAGED: - tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.INPROGRESS); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.INPROGRESS); break; case INPROGRESS: - tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.INPROGRESS); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.INPROGRESS); break; case ONLEAVE: - tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.INPROGRESS); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.INPROGRESS); break; case FINISHED: - tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.COMPLETED); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.COMPLETED); break; case CANCELLED: - tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.CANCELLED); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.CANCELLED); break; case ENTEREDINERROR: - tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.ENTEREDINERROR); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.ENTEREDINERROR); break; case UNKNOWN: - tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.UNKNOWN); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.UNKNOWN); break; default: - tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.NULL); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.NULL); break; } return tgt; } - public static org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent convertStatusHistoryComponent(org.hl7.fhir.dstu3.model.Encounter.StatusHistoryComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent tgt = new org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent(); - ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt); - if (src.hasStatus()) - tgt.setStatusElement(convertEncounterStatus(src.getStatusElement())); - if (src.hasPeriod()) - tgt.setPeriod(Period30_50.convertPeriod(src.getPeriod())); - return tgt; - } - - public static org.hl7.fhir.dstu3.model.Encounter.StatusHistoryComponent convertStatusHistoryComponent(org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.dstu3.model.Encounter.StatusHistoryComponent tgt = new org.hl7.fhir.dstu3.model.Encounter.StatusHistoryComponent(); - ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt); - if (src.hasStatus()) - tgt.setStatusElement(convertEncounterStatus(src.getStatusElement())); - if (src.hasPeriod()) - tgt.setPeriod(Period30_50.convertPeriod(src.getPeriod())); - return tgt; - } +// public static org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent convertStatusHistoryComponent(org.hl7.fhir.dstu3.model.Encounter.StatusHistoryComponent src) throws FHIRException { +// if (src == null) +// return null; +// org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent tgt = new org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent(); +// ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt); +// if (src.hasStatus()) +// tgt.setStatusElement(convertEncounterStatus(src.getStatusElement())); +// if (src.hasPeriod()) +// tgt.setPeriod(Period30_50.convertPeriod(src.getPeriod())); +// return tgt; +// } +// +// public static org.hl7.fhir.dstu3.model.Encounter.StatusHistoryComponent convertStatusHistoryComponent(org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent src) throws FHIRException { +// if (src == null) +// return null; +// org.hl7.fhir.dstu3.model.Encounter.StatusHistoryComponent tgt = new org.hl7.fhir.dstu3.model.Encounter.StatusHistoryComponent(); +// ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt); +// if (src.hasStatus()) +// tgt.setStatusElement(convertEncounterStatus(src.getStatusElement())); +// if (src.hasPeriod()) +// tgt.setPeriod(Period30_50.convertPeriod(src.getPeriod())); +// return tgt; +// } public static org.hl7.fhir.r5.model.Encounter.DiagnosisComponent convertDiagnosisComponent(org.hl7.fhir.dstu3.model.Encounter.DiagnosisComponent src) throws FHIRException { if (src == null) return null; org.hl7.fhir.r5.model.Encounter.DiagnosisComponent tgt = new org.hl7.fhir.r5.model.Encounter.DiagnosisComponent(); ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt); - if (src.hasCondition()) tgt.setCondition(Reference30_50.convertReference(src.getCondition())); - if (src.hasRole()) tgt.setUse(CodeableConcept30_50.convertCodeableConcept(src.getRole())); - if (src.hasRank()) tgt.setRankElement(PositiveInt30_50.convertPositiveInt(src.getRankElement())); + if (src.hasCondition()) tgt.addCondition(Reference30_50.convertReferenceToCodableReference(src.getCondition())); + if (src.hasRole()) tgt.addUse(CodeableConcept30_50.convertCodeableConcept(src.getRole())); +// if (src.hasRank()) tgt.setRankElement(PositiveInt30_50.convertPositiveInt(src.getRankElement())); return tgt; } @@ -403,9 +405,9 @@ public class Encounter30_50 { if (src == null) return null; org.hl7.fhir.dstu3.model.Encounter.DiagnosisComponent tgt = new org.hl7.fhir.dstu3.model.Encounter.DiagnosisComponent(); ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt); - if (src.hasCondition()) tgt.setCondition(Reference30_50.convertReference(src.getCondition())); - if (src.hasUse()) tgt.setRole(CodeableConcept30_50.convertCodeableConcept(src.getUse())); - if (src.hasRank()) tgt.setRankElement(PositiveInt30_50.convertPositiveInt(src.getRankElement())); + if (src.hasCondition() && src.getConditionFirstRep().hasReference()) tgt.setCondition(Reference30_50.convertReference(src.getConditionFirstRep().getReference())); + if (src.hasUse()) tgt.setRole(CodeableConcept30_50.convertCodeableConcept(src.getUseFirstRep())); +// if (src.hasRank()) tgt.setRankElement(PositiveInt30_50.convertPositiveInt(src.getRankElement())); return tgt; } } \ No newline at end of file diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/Endpoint30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/Endpoint30_50.java index d4a076600..337f06374 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/Endpoint30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/Endpoint30_50.java @@ -7,8 +7,11 @@ import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.Coding import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.ContactPoint30_50; import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.Identifier30_50; import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.Period30_50; +import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Code30_50; import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.String30_50; +import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Code43_50; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r5.model.Endpoint.EndpointPayloadComponent; public class Endpoint30_50 { @@ -31,9 +34,12 @@ public class Endpoint30_50 { tgt.addContact(ContactPoint30_50.convertContactPoint(t)); if (src.hasPeriod()) tgt.setPeriod(Period30_50.convertPeriod(src.getPeriod())); - for (org.hl7.fhir.r5.model.CodeableConcept t : src.getPayloadType()) - tgt.addPayloadType(CodeableConcept30_50.convertCodeableConcept(t)); - for (org.hl7.fhir.r5.model.CodeType t : src.getPayloadMimeType()) tgt.addPayloadMimeType(t.getValue()); + for (EndpointPayloadComponent t : src.getPayload()) + if (t.hasType()) + tgt.addPayloadType(CodeableConcept30_50.convertCodeableConcept(t.getTypeFirstRep())); + for (EndpointPayloadComponent t : src.getPayload()) + if (t.hasMimeType()) + tgt.getPayloadMimeType().add(Code30_50.convertCode(t.getMimeType().get(0))); if (src.hasAddress()) tgt.setAddress(src.getAddress()); for (org.hl7.fhir.r5.model.StringType t : src.getHeader()) tgt.addHeader(t.getValue()); @@ -60,8 +66,8 @@ public class Endpoint30_50 { if (src.hasPeriod()) tgt.setPeriod(Period30_50.convertPeriod(src.getPeriod())); for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getPayloadType()) - tgt.addPayloadType(CodeableConcept30_50.convertCodeableConcept(t)); - for (org.hl7.fhir.dstu3.model.CodeType t : src.getPayloadMimeType()) tgt.addPayloadMimeType(t.getValue()); + tgt.addPayload().addType(CodeableConcept30_50.convertCodeableConcept(t)); + for (org.hl7.fhir.dstu3.model.CodeType t : src.getPayloadMimeType()) tgt.addPayload().addMimeType(t.getValue()); if (src.hasAddress()) tgt.setAddress(src.getAddress()); for (org.hl7.fhir.dstu3.model.StringType t : src.getHeader()) tgt.addHeader(t.getValue()); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/EpisodeOfCare30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/EpisodeOfCare30_50.java index 789d25c09..4f88b4e73 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/EpisodeOfCare30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/EpisodeOfCare30_50.java @@ -166,9 +166,9 @@ public class EpisodeOfCare30_50 { if (src == null) return null; org.hl7.fhir.r5.model.EpisodeOfCare.DiagnosisComponent tgt = new org.hl7.fhir.r5.model.EpisodeOfCare.DiagnosisComponent(); ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt); - if (src.hasCondition()) tgt.setCondition(Reference30_50.convertReferenceToCodableReference(src.getCondition())); - if (src.hasRole()) tgt.setRole(CodeableConcept30_50.convertCodeableConcept(src.getRole())); - if (src.hasRank()) tgt.setRankElement(PositiveInt30_50.convertPositiveInt(src.getRankElement())); + if (src.hasCondition()) tgt.addCondition(Reference30_50.convertReferenceToCodableReference(src.getCondition())); + if (src.hasRole()) tgt.setUse(CodeableConcept30_50.convertCodeableConcept(src.getRole())); +// if (src.hasRank()) tgt.setRankElement(PositiveInt30_50.convertPositiveInt(src.getRankElement())); return tgt; } @@ -176,9 +176,9 @@ public class EpisodeOfCare30_50 { if (src == null) return null; org.hl7.fhir.dstu3.model.EpisodeOfCare.DiagnosisComponent tgt = new org.hl7.fhir.dstu3.model.EpisodeOfCare.DiagnosisComponent(); ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt); - if (src.hasCondition()) tgt.setCondition(Reference30_50.convertCodeableReferenceToReference(src.getCondition())); - if (src.hasRole()) tgt.setRole(CodeableConcept30_50.convertCodeableConcept(src.getRole())); - if (src.hasRank()) tgt.setRankElement(PositiveInt30_50.convertPositiveInt(src.getRankElement())); + if (src.hasCondition()) tgt.setCondition(Reference30_50.convertCodeableReferenceToReference(src.getConditionFirstRep())); + if (src.hasUse()) tgt.setRole(CodeableConcept30_50.convertCodeableConcept(src.getUse())); +// if (src.hasRank()) tgt.setRankElement(PositiveInt30_50.convertPositiveInt(src.getRankElement())); return tgt; } } \ No newline at end of file diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/HealthcareService30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/HealthcareService30_50.java index 64cbc6324..1e0424e34 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/HealthcareService30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/HealthcareService30_50.java @@ -36,7 +36,7 @@ public class HealthcareService30_50 { if (src.hasName()) tgt.setNameElement(String30_50.convertString(src.getNameElement())); if (src.hasComment()) - tgt.setCommentElement(String30_50.convertString(src.getCommentElement())); + tgt.setCommentElement(String30_50.convertStringToMarkdown(src.getCommentElement())); if (src.hasExtraDetails()) tgt.setExtraDetails(src.getExtraDetails()); if (src.hasPhoto()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/ImagingStudy30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/ImagingStudy30_50.java index aee662fd3..a8a3804d2 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/ImagingStudy30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/ImagingStudy30_50.java @@ -73,9 +73,9 @@ public class ImagingStudy30_50 { if (src.hasReferrer()) tgt.setReferrer(Reference30_50.convertReference(src.getReferrer())); } - for (org.hl7.fhir.r5.model.Reference t : src.getInterpreter()) { - tgt.addInterpreter(Reference30_50.convertReference(t)); - } +// for (org.hl7.fhir.r5.model.Reference t : src.getInterpreter()) { +// tgt.addInterpreter(Reference30_50.convertReference(t)); +// } for (org.hl7.fhir.r5.model.Reference t : src.getEndpoint()) { tgt.addEndpoint(Reference30_50.convertReference(t)); } @@ -165,9 +165,9 @@ public class ImagingStudy30_50 { if (src.hasReferrer()) tgt.setReferrer(Reference30_50.convertReference(src.getReferrer())); } - for (org.hl7.fhir.dstu3.model.Reference t : src.getInterpreter()) { - tgt.addInterpreter(Reference30_50.convertReference(t)); - } +// for (org.hl7.fhir.dstu3.model.Reference t : src.getInterpreter()) { +// tgt.addInterpreter(Reference30_50.convertReference(t)); +// } for (org.hl7.fhir.dstu3.model.Reference t : src.getEndpoint()) { tgt.addEndpoint(Reference30_50.convertReference(t)); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/Library30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/Library30_50.java index a1e3d7768..8100eae65 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/Library30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/Library30_50.java @@ -139,7 +139,7 @@ public class Library30_50 { if (src.hasPurpose()) tgt.setPurposeElement(MarkDown30_50.convertMarkdown(src.getPurposeElement())); if (src.hasUsage()) - tgt.setUsageElement(String30_50.convertString(src.getUsageElement())); + tgt.setUsageElement(String30_50.convertStringToMarkdown(src.getUsageElement())); if (src.hasCopyright()) tgt.setCopyrightElement(MarkDown30_50.convertMarkdown(src.getCopyrightElement())); if (src.hasApprovalDate()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/List30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/List30_50.java index 3674a1131..82e5db085 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/List30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/List30_50.java @@ -28,7 +28,7 @@ public class List30_50 { if (src.hasCode()) tgt.setCode(CodeableConcept30_50.convertCodeableConcept(src.getCode())); if (src.hasSubject()) - tgt.setSubject(Reference30_50.convertReference(src.getSubject())); + tgt.addSubject(Reference30_50.convertReference(src.getSubject())); if (src.hasEncounter()) tgt.setEncounter(Reference30_50.convertReference(src.getEncounter())); if (src.hasDate()) @@ -61,7 +61,7 @@ public class List30_50 { if (src.hasCode()) tgt.setCode(CodeableConcept30_50.convertCodeableConcept(src.getCode())); if (src.hasSubject()) - tgt.setSubject(Reference30_50.convertReference(src.getSubject())); + tgt.setSubject(Reference30_50.convertReference(src.getSubjectFirstRep())); if (src.hasEncounter()) tgt.setEncounter(Reference30_50.convertReference(src.getEncounter())); if (src.hasDate()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/Location30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/Location30_50.java index b0b4d718d..b1b382f87 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/Location30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/Location30_50.java @@ -30,7 +30,7 @@ public class Location30_50 { tgt.setNameElement(String30_50.convertString(src.getNameElement())); for (org.hl7.fhir.dstu3.model.StringType t : src.getAlias()) tgt.addAlias(t.getValue()); if (src.hasDescription()) - tgt.setDescriptionElement(String30_50.convertString(src.getDescriptionElement())); + tgt.setDescriptionElement(String30_50.convertStringToMarkdown(src.getDescriptionElement())); if (src.hasMode()) tgt.setModeElement(convertLocationMode(src.getModeElement())); if (src.hasType()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/Measure30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/Measure30_50.java index 948f5e5ac..a36ebd0f8 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/Measure30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/Measure30_50.java @@ -59,7 +59,7 @@ public class Measure30_50 { if (src.hasPurpose()) tgt.setPurposeElement(MarkDown30_50.convertMarkdown(src.getPurposeElement())); if (src.hasUsage()) - tgt.setUsageElement(String30_50.convertString(src.getUsageElement())); + tgt.setUsageElement(String30_50.convertStringToMarkdown(src.getUsageElement())); if (src.hasCopyright()) tgt.setCopyrightElement(MarkDown30_50.convertMarkdown(src.getCopyrightElement())); if (src.hasApprovalDate()) @@ -103,9 +103,9 @@ public class Measure30_50 { if (src.hasCompositeScoring()) tgt.setCompositeScoring(CodeableConcept30_50.convertCodeableConcept(src.getCompositeScoring())); if (src.hasRiskAdjustment()) - tgt.setRiskAdjustmentElement(String30_50.convertString(src.getRiskAdjustmentElement())); + tgt.setRiskAdjustmentElement(String30_50.convertStringToMarkdown(src.getRiskAdjustmentElement())); if (src.hasRateAggregation()) - tgt.setRateAggregationElement(String30_50.convertString(src.getRateAggregationElement())); + tgt.setRateAggregationElement(String30_50.convertStringToMarkdown(src.getRateAggregationElement())); if (src.hasRationale()) tgt.setRationaleElement(MarkDown30_50.convertMarkdown(src.getRationaleElement())); if (src.hasClinicalRecommendationStatement()) @@ -259,7 +259,7 @@ public class Measure30_50 { if (src.hasIdentifier()) tgt.setCode(new org.hl7.fhir.r5.model.CodeableConcept().addCoding(new org.hl7.fhir.r5.model.Coding().setCode(src.getIdentifier().getValue()))); if (src.hasDescription()) - tgt.setDescriptionElement(String30_50.convertString(src.getDescriptionElement())); + tgt.setDescriptionElement(String30_50.convertStringToMarkdown(src.getDescriptionElement())); for (org.hl7.fhir.dstu3.model.Measure.MeasureGroupPopulationComponent p : src.getPopulation()) tgt.addPopulation(convertMeasureGroupPopulation(p)); for (org.hl7.fhir.dstu3.model.Measure.MeasureGroupStratifierComponent s : src.getStratifier()) @@ -290,7 +290,7 @@ public class Measure30_50 { if (src.hasCode()) tgt.setCode(CodeableConcept30_50.convertCodeableConcept(src.getCode())); if (src.hasDescription()) - tgt.setDescriptionElement(String30_50.convertString(src.getDescriptionElement())); + tgt.setDescriptionElement(String30_50.convertStringToMarkdown(src.getDescriptionElement())); if (src.hasCriteria()) tgt.setCriteria(new org.hl7.fhir.r5.model.Expression().setExpression(src.getCriteria())); if (src.hasName()) { diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/MedicationAdministration30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/MedicationAdministration30_50.java index 9319bc002..e4b9fdb71 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/MedicationAdministration30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/MedicationAdministration30_50.java @@ -48,7 +48,9 @@ public class MedicationAdministration30_50 { tgt.addReasonReference(Reference30_50.convertReference(t.getReference())); if (src.hasRequest()) tgt.setPrescription(Reference30_50.convertReference(src.getRequest())); - for (org.hl7.fhir.r5.model.Reference t : src.getDevice()) tgt.addDevice(Reference30_50.convertReference(t)); + for (CodeableReference t : src.getDevice()) + if (t.hasReference()) + tgt.addDevice(Reference30_50.convertReference(t.getReference())); for (org.hl7.fhir.r5.model.Annotation t : src.getNote()) tgt.addNote(Annotation30_50.convertAnnotation(t)); if (src.hasDosage()) tgt.setDosage(convertMedicationAdministrationDosageComponent(src.getDosage())); @@ -90,7 +92,7 @@ public class MedicationAdministration30_50 { tgt.addReason(Reference30_50.convertReferenceToCodableReference(t)); if (src.hasPrescription()) tgt.setRequest(Reference30_50.convertReference(src.getPrescription())); - for (org.hl7.fhir.dstu3.model.Reference t : src.getDevice()) tgt.addDevice(Reference30_50.convertReference(t)); + for (org.hl7.fhir.dstu3.model.Reference t : src.getDevice()) tgt.addDevice(Reference30_50.convertReferenceToCodableReference(t)); for (org.hl7.fhir.dstu3.model.Annotation t : src.getNote()) tgt.addNote(Annotation30_50.convertAnnotation(t)); if (src.hasDosage()) tgt.setDosage(convertMedicationAdministrationDosageComponent(src.getDosage())); @@ -145,7 +147,7 @@ public class MedicationAdministration30_50 { org.hl7.fhir.r5.model.MedicationAdministration.MedicationAdministrationPerformerComponent tgt = new org.hl7.fhir.r5.model.MedicationAdministration.MedicationAdministrationPerformerComponent(); ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt); if (src.hasActor()) - tgt.setActor(Reference30_50.convertReference(src.getActor())); + tgt.setActor(Reference30_50.convertReferenceToCodableReference(src.getActor())); return tgt; } @@ -154,8 +156,8 @@ public class MedicationAdministration30_50 { return null; org.hl7.fhir.dstu3.model.MedicationAdministration.MedicationAdministrationPerformerComponent tgt = new org.hl7.fhir.dstu3.model.MedicationAdministration.MedicationAdministrationPerformerComponent(); ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt); - if (src.hasActor()) - tgt.setActor(Reference30_50.convertReference(src.getActor())); + if (src.hasActor() && src.getActor().hasReference()) + tgt.setActor(Reference30_50.convertReference(src.getActor().getReference())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/MedicationRequest30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/MedicationRequest30_50.java index e1a135ac0..a2025d139 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/MedicationRequest30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/MedicationRequest30_50.java @@ -55,7 +55,7 @@ public class MedicationRequest30_50 { } } for (org.hl7.fhir.r5.model.Annotation t : src.getNote()) tgt.addNote(Annotation30_50.convertAnnotation(t)); - for (org.hl7.fhir.r5.model.Dosage t : src.getDose().getDosageInstruction()) + for (org.hl7.fhir.r5.model.Dosage t : src.getDosageInstruction()) tgt.addDosageInstruction(Dosage30_50.convertDosage(t)); if (src.hasDispenseRequest()) tgt.setDispenseRequest(convertMedicationRequestDispenseRequestComponent(src.getDispenseRequest())); @@ -106,7 +106,7 @@ public class MedicationRequest30_50 { tgt.addReason(new CodeableReference().setReference(Reference30_50.convertReference(t))); for (org.hl7.fhir.dstu3.model.Annotation t : src.getNote()) tgt.addNote(Annotation30_50.convertAnnotation(t)); for (org.hl7.fhir.dstu3.model.Dosage t : src.getDosageInstruction()) - tgt.getDose().addDosageInstruction(Dosage30_50.convertDosage(t)); + tgt.addDosageInstruction(Dosage30_50.convertDosage(t)); if (src.hasDispenseRequest()) tgt.setDispenseRequest(convertMedicationRequestDispenseRequestComponent(src.getDispenseRequest())); if (src.hasSubstitution()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/MedicationStatement30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/MedicationStatement30_50.java index 5411d991c..85f8b7f09 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/MedicationStatement30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/MedicationStatement30_50.java @@ -12,10 +12,10 @@ import org.hl7.fhir.r5.model.CodeableReference; public class MedicationStatement30_50 { - public static org.hl7.fhir.r5.model.MedicationUsage convertMedicationStatement(org.hl7.fhir.dstu3.model.MedicationStatement src) throws FHIRException { + public static org.hl7.fhir.r5.model.MedicationStatement convertMedicationStatement(org.hl7.fhir.dstu3.model.MedicationStatement src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r5.model.MedicationUsage tgt = new org.hl7.fhir.r5.model.MedicationUsage(); + org.hl7.fhir.r5.model.MedicationStatement tgt = new org.hl7.fhir.r5.model.MedicationStatement(); ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyDomainResource(src, tgt); for (org.hl7.fhir.dstu3.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(Identifier30_50.convertIdentifier(t)); @@ -52,7 +52,7 @@ public class MedicationStatement30_50 { return tgt; } - public static org.hl7.fhir.dstu3.model.MedicationStatement convertMedicationStatement(org.hl7.fhir.r5.model.MedicationUsage src) throws FHIRException { + public static org.hl7.fhir.dstu3.model.MedicationStatement convertMedicationStatement(org.hl7.fhir.r5.model.MedicationStatement src) throws FHIRException { if (src == null) return null; org.hl7.fhir.dstu3.model.MedicationStatement tgt = new org.hl7.fhir.dstu3.model.MedicationStatement(); @@ -94,7 +94,7 @@ public class MedicationStatement30_50 { return tgt; } - static public org.hl7.fhir.dstu3.model.Enumeration convertMedicationStatementStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.dstu3.model.Enumeration convertMedicationStatementStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.Enumeration tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.MedicationStatement.MedicationStatementStatusEnumFactory()); @@ -125,32 +125,32 @@ public class MedicationStatement30_50 { return tgt; } - static public org.hl7.fhir.r5.model.Enumeration convertMedicationStatementStatus(org.hl7.fhir.dstu3.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r5.model.Enumeration convertMedicationStatementStatus(org.hl7.fhir.dstu3.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; - org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodesEnumFactory()); + org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodesEnumFactory()); ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); switch (src.getValue()) { case ACTIVE: - tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.RECORDED); + tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.RECORDED); break; case COMPLETED: - tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.RECORDED); + tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.RECORDED); break; case ENTEREDINERROR: - tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.ENTEREDINERROR); + tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.ENTEREDINERROR); break; case INTENDED: - tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.RECORDED); + tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.RECORDED); break; case STOPPED: - tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.RECORDED); + tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.RECORDED); break; case ONHOLD: - tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.RECORDED); + tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.RECORDED); break; default: - tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.NULL); + tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.NULL); break; } return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/MessageHeader30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/MessageHeader30_50.java index cc7fd1b1c..1c0b56aca 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/MessageHeader30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/MessageHeader30_50.java @@ -1,11 +1,14 @@ package org.hl7.fhir.convertors.conv30_50.resources30_50; import org.hl7.fhir.convertors.context.ConversionContext30_50; +import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.Uri10_50; import org.hl7.fhir.convertors.conv30_50.datatypes30_50.Reference30_50; import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.CodeableConcept30_50; import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.Coding30_50; import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.ContactPoint30_50; import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.String30_50; +import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Uri30_50; +import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Url40_50; import org.hl7.fhir.exceptions.FHIRException; public class MessageHeader30_50 { @@ -19,8 +22,8 @@ public class MessageHeader30_50 { tgt.setNameElement(String30_50.convertString(src.getNameElement())); if (src.hasTarget()) tgt.setTarget(Reference30_50.convertReference(src.getTarget())); - if (src.hasEndpoint()) - tgt.setEndpoint(src.getEndpoint()); + if (src.hasEndpointUrlType()) + tgt.setEndpointElement(Uri30_50.convertUrl(src.getEndpointUrlType())); return tgt; } @@ -34,7 +37,7 @@ public class MessageHeader30_50 { if (src.hasTarget()) tgt.setTarget(Reference30_50.convertReference(src.getTarget())); if (src.hasEndpoint()) - tgt.setEndpoint(src.getEndpoint()); + tgt.setEndpoint(Uri30_50.convertUri(src.getEndpointElement())); return tgt; } @@ -49,8 +52,8 @@ public class MessageHeader30_50 { tgt.addDestination(convertMessageDestinationComponent(t)); if (src.hasSender()) tgt.setSender(Reference30_50.convertReference(src.getSender())); - if (src.hasEnterer()) - tgt.setEnterer(Reference30_50.convertReference(src.getEnterer())); +// if (src.hasEnterer()) +// tgt.setEnterer(Reference30_50.convertReference(src.getEnterer())); if (src.hasAuthor()) tgt.setAuthor(Reference30_50.convertReference(src.getAuthor())); if (src.hasSource()) @@ -76,8 +79,8 @@ public class MessageHeader30_50 { tgt.addDestination(convertMessageDestinationComponent(t)); if (src.hasSender()) tgt.setSender(Reference30_50.convertReference(src.getSender())); - if (src.hasEnterer()) - tgt.setEnterer(Reference30_50.convertReference(src.getEnterer())); +// if (src.hasEnterer()) +// tgt.setEnterer(Reference30_50.convertReference(src.getEnterer())); if (src.hasAuthor()) tgt.setAuthor(Reference30_50.convertReference(src.getAuthor())); if (src.hasSource()) @@ -133,8 +136,8 @@ public class MessageHeader30_50 { tgt.setVersionElement(String30_50.convertString(src.getVersionElement())); if (src.hasContact()) tgt.setContact(ContactPoint30_50.convertContactPoint(src.getContact())); - if (src.hasEndpoint()) - tgt.setEndpoint(src.getEndpoint()); + if (src.hasEndpointUrlType()) + tgt.setEndpointElement(Uri30_50.convertUrl(src.getEndpointUrlType())); return tgt; } @@ -152,7 +155,7 @@ public class MessageHeader30_50 { if (src.hasContact()) tgt.setContact(ContactPoint30_50.convertContactPoint(src.getContact())); if (src.hasEndpoint()) - tgt.setEndpoint(src.getEndpoint()); + tgt.setEndpoint(Uri30_50.convertUri(src.getEndpointElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/Observation30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/Observation30_50.java index e031049d0..5b75cee71 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/Observation30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/Observation30_50.java @@ -166,7 +166,7 @@ public class Observation30_50 { if (src.hasAge()) tgt.setAge(Range30_50.convertRange(src.getAge())); if (src.hasText()) - tgt.setTextElement(String30_50.convertString(src.getTextElement())); + tgt.setTextElement(String30_50.convertStringToMarkdown(src.getTextElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/OperationDefinition30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/OperationDefinition30_50.java index 2699442e2..27933f54e 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/OperationDefinition30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/OperationDefinition30_50.java @@ -13,9 +13,13 @@ import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Inte import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.MarkDown30_50; import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.String30_50; import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Uri30_50; +import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Code43_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.DataType; +import org.hl7.fhir.r5.model.Enumeration; import org.hl7.fhir.r5.model.Enumerations; +import org.hl7.fhir.r5.model.Enumerations.VersionIndependentResourceTypesAll; +import org.hl7.fhir.r5.model.Enumerations.VersionIndependentResourceTypesAllEnumFactory; public class OperationDefinition30_50 { @@ -58,7 +62,7 @@ public class OperationDefinition30_50 { tgt.setComment(src.getComment()); if (src.hasBase()) tgt.setBaseElement(Reference30_50.convertReferenceToCanonical(src.getBase())); - for (org.hl7.fhir.dstu3.model.CodeType t : src.getResource()) tgt.addResource(t.getValue()); + for (org.hl7.fhir.dstu3.model.CodeType t : src.getResource()) tgt.getResource().add(new Enumeration(new VersionIndependentResourceTypesAllEnumFactory(), Code30_50.convertCode(t))); if (src.hasSystem()) tgt.setSystemElement(Boolean30_50.convertBoolean(src.getSystemElement())); if (src.hasType()) @@ -111,7 +115,7 @@ public class OperationDefinition30_50 { tgt.setComment(src.getComment()); if (src.hasBase()) tgt.setBase(Reference30_50.convertCanonicalToReference(src.getBaseElement())); - for (org.hl7.fhir.r5.model.CodeType t : src.getResource()) tgt.addResource(t.getValue()); + for (Enumeration t : src.getResource()) tgt.getResource().add(Code30_50.convertCode(t.getCodeType())); if (src.hasSystem()) tgt.setSystemElement(Boolean30_50.convertBoolean(src.getSystemElement())); if (src.hasType()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/PaymentNotice30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/PaymentNotice30_50.java index b602378bf..cc1ca428e 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/PaymentNotice30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/PaymentNotice30_50.java @@ -29,8 +29,8 @@ public class PaymentNotice30_50 { tgt.setCreatedElement(DateTime30_50.convertDateTime(src.getCreatedElement())); if (src.hasRecipient()) tgt.setTarget(Reference30_50.convertReference(src.getRecipient())); - if (src.hasProvider()) - tgt.setProvider(Reference30_50.convertReference(src.getProvider())); + if (src.hasReporter()) + tgt.setProvider(Reference30_50.convertReference(src.getReporter())); if (src.hasPaymentStatus()) tgt.setPaymentStatus(CodeableConcept30_50.convertCodeableConcept(src.getPaymentStatus())); return tgt; @@ -56,7 +56,7 @@ public class PaymentNotice30_50 { if (src.hasTarget()) tgt.setRecipient(Reference30_50.convertReference(src.getTarget())); if (src.hasProvider()) - tgt.setProvider(Reference30_50.convertReference(src.getProvider())); + tgt.setReporter(Reference30_50.convertReference(src.getProvider())); if (src.hasPaymentStatus()) tgt.setPaymentStatus(CodeableConcept30_50.convertCodeableConcept(src.getPaymentStatus())); return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/PlanDefinition30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/PlanDefinition30_50.java index 1ab241239..ec8be925a 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/PlanDefinition30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/PlanDefinition30_50.java @@ -534,7 +534,7 @@ public class PlanDefinition30_50 { if (src.hasPurpose()) tgt.setPurposeElement(MarkDown30_50.convertMarkdown(src.getPurposeElement())); if (src.hasUsage()) - tgt.setUsageElement(String30_50.convertString(src.getUsageElement())); + tgt.setUsageElement(String30_50.convertStringToMarkdown(src.getUsageElement())); if (src.hasApprovalDate()) tgt.setApprovalDateElement(Date30_50.convertDate(src.getApprovalDateElement())); if (src.hasLastReviewDate()) @@ -582,9 +582,9 @@ public class PlanDefinition30_50 { if (src.hasTitle()) tgt.setTitleElement(String30_50.convertString(src.getTitleElement())); if (src.hasDescription()) - tgt.setDescriptionElement(String30_50.convertString(src.getDescriptionElement())); + tgt.setDescriptionElement(String30_50.convertStringToMarkdown(src.getDescriptionElement())); if (src.hasTextEquivalent()) - tgt.setTextEquivalentElement(String30_50.convertString(src.getTextEquivalentElement())); + tgt.setTextEquivalentElement(String30_50.convertStringToMarkdown(src.getTextEquivalentElement())); for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getCode()) tgt.setCode(CodeableConcept30_50.convertCodeableConcept(t)); for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getReason()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/Practitioner30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/Practitioner30_50.java index 6d38e89d3..6c5ee06be 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/Practitioner30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/Practitioner30_50.java @@ -12,6 +12,7 @@ import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.Period import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Boolean30_50; import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Date30_50; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r5.model.Practitioner.PractitionerCommunicationComponent; public class Practitioner30_50 { @@ -36,7 +37,7 @@ public class Practitioner30_50 { for (org.hl7.fhir.dstu3.model.Practitioner.PractitionerQualificationComponent t : src.getQualification()) tgt.addQualification(convertPractitionerQualificationComponent(t)); for (org.hl7.fhir.dstu3.model.CodeableConcept t : src.getCommunication()) - tgt.addCommunication(CodeableConcept30_50.convertCodeableConcept(t)); + tgt.addCommunication().setLanguage(CodeableConcept30_50.convertCodeableConcept(t)); return tgt; } @@ -60,8 +61,8 @@ public class Practitioner30_50 { for (org.hl7.fhir.r5.model.Attachment t : src.getPhoto()) tgt.addPhoto(Attachment30_50.convertAttachment(t)); for (org.hl7.fhir.r5.model.Practitioner.PractitionerQualificationComponent t : src.getQualification()) tgt.addQualification(convertPractitionerQualificationComponent(t)); - for (org.hl7.fhir.r5.model.CodeableConcept t : src.getCommunication()) - tgt.addCommunication(CodeableConcept30_50.convertCodeableConcept(t)); + for (PractitionerCommunicationComponent t : src.getCommunication()) + tgt.addCommunication(CodeableConcept30_50.convertCodeableConcept(t.getLanguage())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/Schedule30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/Schedule30_50.java index 2409b3f04..671739863 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/Schedule30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/Schedule30_50.java @@ -55,7 +55,7 @@ public class Schedule30_50 { if (src.hasPlanningHorizon()) tgt.setPlanningHorizon(Period30_50.convertPeriod(src.getPlanningHorizon())); if (src.hasComment()) - tgt.setCommentElement(String30_50.convertString(src.getCommentElement())); + tgt.setCommentElement(String30_50.convertStringToMarkdown(src.getCommentElement())); return tgt; } } \ No newline at end of file diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/SearchParameter30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/SearchParameter30_50.java index eed145ced..bf2c19450 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/SearchParameter30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/SearchParameter30_50.java @@ -15,50 +15,53 @@ import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Stri import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Uri30_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CodeType; +import org.hl7.fhir.r5.model.Enumeration; +import org.hl7.fhir.r5.model.Enumerations.VersionIndependentResourceTypesAll; +import org.hl7.fhir.r5.model.Enumerations.VersionIndependentResourceTypesAllEnumFactory; public class SearchParameter30_50 { - static public org.hl7.fhir.r5.model.Enumeration convertSearchComparator(org.hl7.fhir.dstu3.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r5.model.Enumeration convertSearchComparator(org.hl7.fhir.dstu3.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; - org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.SearchParameter.SearchComparatorEnumFactory()); + org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.SearchComparatorEnumFactory()); ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); switch (src.getValue()) { case EQ: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchComparator.EQ); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchComparator.EQ); break; case NE: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchComparator.NE); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchComparator.NE); break; case GT: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchComparator.GT); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchComparator.GT); break; case LT: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchComparator.LT); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchComparator.LT); break; case GE: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchComparator.GE); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchComparator.GE); break; case LE: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchComparator.LE); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchComparator.LE); break; case SA: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchComparator.SA); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchComparator.SA); break; case EB: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchComparator.EB); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchComparator.EB); break; case AP: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchComparator.AP); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchComparator.AP); break; default: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchComparator.NULL); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchComparator.NULL); break; } return tgt; } - static public org.hl7.fhir.dstu3.model.Enumeration convertSearchComparator(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.dstu3.model.Enumeration convertSearchComparator(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.Enumeration tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.SearchParameter.SearchComparatorEnumFactory()); @@ -98,50 +101,50 @@ public class SearchParameter30_50 { return tgt; } - static public org.hl7.fhir.r5.model.Enumeration convertSearchModifierCode(org.hl7.fhir.dstu3.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r5.model.Enumeration convertSearchModifierCode(org.hl7.fhir.dstu3.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; - org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.SearchParameter.SearchModifierCodeEnumFactory()); + org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.SearchModifierCodeEnumFactory()); ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyElement(src, tgt); switch (src.getValue()) { case MISSING: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.MISSING); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.MISSING); break; case EXACT: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.EXACT); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.EXACT); break; case CONTAINS: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.CONTAINS); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.CONTAINS); break; case NOT: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.NOT); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.NOT); break; case TEXT: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.TEXT); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.TEXT); break; case IN: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.IN); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.IN); break; case NOTIN: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.NOTIN); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.NOTIN); break; case BELOW: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.BELOW); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.BELOW); break; case ABOVE: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.ABOVE); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.ABOVE); break; case TYPE: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.TYPE); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.TYPE); break; default: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.NULL); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.NULL); break; } return tgt; } - static public org.hl7.fhir.dstu3.model.Enumeration convertSearchModifierCode(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.dstu3.model.Enumeration convertSearchModifierCode(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.dstu3.model.Enumeration tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.SearchParameter.SearchModifierCodeEnumFactory()); @@ -213,7 +216,7 @@ public class SearchParameter30_50 { tgt.setPurposeElement(MarkDown30_50.convertMarkdown(src.getPurposeElement())); if (src.hasCode()) tgt.setCodeElement(Code30_50.convertCode(src.getCodeElement())); - for (org.hl7.fhir.dstu3.model.CodeType t : src.getBase()) tgt.getBase().add(Code30_50.convertCode(t)); + for (org.hl7.fhir.dstu3.model.CodeType t : src.getBase()) tgt.getBase().add(new Enumeration(new VersionIndependentResourceTypesAllEnumFactory(), Code30_50.convertCode(t))); if (src.hasType()) tgt.setTypeElement(Enumerations30_50.convertSearchParamType(src.getTypeElement())); if (src.hasDerivedFrom()) @@ -226,7 +229,7 @@ public class SearchParameter30_50 { // tgt.setXpathElement(String30_50.convertString(src.getXpathElement())); if (src.hasXpathUsage()) tgt.setProcessingModeElement(convertXPathUsageType(src.getXpathUsageElement())); - for (org.hl7.fhir.dstu3.model.CodeType t : src.getTarget()) tgt.addTarget(t.getValue()); + for (org.hl7.fhir.dstu3.model.CodeType t : src.getTarget()) tgt.getTarget().add(new Enumeration(new VersionIndependentResourceTypesAllEnumFactory(), t.getValue())); tgt.setComparator(src.getComparator().stream() .map(SearchParameter30_50::convertSearchComparator) .collect(Collectors.toList())); @@ -268,7 +271,7 @@ public class SearchParameter30_50 { tgt.setPurposeElement(MarkDown30_50.convertMarkdown(src.getPurposeElement())); if (src.hasCode()) tgt.setCodeElement(Code30_50.convertCode(src.getCodeElement())); - for (CodeType t : src.getBase()) tgt.getBase().add(Code30_50.convertCode(t)); + for (Enumeration t : src.getBase()) tgt.getBase().add(Code30_50.convertCode(t.getCodeType())); if (src.hasType()) tgt.setTypeElement(Enumerations30_50.convertSearchParamType(src.getTypeElement())); if (src.hasDerivedFrom()) @@ -281,7 +284,7 @@ public class SearchParameter30_50 { // tgt.setXpathElement(String30_50.convertString(src.getXpathElement())); if (src.hasProcessingMode()) tgt.setXpathUsageElement(convertXPathUsageType(src.getProcessingModeElement())); - for (org.hl7.fhir.r5.model.CodeType t : src.getTarget()) tgt.addTarget(t.getValue()); + for (Enumeration t : src.getTarget()) tgt.getTarget().add(Code30_50.convertCode(t.getCodeType())); tgt.setComparator(src.getComparator().stream() .map(SearchParameter30_50::convertSearchComparator) .collect(Collectors.toList())); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/StructureMap30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/StructureMap30_50.java index 777abeaeb..c829b1d5e 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/StructureMap30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/StructureMap30_50.java @@ -303,7 +303,7 @@ public class StructureMap30_50 { org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleTargetComponent tgt = new org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleTargetComponent(); ConversionContext30_50.INSTANCE.getVersionConvertor_30_50().copyBackboneElement(src,tgt); if (src.hasContext()) - tgt.setContextElement(Id30_50.convertId(src.getContextElement())); + tgt.setContextElement(Id30_50.convertIdToString(src.getContextElement())); if (src.hasContextType() && src.getContextType() != org.hl7.fhir.dstu3.model.StructureMap.StructureMapContextType.VARIABLE) throw new Error("This conversion is not supported. Consult code maintainers"); // this should never happens - no one knows what the intent was here. if (src.hasElement()) @@ -600,7 +600,7 @@ public class StructureMap30_50 { tgt.setValue(org.hl7.fhir.r5.model.StructureMap.StructureMapTargetListMode.LAST); break; case COLLATE: - tgt.setValue(org.hl7.fhir.r5.model.StructureMap.StructureMapTargetListMode.COLLATE); + tgt.setValue(org.hl7.fhir.r5.model.StructureMap.StructureMapTargetListMode.SINGLE); break; default: tgt.setValue(org.hl7.fhir.r5.model.StructureMap.StructureMapTargetListMode.NULL); @@ -624,7 +624,7 @@ public class StructureMap30_50 { case LAST: tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapTargetListMode.LAST); break; - case COLLATE: + case SINGLE: tgt.setValue(org.hl7.fhir.dstu3.model.StructureMap.StructureMapTargetListMode.COLLATE); break; default: diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/Substance30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/Substance30_50.java index 8b507a813..bd4976317 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/Substance30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/Substance30_50.java @@ -70,7 +70,7 @@ public class Substance30_50 { if (src.hasCode()) tgt.getCode().setConcept(CodeableConcept30_50.convertCodeableConcept(src.getCode())); if (src.hasDescription()) - tgt.setDescriptionElement(String30_50.convertString(src.getDescriptionElement())); + tgt.setDescriptionElement(String30_50.convertStringToMarkdown(src.getDescriptionElement())); for (org.hl7.fhir.dstu3.model.Substance.SubstanceInstanceComponent t : src.getInstance()) convertSubstanceInstanceComponent(t, tgt); for (org.hl7.fhir.dstu3.model.Substance.SubstanceIngredientComponent t : src.getIngredient()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/TestScript30_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/TestScript30_50.java index f34733384..feee70490 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/TestScript30_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv30_50/resources30_50/TestScript30_50.java @@ -822,7 +822,7 @@ public class TestScript30_50 { tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.NOTMODIFIED); break; case BAD: - tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.BAD); + tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.BADREQUEST); break; case FORBIDDEN: tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.FORBIDDEN); @@ -843,7 +843,7 @@ public class TestScript30_50 { tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.PRECONDITIONFAILED); break; case UNPROCESSABLE: - tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.UNPROCESSABLE); + tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.UNPROCESSABLECONTENT); break; default: tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.NULL); @@ -873,7 +873,7 @@ public class TestScript30_50 { case NOTMODIFIED: tgt.setValue(org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.NOTMODIFIED); break; - case BAD: + case BADREQUEST: tgt.setValue(org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.BAD); break; case FORBIDDEN: @@ -894,7 +894,7 @@ public class TestScript30_50 { case PRECONDITIONFAILED: tgt.setValue(org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.PRECONDITIONFAILED); break; - case UNPROCESSABLE: + case UNPROCESSABLECONTENT: tgt.setValue(org.hl7.fhir.dstu3.model.TestScript.AssertionResponseTypes.UNPROCESSABLE); break; default: diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/datatypes40_50/metadata40_50/Expression40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/datatypes40_50/metadata40_50/Expression40_50.java index c03deb432..7d16140b6 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/datatypes40_50/metadata40_50/Expression40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/datatypes40_50/metadata40_50/Expression40_50.java @@ -13,7 +13,7 @@ public class Expression40_50 { org.hl7.fhir.r5.model.Expression tgt = new org.hl7.fhir.r5.model.Expression(); ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); if (src.hasDescription()) tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement())); - if (src.hasName()) tgt.setNameElement(Id40_50.convertId(src.getNameElement())); + if (src.hasName()) tgt.setNameElement(Id40_50.convertIdToCode(src.getNameElement())); if (src.hasLanguage()) tgt.setLanguageElement(Code40_50.convertCode(src.getLanguageElement())); if (src.hasExpression()) tgt.setExpressionElement(String40_50.convertString(src.getExpressionElement())); if (src.hasReference()) tgt.setReferenceElement(Uri40_50.convertUri(src.getReferenceElement())); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/datatypes40_50/primitive40_50/Code40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/datatypes40_50/primitive40_50/Code40_50.java index 9d660d988..8a2189cf5 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/datatypes40_50/primitive40_50/Code40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/datatypes40_50/primitive40_50/Code40_50.java @@ -3,7 +3,6 @@ package org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50; import org.hl7.fhir.convertors.context.ConversionContext40_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.Enumeration; -import org.hl7.fhir.r5.model.Enumerations.AllResourceTypes; public class Code40_50 { public static org.hl7.fhir.r5.model.CodeType convertCode(org.hl7.fhir.r4.model.CodeType src) throws FHIRException { @@ -18,13 +17,13 @@ public class Code40_50 { return tgt; } - - public static org.hl7.fhir.r5.model.Enumeration convertResourceEnum(org.hl7.fhir.r4.model.CodeType src) { - return new Enumeration(new org.hl7.fhir.r5.model.Enumerations.AllResourceTypesEnumFactory(), src.getCode()); - } - - public static org.hl7.fhir.r4.model.CodeType convertResourceEnum(org.hl7.fhir.r5.model.Enumeration src) { - return new org.hl7.fhir.r4.model.CodeType(src.getCode()); - } +// +// public static org.hl7.fhir.r5.model.Enumeration convertResourceEnum(org.hl7.fhir.r4.model.CodeType src) { +// return new Enumeration(new org.hl7.fhir.r5.model.Enumerations.AllResourceTypesEnumFactory(), src.getCode()); +// } +// +// public static org.hl7.fhir.r4.model.CodeType convertResourceEnum(org.hl7.fhir.r5.model.Enumeration src) { +// return new org.hl7.fhir.r4.model.CodeType(src.getCode()); +// } } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/datatypes40_50/primitive40_50/Decimal40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/datatypes40_50/primitive40_50/Decimal40_50.java index 9a65f9394..80f976315 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/datatypes40_50/primitive40_50/Decimal40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/datatypes40_50/primitive40_50/Decimal40_50.java @@ -15,4 +15,15 @@ public class Decimal40_50 { ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); return tgt; } + + public static org.hl7.fhir.r5.model.Quantity convertDecimalToQuantity(org.hl7.fhir.r4.model.DecimalType src) { + org.hl7.fhir.r5.model.Quantity tgt = new org.hl7.fhir.r5.model.Quantity(); + if (src.hasValue()) { + tgt.setValue(src.getValue()); + tgt.setSystem("http://unitsofmeasure.org"); + tgt.setCode("1"); + } + ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); + return tgt; + } } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/datatypes40_50/primitive40_50/Id40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/datatypes40_50/primitive40_50/Id40_50.java index 0aa6f8a7d..743cee192 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/datatypes40_50/primitive40_50/Id40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/datatypes40_50/primitive40_50/Id40_50.java @@ -1,6 +1,7 @@ package org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50; import org.hl7.fhir.convertors.context.ConversionContext40_50; +import org.hl7.fhir.convertors.context.ConversionContext43_50; import org.hl7.fhir.exceptions.FHIRException; public class Id40_50 { @@ -15,4 +16,33 @@ public class Id40_50 { ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); return tgt; } + + + public static org.hl7.fhir.r5.model.StringType convertIdToString(org.hl7.fhir.r4.model.IdType src) { + org.hl7.fhir.r5.model.StringType tgt = src.hasValue() ? new org.hl7.fhir.r5.model.StringType(src.getValueAsString()) : new org.hl7.fhir.r5.model.StringType(); + ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); + return tgt; + } + + + public static org.hl7.fhir.r4.model.IdType convertId(org.hl7.fhir.r5.model.StringType src) throws FHIRException { + org.hl7.fhir.r4.model.IdType tgt = src.hasValue() ? new org.hl7.fhir.r4.model.IdType(src.getValueAsString()) : new org.hl7.fhir.r4.model.IdType(); + ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); + return tgt; + } + + + public static org.hl7.fhir.r5.model.CodeType convertIdToCode(org.hl7.fhir.r4.model.IdType src) { + org.hl7.fhir.r5.model.CodeType tgt = src.hasValue() ? new org.hl7.fhir.r5.model.CodeType(src.getValueAsString()) : new org.hl7.fhir.r5.model.CodeType(); + ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); + return tgt; + } + + + public static org.hl7.fhir.r4.model.IdType convertId(org.hl7.fhir.r5.model.CodeType src) throws FHIRException { + org.hl7.fhir.r4.model.IdType tgt = src.hasValue() ? new org.hl7.fhir.r4.model.IdType(src.getValueAsString()) : new org.hl7.fhir.r4.model.IdType(); + ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); + return tgt; + } + } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/datatypes40_50/special40_50/ElementDefinition40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/datatypes40_50/special40_50/ElementDefinition40_50.java index b8718509a..5a0bd14d0 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/datatypes40_50/special40_50/ElementDefinition40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/datatypes40_50/special40_50/ElementDefinition40_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv40_50.datatypes40_50.special40_50; import java.util.stream.Collectors; +import org.hl7.fhir.convertors.VersionConvertorConstants; import org.hl7.fhir.convertors.context.ConversionContext40_50; import org.hl7.fhir.convertors.conv40_50.datatypes40_50.BackboneElement40_50; import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.Coding40_50; @@ -519,7 +520,9 @@ public class ElementDefinition40_50 { if (src.hasSeverity()) tgt.setSeverityElement(convertConstraintSeverity(src.getSeverityElement())); if (src.hasHuman()) tgt.setHumanElement(String40_50.convertString(src.getHumanElement())); if (src.hasExpression()) tgt.setExpressionElement(String40_50.convertString(src.getExpressionElement())); - if (src.hasXpath()) tgt.setXpathElement(String40_50.convertString(src.getXpathElement())); + if (src.hasXpath()) { + tgt.addExtension(new org.hl7.fhir.r5.model.Extension(org.hl7.fhir.r5.utils.ToolingExtensions.EXT_XPATH_CONSTRAINT, new org.hl7.fhir.r5.model.StringType(src.getXpath()))); + } if (src.hasSource()) tgt.setSourceElement(Canonical40_50.convertCanonical(src.getSourceElement())); return tgt; } @@ -533,7 +536,9 @@ public class ElementDefinition40_50 { if (src.hasSeverity()) tgt.setSeverityElement(convertConstraintSeverity(src.getSeverityElement())); if (src.hasHuman()) tgt.setHumanElement(String40_50.convertString(src.getHumanElement())); if (src.hasExpression()) tgt.setExpressionElement(String40_50.convertString(src.getExpressionElement())); - if (src.hasXpath()) tgt.setXpathElement(String40_50.convertString(src.getXpathElement())); + if (org.hl7.fhir.r5.utils.ToolingExtensions.hasExtension(src, org.hl7.fhir.r5.utils.ToolingExtensions.EXT_XPATH_CONSTRAINT)) { + tgt.setXpath(org.hl7.fhir.r5.utils.ToolingExtensions.readStringExtension(src, org.hl7.fhir.r5.utils.ToolingExtensions.EXT_XPATH_CONSTRAINT)); + } if (src.hasSource()) tgt.setSourceElement(Canonical40_50.convertCanonical(src.getSourceElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Account40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Account40_50.java index c5cee1b53..1047efca3 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Account40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Account40_50.java @@ -62,7 +62,7 @@ public class Account40_50 { if (src.hasOwner()) tgt.setOwner(Reference40_50.convertReference(src.getOwner())); if (src.hasDescription()) - tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement())); + tgt.setDescriptionElement(String40_50.convertStringToMarkdown(src.getDescriptionElement())); for (org.hl7.fhir.r4.model.Account.GuarantorComponent t : src.getGuarantor()) tgt.addGuarantor(convertGuarantorComponent(t)); // if (src.hasPartOf()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ActivityDefinition40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ActivityDefinition40_50.java index 0ecc71ced..11fe3fa2d 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ActivityDefinition40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ActivityDefinition40_50.java @@ -92,7 +92,7 @@ public class ActivityDefinition40_50 { if (src.hasPurpose()) tgt.setPurposeElement(MarkDown40_50.convertMarkdown(src.getPurposeElement())); if (src.hasUsage()) - tgt.setUsageElement(String40_50.convertString(src.getUsageElement())); + tgt.setUsageElement(String40_50.convertStringToMarkdown(src.getUsageElement())); if (src.hasCopyright()) tgt.setCopyrightElement(MarkDown40_50.convertMarkdown(src.getCopyrightElement())); if (src.hasApprovalDate()) @@ -273,9 +273,6 @@ public class ActivityDefinition40_50 { case COMMUNICATIONREQUEST: tgt.setValue(org.hl7.fhir.r5.model.ActivityDefinition.RequestResourceTypes.COMMUNICATIONREQUEST); break; - case CONTRACT: - tgt.setValue(org.hl7.fhir.r5.model.ActivityDefinition.RequestResourceTypes.CONTRACT); - break; case DEVICEREQUEST: tgt.setValue(org.hl7.fhir.r5.model.ActivityDefinition.RequestResourceTypes.DEVICEREQUEST); break; @@ -335,9 +332,6 @@ public class ActivityDefinition40_50 { case COMMUNICATIONREQUEST: tgt.setValue(org.hl7.fhir.r4.model.ActivityDefinition.ActivityDefinitionKind.COMMUNICATIONREQUEST); break; - case CONTRACT: - tgt.setValue(org.hl7.fhir.r4.model.ActivityDefinition.ActivityDefinitionKind.CONTRACT); - break; case DEVICEREQUEST: tgt.setValue(org.hl7.fhir.r4.model.ActivityDefinition.ActivityDefinitionKind.DEVICEREQUEST); break; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Appointment40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Appointment40_50.java index ff76f8165..b30180df3 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Appointment40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Appointment40_50.java @@ -325,32 +325,32 @@ public class Appointment40_50 { return tgt; } - static public org.hl7.fhir.r5.model.Enumeration convertParticipationStatus(org.hl7.fhir.r4.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r5.model.Enumeration convertParticipationStatus(org.hl7.fhir.r4.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; - org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.ParticipationStatusEnumFactory()); + org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Appointment.ParticipationStatusEnumFactory()); ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); switch (src.getValue()) { case ACCEPTED: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.ACCEPTED); + tgt.setValue(org.hl7.fhir.r5.model.Appointment.ParticipationStatus.ACCEPTED); break; case DECLINED: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.DECLINED); + tgt.setValue(org.hl7.fhir.r5.model.Appointment.ParticipationStatus.DECLINED); break; case TENTATIVE: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.TENTATIVE); + tgt.setValue(org.hl7.fhir.r5.model.Appointment.ParticipationStatus.TENTATIVE); break; case NEEDSACTION: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.NEEDSACTION); + tgt.setValue(org.hl7.fhir.r5.model.Appointment.ParticipationStatus.NEEDSACTION); break; default: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.NULL); + tgt.setValue(org.hl7.fhir.r5.model.Appointment.ParticipationStatus.NULL); break; } return tgt; } - static public org.hl7.fhir.r4.model.Enumeration convertParticipationStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r4.model.Enumeration convertParticipationStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4.model.Enumeration tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.Appointment.ParticipationStatusEnumFactory()); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/AppointmentResponse40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/AppointmentResponse40_50.java index 4c16d1a33..86501a5cb 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/AppointmentResponse40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/AppointmentResponse40_50.java @@ -59,7 +59,7 @@ public class AppointmentResponse40_50 { if (src.hasParticipantStatus()) tgt.setParticipantStatusElement(convertParticipantStatus(src.getParticipantStatusElement())); if (src.hasComment()) - tgt.setCommentElement(String40_50.convertString(src.getCommentElement())); + tgt.setCommentElement(String40_50.convertStringToMarkdown(src.getCommentElement())); return tgt; } @@ -87,32 +87,32 @@ public class AppointmentResponse40_50 { return tgt; } - static public org.hl7.fhir.r5.model.Enumeration convertParticipantStatus(org.hl7.fhir.r4.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r5.model.Enumeration convertParticipantStatus(org.hl7.fhir.r4.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; - org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.ParticipationStatusEnumFactory()); + org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatusEnumFactory()); ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); switch (src.getValue()) { case ACCEPTED: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.ACCEPTED); + tgt.setValue(org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus.ACCEPTED); break; case DECLINED: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.DECLINED); + tgt.setValue(org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus.DECLINED); break; case TENTATIVE: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.TENTATIVE); + tgt.setValue(org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus.TENTATIVE); break; case NEEDSACTION: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.NEEDSACTION); + tgt.setValue(org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus.NEEDSACTION); break; default: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.NULL); + tgt.setValue(org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus.NULL); break; } return tgt; } - static public org.hl7.fhir.r4.model.Enumeration convertParticipantStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r4.model.Enumeration convertParticipantStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4.model.Enumeration tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.AppointmentResponse.ParticipantStatusEnumFactory()); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/BodyStructure40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/BodyStructure40_50.java index 45f54f3d5..3be999f5c 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/BodyStructure40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/BodyStructure40_50.java @@ -56,7 +56,7 @@ public class BodyStructure40_50 { // for (org.hl7.fhir.r4.model.CodeableConcept t : src.getLocationQualifier()) // tgt.addLocationQualifier(CodeableConcept40_50.convertCodeableConcept(t)); if (src.hasDescription()) - tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement())); + tgt.setDescriptionElement(String40_50.convertStringToMarkdown(src.getDescriptionElement())); for (org.hl7.fhir.r4.model.Attachment t : src.getImage()) tgt.addImage(Attachment40_50.convertAttachment(t)); if (src.hasPatient()) tgt.setPatient(Reference40_50.convertReference(src.getPatient())); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/CapabilityStatement40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/CapabilityStatement40_50.java index 614704097..3480bfa19 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/CapabilityStatement40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/CapabilityStatement40_50.java @@ -244,7 +244,7 @@ public class CapabilityStatement40_50 { org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementImplementationComponent tgt = new org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementImplementationComponent(); ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt); if (src.hasDescription()) - tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement())); + tgt.setDescriptionElement(String40_50.convertStringToMarkdown(src.getDescriptionElement())); if (src.hasUrl()) tgt.setUrlElement(Url40_50.convertUrl(src.getUrlElement())); if (src.hasCustodian()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/CarePlan40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/CarePlan40_50.java index 46b38d28b..243dfa84c 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/CarePlan40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/CarePlan40_50.java @@ -273,8 +273,8 @@ public class CarePlan40_50 { for (org.hl7.fhir.r4.model.Annotation t : src.getProgress()) tgt.addProgress(Annotation40_50.convertAnnotation(t)); if (src.hasReference()) tgt.setPlannedActivityReference(Reference40_50.convertReference(src.getReference())); - if (src.hasDetail()) - tgt.setPlannedActivityDetail(convertCarePlanActivityDetailComponent(src.getDetail())); +// if (src.hasDetail()) +// tgt.setPlannedActivityDetail(convertCarePlanActivityDetailComponent(src.getDetail())); return tgt; } @@ -292,244 +292,244 @@ public class CarePlan40_50 { for (org.hl7.fhir.r5.model.Annotation t : src.getProgress()) tgt.addProgress(Annotation40_50.convertAnnotation(t)); if (src.hasPlannedActivityReference()) tgt.setReference(Reference40_50.convertReference(src.getPlannedActivityReference())); - if (src.hasPlannedActivityDetail()) - tgt.setDetail(convertCarePlanActivityDetailComponent(src.getPlannedActivityDetail())); - return tgt; - } - - public static org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent convertCarePlanActivityDetailComponent(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityDetailComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent tgt = new org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent(); - ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt); - if (src.hasKind()) - tgt.setKindElement(convertCarePlanActivityKind(src.getKindElement())); - for (org.hl7.fhir.r4.model.CanonicalType t : src.getInstantiatesCanonical()) - tgt.getInstantiatesCanonical().add(Canonical40_50.convertCanonical(t)); - for (org.hl7.fhir.r4.model.UriType t : src.getInstantiatesUri()) - tgt.getInstantiatesUri().add(Uri40_50.convertUri(t)); - if (src.hasCode()) - tgt.setCode(CodeableConcept40_50.convertCodeableConcept(src.getCode())); - for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReasonCode()) - tgt.addReason(CodeableConcept40_50.convertCodeableConceptToCodeableReference(t)); - for (org.hl7.fhir.r4.model.Reference t : src.getReasonReference()) - tgt.addReason(Reference40_50.convertReferenceToCodeableReference(t)); - for (org.hl7.fhir.r4.model.Reference t : src.getGoal()) tgt.addGoal(Reference40_50.convertReference(t)); - if (src.hasStatus()) - tgt.setStatusElement(convertCarePlanActivityStatus(src.getStatusElement())); - if (src.hasStatusReason()) - tgt.setStatusReason(CodeableConcept40_50.convertCodeableConcept(src.getStatusReason())); - if (src.hasDoNotPerform()) - tgt.setDoNotPerformElement(Boolean40_50.convertBoolean(src.getDoNotPerformElement())); - if (src.hasScheduled()) - tgt.setScheduled(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getScheduled())); - if (src.hasLocation()) - tgt.getLocation().setReference(Reference40_50.convertReference(src.getLocation())); - for (org.hl7.fhir.r4.model.Reference t : src.getPerformer()) tgt.addPerformer(Reference40_50.convertReference(t)); - if (src.hasProduct()) - tgt.setProduct(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getProduct())); - if (src.hasDailyAmount()) - tgt.setDailyAmount(SimpleQuantity40_50.convertSimpleQuantity(src.getDailyAmount())); - if (src.hasQuantity()) - tgt.setQuantity(SimpleQuantity40_50.convertSimpleQuantity(src.getQuantity())); - if (src.hasDescription()) - tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement())); - return tgt; - } - - public static org.hl7.fhir.r4.model.CarePlan.CarePlanActivityDetailComponent convertCarePlanActivityDetailComponent(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.CarePlan.CarePlanActivityDetailComponent tgt = new org.hl7.fhir.r4.model.CarePlan.CarePlanActivityDetailComponent(); - ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt); - if (src.hasKind()) - tgt.setKindElement(convertCarePlanActivityKind(src.getKindElement())); - for (org.hl7.fhir.r5.model.CanonicalType t : src.getInstantiatesCanonical()) - tgt.getInstantiatesCanonical().add(Canonical40_50.convertCanonical(t)); - for (org.hl7.fhir.r5.model.UriType t : src.getInstantiatesUri()) - tgt.getInstantiatesUri().add(Uri40_50.convertUri(t)); - if (src.hasCode()) - tgt.setCode(CodeableConcept40_50.convertCodeableConcept(src.getCode())); - for (CodeableReference t : src.getReason()) - if (t.hasConcept()) - tgt.addReasonCode(CodeableConcept40_50.convertCodeableConcept(t.getConcept())); - for (CodeableReference t : src.getReason()) - if (t.hasReference()) - tgt.addReasonReference(Reference40_50.convertReference(t.getReference())); - for (org.hl7.fhir.r5.model.Reference t : src.getGoal()) tgt.addGoal(Reference40_50.convertReference(t)); - if (src.hasStatus()) - tgt.setStatusElement(convertCarePlanActivityStatus(src.getStatusElement())); - if (src.hasStatusReason()) - tgt.setStatusReason(CodeableConcept40_50.convertCodeableConcept(src.getStatusReason())); - if (src.hasDoNotPerform()) - tgt.setDoNotPerformElement(Boolean40_50.convertBoolean(src.getDoNotPerformElement())); - if (src.hasScheduled()) - tgt.setScheduled(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getScheduled())); - if (src.getLocation().hasReference()) - tgt.setLocation(Reference40_50.convertReference(src.getLocation().getReference())); - for (org.hl7.fhir.r5.model.Reference t : src.getPerformer()) tgt.addPerformer(Reference40_50.convertReference(t)); - if (src.hasProduct()) - tgt.setProduct(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getProduct())); - if (src.hasDailyAmount()) - tgt.setDailyAmount(SimpleQuantity40_50.convertSimpleQuantity(src.getDailyAmount())); - if (src.hasQuantity()) - tgt.setQuantity(SimpleQuantity40_50.convertSimpleQuantity(src.getQuantity())); - if (src.hasDescription()) - tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement())); - return tgt; - } - - static public org.hl7.fhir.r5.model.Enumeration convertCarePlanActivityKind(org.hl7.fhir.r4.model.Enumeration src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKindEnumFactory()); - ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); - switch (src.getValue()) { - case APPOINTMENT: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.APPOINTMENT); - break; - case COMMUNICATIONREQUEST: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.COMMUNICATIONREQUEST); - break; - case DEVICEREQUEST: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.DEVICEREQUEST); - break; - case MEDICATIONREQUEST: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.MEDICATIONREQUEST); - break; - case NUTRITIONORDER: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.NUTRITIONORDER); - break; - case TASK: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.TASK); - break; - case SERVICEREQUEST: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.SERVICEREQUEST); - break; - case VISIONPRESCRIPTION: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.VISIONPRESCRIPTION); - break; - default: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.NULL); - break; - } - return tgt; - } - - static public org.hl7.fhir.r4.model.Enumeration convertCarePlanActivityKind(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Enumeration tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKindEnumFactory()); - ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); - switch (src.getValue()) { - case APPOINTMENT: - tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind.APPOINTMENT); - break; - case COMMUNICATIONREQUEST: - tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind.COMMUNICATIONREQUEST); - break; - case DEVICEREQUEST: - tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind.DEVICEREQUEST); - break; - case MEDICATIONREQUEST: - tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind.MEDICATIONREQUEST); - break; - case NUTRITIONORDER: - tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind.NUTRITIONORDER); - break; - case TASK: - tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind.TASK); - break; - case SERVICEREQUEST: - tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind.SERVICEREQUEST); - break; - case VISIONPRESCRIPTION: - tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind.VISIONPRESCRIPTION); - break; - default: - tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind.NULL); - break; - } - return tgt; - } - - static public org.hl7.fhir.r5.model.Enumeration convertCarePlanActivityStatus(org.hl7.fhir.r4.model.Enumeration src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatusEnumFactory()); - ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); - switch (src.getValue()) { - case NOTSTARTED: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.NOTSTARTED); - break; - case SCHEDULED: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.SCHEDULED); - break; - case INPROGRESS: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.INPROGRESS); - break; - case ONHOLD: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.ONHOLD); - break; - case COMPLETED: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.COMPLETED); - break; - case CANCELLED: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.CANCELLED); - break; - case STOPPED: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.STOPPED); - break; - case UNKNOWN: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.UNKNOWN); - break; - case ENTEREDINERROR: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.ENTEREDINERROR); - break; - default: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.NULL); - break; - } - return tgt; - } - - static public org.hl7.fhir.r4.model.Enumeration convertCarePlanActivityStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4.model.Enumeration tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatusEnumFactory()); - ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); - switch (src.getValue()) { - case NOTSTARTED: - tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.NOTSTARTED); - break; - case SCHEDULED: - tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.SCHEDULED); - break; - case INPROGRESS: - tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.INPROGRESS); - break; - case ONHOLD: - tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.ONHOLD); - break; - case COMPLETED: - tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.COMPLETED); - break; - case CANCELLED: - tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.CANCELLED); - break; - case STOPPED: - tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.STOPPED); - break; - case UNKNOWN: - tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.UNKNOWN); - break; - case ENTEREDINERROR: - tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.ENTEREDINERROR); - break; - default: - tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.NULL); - break; - } +// if (src.hasPlannedActivityDetail()) +// tgt.setDetail(convertCarePlanActivityDetailComponent(src.getPlannedActivityDetail())); return tgt; } +// +// public static org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent convertCarePlanActivityDetailComponent(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityDetailComponent src) throws FHIRException { +// if (src == null) +// return null; +// org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent tgt = new org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent(); +// ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt); +// if (src.hasKind()) +// tgt.setKindElement(convertCarePlanActivityKind(src.getKindElement())); +// for (org.hl7.fhir.r4.model.CanonicalType t : src.getInstantiatesCanonical()) +// tgt.getInstantiatesCanonical().add(Canonical40_50.convertCanonical(t)); +// for (org.hl7.fhir.r4.model.UriType t : src.getInstantiatesUri()) +// tgt.getInstantiatesUri().add(Uri40_50.convertUri(t)); +// if (src.hasCode()) +// tgt.setCode(CodeableConcept40_50.convertCodeableConcept(src.getCode())); +// for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReasonCode()) +// tgt.addReason(CodeableConcept40_50.convertCodeableConceptToCodeableReference(t)); +// for (org.hl7.fhir.r4.model.Reference t : src.getReasonReference()) +// tgt.addReason(Reference40_50.convertReferenceToCodeableReference(t)); +// for (org.hl7.fhir.r4.model.Reference t : src.getGoal()) tgt.addGoal(Reference40_50.convertReference(t)); +// if (src.hasStatus()) +// tgt.setStatusElement(convertCarePlanActivityStatus(src.getStatusElement())); +// if (src.hasStatusReason()) +// tgt.setStatusReason(CodeableConcept40_50.convertCodeableConcept(src.getStatusReason())); +// if (src.hasDoNotPerform()) +// tgt.setDoNotPerformElement(Boolean40_50.convertBoolean(src.getDoNotPerformElement())); +// if (src.hasScheduled()) +// tgt.setScheduled(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getScheduled())); +// if (src.hasLocation()) +// tgt.getLocation().setReference(Reference40_50.convertReference(src.getLocation())); +// for (org.hl7.fhir.r4.model.Reference t : src.getPerformer()) tgt.addPerformer(Reference40_50.convertReference(t)); +// if (src.hasProduct()) +// tgt.setProduct(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getProduct())); +// if (src.hasDailyAmount()) +// tgt.setDailyAmount(SimpleQuantity40_50.convertSimpleQuantity(src.getDailyAmount())); +// if (src.hasQuantity()) +// tgt.setQuantity(SimpleQuantity40_50.convertSimpleQuantity(src.getQuantity())); +// if (src.hasDescription()) +// tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement())); +// return tgt; +// } +// +// public static org.hl7.fhir.r4.model.CarePlan.CarePlanActivityDetailComponent convertCarePlanActivityDetailComponent(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent src) throws FHIRException { +// if (src == null) +// return null; +// org.hl7.fhir.r4.model.CarePlan.CarePlanActivityDetailComponent tgt = new org.hl7.fhir.r4.model.CarePlan.CarePlanActivityDetailComponent(); +// ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt); +// if (src.hasKind()) +// tgt.setKindElement(convertCarePlanActivityKind(src.getKindElement())); +// for (org.hl7.fhir.r5.model.CanonicalType t : src.getInstantiatesCanonical()) +// tgt.getInstantiatesCanonical().add(Canonical40_50.convertCanonical(t)); +// for (org.hl7.fhir.r5.model.UriType t : src.getInstantiatesUri()) +// tgt.getInstantiatesUri().add(Uri40_50.convertUri(t)); +// if (src.hasCode()) +// tgt.setCode(CodeableConcept40_50.convertCodeableConcept(src.getCode())); +// for (CodeableReference t : src.getReason()) +// if (t.hasConcept()) +// tgt.addReasonCode(CodeableConcept40_50.convertCodeableConcept(t.getConcept())); +// for (CodeableReference t : src.getReason()) +// if (t.hasReference()) +// tgt.addReasonReference(Reference40_50.convertReference(t.getReference())); +// for (org.hl7.fhir.r5.model.Reference t : src.getGoal()) tgt.addGoal(Reference40_50.convertReference(t)); +// if (src.hasStatus()) +// tgt.setStatusElement(convertCarePlanActivityStatus(src.getStatusElement())); +// if (src.hasStatusReason()) +// tgt.setStatusReason(CodeableConcept40_50.convertCodeableConcept(src.getStatusReason())); +// if (src.hasDoNotPerform()) +// tgt.setDoNotPerformElement(Boolean40_50.convertBoolean(src.getDoNotPerformElement())); +// if (src.hasScheduled()) +// tgt.setScheduled(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getScheduled())); +// if (src.getLocation().hasReference()) +// tgt.setLocation(Reference40_50.convertReference(src.getLocation().getReference())); +// for (org.hl7.fhir.r5.model.Reference t : src.getPerformer()) tgt.addPerformer(Reference40_50.convertReference(t)); +// if (src.hasProduct()) +// tgt.setProduct(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getProduct())); +// if (src.hasDailyAmount()) +// tgt.setDailyAmount(SimpleQuantity40_50.convertSimpleQuantity(src.getDailyAmount())); +// if (src.hasQuantity()) +// tgt.setQuantity(SimpleQuantity40_50.convertSimpleQuantity(src.getQuantity())); +// if (src.hasDescription()) +// tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement())); +// return tgt; +// } +// +// static public org.hl7.fhir.r5.model.Enumeration convertCarePlanActivityKind(org.hl7.fhir.r4.model.Enumeration src) throws FHIRException { +// if (src == null || src.isEmpty()) +// return null; +// org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKindEnumFactory()); +// ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); +// switch (src.getValue()) { +// case APPOINTMENT: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.APPOINTMENT); +// break; +// case COMMUNICATIONREQUEST: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.COMMUNICATIONREQUEST); +// break; +// case DEVICEREQUEST: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.DEVICEREQUEST); +// break; +// case MEDICATIONREQUEST: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.MEDICATIONREQUEST); +// break; +// case NUTRITIONORDER: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.NUTRITIONORDER); +// break; +// case TASK: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.TASK); +// break; +// case SERVICEREQUEST: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.SERVICEREQUEST); +// break; +// case VISIONPRESCRIPTION: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.VISIONPRESCRIPTION); +// break; +// default: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.NULL); +// break; +// } +// return tgt; +// } +// +// static public org.hl7.fhir.r4.model.Enumeration convertCarePlanActivityKind(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { +// if (src == null || src.isEmpty()) +// return null; +// org.hl7.fhir.r4.model.Enumeration tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKindEnumFactory()); +// ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); +// switch (src.getValue()) { +// case APPOINTMENT: +// tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind.APPOINTMENT); +// break; +// case COMMUNICATIONREQUEST: +// tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind.COMMUNICATIONREQUEST); +// break; +// case DEVICEREQUEST: +// tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind.DEVICEREQUEST); +// break; +// case MEDICATIONREQUEST: +// tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind.MEDICATIONREQUEST); +// break; +// case NUTRITIONORDER: +// tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind.NUTRITIONORDER); +// break; +// case TASK: +// tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind.TASK); +// break; +// case SERVICEREQUEST: +// tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind.SERVICEREQUEST); +// break; +// case VISIONPRESCRIPTION: +// tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind.VISIONPRESCRIPTION); +// break; +// default: +// tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityKind.NULL); +// break; +// } +// return tgt; +// } +// +// static public org.hl7.fhir.r5.model.Enumeration convertCarePlanActivityStatus(org.hl7.fhir.r4.model.Enumeration src) throws FHIRException { +// if (src == null || src.isEmpty()) +// return null; +// org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatusEnumFactory()); +// ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); +// switch (src.getValue()) { +// case NOTSTARTED: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.NOTSTARTED); +// break; +// case SCHEDULED: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.SCHEDULED); +// break; +// case INPROGRESS: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.INPROGRESS); +// break; +// case ONHOLD: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.ONHOLD); +// break; +// case COMPLETED: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.COMPLETED); +// break; +// case CANCELLED: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.CANCELLED); +// break; +// case STOPPED: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.STOPPED); +// break; +// case UNKNOWN: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.UNKNOWN); +// break; +// case ENTEREDINERROR: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.ENTEREDINERROR); +// break; +// default: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.NULL); +// break; +// } +// return tgt; +// } +// +// static public org.hl7.fhir.r4.model.Enumeration convertCarePlanActivityStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { +// if (src == null || src.isEmpty()) +// return null; +// org.hl7.fhir.r4.model.Enumeration tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatusEnumFactory()); +// ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); +// switch (src.getValue()) { +// case NOTSTARTED: +// tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.NOTSTARTED); +// break; +// case SCHEDULED: +// tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.SCHEDULED); +// break; +// case INPROGRESS: +// tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.INPROGRESS); +// break; +// case ONHOLD: +// tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.ONHOLD); +// break; +// case COMPLETED: +// tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.COMPLETED); +// break; +// case CANCELLED: +// tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.CANCELLED); +// break; +// case STOPPED: +// tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.STOPPED); +// break; +// case UNKNOWN: +// tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.UNKNOWN); +// break; +// case ENTEREDINERROR: +// tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.ENTEREDINERROR); +// break; +// default: +// tgt.setValue(org.hl7.fhir.r4.model.CarePlan.CarePlanActivityStatus.NULL); +// break; +// } +// return tgt; +// } } \ No newline at end of file diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ClaimResponse40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ClaimResponse40_50.java index c6d204434..66e1f1af1 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ClaimResponse40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ClaimResponse40_50.java @@ -353,7 +353,7 @@ public class ClaimResponse40_50 { if (src.hasAmount()) tgt.setAmount(Money40_50.convertMoney(src.getAmount())); if (src.hasValue()) - tgt.setValueElement(Decimal40_50.convertDecimal(src.getValueElement())); + tgt.setQuantity(Decimal40_50.convertDecimalToQuantity(src.getValueElement())); return tgt; } @@ -368,8 +368,8 @@ public class ClaimResponse40_50 { tgt.setReason(CodeableConcept40_50.convertCodeableConcept(src.getReason())); if (src.hasAmount()) tgt.setAmount(Money40_50.convertMoney(src.getAmount())); - if (src.hasValue()) - tgt.setValueElement(Decimal40_50.convertDecimal(src.getValueElement())); + if (src.hasQuantity()) + tgt.setValueElement(Decimal40_50.convertDecimal(src.getQuantity().getValueElement())); return tgt; } @@ -691,7 +691,7 @@ public class ClaimResponse40_50 { if (src.hasNumber()) tgt.setNumberElement(PositiveInt40_50.convertPositiveInt(src.getNumberElement())); if (src.hasType()) - tgt.setTypeElement(Enumerations40_50.convertNoteType(src.getTypeElement())); + tgt.getType().addCoding().setSystem("http://hl7.org/fhir/note-type").setCode(src.getType().toCode()); if (src.hasText()) tgt.setTextElement(String40_50.convertString(src.getTextElement())); if (src.hasLanguage()) @@ -706,8 +706,8 @@ public class ClaimResponse40_50 { ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt); if (src.hasNumber()) tgt.setNumberElement(PositiveInt40_50.convertPositiveInt(src.getNumberElement())); - if (src.hasType()) - tgt.setTypeElement(Enumerations40_50.convertNoteType(src.getTypeElement())); + if (src.hasType() && src.getType().hasCoding("http://hl7.org/fhir/note-type")) + tgt.setType(org.hl7.fhir.r4.model.Enumerations.NoteType.fromCode(src.getType().getCode("http://hl7.org/fhir/note-type"))); if (src.hasText()) tgt.setTextElement(String40_50.convertString(src.getTextElement())); if (src.hasLanguage()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ConceptMap40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ConceptMap40_50.java index 1aad37a33..cbfa9afd3 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ConceptMap40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ConceptMap40_50.java @@ -94,7 +94,7 @@ public class ConceptMap40_50 { if (src.hasTarget()) tgt.setTargetScope(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getTarget())); for (org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupComponent t : src.getGroup()) - tgt.addGroup(convertConceptMapGroupComponent(t)); + tgt.addGroup(convertConceptMapGroupComponent(t, tgt)); return tgt; } @@ -138,11 +138,11 @@ public class ConceptMap40_50 { if (src.hasTargetScope()) tgt.setTarget(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getTargetScope())); for (org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent t : src.getGroup()) - tgt.addGroup(convertConceptMapGroupComponent(t)); + tgt.addGroup(convertConceptMapGroupComponent(t, src)); return tgt; } - public static org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent convertConceptMapGroupComponent(org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupComponent src) throws FHIRException { + public static org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent convertConceptMapGroupComponent(org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupComponent src, org.hl7.fhir.r5.model.ConceptMap tgtMap) throws FHIRException { if (src == null) return null; org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent tgt = new org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent(); @@ -152,7 +152,7 @@ public class ConceptMap40_50 { if (src.hasTarget() || src.hasTargetVersion()) tgt.setTargetElement(convertUriAndVersionToCanonical(src.getTargetElement(), src.getTargetVersionElement())); for (org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent t : src.getElement()) - tgt.addElement(convertSourceElementComponent(t)); + tgt.addElement(convertSourceElementComponent(t, tgtMap)); if (src.hasUnmapped()) tgt.setUnmapped(convertConceptMapGroupUnmappedComponent(src.getUnmapped())); return tgt; @@ -173,7 +173,7 @@ public class ConceptMap40_50 { return tgt; } - public static org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupComponent convertConceptMapGroupComponent(org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent src) throws FHIRException { + public static org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupComponent convertConceptMapGroupComponent(org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent src, org.hl7.fhir.r5.model.ConceptMap srcMap) throws FHIRException { if (src == null) return null; org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupComponent tgt = new org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupComponent(); @@ -189,13 +189,13 @@ public class ConceptMap40_50 { tgt.setTargetVersion(cp.getVersion()); } for (org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent t : src.getElement()) - tgt.addElement(convertSourceElementComponent(t)); + tgt.addElement(convertSourceElementComponent(t, srcMap)); if (src.hasUnmapped()) tgt.setUnmapped(convertConceptMapGroupUnmappedComponent(src.getUnmapped())); return tgt; } - public static org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent convertSourceElementComponent(org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent src) throws FHIRException { + public static org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent convertSourceElementComponent(org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent src, org.hl7.fhir.r5.model.ConceptMap tgtMap) throws FHIRException { if (src == null) return null; org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent(); @@ -208,13 +208,13 @@ public class ConceptMap40_50 { if (t.getEquivalence() == org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.UNMATCHED) { tgt.setNoMap(true); } else { - tgt.addTarget(convertTargetElementComponent(t)); + tgt.addTarget(convertTargetElementComponent(t, tgtMap)); } } return tgt; } - public static org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent convertSourceElementComponent(org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent src) throws FHIRException { + public static org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent convertSourceElementComponent(org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent src, org.hl7.fhir.r5.model.ConceptMap srcMap) throws FHIRException { if (src == null) return null; org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.r4.model.ConceptMap.SourceElementComponent(); @@ -227,12 +227,12 @@ public class ConceptMap40_50 { tgt.addTarget(new org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent().setEquivalence(org.hl7.fhir.r4.model.Enumerations.ConceptMapEquivalence.UNMATCHED)); } else { for (org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent t : src.getTarget()) - tgt.addTarget(convertTargetElementComponent(t)); + tgt.addTarget(convertTargetElementComponent(t, srcMap)); } return tgt; } - public static org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent src) throws FHIRException { + public static org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent src, org.hl7.fhir.r5.model.ConceptMap tgtMap) throws FHIRException { if (src == null) return null; org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent(); @@ -246,13 +246,13 @@ public class ConceptMap40_50 { if (src.hasComment()) tgt.setCommentElement(String40_50.convertString(src.getCommentElement())); for (org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) - tgt.addDependsOn(convertOtherElementComponent(t)); + tgt.addDependsOn(convertOtherElementComponent(t, tgtMap)); for (org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent t : src.getProduct()) - tgt.addProduct(convertOtherElementComponent(t)); + tgt.addProduct(convertOtherElementComponent(t, tgtMap)); return tgt; } - public static org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent src) throws FHIRException { + public static org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent src, org.hl7.fhir.r5.model.ConceptMap srcMap) throws FHIRException { if (src == null) return null; org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.r4.model.ConceptMap.TargetElementComponent(); @@ -268,9 +268,9 @@ public class ConceptMap40_50 { if (src.hasComment()) tgt.setCommentElement(String40_50.convertString(src.getCommentElement())); for (org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) - tgt.addDependsOn(convertOtherElementComponent(t)); + tgt.addDependsOn(convertOtherElementComponent(t, srcMap)); for (org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent t : src.getProduct()) - tgt.addProduct(convertOtherElementComponent(t)); + tgt.addProduct(convertOtherElementComponent(t, srcMap)); return tgt; } @@ -350,13 +350,13 @@ public class ConceptMap40_50 { return tgt; } - public static org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent src) throws FHIRException { + public static org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent src, org.hl7.fhir.r5.model.ConceptMap tgtMap) throws FHIRException { if (src == null) return null; org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent(); ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt); if (src.hasProperty()) - tgt.setPropertyElement(Uri40_50.convertUri(src.getPropertyElement())); + tgt.setAttribute(tgtMap.registerAttribute(src.getProperty())); if (src.hasSystem()) { tgt.setValue(new Coding().setSystem(src.getSystem()).setCode(src.getValue()).setDisplay(src.getDisplay())); } else if (src.hasValueElement()) { @@ -365,14 +365,14 @@ public class ConceptMap40_50 { return tgt; } - public static org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent src) throws FHIRException { + public static org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent src, org.hl7.fhir.r5.model.ConceptMap srcMap) throws FHIRException { if (src == null) return null; org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.r4.model.ConceptMap.OtherElementComponent(); ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt); - if (src.hasProperty()) - tgt.setPropertyElement(Uri40_50.convertUri(src.getPropertyElement())); - + if (src.hasAttribute()) + tgt.setProperty(srcMap.getAttributeUri(src.getAttribute())); + if (src.hasValueCoding()) { tgt.setSystem(src.getValueCoding().getSystem()); tgt.setValue(src.getValueCoding().getCode()); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Consent40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Consent40_50.java index 047adb3a8..0fe389de5 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Consent40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Consent40_50.java @@ -72,7 +72,7 @@ public class Consent40_50 { for (org.hl7.fhir.r4.model.Consent.ConsentVerificationComponent t : src.getVerification()) tgt.addVerification(convertConsentVerificationComponent(t)); if (src.hasProvision()) - tgt.setProvision(convertprovisionComponent(src.getProvision())); + tgt.addProvision(convertprovisionComponent(src.getProvision())); return tgt; } @@ -108,7 +108,7 @@ public class Consent40_50 { for (org.hl7.fhir.r5.model.Consent.ConsentVerificationComponent t : src.getVerification()) tgt.addVerification(convertConsentVerificationComponent(t)); if (src.hasProvision()) - tgt.setProvision(convertprovisionComponent(src.getProvision())); + tgt.setProvision(convertprovisionComponent(src.getProvisionFirstRep())); return tgt; } @@ -225,8 +225,8 @@ public class Consent40_50 { return null; org.hl7.fhir.r5.model.Consent.ProvisionComponent tgt = new org.hl7.fhir.r5.model.Consent.ProvisionComponent(); ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt); - if (src.hasType()) - tgt.setTypeElement(convertConsentProvisionType(src.getTypeElement())); +// if (src.hasType()) +// tgt.setTypeElement(convertConsentProvisionType(src.getTypeElement())); if (src.hasPeriod()) tgt.setPeriod(Period40_50.convertPeriod(src.getPeriod())); for (org.hl7.fhir.r4.model.Consent.provisionActorComponent t : src.getActor()) @@ -252,8 +252,8 @@ public class Consent40_50 { return null; org.hl7.fhir.r4.model.Consent.provisionComponent tgt = new org.hl7.fhir.r4.model.Consent.provisionComponent(); ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt); - if (src.hasType()) - tgt.setTypeElement(convertConsentProvisionType(src.getTypeElement())); +// if (src.hasType()) +// tgt.setTypeElement(convertConsentProvisionType(src.getTypeElement())); if (src.hasPeriod()) tgt.setPeriod(Period40_50.convertPeriod(src.getPeriod())); for (org.hl7.fhir.r5.model.Consent.ProvisionActorComponent t : src.getActor()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/DetectedIssue40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/DetectedIssue40_50.java index a76097c27..104c27a7c 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/DetectedIssue40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/DetectedIssue40_50.java @@ -63,7 +63,7 @@ public class DetectedIssue40_50 { for (org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueEvidenceComponent t : src.getEvidence()) tgt.addEvidence(convertDetectedIssueEvidenceComponent(t)); if (src.hasDetail()) - tgt.setDetailElement(String40_50.convertString(src.getDetailElement())); + tgt.setDetailElement(String40_50.convertStringToMarkdown(src.getDetailElement())); if (src.hasReference()) tgt.setReferenceElement(Uri40_50.convertUri(src.getReferenceElement())); for (org.hl7.fhir.r4.model.DetectedIssue.DetectedIssueMitigationComponent t : src.getMitigation()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Device40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Device40_50.java index b82037db1..1e7268d1e 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Device40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Device40_50.java @@ -72,7 +72,7 @@ public class Device40_50 { if (src.hasSerialNumber()) tgt.setSerialNumberElement(String40_50.convertString(src.getSerialNumberElement())); for (org.hl7.fhir.r4.model.Device.DeviceDeviceNameComponent t : src.getDeviceName()) - tgt.addDeviceName(convertDeviceDeviceNameComponent(t)); + tgt.addName(convertDeviceDeviceNameComponent(t)); if (src.hasModelNumber()) tgt.setModelNumberElement(String40_50.convertString(src.getModelNumberElement())); if (src.hasPartNumber()) @@ -85,8 +85,8 @@ public class Device40_50 { tgt.addVersion(convertDeviceVersionComponent(t)); for (org.hl7.fhir.r4.model.Device.DevicePropertyComponent t : src.getProperty()) tgt.addProperty(convertDevicePropertyComponent(t)); - if (src.hasPatient()) - tgt.getAssociationFirstRep().setHumanSubject(Reference40_50.convertReference(src.getPatient())); +// if (src.hasPatient()) +// tgt.getAssociationFirstRep().setHumanSubject(Reference40_50.convertReference(src.getPatient())); if (src.hasOwner()) tgt.setOwner(Reference40_50.convertReference(src.getOwner())); for (org.hl7.fhir.r4.model.ContactPoint t : src.getContact()) @@ -130,7 +130,7 @@ public class Device40_50 { tgt.setLotNumberElement(String40_50.convertString(src.getLotNumberElement())); if (src.hasSerialNumber()) tgt.setSerialNumberElement(String40_50.convertString(src.getSerialNumberElement())); - for (org.hl7.fhir.r5.model.Device.DeviceDeviceNameComponent t : src.getDeviceName()) + for (org.hl7.fhir.r5.model.Device.DeviceNameComponent t : src.getName()) tgt.addDeviceName(convertDeviceDeviceNameComponent(t)); if (src.hasModelNumber()) tgt.setModelNumberElement(String40_50.convertString(src.getModelNumberElement())); @@ -144,8 +144,8 @@ public class Device40_50 { tgt.addVersion(convertDeviceVersionComponent(t)); for (org.hl7.fhir.r5.model.Device.DevicePropertyComponent t : src.getProperty()) tgt.addProperty(convertDevicePropertyComponent(t)); - if (src.getAssociationFirstRep().hasHumanSubject()) - tgt.setPatient(Reference40_50.convertReference(src.getAssociationFirstRep().getHumanSubject())); +// if (src.getAssociationFirstRep().hasHumanSubject()) +// tgt.setPatient(Reference40_50.convertReference(src.getAssociationFirstRep().getHumanSubject())); if (src.hasOwner()) tgt.setOwner(Reference40_50.convertReference(src.getOwner())); for (org.hl7.fhir.r5.model.ContactPoint t : src.getContact()) @@ -311,25 +311,25 @@ public class Device40_50 { return tgt; } - public static org.hl7.fhir.r5.model.Device.DeviceDeviceNameComponent convertDeviceDeviceNameComponent(org.hl7.fhir.r4.model.Device.DeviceDeviceNameComponent src) throws FHIRException { + public static org.hl7.fhir.r5.model.Device.DeviceNameComponent convertDeviceDeviceNameComponent(org.hl7.fhir.r4.model.Device.DeviceDeviceNameComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r5.model.Device.DeviceDeviceNameComponent tgt = new org.hl7.fhir.r5.model.Device.DeviceDeviceNameComponent(); + org.hl7.fhir.r5.model.Device.DeviceNameComponent tgt = new org.hl7.fhir.r5.model.Device.DeviceNameComponent(); ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt); if (src.hasName()) - tgt.setNameElement(String40_50.convertString(src.getNameElement())); + tgt.setValueElement(String40_50.convertString(src.getNameElement())); if (src.hasType()) tgt.setTypeElement(convertDeviceNameType(src.getTypeElement())); return tgt; } - public static org.hl7.fhir.r4.model.Device.DeviceDeviceNameComponent convertDeviceDeviceNameComponent(org.hl7.fhir.r5.model.Device.DeviceDeviceNameComponent src) throws FHIRException { + public static org.hl7.fhir.r4.model.Device.DeviceDeviceNameComponent convertDeviceDeviceNameComponent(org.hl7.fhir.r5.model.Device.DeviceNameComponent src) throws FHIRException { if (src == null) return null; org.hl7.fhir.r4.model.Device.DeviceDeviceNameComponent tgt = new org.hl7.fhir.r4.model.Device.DeviceDeviceNameComponent(); ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt); - if (src.hasName()) - tgt.setNameElement(String40_50.convertString(src.getNameElement())); + if (src.hasValue()) + tgt.setNameElement(String40_50.convertString(src.getValueElement())); if (src.hasType()) tgt.setTypeElement(convertDeviceNameType(src.getTypeElement())); return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/DeviceDefinition40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/DeviceDefinition40_50.java index e31207094..147265954 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/DeviceDefinition40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/DeviceDefinition40_50.java @@ -85,8 +85,8 @@ public class DeviceDefinition40_50 { // if (src.hasOnlineInformation()) // tgt.setOnlineInformationElement(Uri40_50.convertUri(src.getOnlineInformationElement())); for (org.hl7.fhir.r4.model.Annotation t : src.getNote()) tgt.addNote(Annotation40_50.convertAnnotation(t)); - if (src.hasParentDevice()) - tgt.setParentDevice(Reference40_50.convertReference(src.getParentDevice())); +// if (src.hasParentDevice()) +// tgt.setParentDevice(Reference40_50.convertReference(src.getParentDevice())); for (org.hl7.fhir.r4.model.DeviceDefinition.DeviceDefinitionMaterialComponent t : src.getMaterial()) tgt.addMaterial(convertDeviceDefinitionMaterialComponent(t)); return tgt; @@ -132,8 +132,8 @@ public class DeviceDefinition40_50 { // if (src.hasOnlineInformation()) // tgt.setOnlineInformationElement(Uri40_50.convertUri(src.getOnlineInformationElement())); for (org.hl7.fhir.r5.model.Annotation t : src.getNote()) tgt.addNote(Annotation40_50.convertAnnotation(t)); - if (src.hasParentDevice()) - tgt.setParentDevice(Reference40_50.convertReference(src.getParentDevice())); +// if (src.hasParentDevice()) +// tgt.setParentDevice(Reference40_50.convertReference(src.getParentDevice())); for (org.hl7.fhir.r5.model.DeviceDefinition.DeviceDefinitionMaterialComponent t : src.getMaterial()) tgt.addMaterial(convertDeviceDefinitionMaterialComponent(t)); return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/DeviceMetric40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/DeviceMetric40_50.java index 628030767..345d9780b 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/DeviceMetric40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/DeviceMetric40_50.java @@ -50,18 +50,18 @@ public class DeviceMetric40_50 { tgt.setType(CodeableConcept40_50.convertCodeableConcept(src.getType())); if (src.hasUnit()) tgt.setUnit(CodeableConcept40_50.convertCodeableConcept(src.getUnit())); - if (src.hasSource()) - tgt.setSource(Reference40_50.convertReference(src.getSource())); if (src.hasParent()) - tgt.setParent(Reference40_50.convertReference(src.getParent())); + tgt.setDevice(Reference40_50.convertReference(src.getParent())); + if (src.hasSource()) + tgt.setDevice(Reference40_50.convertReference(src.getSource())); if (src.hasOperationalStatus()) tgt.setOperationalStatusElement(convertDeviceMetricOperationalStatus(src.getOperationalStatusElement())); if (src.hasColor()) tgt.setColorElement(convertDeviceMetricColor(src.getColorElement())); if (src.hasCategory()) tgt.setCategoryElement(convertDeviceMetricCategory(src.getCategoryElement())); - if (src.hasMeasurementPeriod()) - tgt.setMeasurementPeriod(Timing40_50.convertTiming(src.getMeasurementPeriod())); +// if (src.hasMeasurementPeriod()) +// tgt.setMeasurementPeriod(Timing40_50.convertTiming(src.getMeasurementPeriod())); for (org.hl7.fhir.r4.model.DeviceMetric.DeviceMetricCalibrationComponent t : src.getCalibration()) tgt.addCalibration(convertDeviceMetricCalibrationComponent(t)); return tgt; @@ -78,18 +78,18 @@ public class DeviceMetric40_50 { tgt.setType(CodeableConcept40_50.convertCodeableConcept(src.getType())); if (src.hasUnit()) tgt.setUnit(CodeableConcept40_50.convertCodeableConcept(src.getUnit())); - if (src.hasSource()) - tgt.setSource(Reference40_50.convertReference(src.getSource())); - if (src.hasParent()) - tgt.setParent(Reference40_50.convertReference(src.getParent())); + if (src.hasDevice()) + tgt.setSource(Reference40_50.convertReference(src.getDevice())); +// if (src.hasParent()) +// tgt.setParent(Reference40_50.convertReference(src.getParent())); if (src.hasOperationalStatus()) tgt.setOperationalStatusElement(convertDeviceMetricOperationalStatus(src.getOperationalStatusElement())); if (src.hasColor()) tgt.setColorElement(convertDeviceMetricColor(src.getColorElement())); if (src.hasCategory()) tgt.setCategoryElement(convertDeviceMetricCategory(src.getCategoryElement())); - if (src.hasMeasurementPeriod()) - tgt.setMeasurementPeriod(Timing40_50.convertTiming(src.getMeasurementPeriod())); +// if (src.hasMeasurementPeriod()) +// tgt.setMeasurementPeriod(Timing40_50.convertTiming(src.getMeasurementPeriod())); for (org.hl7.fhir.r5.model.DeviceMetric.DeviceMetricCalibrationComponent t : src.getCalibration()) tgt.addCalibration(convertDeviceMetricCalibrationComponent(t)); return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/DeviceRequest40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/DeviceRequest40_50.java index 79620185d..b8c94018c 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/DeviceRequest40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/DeviceRequest40_50.java @@ -8,6 +8,8 @@ import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Canonical import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.DateTime40_50; import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Uri40_50; import org.hl7.fhir.convertors.conv40_50.datatypes40_50.special40_50.Reference40_50; +import org.hl7.fhir.convertors.conv43_50.datatypes43_50.general43_50.CodeableConcept43_50; +import org.hl7.fhir.convertors.conv43_50.datatypes43_50.special43_50.Reference43_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CodeableReference; @@ -82,9 +84,9 @@ public class DeviceRequest40_50 { if (src.hasRequester()) tgt.setRequester(Reference40_50.convertReference(src.getRequester())); if (src.hasPerformerType()) - tgt.setPerformerType(CodeableConcept40_50.convertCodeableConcept(src.getPerformerType())); + tgt.getPerformer().setConcept(CodeableConcept40_50.convertCodeableConcept(src.getPerformerType())); if (src.hasPerformer()) - tgt.setPerformer(Reference40_50.convertReference(src.getPerformer())); + tgt.getPerformer().setReference(Reference40_50.convertReference(src.getPerformer())); for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReasonCode()) tgt.addReason(CodeableConcept40_50.convertCodeableConceptToCodeableReference(t)); for (org.hl7.fhir.r4.model.Reference t : src.getReasonReference()) @@ -136,10 +138,10 @@ public class DeviceRequest40_50 { tgt.setAuthoredOnElement(DateTime40_50.convertDateTime(src.getAuthoredOnElement())); if (src.hasRequester()) tgt.setRequester(Reference40_50.convertReference(src.getRequester())); - if (src.hasPerformerType()) - tgt.setPerformerType(CodeableConcept40_50.convertCodeableConcept(src.getPerformerType())); - if (src.hasPerformer()) - tgt.setPerformer(Reference40_50.convertReference(src.getPerformer())); + if (src.getPerformer().hasConcept()) + tgt.setPerformerType(CodeableConcept40_50.convertCodeableConcept(src.getPerformer().getConcept())); + if (src.getPerformer().hasReference()) + tgt.setPerformer(Reference40_50.convertReference(src.getPerformer().getReference())); for (CodeableReference t : src.getReason()) if (t.hasConcept()) tgt.addReasonCode(CodeableConcept40_50.convertCodeableConcept(t.getConcept())); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/DiagnosticReport40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/DiagnosticReport40_50.java index 715ad9750..edd8f2c47 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/DiagnosticReport40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/DiagnosticReport40_50.java @@ -70,7 +70,7 @@ public class DiagnosticReport40_50 { for (org.hl7.fhir.r4.model.DiagnosticReport.DiagnosticReportMediaComponent t : src.getMedia()) tgt.addMedia(convertDiagnosticReportMediaComponent(t)); if (src.hasConclusion()) - tgt.setConclusionElement(String40_50.convertString(src.getConclusionElement())); + tgt.setConclusionElement(String40_50.convertStringToMarkdown(src.getConclusionElement())); for (org.hl7.fhir.r4.model.CodeableConcept t : src.getConclusionCode()) tgt.addConclusionCode(CodeableConcept40_50.convertCodeableConcept(t)); for (org.hl7.fhir.r4.model.Attachment t : src.getPresentedForm()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/DocumentManifest40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/DocumentManifest40_50.java deleted file mode 100644 index 8a0769585..000000000 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/DocumentManifest40_50.java +++ /dev/null @@ -1,124 +0,0 @@ -package org.hl7.fhir.convertors.conv40_50.resources40_50; - -import org.hl7.fhir.convertors.context.ConversionContext40_50; -import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.CodeableConcept40_50; -import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.Identifier40_50; -import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.DateTime40_50; -import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.String40_50; -import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Uri40_50; -import org.hl7.fhir.convertors.conv40_50.datatypes40_50.special40_50.Reference40_50; -import org.hl7.fhir.exceptions.FHIRException; - -/* - Copyright (c) 2011+, HL7, Inc. - All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of HL7 nor the names of its contributors may be used to - endorse or promote products derived from this software without specific - prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. - -*/ -// Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class DocumentManifest40_50 { - - public static org.hl7.fhir.r5.model.DocumentManifest convertDocumentManifest(org.hl7.fhir.r4.model.DocumentManifest src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r5.model.DocumentManifest tgt = new org.hl7.fhir.r5.model.DocumentManifest(); - ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyDomainResource(src, tgt); - if (src.hasMasterIdentifier()) - tgt.setMasterIdentifier(Identifier40_50.convertIdentifier(src.getMasterIdentifier())); - for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(Identifier40_50.convertIdentifier(t)); - if (src.hasStatus()) - tgt.setStatusElement(Enumerations40_50.convertDocumentReferenceStatus(src.getStatusElement())); - if (src.hasType()) - tgt.setType(CodeableConcept40_50.convertCodeableConcept(src.getType())); - if (src.hasSubject()) - tgt.setSubject(Reference40_50.convertReference(src.getSubject())); - if (src.hasCreated()) - tgt.setCreatedElement(DateTime40_50.convertDateTime(src.getCreatedElement())); - for (org.hl7.fhir.r4.model.Reference t : src.getAuthor()) tgt.addAuthor(Reference40_50.convertReference(t)); - for (org.hl7.fhir.r4.model.Reference t : src.getRecipient()) tgt.addRecipient(Reference40_50.convertReference(t)); - if (src.hasSource()) - tgt.setSourceElement(Uri40_50.convertUri(src.getSourceElement())); - if (src.hasDescription()) - tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement())); - for (org.hl7.fhir.r4.model.Reference t : src.getContent()) tgt.addContent(Reference40_50.convertReference(t)); - for (org.hl7.fhir.r4.model.DocumentManifest.DocumentManifestRelatedComponent t : src.getRelated()) - tgt.addRelated(convertDocumentManifestRelatedComponent(t)); - return tgt; - } - - public static org.hl7.fhir.r4.model.DocumentManifest convertDocumentManifest(org.hl7.fhir.r5.model.DocumentManifest src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.DocumentManifest tgt = new org.hl7.fhir.r4.model.DocumentManifest(); - ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyDomainResource(src, tgt); - if (src.hasMasterIdentifier()) - tgt.setMasterIdentifier(Identifier40_50.convertIdentifier(src.getMasterIdentifier())); - for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(Identifier40_50.convertIdentifier(t)); - if (src.hasStatus()) - tgt.setStatusElement(Enumerations40_50.convertDocumentReferenceStatus(src.getStatusElement())); - if (src.hasType()) - tgt.setType(CodeableConcept40_50.convertCodeableConcept(src.getType())); - if (src.hasSubject()) - tgt.setSubject(Reference40_50.convertReference(src.getSubject())); - if (src.hasCreated()) - tgt.setCreatedElement(DateTime40_50.convertDateTime(src.getCreatedElement())); - for (org.hl7.fhir.r5.model.Reference t : src.getAuthor()) tgt.addAuthor(Reference40_50.convertReference(t)); - for (org.hl7.fhir.r5.model.Reference t : src.getRecipient()) tgt.addRecipient(Reference40_50.convertReference(t)); - if (src.hasSource()) - tgt.setSourceElement(Uri40_50.convertUri(src.getSourceElement())); - if (src.hasDescription()) - tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement())); - for (org.hl7.fhir.r5.model.Reference t : src.getContent()) tgt.addContent(Reference40_50.convertReference(t)); - for (org.hl7.fhir.r5.model.DocumentManifest.DocumentManifestRelatedComponent t : src.getRelated()) - tgt.addRelated(convertDocumentManifestRelatedComponent(t)); - return tgt; - } - - public static org.hl7.fhir.r5.model.DocumentManifest.DocumentManifestRelatedComponent convertDocumentManifestRelatedComponent(org.hl7.fhir.r4.model.DocumentManifest.DocumentManifestRelatedComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r5.model.DocumentManifest.DocumentManifestRelatedComponent tgt = new org.hl7.fhir.r5.model.DocumentManifest.DocumentManifestRelatedComponent(); - ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt); - if (src.hasIdentifier()) - tgt.setIdentifier(Identifier40_50.convertIdentifier(src.getIdentifier())); - if (src.hasRef()) - tgt.setRef(Reference40_50.convertReference(src.getRef())); - return tgt; - } - - public static org.hl7.fhir.r4.model.DocumentManifest.DocumentManifestRelatedComponent convertDocumentManifestRelatedComponent(org.hl7.fhir.r5.model.DocumentManifest.DocumentManifestRelatedComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.DocumentManifest.DocumentManifestRelatedComponent tgt = new org.hl7.fhir.r4.model.DocumentManifest.DocumentManifestRelatedComponent(); - ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt); - if (src.hasIdentifier()) - tgt.setIdentifier(Identifier40_50.convertIdentifier(src.getIdentifier())); - if (src.hasRef()) - tgt.setRef(Reference40_50.convertReference(src.getRef())); - return tgt; - } -} \ No newline at end of file diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Encounter40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Encounter40_50.java index 12eb4d6c1..ee89125b1 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Encounter40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Encounter40_50.java @@ -10,6 +10,7 @@ import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.PositiveI import org.hl7.fhir.convertors.conv40_50.datatypes40_50.special40_50.Reference40_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CodeableReference; +import org.hl7.fhir.r5.model.Encounter.ReasonComponent; /* Copyright (c) 2011+, HL7, Inc. @@ -51,12 +52,12 @@ public class Encounter40_50 { tgt.addIdentifier(Identifier40_50.convertIdentifier(t)); if (src.hasStatus()) tgt.setStatusElement(convertEncounterStatus(src.getStatusElement())); - for (org.hl7.fhir.r4.model.Encounter.StatusHistoryComponent t : src.getStatusHistory()) - tgt.addStatusHistory(convertStatusHistoryComponent(t)); +// for (org.hl7.fhir.r4.model.Encounter.StatusHistoryComponent t : src.getStatusHistory()) +// tgt.addStatusHistory(convertStatusHistoryComponent(t)); if (src.hasClass_()) tgt.addClass_(new org.hl7.fhir.r5.model.CodeableConcept().addCoding(Coding40_50.convertCoding(src.getClass_()))); - for (org.hl7.fhir.r4.model.Encounter.ClassHistoryComponent t : src.getClassHistory()) - tgt.addClassHistory(convertClassHistoryComponent(t)); +// for (org.hl7.fhir.r4.model.Encounter.ClassHistoryComponent t : src.getClassHistory()) +// tgt.addClassHistory(convertClassHistoryComponent(t)); for (org.hl7.fhir.r4.model.CodeableConcept t : src.getType()) tgt.addType(CodeableConcept40_50.convertCodeableConcept(t)); if (src.hasServiceType()) @@ -77,14 +78,14 @@ public class Encounter40_50 { if (src.hasLength()) tgt.setLength(Duration40_50.convertDuration(src.getLength())); for (org.hl7.fhir.r4.model.CodeableConcept t : src.getReasonCode()) - tgt.addReason(CodeableConcept40_50.convertCodeableConceptToCodeableReference(t)); + tgt.addReason().addValue(CodeableConcept40_50.convertCodeableConceptToCodeableReference(t)); for (org.hl7.fhir.r4.model.Reference t : src.getReasonReference()) - tgt.addReason(Reference40_50.convertReferenceToCodeableReference(t)); + tgt.addReason().addValue(Reference40_50.convertReferenceToCodeableReference(t)); for (org.hl7.fhir.r4.model.Encounter.DiagnosisComponent t : src.getDiagnosis()) tgt.addDiagnosis(convertDiagnosisComponent(t)); for (org.hl7.fhir.r4.model.Reference t : src.getAccount()) tgt.addAccount(Reference40_50.convertReference(t)); if (src.hasHospitalization()) - tgt.setAdmission(convertEncounterHospitalizationComponent(src.getHospitalization())); + tgt.setAdmission(convertEncounterHospitalizationComponent(src.getHospitalization(), tgt)); for (org.hl7.fhir.r4.model.Encounter.EncounterLocationComponent t : src.getLocation()) tgt.addLocation(convertEncounterLocationComponent(t)); if (src.hasServiceProvider()) @@ -103,12 +104,12 @@ public class Encounter40_50 { tgt.addIdentifier(Identifier40_50.convertIdentifier(t)); if (src.hasStatus()) tgt.setStatusElement(convertEncounterStatus(src.getStatusElement())); - for (org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent t : src.getStatusHistory()) - tgt.addStatusHistory(convertStatusHistoryComponent(t)); +// for (org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent t : src.getStatusHistory()) +// tgt.addStatusHistory(convertStatusHistoryComponent(t)); if (src.hasClass_()) tgt.setClass_(Coding40_50.convertCoding(src.getClass_FirstRep().getCodingFirstRep())); - for (org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent t : src.getClassHistory()) - tgt.addClassHistory(convertClassHistoryComponent(t)); +// for (org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent t : src.getClassHistory()) +// tgt.addClassHistory(convertClassHistoryComponent(t)); for (org.hl7.fhir.r5.model.CodeableConcept t : src.getType()) tgt.addType(CodeableConcept40_50.convertCodeableConcept(t)); if (src.getServiceTypeFirstRep().hasConcept()) @@ -128,17 +129,19 @@ public class Encounter40_50 { tgt.setPeriod(Period40_50.convertPeriod(src.getActualPeriod())); if (src.hasLength()) tgt.setLength(Duration40_50.convertDuration(src.getLength())); - for (CodeableReference t : src.getReason()) - if (t.hasConcept()) - tgt.addReasonCode(CodeableConcept40_50.convertCodeableConcept(t.getConcept())); - for (CodeableReference t : src.getReason()) - if (t.hasReference()) - tgt.addReasonReference(Reference40_50.convertReference(t.getReference())); + for (ReasonComponent t1 : src.getReason()) + for (CodeableReference t : t1.getValue()) + if (t.hasConcept()) + tgt.addReasonCode(CodeableConcept40_50.convertCodeableConcept(t.getConcept())); + for (ReasonComponent t1 : src.getReason()) + for (CodeableReference t : t1.getValue()) + if (t.hasReference()) + tgt.addReasonReference(Reference40_50.convertReference(t.getReference())); for (org.hl7.fhir.r5.model.Encounter.DiagnosisComponent t : src.getDiagnosis()) tgt.addDiagnosis(convertDiagnosisComponent(t)); for (org.hl7.fhir.r5.model.Reference t : src.getAccount()) tgt.addAccount(Reference40_50.convertReference(t)); - if (src.hasAdmission()) - tgt.setHospitalization(convertEncounterHospitalizationComponent(src.getAdmission())); + if (src.hasAdmission() || src.hasDietPreference() || src.hasSpecialArrangement() || src.hasSpecialCourtesy()) + tgt.setHospitalization(convertEncounterHospitalizationComponent(src.getAdmission(), src)); for (org.hl7.fhir.r5.model.Encounter.EncounterLocationComponent t : src.getLocation()) tgt.addLocation(convertEncounterLocationComponent(t)); if (src.hasServiceProvider()) @@ -148,47 +151,47 @@ public class Encounter40_50 { return tgt; } - static public org.hl7.fhir.r5.model.Enumeration convertEncounterStatus(org.hl7.fhir.r4.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r5.model.Enumeration convertEncounterStatus(org.hl7.fhir.r4.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; - org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Encounter.EncounterStatusEnumFactory()); + org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.EncounterStatusEnumFactory()); ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); switch (src.getValue()) { case PLANNED: - tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.PLANNED); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.PLANNED); break; case ARRIVED: - tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.INPROGRESS); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.INPROGRESS); break; case TRIAGED: - tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.INPROGRESS); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.INPROGRESS); break; case INPROGRESS: - tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.INPROGRESS); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.INPROGRESS); break; case ONLEAVE: - tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.INPROGRESS); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.INPROGRESS); break; case FINISHED: - tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.COMPLETED); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.COMPLETED); break; case CANCELLED: - tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.CANCELLED); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.CANCELLED); break; case ENTEREDINERROR: - tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.ENTEREDINERROR); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.ENTEREDINERROR); break; case UNKNOWN: - tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.UNKNOWN); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.UNKNOWN); break; default: - tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.NULL); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.NULL); break; } return tgt; } - static public org.hl7.fhir.r4.model.Enumeration convertEncounterStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r4.model.Enumeration convertEncounterStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4.model.Enumeration tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.Encounter.EncounterStatusEnumFactory()); @@ -219,53 +222,53 @@ public class Encounter40_50 { return tgt; } - public static org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent convertStatusHistoryComponent(org.hl7.fhir.r4.model.Encounter.StatusHistoryComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent tgt = new org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent(); - ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt); - if (src.hasStatus()) - tgt.setStatusElement(convertEncounterStatus(src.getStatusElement())); - if (src.hasPeriod()) - tgt.setPeriod(Period40_50.convertPeriod(src.getPeriod())); - return tgt; - } - - public static org.hl7.fhir.r4.model.Encounter.StatusHistoryComponent convertStatusHistoryComponent(org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Encounter.StatusHistoryComponent tgt = new org.hl7.fhir.r4.model.Encounter.StatusHistoryComponent(); - ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt); - if (src.hasStatus()) - tgt.setStatusElement(convertEncounterStatus(src.getStatusElement())); - if (src.hasPeriod()) - tgt.setPeriod(Period40_50.convertPeriod(src.getPeriod())); - return tgt; - } - - public static org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent convertClassHistoryComponent(org.hl7.fhir.r4.model.Encounter.ClassHistoryComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent tgt = new org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent(); - ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt); - if (src.hasClass_()) - tgt.setClass_(Coding40_50.convertCoding(src.getClass_())); - if (src.hasPeriod()) - tgt.setPeriod(Period40_50.convertPeriod(src.getPeriod())); - return tgt; - } - - public static org.hl7.fhir.r4.model.Encounter.ClassHistoryComponent convertClassHistoryComponent(org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4.model.Encounter.ClassHistoryComponent tgt = new org.hl7.fhir.r4.model.Encounter.ClassHistoryComponent(); - ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt); - if (src.hasClass_()) - tgt.setClass_(Coding40_50.convertCoding(src.getClass_())); - if (src.hasPeriod()) - tgt.setPeriod(Period40_50.convertPeriod(src.getPeriod())); - return tgt; - } +// public static org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent convertStatusHistoryComponent(org.hl7.fhir.r4.model.Encounter.StatusHistoryComponent src) throws FHIRException { +// if (src == null) +// return null; +// org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent tgt = new org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent(); +// ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt); +// if (src.hasStatus()) +// tgt.setStatusElement(convertEncounterStatus(src.getStatusElement())); +// if (src.hasPeriod()) +// tgt.setPeriod(Period40_50.convertPeriod(src.getPeriod())); +// return tgt; +// } +// +// public static org.hl7.fhir.r4.model.Encounter.StatusHistoryComponent convertStatusHistoryComponent(org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent src) throws FHIRException { +// if (src == null) +// return null; +// org.hl7.fhir.r4.model.Encounter.StatusHistoryComponent tgt = new org.hl7.fhir.r4.model.Encounter.StatusHistoryComponent(); +// ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt); +// if (src.hasStatus()) +// tgt.setStatusElement(convertEncounterStatus(src.getStatusElement())); +// if (src.hasPeriod()) +// tgt.setPeriod(Period40_50.convertPeriod(src.getPeriod())); +// return tgt; +// } +// +// public static org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent convertClassHistoryComponent(org.hl7.fhir.r4.model.Encounter.ClassHistoryComponent src) throws FHIRException { +// if (src == null) +// return null; +// org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent tgt = new org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent(); +// ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt); +// if (src.hasClass_()) +// tgt.setClass_(Coding40_50.convertCoding(src.getClass_())); +// if (src.hasPeriod()) +// tgt.setPeriod(Period40_50.convertPeriod(src.getPeriod())); +// return tgt; +// } +// +// public static org.hl7.fhir.r4.model.Encounter.ClassHistoryComponent convertClassHistoryComponent(org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent src) throws FHIRException { +// if (src == null) +// return null; +// org.hl7.fhir.r4.model.Encounter.ClassHistoryComponent tgt = new org.hl7.fhir.r4.model.Encounter.ClassHistoryComponent(); +// ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt); +// if (src.hasClass_()) +// tgt.setClass_(Coding40_50.convertCoding(src.getClass_())); +// if (src.hasPeriod()) +// tgt.setPeriod(Period40_50.convertPeriod(src.getPeriod())); +// return tgt; +// } public static org.hl7.fhir.r5.model.Encounter.EncounterParticipantComponent convertEncounterParticipantComponent(org.hl7.fhir.r4.model.Encounter.EncounterParticipantComponent src) throws FHIRException { if (src == null) @@ -301,11 +304,11 @@ public class Encounter40_50 { org.hl7.fhir.r5.model.Encounter.DiagnosisComponent tgt = new org.hl7.fhir.r5.model.Encounter.DiagnosisComponent(); ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt); if (src.hasCondition()) - tgt.setCondition(Reference40_50.convertReference(src.getCondition())); + tgt.addCondition(Reference40_50.convertReferenceToCodeableReference(src.getCondition())); if (src.hasUse()) - tgt.setUse(CodeableConcept40_50.convertCodeableConcept(src.getUse())); - if (src.hasRank()) - tgt.setRankElement(PositiveInt40_50.convertPositiveInt(src.getRankElement())); + tgt.addUse(CodeableConcept40_50.convertCodeableConcept(src.getUse())); +// if (src.hasRank()) +// tgt.setRankElement(PositiveInt40_50.convertPositiveInt(src.getRankElement())); return tgt; } @@ -314,16 +317,16 @@ public class Encounter40_50 { return null; org.hl7.fhir.r4.model.Encounter.DiagnosisComponent tgt = new org.hl7.fhir.r4.model.Encounter.DiagnosisComponent(); ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt); - if (src.hasCondition()) - tgt.setCondition(Reference40_50.convertReference(src.getCondition())); + if (src.hasCondition() && src.getConditionFirstRep().hasReference()) + tgt.setCondition(Reference40_50.convertReference(src.getConditionFirstRep().getReference())); if (src.hasUse()) - tgt.setUse(CodeableConcept40_50.convertCodeableConcept(src.getUse())); - if (src.hasRank()) - tgt.setRankElement(PositiveInt40_50.convertPositiveInt(src.getRankElement())); + tgt.setUse(CodeableConcept40_50.convertCodeableConcept(src.getUseFirstRep())); +// if (src.hasRank()) +// tgt.setRankElement(PositiveInt40_50.convertPositiveInt(src.getRankElement())); return tgt; } - public static org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent convertEncounterHospitalizationComponent(org.hl7.fhir.r4.model.Encounter.EncounterHospitalizationComponent src) throws FHIRException { + public static org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent convertEncounterHospitalizationComponent(org.hl7.fhir.r4.model.Encounter.EncounterHospitalizationComponent src, org.hl7.fhir.r5.model.Encounter tgte) throws FHIRException { if (src == null) return null; org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent tgt = new org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent(); @@ -337,11 +340,11 @@ public class Encounter40_50 { if (src.hasReAdmission()) tgt.setReAdmission(CodeableConcept40_50.convertCodeableConcept(src.getReAdmission())); for (org.hl7.fhir.r4.model.CodeableConcept t : src.getDietPreference()) - tgt.addDietPreference(CodeableConcept40_50.convertCodeableConcept(t)); + tgte.addDietPreference(CodeableConcept40_50.convertCodeableConcept(t)); for (org.hl7.fhir.r4.model.CodeableConcept t : src.getSpecialCourtesy()) - tgt.addSpecialCourtesy(CodeableConcept40_50.convertCodeableConcept(t)); + tgte.addSpecialCourtesy(CodeableConcept40_50.convertCodeableConcept(t)); for (org.hl7.fhir.r4.model.CodeableConcept t : src.getSpecialArrangement()) - tgt.addSpecialArrangement(CodeableConcept40_50.convertCodeableConcept(t)); + tgte.addSpecialArrangement(CodeableConcept40_50.convertCodeableConcept(t)); if (src.hasDestination()) tgt.setDestination(Reference40_50.convertReference(src.getDestination())); if (src.hasDischargeDisposition()) @@ -349,7 +352,7 @@ public class Encounter40_50 { return tgt; } - public static org.hl7.fhir.r4.model.Encounter.EncounterHospitalizationComponent convertEncounterHospitalizationComponent(org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent src) throws FHIRException { + public static org.hl7.fhir.r4.model.Encounter.EncounterHospitalizationComponent convertEncounterHospitalizationComponent(org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent src, org.hl7.fhir.r5.model.Encounter srce) throws FHIRException { if (src == null) return null; org.hl7.fhir.r4.model.Encounter.EncounterHospitalizationComponent tgt = new org.hl7.fhir.r4.model.Encounter.EncounterHospitalizationComponent(); @@ -362,11 +365,11 @@ public class Encounter40_50 { tgt.setAdmitSource(CodeableConcept40_50.convertCodeableConcept(src.getAdmitSource())); if (src.hasReAdmission()) tgt.setReAdmission(CodeableConcept40_50.convertCodeableConcept(src.getReAdmission())); - for (org.hl7.fhir.r5.model.CodeableConcept t : src.getDietPreference()) + for (org.hl7.fhir.r5.model.CodeableConcept t : srce.getDietPreference()) tgt.addDietPreference(CodeableConcept40_50.convertCodeableConcept(t)); - for (org.hl7.fhir.r5.model.CodeableConcept t : src.getSpecialCourtesy()) + for (org.hl7.fhir.r5.model.CodeableConcept t : srce.getSpecialCourtesy()) tgt.addSpecialCourtesy(CodeableConcept40_50.convertCodeableConcept(t)); - for (org.hl7.fhir.r5.model.CodeableConcept t : src.getSpecialArrangement()) + for (org.hl7.fhir.r5.model.CodeableConcept t : srce.getSpecialArrangement()) tgt.addSpecialArrangement(CodeableConcept40_50.convertCodeableConcept(t)); if (src.hasDestination()) tgt.setDestination(Reference40_50.convertReference(src.getDestination())); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Endpoint40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Endpoint40_50.java index 0082b142a..57b53e54d 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Endpoint40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Endpoint40_50.java @@ -1,6 +1,7 @@ package org.hl7.fhir.convertors.conv40_50.resources40_50; import org.hl7.fhir.convertors.context.ConversionContext40_50; +import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.CodeableConcept30_50; import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.CodeableConcept40_50; import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.Coding40_50; import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.ContactPoint40_50; @@ -10,7 +11,9 @@ import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Code40_50 import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.String40_50; import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Url40_50; import org.hl7.fhir.convertors.conv40_50.datatypes40_50.special40_50.Reference40_50; +import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Code43_50; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r5.model.Endpoint.EndpointPayloadComponent; /* Copyright (c) 2011+, HL7, Inc. @@ -63,9 +66,9 @@ public class Endpoint40_50 { if (src.hasPeriod()) tgt.setPeriod(Period40_50.convertPeriod(src.getPeriod())); for (org.hl7.fhir.r4.model.CodeableConcept t : src.getPayloadType()) - tgt.addPayloadType(CodeableConcept40_50.convertCodeableConcept(t)); + tgt.addPayload().addType(CodeableConcept40_50.convertCodeableConcept(t)); for (org.hl7.fhir.r4.model.CodeType t : src.getPayloadMimeType()) - tgt.getPayloadMimeType().add(Code40_50.convertCode(t)); + tgt.addPayload().getMimeType().add(Code40_50.convertCode(t)); if (src.hasAddress()) tgt.setAddressElement(Url40_50.convertUrl(src.getAddressElement())); for (org.hl7.fhir.r4.model.StringType t : src.getHeader()) tgt.getHeader().add(String40_50.convertString(t)); @@ -91,10 +94,12 @@ public class Endpoint40_50 { tgt.addContact(ContactPoint40_50.convertContactPoint(t)); if (src.hasPeriod()) tgt.setPeriod(Period40_50.convertPeriod(src.getPeriod())); - for (org.hl7.fhir.r5.model.CodeableConcept t : src.getPayloadType()) - tgt.addPayloadType(CodeableConcept40_50.convertCodeableConcept(t)); - for (org.hl7.fhir.r5.model.CodeType t : src.getPayloadMimeType()) - tgt.getPayloadMimeType().add(Code40_50.convertCode(t)); + for (EndpointPayloadComponent t : src.getPayload()) + if (t.hasType()) + tgt.addPayloadType(CodeableConcept40_50.convertCodeableConcept(t.getTypeFirstRep())); + for (EndpointPayloadComponent t : src.getPayload()) + if (t.hasMimeType()) + tgt.getPayloadMimeType().add(Code40_50.convertCode(t.getMimeType().get(0))); if (src.hasAddress()) tgt.setAddressElement(Url40_50.convertUrl(src.getAddressElement())); for (org.hl7.fhir.r5.model.StringType t : src.getHeader()) tgt.getHeader().add(String40_50.convertString(t)); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Enumerations40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Enumerations40_50.java index 74d26d25c..1c248f7dd 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Enumerations40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Enumerations40_50.java @@ -231,10 +231,10 @@ public class Enumerations40_50 { tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._4_3_0); break; case _4_3_0_CIBUILD: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._4_3_0_CIBUILD); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._4_3_0CIBUILD); break; case _4_3_0_SNAPSHOT1: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._4_3_0_SNAPSHOT1); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._4_3_0SNAPSHOT1); break; case _5_0_0: tgt.setValue(org.hl7.fhir.r5.model.Enumerations.FHIRVersion._5_0_0); @@ -339,10 +339,10 @@ public class Enumerations40_50 { case _4_3_0: tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._4_3_0); break; - case _4_3_0_CIBUILD: + case _4_3_0CIBUILD: tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._4_3_0_CIBUILD); break; - case _4_3_0_SNAPSHOT1: + case _4_3_0SNAPSHOT1: tgt.setValue(org.hl7.fhir.r4.model.Enumerations.FHIRVersion._4_3_0_SNAPSHOT1); break; case _5_0_0: @@ -448,29 +448,29 @@ public class Enumerations40_50 { return tgt; } - static public org.hl7.fhir.r5.model.Enumeration convertNoteType(org.hl7.fhir.r4.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r5.model.Enumeration convertNoteType(org.hl7.fhir.r4.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; - org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.NoteTypeEnumFactory()); + org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.PaymentReconciliation.NoteTypeEnumFactory()); ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); switch (src.getValue()) { case DISPLAY: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.NoteType.DISPLAY); + tgt.setValue(org.hl7.fhir.r5.model.PaymentReconciliation.NoteType.DISPLAY); break; case PRINT: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.NoteType.PRINT); + tgt.setValue(org.hl7.fhir.r5.model.PaymentReconciliation.NoteType.PRINT); break; case PRINTOPER: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.NoteType.PRINTOPER); + tgt.setValue(org.hl7.fhir.r5.model.PaymentReconciliation.NoteType.PRINTOPER); break; default: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.NoteType.NULL); + tgt.setValue(org.hl7.fhir.r5.model.PaymentReconciliation.NoteType.NULL); break; } return tgt; } - static public org.hl7.fhir.r4.model.Enumeration convertNoteType(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r4.model.Enumeration convertNoteType(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4.model.Enumeration tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.Enumerations.NoteTypeEnumFactory()); @@ -563,29 +563,29 @@ public class Enumerations40_50 { return tgt; } - static public org.hl7.fhir.r5.model.Enumeration convertDocumentReferenceStatus(org.hl7.fhir.r4.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r5.model.Enumeration convertDocumentReferenceStatus(org.hl7.fhir.r4.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; - org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatusEnumFactory()); + org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatusEnumFactory()); ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); switch (src.getValue()) { case CURRENT: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatus.CURRENT); + tgt.setValue(org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus.CURRENT); break; case SUPERSEDED: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatus.SUPERSEDED); + tgt.setValue(org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus.SUPERSEDED); break; case ENTEREDINERROR: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatus.ENTEREDINERROR); + tgt.setValue(org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus.ENTEREDINERROR); break; default: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatus.NULL); + tgt.setValue(org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus.NULL); break; } return tgt; } - static public org.hl7.fhir.r4.model.Enumeration convertDocumentReferenceStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r4.model.Enumeration convertDocumentReferenceStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4.model.Enumeration tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.Enumerations.DocumentReferenceStatusEnumFactory()); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/EpisodeOfCare40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/EpisodeOfCare40_50.java index 2f62258da..31217b836 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/EpisodeOfCare40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/EpisodeOfCare40_50.java @@ -197,11 +197,11 @@ public class EpisodeOfCare40_50 { org.hl7.fhir.r5.model.EpisodeOfCare.DiagnosisComponent tgt = new org.hl7.fhir.r5.model.EpisodeOfCare.DiagnosisComponent(); ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt); if (src.hasCondition()) - tgt.setCondition(Reference40_50.convertReferenceToCodeableReference(src.getCondition())); + tgt.addCondition(Reference40_50.convertReferenceToCodeableReference(src.getCondition())); if (src.hasRole()) - tgt.setRole(CodeableConcept40_50.convertCodeableConcept(src.getRole())); - if (src.hasRank()) - tgt.setRankElement(PositiveInt40_50.convertPositiveInt(src.getRankElement())); + tgt.setUse(CodeableConcept40_50.convertCodeableConcept(src.getRole())); +// if (src.hasRank()) +// tgt.setRankElement(PositiveInt40_50.convertPositiveInt(src.getRankElement())); return tgt; } @@ -211,11 +211,11 @@ public class EpisodeOfCare40_50 { org.hl7.fhir.r4.model.EpisodeOfCare.DiagnosisComponent tgt = new org.hl7.fhir.r4.model.EpisodeOfCare.DiagnosisComponent(); ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt); if (src.hasCondition()) - tgt.setCondition(Reference40_50.convertCodeableReferenceToReference(src.getCondition())); - if (src.hasRole()) - tgt.setRole(CodeableConcept40_50.convertCodeableConcept(src.getRole())); - if (src.hasRank()) - tgt.setRankElement(PositiveInt40_50.convertPositiveInt(src.getRankElement())); + tgt.setCondition(Reference40_50.convertCodeableReferenceToReference(src.getConditionFirstRep())); + if (src.hasUse()) + tgt.setRole(CodeableConcept40_50.convertCodeableConcept(src.getUse())); +// if (src.hasRank()) +// tgt.setRankElement(PositiveInt40_50.convertPositiveInt(src.getRankElement())); return tgt; } } \ No newline at end of file diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/EventDefinition40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/EventDefinition40_50.java index c2744faa4..7c7578894 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/EventDefinition40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/EventDefinition40_50.java @@ -85,7 +85,7 @@ public class EventDefinition40_50 { if (src.hasPurpose()) tgt.setPurposeElement(MarkDown40_50.convertMarkdown(src.getPurposeElement())); if (src.hasUsage()) - tgt.setUsageElement(String40_50.convertString(src.getUsageElement())); + tgt.setUsageElement(String40_50.convertStringToMarkdown(src.getUsageElement())); if (src.hasCopyright()) tgt.setCopyrightElement(MarkDown40_50.convertMarkdown(src.getCopyrightElement())); if (src.hasApprovalDate()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ExplanationOfBenefit40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ExplanationOfBenefit40_50.java index 62e50bd8e..f8042f2b9 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ExplanationOfBenefit40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ExplanationOfBenefit40_50.java @@ -750,7 +750,7 @@ public class ExplanationOfBenefit40_50 { if (src.hasAmount()) tgt.setAmount(Money40_50.convertMoney(src.getAmount())); if (src.hasValue()) - tgt.setValueElement(Decimal40_50.convertDecimal(src.getValueElement())); + tgt.setQuantity(Decimal40_50.convertDecimalToQuantity(src.getValueElement())); return tgt; } @@ -765,8 +765,8 @@ public class ExplanationOfBenefit40_50 { tgt.setReason(CodeableConcept40_50.convertCodeableConcept(src.getReason())); if (src.hasAmount()) tgt.setAmount(Money40_50.convertMoney(src.getAmount())); - if (src.hasValue()) - tgt.setValueElement(Decimal40_50.convertDecimal(src.getValueElement())); + if (src.hasQuantity()) + tgt.setValueElement(Decimal40_50.convertDecimal(src.getQuantity().getValueElement())); return tgt; } @@ -1164,7 +1164,7 @@ public class ExplanationOfBenefit40_50 { if (src.hasNumber()) tgt.setNumberElement(PositiveInt40_50.convertPositiveInt(src.getNumberElement())); if (src.hasType()) - tgt.setTypeElement(Enumerations40_50.convertNoteType(src.getTypeElement())); + tgt.getType().addCoding().setSystem("http://hl7.org/fhir/note-type").setCode(src.getType().toCode()); if (src.hasText()) tgt.setTextElement(String40_50.convertString(src.getTextElement())); if (src.hasLanguage()) @@ -1179,8 +1179,8 @@ public class ExplanationOfBenefit40_50 { ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt); if (src.hasNumber()) tgt.setNumberElement(PositiveInt40_50.convertPositiveInt(src.getNumberElement())); - if (src.hasType()) - tgt.setTypeElement(Enumerations40_50.convertNoteType(src.getTypeElement())); + if (src.hasType() && src.getType().hasCoding("http://hl7.org/fhir/note-type")) + tgt.setType(org.hl7.fhir.r4.model.Enumerations.NoteType.fromCode(src.getType().getCode("http://hl7.org/fhir/note-type"))); if (src.hasText()) tgt.setTextElement(String40_50.convertString(src.getTextElement())); if (src.hasLanguage()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/GuidanceResponse40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/GuidanceResponse40_50.java index 443dd57b6..330883b01 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/GuidanceResponse40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/GuidanceResponse40_50.java @@ -7,6 +7,7 @@ import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.Identifier4 import org.hl7.fhir.convertors.conv40_50.datatypes40_50.metadata40_50.DataRequirement40_50; import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.DateTime40_50; import org.hl7.fhir.convertors.conv40_50.datatypes40_50.special40_50.Reference40_50; +import org.hl7.fhir.convertors.conv43_50.datatypes43_50.special43_50.Reference43_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CodeableReference; @@ -68,11 +69,11 @@ public class GuidanceResponse40_50 { tgt.addReason(Reference40_50.convertReferenceToCodeableReference(t)); for (org.hl7.fhir.r4.model.Annotation t : src.getNote()) tgt.addNote(Annotation40_50.convertAnnotation(t)); for (org.hl7.fhir.r4.model.Reference t : src.getEvaluationMessage()) - tgt.addEvaluationMessage(Reference40_50.convertReference(t)); + tgt.setEvaluationMessage(Reference40_50.convertReference(t)); if (src.hasOutputParameters()) tgt.setOutputParameters(Reference40_50.convertReference(src.getOutputParameters())); if (src.hasResult()) - tgt.setResult(Reference40_50.convertReference(src.getResult())); + tgt.addResult(Reference40_50.convertReference(src.getResult())); for (org.hl7.fhir.r4.model.DataRequirement t : src.getDataRequirement()) tgt.addDataRequirement(DataRequirement40_50.convertDataRequirement(t)); return tgt; @@ -106,12 +107,12 @@ public class GuidanceResponse40_50 { if (t.hasReference()) tgt.addReasonReference(Reference40_50.convertReference(t.getReference())); for (org.hl7.fhir.r5.model.Annotation t : src.getNote()) tgt.addNote(Annotation40_50.convertAnnotation(t)); - for (org.hl7.fhir.r5.model.Reference t : src.getEvaluationMessage()) - tgt.addEvaluationMessage(Reference40_50.convertReference(t)); + if (src.hasEvaluationMessage()) + tgt.addEvaluationMessage(Reference40_50.convertReference(src.getEvaluationMessage())); if (src.hasOutputParameters()) tgt.setOutputParameters(Reference40_50.convertReference(src.getOutputParameters())); if (src.hasResult()) - tgt.setResult(Reference40_50.convertReference(src.getResult())); + tgt.setResult(Reference40_50.convertReference(src.getResultFirstRep())); for (org.hl7.fhir.r5.model.DataRequirement t : src.getDataRequirement()) tgt.addDataRequirement(DataRequirement40_50.convertDataRequirement(t)); return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/HealthcareService40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/HealthcareService40_50.java index 8304370c9..4f1696d53 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/HealthcareService40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/HealthcareService40_50.java @@ -64,7 +64,7 @@ public class HealthcareService40_50 { if (src.hasName()) tgt.setNameElement(String40_50.convertString(src.getNameElement())); if (src.hasComment()) - tgt.setCommentElement(String40_50.convertString(src.getCommentElement())); + tgt.setCommentElement(String40_50.convertStringToMarkdown(src.getCommentElement())); if (src.hasExtraDetails()) tgt.setExtraDetailsElement(MarkDown40_50.convertMarkdown(src.getExtraDetailsElement())); if (src.hasPhoto()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ImagingStudy40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ImagingStudy40_50.java index deec1546d..08760a080 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ImagingStudy40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ImagingStudy40_50.java @@ -66,8 +66,8 @@ public class ImagingStudy40_50 { for (org.hl7.fhir.r4.model.Reference t : src.getBasedOn()) tgt.addBasedOn(Reference40_50.convertReference(t)); if (src.hasReferrer()) tgt.setReferrer(Reference40_50.convertReference(src.getReferrer())); - for (org.hl7.fhir.r4.model.Reference t : src.getInterpreter()) - tgt.addInterpreter(Reference40_50.convertReference(t)); +// for (org.hl7.fhir.r4.model.Reference t : src.getInterpreter()) +// tgt.addInterpreter(Reference40_50.convertReference(t)); for (org.hl7.fhir.r4.model.Reference t : src.getEndpoint()) tgt.addEndpoint(Reference40_50.convertReference(t)); if (src.hasNumberOfSeries()) tgt.setNumberOfSeriesElement(UnsignedInt40_50.convertUnsignedInt(src.getNumberOfSeriesElement())); @@ -112,8 +112,8 @@ public class ImagingStudy40_50 { for (org.hl7.fhir.r5.model.Reference t : src.getBasedOn()) tgt.addBasedOn(Reference40_50.convertReference(t)); if (src.hasReferrer()) tgt.setReferrer(Reference40_50.convertReference(src.getReferrer())); - for (org.hl7.fhir.r5.model.Reference t : src.getInterpreter()) - tgt.addInterpreter(Reference40_50.convertReference(t)); +// for (org.hl7.fhir.r5.model.Reference t : src.getInterpreter()) +// tgt.addInterpreter(Reference40_50.convertReference(t)); for (org.hl7.fhir.r5.model.Reference t : src.getEndpoint()) tgt.addEndpoint(Reference40_50.convertReference(t)); if (src.hasNumberOfSeries()) tgt.setNumberOfSeriesElement(UnsignedInt40_50.convertUnsignedInt(src.getNumberOfSeriesElement())); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ImmunizationEvaluation40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ImmunizationEvaluation40_50.java index 1abd9ad15..4869fb1f7 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ImmunizationEvaluation40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ImmunizationEvaluation40_50.java @@ -63,7 +63,7 @@ public class ImmunizationEvaluation40_50 { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getDoseStatusReason()) tgt.addDoseStatusReason(CodeableConcept40_50.convertCodeableConcept(t)); if (src.hasDescription()) - tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement())); + tgt.setDescriptionElement(String40_50.convertStringToMarkdown(src.getDescriptionElement())); if (src.hasSeries()) tgt.setSeriesElement(String40_50.convertString(src.getSeriesElement())); if (src.hasDoseNumber()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ImmunizationRecommendation40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ImmunizationRecommendation40_50.java index f163f54dc..5d80e9a1d 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ImmunizationRecommendation40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ImmunizationRecommendation40_50.java @@ -93,7 +93,7 @@ public class ImmunizationRecommendation40_50 { for (org.hl7.fhir.r4.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent t : src.getDateCriterion()) tgt.addDateCriterion(convertImmunizationRecommendationRecommendationDateCriterionComponent(t)); if (src.hasDescription()) - tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement())); + tgt.setDescriptionElement(String40_50.convertStringToMarkdown(src.getDescriptionElement())); if (src.hasSeries()) tgt.setSeriesElement(String40_50.convertString(src.getSeriesElement())); if (src.hasDoseNumber()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Library40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Library40_50.java index e21129edf..e77fa7a22 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Library40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Library40_50.java @@ -89,7 +89,7 @@ public class Library40_50 { if (src.hasPurpose()) tgt.setPurposeElement(MarkDown40_50.convertMarkdown(src.getPurposeElement())); if (src.hasUsage()) - tgt.setUsageElement(String40_50.convertString(src.getUsageElement())); + tgt.setUsageElement(String40_50.convertStringToMarkdown(src.getUsageElement())); if (src.hasCopyright()) tgt.setCopyrightElement(MarkDown40_50.convertMarkdown(src.getCopyrightElement())); if (src.hasApprovalDate()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ListResource40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ListResource40_50.java index 1eff6d5ee..656c0331f 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ListResource40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ListResource40_50.java @@ -57,7 +57,7 @@ public class ListResource40_50 { if (src.hasCode()) tgt.setCode(CodeableConcept40_50.convertCodeableConcept(src.getCode())); if (src.hasSubject()) - tgt.setSubject(Reference40_50.convertReference(src.getSubject())); + tgt.addSubject(Reference40_50.convertReference(src.getSubject())); if (src.hasEncounter()) tgt.setEncounter(Reference40_50.convertReference(src.getEncounter())); if (src.hasDate()) @@ -90,7 +90,7 @@ public class ListResource40_50 { if (src.hasCode()) tgt.setCode(CodeableConcept40_50.convertCodeableConcept(src.getCode())); if (src.hasSubject()) - tgt.setSubject(Reference40_50.convertReference(src.getSubject())); + tgt.setSubject(Reference40_50.convertReference(src.getSubjectFirstRep())); if (src.hasEncounter()) tgt.setEncounter(Reference40_50.convertReference(src.getEncounter())); if (src.hasDate()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Location40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Location40_50.java index 60e5043ee..229f46b72 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Location40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Location40_50.java @@ -59,7 +59,7 @@ public class Location40_50 { tgt.setNameElement(String40_50.convertString(src.getNameElement())); for (org.hl7.fhir.r4.model.StringType t : src.getAlias()) tgt.getAlias().add(String40_50.convertString(t)); if (src.hasDescription()) - tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement())); + tgt.setDescriptionElement(String40_50.convertStringToMarkdown(src.getDescriptionElement())); if (src.hasMode()) tgt.setModeElement(convertLocationMode(src.getModeElement())); for (org.hl7.fhir.r4.model.CodeableConcept t : src.getType()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Measure40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Measure40_50.java index 03258da84..9c68d9661 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Measure40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Measure40_50.java @@ -87,7 +87,7 @@ public class Measure40_50 { if (src.hasPurpose()) tgt.setPurposeElement(MarkDown40_50.convertMarkdown(src.getPurposeElement())); if (src.hasUsage()) - tgt.setUsageElement(String40_50.convertString(src.getUsageElement())); + tgt.setUsageElement(String40_50.convertStringToMarkdown(src.getUsageElement())); if (src.hasCopyright()) tgt.setCopyrightElement(MarkDown40_50.convertMarkdown(src.getCopyrightElement())); if (src.hasApprovalDate()) @@ -119,9 +119,9 @@ public class Measure40_50 { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getType()) tgt.addType(CodeableConcept40_50.convertCodeableConcept(t)); if (src.hasRiskAdjustment()) - tgt.setRiskAdjustmentElement(String40_50.convertString(src.getRiskAdjustmentElement())); + tgt.setRiskAdjustmentElement(String40_50.convertStringToMarkdown(src.getRiskAdjustmentElement())); if (src.hasRateAggregation()) - tgt.setRateAggregationElement(String40_50.convertString(src.getRateAggregationElement())); + tgt.setRateAggregationElement(String40_50.convertStringToMarkdown(src.getRateAggregationElement())); if (src.hasRationale()) tgt.setRationaleElement(MarkDown40_50.convertMarkdown(src.getRationaleElement())); if (src.hasClinicalRecommendationStatement()) @@ -237,7 +237,7 @@ public class Measure40_50 { if (src.hasCode()) tgt.setCode(CodeableConcept40_50.convertCodeableConcept(src.getCode())); if (src.hasDescription()) - tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement())); + tgt.setDescriptionElement(String40_50.convertStringToMarkdown(src.getDescriptionElement())); for (org.hl7.fhir.r4.model.Measure.MeasureGroupPopulationComponent t : src.getPopulation()) tgt.addPopulation(convertMeasureGroupPopulationComponent(t)); for (org.hl7.fhir.r4.model.Measure.MeasureGroupStratifierComponent t : src.getStratifier()) @@ -269,7 +269,7 @@ public class Measure40_50 { if (src.hasCode()) tgt.setCode(CodeableConcept40_50.convertCodeableConcept(src.getCode())); if (src.hasDescription()) - tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement())); + tgt.setDescriptionElement(String40_50.convertStringToMarkdown(src.getDescriptionElement())); if (src.hasCriteria()) tgt.setCriteria(Expression40_50.convertExpression(src.getCriteria())); return tgt; @@ -297,7 +297,7 @@ public class Measure40_50 { if (src.hasCode()) tgt.setCode(CodeableConcept40_50.convertCodeableConcept(src.getCode())); if (src.hasDescription()) - tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement())); + tgt.setDescriptionElement(String40_50.convertStringToMarkdown(src.getDescriptionElement())); if (src.hasCriteria()) tgt.setCriteria(Expression40_50.convertExpression(src.getCriteria())); for (org.hl7.fhir.r4.model.Measure.MeasureGroupStratifierComponentComponent t : src.getComponent()) @@ -329,7 +329,7 @@ public class Measure40_50 { if (src.hasCode()) tgt.setCode(CodeableConcept40_50.convertCodeableConcept(src.getCode())); if (src.hasDescription()) - tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement())); + tgt.setDescriptionElement(String40_50.convertStringToMarkdown(src.getDescriptionElement())); if (src.hasCriteria()) tgt.setCriteria(Expression40_50.convertExpression(src.getCriteria())); return tgt; @@ -359,7 +359,7 @@ public class Measure40_50 { for (org.hl7.fhir.r4.model.CodeableConcept t : src.getUsage()) tgt.addUsage(CodeableConcept40_50.convertCodeableConcept(t)); if (src.hasDescription()) - tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement())); + tgt.setDescriptionElement(String40_50.convertStringToMarkdown(src.getDescriptionElement())); if (src.hasCriteria()) tgt.setCriteria(Expression40_50.convertExpression(src.getCriteria())); return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Medication40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Medication40_50.java index 309153056..eb85e41fe 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Medication40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Medication40_50.java @@ -56,8 +56,8 @@ public class Medication40_50 { tgt.setMarketingAuthorizationHolder(Reference40_50.convertReference(src.getManufacturer())); if (src.hasForm()) tgt.setDoseForm(CodeableConcept40_50.convertCodeableConcept(src.getForm())); - if (src.hasAmount()) - tgt.setTotalVolume(Ratio40_50.convertRatio(src.getAmount())); +// if (src.hasAmount()) +// tgt.setTotalVolume(Ratio40_50.convertRatio(src.getAmount())); for (org.hl7.fhir.r4.model.Medication.MedicationIngredientComponent t : src.getIngredient()) tgt.addIngredient(convertMedicationIngredientComponent(t)); if (src.hasBatch()) @@ -80,8 +80,8 @@ public class Medication40_50 { tgt.setManufacturer(Reference40_50.convertReference(src.getMarketingAuthorizationHolder())); if (src.hasDoseForm()) tgt.setForm(CodeableConcept40_50.convertCodeableConcept(src.getDoseForm())); - if (src.hasTotalVolume()) - tgt.setAmount(Ratio40_50.convertRatio(src.getTotalVolume())); +// if (src.hasTotalVolume()) +// tgt.setAmount(Ratio40_50.convertRatio(src.getTotalVolume())); for (org.hl7.fhir.r5.model.Medication.MedicationIngredientComponent t : src.getIngredient()) tgt.addIngredient(convertMedicationIngredientComponent(t)); if (src.hasBatch()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/MedicationAdministration40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/MedicationAdministration40_50.java index 37d149214..eb01a104f 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/MedicationAdministration40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/MedicationAdministration40_50.java @@ -76,7 +76,7 @@ public class MedicationAdministration40_50 { tgt.addReason(Reference40_50.convertReferenceToCodeableReference(t)); if (src.hasRequest()) tgt.setRequest(Reference40_50.convertReference(src.getRequest())); - for (org.hl7.fhir.r4.model.Reference t : src.getDevice()) tgt.addDevice(Reference40_50.convertReference(t)); + for (org.hl7.fhir.r4.model.Reference t : src.getDevice()) tgt.addDevice(Reference40_50.convertReferenceToCodeableReference(t)); for (org.hl7.fhir.r4.model.Annotation t : src.getNote()) tgt.addNote(Annotation40_50.convertAnnotation(t)); if (src.hasDosage()) tgt.setDosage(convertMedicationAdministrationDosageComponent(src.getDosage())); @@ -122,7 +122,9 @@ public class MedicationAdministration40_50 { tgt.addReasonReference(Reference40_50.convertReference(t.getReference())); if (src.hasRequest()) tgt.setRequest(Reference40_50.convertReference(src.getRequest())); - for (org.hl7.fhir.r5.model.Reference t : src.getDevice()) tgt.addDevice(Reference40_50.convertReference(t)); + for (CodeableReference t : src.getDevice()) + if (t.hasReference()) + tgt.addDevice(Reference40_50.convertReference(t.getReference())); for (org.hl7.fhir.r5.model.Annotation t : src.getNote()) tgt.addNote(Annotation40_50.convertAnnotation(t)); if (src.hasDosage()) tgt.setDosage(convertMedicationAdministrationDosageComponent(src.getDosage())); @@ -209,7 +211,7 @@ public class MedicationAdministration40_50 { if (src.hasFunction()) tgt.setFunction(CodeableConcept40_50.convertCodeableConcept(src.getFunction())); if (src.hasActor()) - tgt.setActor(Reference40_50.convertReference(src.getActor())); + tgt.setActor(Reference40_50.convertReferenceToCodeableReference(src.getActor())); return tgt; } @@ -220,8 +222,8 @@ public class MedicationAdministration40_50 { ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt); if (src.hasFunction()) tgt.setFunction(CodeableConcept40_50.convertCodeableConcept(src.getFunction())); - if (src.hasActor()) - tgt.setActor(Reference40_50.convertReference(src.getActor())); + if (src.hasActor() && src.getActor().hasReference()) + tgt.setActor(Reference40_50.convertReference(src.getActor().getReference())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/MedicationRequest40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/MedicationRequest40_50.java index a47dace69..26f4f4d1f 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/MedicationRequest40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/MedicationRequest40_50.java @@ -104,7 +104,7 @@ public class MedicationRequest40_50 { for (org.hl7.fhir.r4.model.Reference t : src.getInsurance()) tgt.addInsurance(Reference40_50.convertReference(t)); for (org.hl7.fhir.r4.model.Annotation t : src.getNote()) tgt.addNote(Annotation40_50.convertAnnotation(t)); for (org.hl7.fhir.r4.model.Dosage t : src.getDosageInstruction()) - tgt.getDose().addDosageInstruction(Dosage40_50.convertDosage(t)); + tgt.addDosageInstruction(Dosage40_50.convertDosage(t)); if (src.hasDispenseRequest()) tgt.setDispenseRequest(convertMedicationRequestDispenseRequestComponent(src.getDispenseRequest())); if (src.hasSubstitution()) @@ -178,7 +178,7 @@ public class MedicationRequest40_50 { tgt.setCourseOfTherapyType(CodeableConcept40_50.convertCodeableConcept(src.getCourseOfTherapyType())); for (org.hl7.fhir.r5.model.Reference t : src.getInsurance()) tgt.addInsurance(Reference40_50.convertReference(t)); for (org.hl7.fhir.r5.model.Annotation t : src.getNote()) tgt.addNote(Annotation40_50.convertAnnotation(t)); - for (org.hl7.fhir.r5.model.Dosage t : src.getDose().getDosageInstruction()) + for (org.hl7.fhir.r5.model.Dosage t : src.getDosageInstruction()) tgt.addDosageInstruction(Dosage40_50.convertDosage(t)); if (src.hasDispenseRequest()) tgt.setDispenseRequest(convertMedicationRequestDispenseRequestComponent(src.getDispenseRequest())); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/MedicationStatement40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/MedicationStatement40_50.java index 02c2d0704..d450f8dbd 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/MedicationStatement40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/MedicationStatement40_50.java @@ -41,10 +41,10 @@ import org.hl7.fhir.r5.model.CodeableReference; // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 public class MedicationStatement40_50 { - public static org.hl7.fhir.r5.model.MedicationUsage convertMedicationStatement(org.hl7.fhir.r4.model.MedicationStatement src) throws FHIRException { + public static org.hl7.fhir.r5.model.MedicationStatement convertMedicationStatement(org.hl7.fhir.r4.model.MedicationStatement src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r5.model.MedicationUsage tgt = new org.hl7.fhir.r5.model.MedicationUsage(); + org.hl7.fhir.r5.model.MedicationStatement tgt = new org.hl7.fhir.r5.model.MedicationStatement(); ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyDomainResource(src, tgt); for (org.hl7.fhir.r4.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(Identifier40_50.convertIdentifier(t)); @@ -83,7 +83,7 @@ public class MedicationStatement40_50 { return tgt; } - public static org.hl7.fhir.r4.model.MedicationStatement convertMedicationStatement(org.hl7.fhir.r5.model.MedicationUsage src) throws FHIRException { + public static org.hl7.fhir.r4.model.MedicationStatement convertMedicationStatement(org.hl7.fhir.r5.model.MedicationStatement src) throws FHIRException { if (src == null) return null; org.hl7.fhir.r4.model.MedicationStatement tgt = new org.hl7.fhir.r4.model.MedicationStatement(); @@ -127,44 +127,44 @@ public class MedicationStatement40_50 { return tgt; } - static public org.hl7.fhir.r5.model.Enumeration convertMedicationStatementStatus(org.hl7.fhir.r4.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r5.model.Enumeration convertMedicationStatementStatus(org.hl7.fhir.r4.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; - org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodesEnumFactory()); + org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodesEnumFactory()); ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); switch (src.getValue()) { case ACTIVE: - tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.RECORDED); + tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.RECORDED); break; case COMPLETED: - tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.RECORDED); + tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.RECORDED); break; case ENTEREDINERROR: - tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.ENTEREDINERROR); + tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.ENTEREDINERROR); break; case INTENDED: - tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.RECORDED); + tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.RECORDED); break; case STOPPED: - tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.RECORDED); + tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.RECORDED); break; case ONHOLD: - tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.RECORDED); + tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.RECORDED); break; case UNKNOWN: - tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.RECORDED); + tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.RECORDED); break; case NOTTAKEN: - tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.RECORDED); + tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.RECORDED); break; default: - tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.NULL); + tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.NULL); break; } return tgt; } - static public org.hl7.fhir.r4.model.Enumeration convertMedicationStatementStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r4.model.Enumeration convertMedicationStatementStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4.model.Enumeration tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.MedicationStatement.MedicationStatementStatusEnumFactory()); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/MessageHeader40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/MessageHeader40_50.java index d36962143..075bcd645 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/MessageHeader40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/MessageHeader40_50.java @@ -1,11 +1,13 @@ package org.hl7.fhir.convertors.conv40_50.resources40_50; import org.hl7.fhir.convertors.context.ConversionContext40_50; +import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.Uri10_50; import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.CodeableConcept40_50; import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.Coding40_50; import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.ContactPoint40_50; import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Canonical40_50; import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.String40_50; +import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Uri40_50; import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Url40_50; import org.hl7.fhir.convertors.conv40_50.datatypes40_50.special40_50.Reference40_50; import org.hl7.fhir.exceptions.FHIRException; @@ -55,8 +57,8 @@ public class MessageHeader40_50 { tgt.addDestination(convertMessageDestinationComponent(t)); if (src.hasSender()) tgt.setSender(Reference40_50.convertReference(src.getSender())); - if (src.hasEnterer()) - tgt.setEnterer(Reference40_50.convertReference(src.getEnterer())); +// if (src.hasEnterer()) +// tgt.setEnterer(Reference40_50.convertReference(src.getEnterer())); if (src.hasAuthor()) tgt.setAuthor(Reference40_50.convertReference(src.getAuthor())); if (src.hasSource()) @@ -86,8 +88,8 @@ public class MessageHeader40_50 { tgt.addDestination(convertMessageDestinationComponent(t)); if (src.hasSender()) tgt.setSender(Reference40_50.convertReference(src.getSender())); - if (src.hasEnterer()) - tgt.setEnterer(Reference40_50.convertReference(src.getEnterer())); +// if (src.hasEnterer()) +// tgt.setEnterer(Reference40_50.convertReference(src.getEnterer())); if (src.hasAuthor()) tgt.setAuthor(Reference40_50.convertReference(src.getAuthor())); if (src.hasSource()) @@ -114,7 +116,7 @@ public class MessageHeader40_50 { if (src.hasTarget()) tgt.setTarget(Reference40_50.convertReference(src.getTarget())); if (src.hasEndpoint()) - tgt.setEndpointElement(Url40_50.convertUrl(src.getEndpointElement())); + tgt.setEndpoint(Uri40_50.convertUri(src.getEndpointElement())); if (src.hasReceiver()) tgt.setReceiver(Reference40_50.convertReference(src.getReceiver())); return tgt; @@ -129,8 +131,8 @@ public class MessageHeader40_50 { tgt.setNameElement(String40_50.convertString(src.getNameElement())); if (src.hasTarget()) tgt.setTarget(Reference40_50.convertReference(src.getTarget())); - if (src.hasEndpoint()) - tgt.setEndpointElement(Url40_50.convertUrl(src.getEndpointElement())); + if (src.hasEndpointUrlType()) + tgt.setEndpointElement(Url40_50.convertUrl(src.getEndpointUrlType())); if (src.hasReceiver()) tgt.setReceiver(Reference40_50.convertReference(src.getReceiver())); return tgt; @@ -150,7 +152,7 @@ public class MessageHeader40_50 { if (src.hasContact()) tgt.setContact(ContactPoint40_50.convertContactPoint(src.getContact())); if (src.hasEndpoint()) - tgt.setEndpointElement(Url40_50.convertUrl(src.getEndpointElement())); + tgt.setEndpoint(Uri40_50.convertUri(src.getEndpointElement())); return tgt; } @@ -167,8 +169,8 @@ public class MessageHeader40_50 { tgt.setVersionElement(String40_50.convertString(src.getVersionElement())); if (src.hasContact()) tgt.setContact(ContactPoint40_50.convertContactPoint(src.getContact())); - if (src.hasEndpoint()) - tgt.setEndpointElement(Url40_50.convertUrl(src.getEndpointElement())); + if (src.hasEndpointUrlType()) + tgt.setEndpointElement(Url40_50.convertUrl(src.getEndpointUrlType())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/NutritionOrder40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/NutritionOrder40_50.java index ab0ba8385..acb5f4709 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/NutritionOrder40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/NutritionOrder40_50.java @@ -414,7 +414,7 @@ public class NutritionOrder40_50 { if (src.hasMaxVolumeToDeliver()) tgt.setMaxVolumeToDeliver(SimpleQuantity40_50.convertSimpleQuantity(src.getMaxVolumeToDeliver())); if (src.hasAdministrationInstruction()) - tgt.setAdministrationInstructionElement(String40_50.convertString(src.getAdministrationInstructionElement())); + tgt.setAdministrationInstructionElement(String40_50.convertStringToMarkdown(src.getAdministrationInstructionElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Observation40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Observation40_50.java index cf4b9ad9d..d261580cf 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Observation40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Observation40_50.java @@ -232,7 +232,7 @@ public class Observation40_50 { if (src.hasAge()) tgt.setAge(Range40_50.convertRange(src.getAge())); if (src.hasText()) - tgt.setTextElement(String40_50.convertString(src.getTextElement())); + tgt.setTextElement(String40_50.convertStringToMarkdown(src.getTextElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/OperationDefinition40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/OperationDefinition40_50.java index 5a5fd1951..d4088c0e6 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/OperationDefinition40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/OperationDefinition40_50.java @@ -12,8 +12,12 @@ import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Integer40 import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.MarkDown40_50; import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.String40_50; import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Uri40_50; +import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Code43_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CodeType; +import org.hl7.fhir.r5.model.Enumeration; +import org.hl7.fhir.r5.model.Enumerations.VersionIndependentResourceTypesAll; +import org.hl7.fhir.r5.model.Enumerations.VersionIndependentResourceTypesAllEnumFactory; /* Copyright (c) 2011+, HL7, Inc. @@ -87,7 +91,7 @@ public class OperationDefinition40_50 { tgt.setCommentElement(MarkDown40_50.convertMarkdown(src.getCommentElement())); if (src.hasBase()) tgt.setBaseElement(Canonical40_50.convertCanonical(src.getBaseElement())); - for (org.hl7.fhir.r4.model.CodeType t : src.getResource()) tgt.getResource().add(Code40_50.convertCode(t)); + for (org.hl7.fhir.r4.model.CodeType t : src.getResource()) tgt.getResource().add(new Enumeration(new VersionIndependentResourceTypesAllEnumFactory(), Code40_50.convertCode(t))); if (src.hasSystem()) tgt.setSystemElement(Boolean40_50.convertBoolean(src.getSystemElement())); if (src.hasType()) @@ -146,7 +150,7 @@ public class OperationDefinition40_50 { tgt.setCommentElement(MarkDown40_50.convertMarkdown(src.getCommentElement())); if (src.hasBase()) tgt.setBaseElement(Canonical40_50.convertCanonical(src.getBaseElement())); - for (CodeType t : src.getResource()) tgt.getResource().add(Code40_50.convertCode(t)); + for (Enumeration t : src.getResource()) tgt.getResource().add(Code40_50.convertCode(t.getCodeType())); if (src.hasSystem()) tgt.setSystemElement(Boolean40_50.convertBoolean(src.getSystemElement())); if (src.hasType()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/PaymentNotice40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/PaymentNotice40_50.java index 22ea000f8..0d8fc7461 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/PaymentNotice40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/PaymentNotice40_50.java @@ -56,7 +56,7 @@ public class PaymentNotice40_50 { if (src.hasCreated()) tgt.setCreatedElement(DateTime40_50.convertDateTime(src.getCreatedElement())); if (src.hasProvider()) - tgt.setProvider(Reference40_50.convertReference(src.getProvider())); + tgt.setReporter(Reference40_50.convertReference(src.getProvider())); if (src.hasPayment()) tgt.setPayment(Reference40_50.convertReference(src.getPayment())); if (src.hasPaymentDate()) @@ -87,8 +87,8 @@ public class PaymentNotice40_50 { tgt.setResponse(Reference40_50.convertReference(src.getResponse())); if (src.hasCreated()) tgt.setCreatedElement(DateTime40_50.convertDateTime(src.getCreatedElement())); - if (src.hasProvider()) - tgt.setProvider(Reference40_50.convertReference(src.getProvider())); + if (src.hasReporter()) + tgt.setProvider(Reference40_50.convertReference(src.getReporter())); if (src.hasPayment()) tgt.setPayment(Reference40_50.convertReference(src.getPayment())); if (src.hasPaymentDate()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/PlanDefinition40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/PlanDefinition40_50.java index c6f33d1e4..aa8833f2c 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/PlanDefinition40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/PlanDefinition40_50.java @@ -95,7 +95,7 @@ public class PlanDefinition40_50 { if (src.hasPurpose()) tgt.setPurposeElement(MarkDown40_50.convertMarkdown(src.getPurposeElement())); if (src.hasUsage()) - tgt.setUsageElement(String40_50.convertString(src.getUsageElement())); + tgt.setUsageElement(String40_50.convertStringToMarkdown(src.getUsageElement())); if (src.hasCopyright()) tgt.setCopyrightElement(MarkDown40_50.convertMarkdown(src.getCopyrightElement())); if (src.hasApprovalDate()) @@ -277,9 +277,9 @@ public class PlanDefinition40_50 { if (src.hasTitle()) tgt.setTitleElement(String40_50.convertString(src.getTitleElement())); if (src.hasDescription()) - tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement())); + tgt.setDescriptionElement(String40_50.convertStringToMarkdown(src.getDescriptionElement())); if (src.hasTextEquivalent()) - tgt.setTextEquivalentElement(String40_50.convertString(src.getTextEquivalentElement())); + tgt.setTextEquivalentElement(String40_50.convertStringToMarkdown(src.getTextEquivalentElement())); if (src.hasPriority()) tgt.setPriorityElement(convertRequestPriority(src.getPriorityElement())); for (org.hl7.fhir.r4.model.CodeableConcept t : src.getCode()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Practitioner40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Practitioner40_50.java index 8ecf5d2ed..21d07f4b2 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Practitioner40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Practitioner40_50.java @@ -12,6 +12,7 @@ import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Boolean40 import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Date40_50; import org.hl7.fhir.convertors.conv40_50.datatypes40_50.special40_50.Reference40_50; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r5.model.Practitioner.PractitionerCommunicationComponent; /* Copyright (c) 2011+, HL7, Inc. @@ -65,7 +66,7 @@ public class Practitioner40_50 { for (org.hl7.fhir.r4.model.Practitioner.PractitionerQualificationComponent t : src.getQualification()) tgt.addQualification(convertPractitionerQualificationComponent(t)); for (org.hl7.fhir.r4.model.CodeableConcept t : src.getCommunication()) - tgt.addCommunication(CodeableConcept40_50.convertCodeableConcept(t)); + tgt.addCommunication().setLanguage(CodeableConcept40_50.convertCodeableConcept(t)); return tgt; } @@ -89,8 +90,8 @@ public class Practitioner40_50 { for (org.hl7.fhir.r5.model.Attachment t : src.getPhoto()) tgt.addPhoto(Attachment40_50.convertAttachment(t)); for (org.hl7.fhir.r5.model.Practitioner.PractitionerQualificationComponent t : src.getQualification()) tgt.addQualification(convertPractitionerQualificationComponent(t)); - for (org.hl7.fhir.r5.model.CodeableConcept t : src.getCommunication()) - tgt.addCommunication(CodeableConcept40_50.convertCodeableConcept(t)); + for (PractitionerCommunicationComponent t : src.getCommunication()) + tgt.addCommunication(CodeableConcept40_50.convertCodeableConcept(t.getLanguage())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Resource40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Resource40_50.java index 426e8b61b..11c46271b 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Resource40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Resource40_50.java @@ -118,8 +118,8 @@ public class Resource40_50 { return DeviceUseStatement40_50.convertDeviceUseStatement((org.hl7.fhir.r4.model.DeviceUseStatement) src); if (src instanceof org.hl7.fhir.r4.model.DiagnosticReport) return DiagnosticReport40_50.convertDiagnosticReport((org.hl7.fhir.r4.model.DiagnosticReport) src); - if (src instanceof org.hl7.fhir.r4.model.DocumentManifest) - return DocumentManifest40_50.convertDocumentManifest((org.hl7.fhir.r4.model.DocumentManifest) src); +// if (src instanceof org.hl7.fhir.r4.model.DocumentManifest) +// return DocumentManifest40_50.convertDocumentManifest((org.hl7.fhir.r4.model.DocumentManifest) src); if (src instanceof org.hl7.fhir.r4.model.DocumentReference) return DocumentReference40_50.convertDocumentReference((org.hl7.fhir.r4.model.DocumentReference) src); if (src instanceof org.hl7.fhir.r4.model.Encounter) @@ -359,8 +359,8 @@ public class Resource40_50 { return DeviceUseStatement40_50.convertDeviceUseStatement((org.hl7.fhir.r5.model.DeviceUsage) src); if (src instanceof org.hl7.fhir.r5.model.DiagnosticReport) return DiagnosticReport40_50.convertDiagnosticReport((org.hl7.fhir.r5.model.DiagnosticReport) src); - if (src instanceof org.hl7.fhir.r5.model.DocumentManifest) - return DocumentManifest40_50.convertDocumentManifest((org.hl7.fhir.r5.model.DocumentManifest) src); +// if (src instanceof org.hl7.fhir.r5.model.DocumentManifest) +// return DocumentManifest40_50.convertDocumentManifest((org.hl7.fhir.r5.model.DocumentManifest) src); if (src instanceof org.hl7.fhir.r5.model.DocumentReference) return DocumentReference40_50.convertDocumentReference((org.hl7.fhir.r5.model.DocumentReference) src); if (src instanceof org.hl7.fhir.r5.model.Encounter) @@ -426,8 +426,8 @@ public class Resource40_50 { return MedicationKnowledge40_50.convertMedicationKnowledge((org.hl7.fhir.r5.model.MedicationKnowledge) src); if (src instanceof org.hl7.fhir.r5.model.MedicationRequest) return MedicationRequest40_50.convertMedicationRequest((org.hl7.fhir.r5.model.MedicationRequest) src); - if (src instanceof org.hl7.fhir.r5.model.MedicationUsage) - return MedicationStatement40_50.convertMedicationStatement((org.hl7.fhir.r5.model.MedicationUsage) src); + if (src instanceof org.hl7.fhir.r5.model.MedicationStatement) + return MedicationStatement40_50.convertMedicationStatement((org.hl7.fhir.r5.model.MedicationStatement) src); if (src instanceof org.hl7.fhir.r5.model.MessageDefinition) return MessageDefinition40_50.convertMessageDefinition((org.hl7.fhir.r5.model.MessageDefinition) src); if (src instanceof org.hl7.fhir.r5.model.MessageHeader) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Schedule40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Schedule40_50.java index 6895df0c7..2112b1ee8 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Schedule40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Schedule40_50.java @@ -60,7 +60,7 @@ public class Schedule40_50 { if (src.hasPlanningHorizon()) tgt.setPlanningHorizon(Period40_50.convertPeriod(src.getPlanningHorizon())); if (src.hasComment()) - tgt.setCommentElement(String40_50.convertString(src.getCommentElement())); + tgt.setCommentElement(String40_50.convertStringToMarkdown(src.getCommentElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/SearchParameter40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/SearchParameter40_50.java index fd7b97ef7..2d1f3b19e 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/SearchParameter40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/SearchParameter40_50.java @@ -15,6 +15,9 @@ import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.String40_ import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Uri40_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CodeType; +import org.hl7.fhir.r5.model.Enumeration; +import org.hl7.fhir.r5.model.Enumerations.VersionIndependentResourceTypesAll; +import org.hl7.fhir.r5.model.Enumerations.VersionIndependentResourceTypesAllEnumFactory; /* Copyright (c) 2011+, HL7, Inc. @@ -80,7 +83,7 @@ public class SearchParameter40_50 { tgt.setPurposeElement(MarkDown40_50.convertMarkdown(src.getPurposeElement())); if (src.hasCode()) tgt.setCodeElement(Code40_50.convertCode(src.getCodeElement())); - for (org.hl7.fhir.r4.model.CodeType t : src.getBase()) tgt.getBase().add(Code40_50.convertCode(t)); + for (org.hl7.fhir.r4.model.CodeType t : src.getBase()) tgt.getBase().add(new Enumeration(new VersionIndependentResourceTypesAllEnumFactory(), Code40_50.convertCode(t))); if (src.hasType()) tgt.setTypeElement(Enumerations40_50.convertSearchParamType(src.getTypeElement())); if (src.hasExpression()) @@ -89,7 +92,7 @@ public class SearchParameter40_50 { // tgt.setXpathElement(String40_50.convertString(src.getXpathElement())); if (src.hasXpathUsage()) tgt.setProcessingModeElement(convertXPathUsageType(src.getXpathUsageElement())); - for (org.hl7.fhir.r4.model.CodeType t : src.getTarget()) tgt.getTarget().add(Code40_50.convertCode(t)); + for (org.hl7.fhir.r4.model.CodeType t : src.getTarget()) tgt.getTarget().add(new Enumeration(new VersionIndependentResourceTypesAllEnumFactory(), Code40_50.convertCode(t))); if (src.hasMultipleOr()) tgt.setMultipleOrElement(Boolean40_50.convertBoolean(src.getMultipleOrElement())); if (src.hasMultipleAnd()) @@ -139,7 +142,7 @@ public class SearchParameter40_50 { tgt.setPurposeElement(MarkDown40_50.convertMarkdown(src.getPurposeElement())); if (src.hasCode()) tgt.setCodeElement(Code40_50.convertCode(src.getCodeElement())); - for (CodeType t : src.getBase()) tgt.getBase().add(Code40_50.convertCode(t)); + for (Enumeration t : src.getBase()) tgt.getBase().add(Code40_50.convertCode(t.getCodeType())); if (src.hasType()) tgt.setTypeElement(Enumerations40_50.convertSearchParamType(src.getTypeElement())); if (src.hasExpression()) @@ -148,7 +151,7 @@ public class SearchParameter40_50 { // tgt.setXpathElement(String40_50.convertString(src.getXpathElement())); if (src.hasProcessingMode()) tgt.setXpathUsageElement(convertXPathUsageType(src.getProcessingModeElement())); - for (CodeType t : src.getTarget()) tgt.getTarget().add(Code40_50.convertCode(t)); + for (Enumeration t : src.getTarget()) tgt.getTarget().add(Code40_50.convertCode(t.getCodeType())); if (src.hasMultipleOr()) tgt.setMultipleOrElement(Boolean40_50.convertBoolean(src.getMultipleOrElement())); if (src.hasMultipleAnd()) @@ -215,47 +218,47 @@ public class SearchParameter40_50 { return tgt; } - static public org.hl7.fhir.r5.model.Enumeration convertSearchComparator(org.hl7.fhir.r4.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r5.model.Enumeration convertSearchComparator(org.hl7.fhir.r4.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; - org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.SearchParameter.SearchComparatorEnumFactory()); + org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.SearchComparatorEnumFactory()); ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); switch (src.getValue()) { case EQ: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchComparator.EQ); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchComparator.EQ); break; case NE: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchComparator.NE); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchComparator.NE); break; case GT: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchComparator.GT); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchComparator.GT); break; case LT: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchComparator.LT); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchComparator.LT); break; case GE: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchComparator.GE); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchComparator.GE); break; case LE: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchComparator.LE); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchComparator.LE); break; case SA: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchComparator.SA); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchComparator.SA); break; case EB: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchComparator.EB); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchComparator.EB); break; case AP: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchComparator.AP); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchComparator.AP); break; default: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchComparator.NULL); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchComparator.NULL); break; } return tgt; } - static public org.hl7.fhir.r4.model.Enumeration convertSearchComparator(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r4.model.Enumeration convertSearchComparator(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4.model.Enumeration tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.SearchParameter.SearchComparatorEnumFactory()); @@ -295,56 +298,56 @@ public class SearchParameter40_50 { return tgt; } - static public org.hl7.fhir.r5.model.Enumeration convertSearchModifierCode(org.hl7.fhir.r4.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r5.model.Enumeration convertSearchModifierCode(org.hl7.fhir.r4.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; - org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.SearchParameter.SearchModifierCodeEnumFactory()); + org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.SearchModifierCodeEnumFactory()); ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); switch (src.getValue()) { case MISSING: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.MISSING); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.MISSING); break; case EXACT: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.EXACT); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.EXACT); break; case CONTAINS: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.CONTAINS); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.CONTAINS); break; case NOT: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.NOT); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.NOT); break; case TEXT: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.TEXT); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.TEXT); break; case IN: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.IN); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.IN); break; case NOTIN: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.NOTIN); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.NOTIN); break; case BELOW: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.BELOW); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.BELOW); break; case ABOVE: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.ABOVE); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.ABOVE); break; case TYPE: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.TYPE); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.TYPE); break; case IDENTIFIER: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.IDENTIFIER); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.IDENTIFIER); break; case OFTYPE: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.OFTYPE); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.OFTYPE); break; default: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.NULL); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.NULL); break; } return tgt; } - static public org.hl7.fhir.r4.model.Enumeration convertSearchModifierCode(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r4.model.Enumeration convertSearchModifierCode(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4.model.Enumeration tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.SearchParameter.SearchModifierCodeEnumFactory()); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ServiceRequest40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ServiceRequest40_50.java index a2f47e04d..5d01d850c 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ServiceRequest40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ServiceRequest40_50.java @@ -10,8 +10,11 @@ import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.DateTime4 import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.String40_50; import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Uri40_50; import org.hl7.fhir.convertors.conv40_50.datatypes40_50.special40_50.Reference40_50; +import org.hl7.fhir.convertors.conv43_50.datatypes43_50.general43_50.CodeableConcept43_50; +import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.String43_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CodeableReference; +import org.hl7.fhir.r5.model.ServiceRequest.ServiceRequestOrderDetailComponent; /* Copyright (c) 2011+, HL7, Inc. @@ -72,7 +75,7 @@ public class ServiceRequest40_50 { if (src.hasCode()) tgt.setCode(CodeableConcept40_50.convertCodeableConceptToCodeableReference(src.getCode())); for (org.hl7.fhir.r4.model.CodeableConcept t : src.getOrderDetail()) - tgt.addOrderDetail(CodeableConcept40_50.convertCodeableConcept(t)); + tgt.addOrderDetail().getParameter().setValue(CodeableConcept40_50.convertCodeableConcept(t)); if (src.hasQuantity()) tgt.setQuantity(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getQuantity())); if (src.hasSubject()) @@ -100,13 +103,13 @@ public class ServiceRequest40_50 { tgt.addReason(Reference40_50.convertReferenceToCodeableReference(t)); for (org.hl7.fhir.r4.model.Reference t : src.getInsurance()) tgt.addInsurance(Reference40_50.convertReference(t)); for (org.hl7.fhir.r4.model.Reference t : src.getSupportingInfo()) - tgt.addSupportingInfo(Reference40_50.convertReference(t)); + tgt.addSupportingInfo(Reference40_50.convertReferenceToCodeableReference(t)); for (org.hl7.fhir.r4.model.Reference t : src.getSpecimen()) tgt.addSpecimen(Reference40_50.convertReference(t)); for (org.hl7.fhir.r4.model.CodeableConcept t : src.getBodySite()) tgt.addBodySite(CodeableConcept40_50.convertCodeableConcept(t)); for (org.hl7.fhir.r4.model.Annotation t : src.getNote()) tgt.addNote(Annotation40_50.convertAnnotation(t)); if (src.hasPatientInstruction()) - tgt.setPatientInstructionElement(String40_50.convertString(src.getPatientInstructionElement())); + tgt.addPatientInstruction().setInstruction(String40_50.convertStringToMarkdown(src.getPatientInstructionElement())); for (org.hl7.fhir.r4.model.Reference t : src.getRelevantHistory()) tgt.addRelevantHistory(Reference40_50.convertReference(t)); return tgt; @@ -139,8 +142,11 @@ public class ServiceRequest40_50 { tgt.setDoNotPerformElement(Boolean40_50.convertBoolean(src.getDoNotPerformElement())); if (src.hasCode()) tgt.setCode(CodeableConcept40_50.convertCodeableReferenceToCodeableConcept(src.getCode())); - for (org.hl7.fhir.r5.model.CodeableConcept t : src.getOrderDetail()) - tgt.addOrderDetail(CodeableConcept40_50.convertCodeableConcept(t)); + for (ServiceRequestOrderDetailComponent t : src.getOrderDetail()) { + if (t.getParameter().hasValueCodeableConcept()) { + tgt.addOrderDetail(CodeableConcept40_50.convertCodeableConcept(t.getParameter().getValueCodeableConcept())); + } + } if (src.hasQuantity()) tgt.setQuantity(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getQuantity())); if (src.hasSubject()) @@ -171,14 +177,15 @@ public class ServiceRequest40_50 { if (t.hasReference()) tgt.addReasonReference(Reference40_50.convertReference(t.getReference())); for (org.hl7.fhir.r5.model.Reference t : src.getInsurance()) tgt.addInsurance(Reference40_50.convertReference(t)); - for (org.hl7.fhir.r5.model.Reference t : src.getSupportingInfo()) - tgt.addSupportingInfo(Reference40_50.convertReference(t)); + for (CodeableReference t : src.getSupportingInfo()) + if (t.hasReference()) + tgt.addSupportingInfo(Reference40_50.convertReference(t.getReference())); for (org.hl7.fhir.r5.model.Reference t : src.getSpecimen()) tgt.addSpecimen(Reference40_50.convertReference(t)); for (org.hl7.fhir.r5.model.CodeableConcept t : src.getBodySite()) tgt.addBodySite(CodeableConcept40_50.convertCodeableConcept(t)); for (org.hl7.fhir.r5.model.Annotation t : src.getNote()) tgt.addNote(Annotation40_50.convertAnnotation(t)); - if (src.hasPatientInstruction()) - tgt.setPatientInstructionElement(String40_50.convertString(src.getPatientInstructionElement())); + if (src.getPatientInstructionFirstRep().hasInstructionMarkdownType()) + tgt.setPatientInstructionElement(String40_50.convertString(src.getPatientInstructionFirstRep().getInstructionMarkdownType())); for (org.hl7.fhir.r5.model.Reference t : src.getRelevantHistory()) tgt.addRelevantHistory(Reference40_50.convertReference(t)); return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/SpecimenDefinition40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/SpecimenDefinition40_50.java index ad1da389e..6b403b1e8 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/SpecimenDefinition40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/SpecimenDefinition40_50.java @@ -95,7 +95,7 @@ public class SpecimenDefinition40_50 { if (src.hasContainer()) tgt.setContainer(convertSpecimenDefinitionTypeTestedContainerComponent(src.getContainer())); if (src.hasRequirement()) - tgt.setRequirementElement(String40_50.convertString(src.getRequirementElement())); + tgt.setRequirementElement(String40_50.convertStringToMarkdown(src.getRequirementElement())); if (src.hasRetentionTime()) tgt.setRetentionTime(Duration40_50.convertDuration(src.getRetentionTime())); for (org.hl7.fhir.r4.model.CodeableConcept t : src.getRejectionCriterion()) @@ -179,7 +179,7 @@ public class SpecimenDefinition40_50 { if (src.hasCap()) tgt.setCap(CodeableConcept40_50.convertCodeableConcept(src.getCap())); if (src.hasDescription()) - tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement())); + tgt.setDescriptionElement(String40_50.convertStringToMarkdown(src.getDescriptionElement())); if (src.hasCapacity()) tgt.setCapacity(SimpleQuantity40_50.convertSimpleQuantity(src.getCapacity())); if (src.hasMinimumVolume()) @@ -187,7 +187,7 @@ public class SpecimenDefinition40_50 { for (org.hl7.fhir.r4.model.SpecimenDefinition.SpecimenDefinitionTypeTestedContainerAdditiveComponent t : src.getAdditive()) tgt.addAdditive(convertSpecimenDefinitionTypeTestedContainerAdditiveComponent(t)); if (src.hasPreparation()) - tgt.setPreparationElement(String40_50.convertString(src.getPreparationElement())); + tgt.setPreparationElement(String40_50.convertStringToMarkdown(src.getPreparationElement())); return tgt; } @@ -247,7 +247,7 @@ public class SpecimenDefinition40_50 { if (src.hasMaxDuration()) tgt.setMaxDuration(Duration40_50.convertDuration(src.getMaxDuration())); if (src.hasInstruction()) - tgt.setInstructionElement(String40_50.convertString(src.getInstructionElement())); + tgt.setInstructionElement(String40_50.convertStringToMarkdown(src.getInstructionElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/StructureMap40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/StructureMap40_50.java index 613010c9a..17102b40d 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/StructureMap40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/StructureMap40_50.java @@ -546,7 +546,7 @@ public class StructureMap40_50 { org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleTargetComponent tgt = new org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleTargetComponent(); ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyBackboneElement(src, tgt); if (src.hasContext()) - tgt.setContextElement(Id40_50.convertId(src.getContextElement())); + tgt.setContextElement(Id40_50.convertIdToString(src.getContextElement())); if (src.hasContextType() && src.getContextType() != org.hl7.fhir.r4.model.StructureMap.StructureMapContextType.VARIABLE) throw new Error("This conversion is not supported. Consult code maintainers"); // this should never happens - no one knows what the intent was here. if (src.hasElement()) @@ -605,7 +605,7 @@ public class StructureMap40_50 { tgt.setValue(org.hl7.fhir.r5.model.StructureMap.StructureMapTargetListMode.LAST); break; case COLLATE: - tgt.setValue(org.hl7.fhir.r5.model.StructureMap.StructureMapTargetListMode.COLLATE); + tgt.setValue(org.hl7.fhir.r5.model.StructureMap.StructureMapTargetListMode.SINGLE); break; default: tgt.setValue(org.hl7.fhir.r5.model.StructureMap.StructureMapTargetListMode.NULL); @@ -629,7 +629,7 @@ public class StructureMap40_50 { case LAST: tgt.setValue(org.hl7.fhir.r4.model.StructureMap.StructureMapTargetListMode.LAST); break; - case COLLATE: + case SINGLE: tgt.setValue(org.hl7.fhir.r4.model.StructureMap.StructureMapTargetListMode.COLLATE); break; default: diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Substance40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Substance40_50.java index e9ec8877f..d906c245c 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Substance40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/Substance40_50.java @@ -55,7 +55,7 @@ public class Substance40_50 { if (src.hasCode()) tgt.getCode().setConcept(CodeableConcept40_50.convertCodeableConcept(src.getCode())); if (src.hasDescription()) - tgt.setDescriptionElement(String40_50.convertString(src.getDescriptionElement())); + tgt.setDescriptionElement(String40_50.convertStringToMarkdown(src.getDescriptionElement())); for (org.hl7.fhir.r4.model.Substance.SubstanceInstanceComponent t : src.getInstance()) convertSubstanceInstanceComponent(t, tgt); for (org.hl7.fhir.r4.model.Substance.SubstanceIngredientComponent t : src.getIngredient()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/TerminologyCapabilities40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/TerminologyCapabilities40_50.java index e8936566c..3f61a9bd6 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/TerminologyCapabilities40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/TerminologyCapabilities40_50.java @@ -15,8 +15,8 @@ import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Url40_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r4.model.CodeType; import org.hl7.fhir.r5.model.Enumeration; -import org.hl7.fhir.r5.model.TerminologyCapabilities.CommonLanguages; -import org.hl7.fhir.r5.model.TerminologyCapabilities.CommonLanguagesEnumFactory; +import org.hl7.fhir.r5.model.Enumerations.CommonLanguages; +import org.hl7.fhir.r5.model.Enumerations.CommonLanguagesEnumFactory; /* Copyright (c) 2011+, HL7, Inc. diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/TestScript40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/TestScript40_50.java index 625d7067b..824eb9c1c 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/TestScript40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/TestScript40_50.java @@ -878,7 +878,7 @@ public class TestScript40_50 { tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.NOTMODIFIED); break; case BAD: - tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.BAD); + tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.BADREQUEST); break; case FORBIDDEN: tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.FORBIDDEN); @@ -899,7 +899,7 @@ public class TestScript40_50 { tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.PRECONDITIONFAILED); break; case UNPROCESSABLE: - tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.UNPROCESSABLE); + tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.UNPROCESSABLECONTENT); break; default: tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.NULL); @@ -926,7 +926,7 @@ public class TestScript40_50 { case NOTMODIFIED: tgt.setValue(org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.NOTMODIFIED); break; - case BAD: + case BADREQUEST: tgt.setValue(org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.BAD); break; case FORBIDDEN: @@ -947,7 +947,7 @@ public class TestScript40_50 { case PRECONDITIONFAILED: tgt.setValue(org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.PRECONDITIONFAILED); break; - case UNPROCESSABLE: + case UNPROCESSABLECONTENT: tgt.setValue(org.hl7.fhir.r4.model.TestScript.AssertionResponseTypes.UNPROCESSABLE); break; default: diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/datatypes43_50/metadata43_50/Expression43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/datatypes43_50/metadata43_50/Expression43_50.java index 6e0a7aec6..f156481e4 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/datatypes43_50/metadata43_50/Expression43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/datatypes43_50/metadata43_50/Expression43_50.java @@ -13,7 +13,7 @@ public class Expression43_50 { org.hl7.fhir.r5.model.Expression tgt = new org.hl7.fhir.r5.model.Expression(); ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); if (src.hasDescription()) tgt.setDescriptionElement(String43_50.convertString(src.getDescriptionElement())); - if (src.hasName()) tgt.setNameElement(Id43_50.convertId(src.getNameElement())); + if (src.hasName()) tgt.setNameElement(Id43_50.convertIdToCode(src.getNameElement())); if (src.hasLanguage()) tgt.setLanguageElement(Code43_50.convertCode(src.getLanguageElement())); if (src.hasExpression()) tgt.setExpressionElement(String43_50.convertString(src.getExpressionElement())); if (src.hasReference()) tgt.setReferenceElement(Uri43_50.convertUri(src.getReferenceElement())); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/datatypes43_50/primitive43_50/Code43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/datatypes43_50/primitive43_50/Code43_50.java index ed4e83d5a..c644d6da5 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/datatypes43_50/primitive43_50/Code43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/datatypes43_50/primitive43_50/Code43_50.java @@ -3,8 +3,6 @@ package org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50; import org.hl7.fhir.convertors.context.ConversionContext43_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.Enumeration; -import org.hl7.fhir.r5.model.Enumerations.AllResourceTypes; - public class Code43_50 { public static org.hl7.fhir.r5.model.CodeType convertCode(org.hl7.fhir.r4b.model.CodeType src) throws FHIRException { org.hl7.fhir.r5.model.CodeType tgt = src.hasValue() ? new org.hl7.fhir.r5.model.CodeType(src.getValueAsString()) : new org.hl7.fhir.r5.model.CodeType(); @@ -17,12 +15,12 @@ public class Code43_50 { ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); return tgt; } - - public static org.hl7.fhir.r5.model.Enumeration convertResourceEnum(org.hl7.fhir.r4b.model.CodeType src) { - return new Enumeration(new org.hl7.fhir.r5.model.Enumerations.AllResourceTypesEnumFactory(), src.getCode()); - } - - public static org.hl7.fhir.r4b.model.CodeType convertResourceEnum(org.hl7.fhir.r5.model.Enumeration src) { - return new org.hl7.fhir.r4b.model.CodeType(src.getCode()); - } +// +// public static org.hl7.fhir.r5.model.Enumeration convertResourceEnum(org.hl7.fhir.r4b.model.CodeType src) { +// return new Enumeration(new org.hl7.fhir.r5.model.Enumerations.AllResourceTypesEnumFactory(), src.getCode()); +// } +// +// public static org.hl7.fhir.r4b.model.CodeType convertResourceEnum(org.hl7.fhir.r5.model.Enumeration src) { +// return new org.hl7.fhir.r4b.model.CodeType(src.getCode()); +// } } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/datatypes43_50/primitive43_50/Decimal43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/datatypes43_50/primitive43_50/Decimal43_50.java index 27326a636..18dafe8b4 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/datatypes43_50/primitive43_50/Decimal43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/datatypes43_50/primitive43_50/Decimal43_50.java @@ -1,7 +1,9 @@ package org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50; +import org.hl7.fhir.convertors.context.ConversionContext40_50; import org.hl7.fhir.convertors.context.ConversionContext43_50; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r4b.model.DecimalType; public class Decimal43_50 { public static org.hl7.fhir.r5.model.DecimalType convertDecimal(org.hl7.fhir.r4b.model.DecimalType src) throws FHIRException { @@ -15,4 +17,16 @@ public class Decimal43_50 { ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); return tgt; } + + + public static org.hl7.fhir.r5.model.Quantity convertDecimalToQuantity(org.hl7.fhir.r4b.model.DecimalType src) { + org.hl7.fhir.r5.model.Quantity tgt = new org.hl7.fhir.r5.model.Quantity(); + if (src.hasValue()) { + tgt.setValue(src.getValue()); + tgt.setSystem("http://unitsofmeasure.org"); + tgt.setCode("1"); + } + ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); + return tgt; + } } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/datatypes43_50/primitive43_50/Id43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/datatypes43_50/primitive43_50/Id43_50.java index a4eb361e1..21fa520ed 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/datatypes43_50/primitive43_50/Id43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/datatypes43_50/primitive43_50/Id43_50.java @@ -3,6 +3,7 @@ package org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50; import org.hl7.fhir.convertors.context.ConversionContext43_50; import org.hl7.fhir.exceptions.FHIRException; + public class Id43_50 { public static org.hl7.fhir.r5.model.IdType convertId(org.hl7.fhir.r4b.model.IdType src) throws FHIRException { org.hl7.fhir.r5.model.IdType tgt = src.hasValue() ? new org.hl7.fhir.r5.model.IdType(src.getValueAsString()) : new org.hl7.fhir.r5.model.IdType(); @@ -15,4 +16,29 @@ public class Id43_50 { ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); return tgt; } + + public static org.hl7.fhir.r5.model.StringType convertIdToString(org.hl7.fhir.r4b.model.IdType src) { + org.hl7.fhir.r5.model.StringType tgt = src.hasValue() ? new org.hl7.fhir.r5.model.StringType(src.getValueAsString()) : new org.hl7.fhir.r5.model.StringType(); + ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); + return tgt; + } + + public static org.hl7.fhir.r4b.model.IdType convertId(org.hl7.fhir.r5.model.StringType src) throws FHIRException { + org.hl7.fhir.r4b.model.IdType tgt = src.hasValue() ? new org.hl7.fhir.r4b.model.IdType(src.getValueAsString()) : new org.hl7.fhir.r4b.model.IdType(); + ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); + return tgt; + } + + public static org.hl7.fhir.r5.model.CodeType convertIdToCode(org.hl7.fhir.r4b.model.IdType src) { + org.hl7.fhir.r5.model.CodeType tgt = src.hasValue() ? new org.hl7.fhir.r5.model.CodeType(src.getValueAsString()) : new org.hl7.fhir.r5.model.CodeType(); + ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); + return tgt; + } + + public static org.hl7.fhir.r4b.model.IdType convertId(org.hl7.fhir.r5.model.CodeType src) throws FHIRException { + org.hl7.fhir.r4b.model.IdType tgt = src.hasValue() ? new org.hl7.fhir.r4b.model.IdType(src.getValueAsString()) : new org.hl7.fhir.r4b.model.IdType(); + ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); + return tgt; + } + } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/datatypes43_50/special43_50/ElementDefinition43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/datatypes43_50/special43_50/ElementDefinition43_50.java index af572899a..6c4ad2c45 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/datatypes43_50/special43_50/ElementDefinition43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/datatypes43_50/special43_50/ElementDefinition43_50.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv43_50.datatypes43_50.special43_50; import java.util.stream.Collectors; +import org.hl7.fhir.convertors.VersionConvertorConstants; import org.hl7.fhir.convertors.context.ConversionContext43_50; import org.hl7.fhir.convertors.conv43_50.datatypes43_50.BackboneElement43_50; import org.hl7.fhir.convertors.conv43_50.datatypes43_50.general43_50.Coding43_50; @@ -519,7 +520,9 @@ public class ElementDefinition43_50 { if (src.hasSeverity()) tgt.setSeverityElement(convertConstraintSeverity(src.getSeverityElement())); if (src.hasHuman()) tgt.setHumanElement(String43_50.convertString(src.getHumanElement())); if (src.hasExpression()) tgt.setExpressionElement(String43_50.convertString(src.getExpressionElement())); - if (src.hasXpath()) tgt.setXpathElement(String43_50.convertString(src.getXpathElement())); + if (src.hasXpath()) { + tgt.addExtension(new org.hl7.fhir.r5.model.Extension(org.hl7.fhir.r5.utils.ToolingExtensions.EXT_XPATH_CONSTRAINT, new org.hl7.fhir.r5.model.StringType(src.getXpath()))); + } if (src.hasSource()) tgt.setSourceElement(Canonical43_50.convertCanonical(src.getSourceElement())); return tgt; } @@ -533,7 +536,10 @@ public class ElementDefinition43_50 { if (src.hasSeverity()) tgt.setSeverityElement(convertConstraintSeverity(src.getSeverityElement())); if (src.hasHuman()) tgt.setHumanElement(String43_50.convertString(src.getHumanElement())); if (src.hasExpression()) tgt.setExpressionElement(String43_50.convertString(src.getExpressionElement())); - if (src.hasXpath()) tgt.setXpathElement(String43_50.convertString(src.getXpathElement())); + if (org.hl7.fhir.r5.utils.ToolingExtensions.hasExtension(src, org.hl7.fhir.r5.utils.ToolingExtensions.EXT_XPATH_CONSTRAINT)) { + tgt.setXpath(org.hl7.fhir.r5.utils.ToolingExtensions.readStringExtension(src, org.hl7.fhir.r5.utils.ToolingExtensions.EXT_XPATH_CONSTRAINT)); + } + if (src.hasSource()) tgt.setSourceElement(Canonical43_50.convertCanonical(src.getSourceElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Account43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Account43_50.java index 2520b039e..c561b9be7 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Account43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Account43_50.java @@ -62,7 +62,7 @@ public class Account43_50 { if (src.hasOwner()) tgt.setOwner(Reference43_50.convertReference(src.getOwner())); if (src.hasDescription()) - tgt.setDescriptionElement(String43_50.convertString(src.getDescriptionElement())); + tgt.setDescriptionElement(String43_50.convertStringToMarkdown(src.getDescriptionElement())); for (org.hl7.fhir.r4b.model.Account.GuarantorComponent t : src.getGuarantor()) tgt.addGuarantor(convertGuarantorComponent(t)); // if (src.hasPartOf()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/ActivityDefinition43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/ActivityDefinition43_50.java index 3a9b39bba..c97df92ad 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/ActivityDefinition43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/ActivityDefinition43_50.java @@ -92,7 +92,7 @@ public class ActivityDefinition43_50 { if (src.hasPurpose()) tgt.setPurposeElement(MarkDown43_50.convertMarkdown(src.getPurposeElement())); if (src.hasUsage()) - tgt.setUsageElement(String43_50.convertString(src.getUsageElement())); + tgt.setUsageElement(String43_50.convertStringToMarkdown(src.getUsageElement())); if (src.hasCopyright()) tgt.setCopyrightElement(MarkDown43_50.convertMarkdown(src.getCopyrightElement())); if (src.hasApprovalDate()) @@ -273,9 +273,6 @@ public class ActivityDefinition43_50 { case COMMUNICATIONREQUEST: tgt.setValue(org.hl7.fhir.r5.model.ActivityDefinition.RequestResourceTypes.COMMUNICATIONREQUEST); break; - case CONTRACT: - tgt.setValue(org.hl7.fhir.r5.model.ActivityDefinition.RequestResourceTypes.CONTRACT); - break; case DEVICEREQUEST: tgt.setValue(org.hl7.fhir.r5.model.ActivityDefinition.RequestResourceTypes.DEVICEREQUEST); break; @@ -335,9 +332,6 @@ public class ActivityDefinition43_50 { case COMMUNICATIONREQUEST: tgt.setValue(org.hl7.fhir.r4b.model.ActivityDefinition.RequestResourceType.COMMUNICATIONREQUEST); break; - case CONTRACT: - tgt.setValue(org.hl7.fhir.r4b.model.ActivityDefinition.RequestResourceType.CONTRACT); - break; case DEVICEREQUEST: tgt.setValue(org.hl7.fhir.r4b.model.ActivityDefinition.RequestResourceType.DEVICEREQUEST); break; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Appointment43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Appointment43_50.java index d16b3459a..786b15058 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Appointment43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Appointment43_50.java @@ -325,32 +325,32 @@ public class Appointment43_50 { return tgt; } - static public org.hl7.fhir.r5.model.Enumeration convertParticipationStatus(org.hl7.fhir.r4b.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r5.model.Enumeration convertParticipationStatus(org.hl7.fhir.r4b.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; - org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.ParticipationStatusEnumFactory()); + org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Appointment.ParticipationStatusEnumFactory()); ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); switch (src.getValue()) { case ACCEPTED: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.ACCEPTED); + tgt.setValue(org.hl7.fhir.r5.model.Appointment.ParticipationStatus.ACCEPTED); break; case DECLINED: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.DECLINED); + tgt.setValue(org.hl7.fhir.r5.model.Appointment.ParticipationStatus.DECLINED); break; case TENTATIVE: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.TENTATIVE); + tgt.setValue(org.hl7.fhir.r5.model.Appointment.ParticipationStatus.TENTATIVE); break; case NEEDSACTION: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.NEEDSACTION); + tgt.setValue(org.hl7.fhir.r5.model.Appointment.ParticipationStatus.NEEDSACTION); break; default: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.NULL); + tgt.setValue(org.hl7.fhir.r5.model.Appointment.ParticipationStatus.NULL); break; } return tgt; } - static public org.hl7.fhir.r4b.model.Enumeration convertParticipationStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r4b.model.Enumeration convertParticipationStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4b.model.Enumeration tgt = new org.hl7.fhir.r4b.model.Enumeration<>(new org.hl7.fhir.r4b.model.Enumerations.ParticipationStatusEnumFactory()); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/AppointmentResponse43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/AppointmentResponse43_50.java index a102943ee..5c176302c 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/AppointmentResponse43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/AppointmentResponse43_50.java @@ -59,7 +59,7 @@ public class AppointmentResponse43_50 { if (src.hasParticipantStatus()) tgt.setParticipantStatusElement(convertParticipantStatus(src.getParticipantStatusElement())); if (src.hasComment()) - tgt.setCommentElement(String43_50.convertString(src.getCommentElement())); + tgt.setCommentElement(String43_50.convertStringToMarkdown(src.getCommentElement())); return tgt; } @@ -87,32 +87,32 @@ public class AppointmentResponse43_50 { return tgt; } - static public org.hl7.fhir.r5.model.Enumeration convertParticipantStatus(org.hl7.fhir.r4b.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r5.model.Enumeration convertParticipantStatus(org.hl7.fhir.r4b.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; - org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.ParticipationStatusEnumFactory()); + org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatusEnumFactory()); ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); switch (src.getValue()) { case ACCEPTED: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.ACCEPTED); + tgt.setValue(org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus.ACCEPTED); break; case DECLINED: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.DECLINED); + tgt.setValue(org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus.DECLINED); break; case TENTATIVE: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.TENTATIVE); + tgt.setValue(org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus.TENTATIVE); break; case NEEDSACTION: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.NEEDSACTION); + tgt.setValue(org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus.NEEDSACTION); break; default: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.ParticipationStatus.NULL); + tgt.setValue(org.hl7.fhir.r5.model.AppointmentResponse.AppointmentResponseStatus.NULL); break; } return tgt; } - static public org.hl7.fhir.r4b.model.Enumeration convertParticipantStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r4b.model.Enumeration convertParticipantStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4b.model.Enumeration tgt = new org.hl7.fhir.r4b.model.Enumeration<>(new org.hl7.fhir.r4b.model.Enumerations.ParticipationStatusEnumFactory()); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/BodyStructure43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/BodyStructure43_50.java index 63377a0c6..57c10e66c 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/BodyStructure43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/BodyStructure43_50.java @@ -56,7 +56,7 @@ public class BodyStructure43_50 { // for (org.hl7.fhir.r4b.model.CodeableConcept t : src.getLocationQualifier()) // tgt.addLocationQualifier(CodeableConcept43_50.convertCodeableConcept(t)); if (src.hasDescription()) - tgt.setDescriptionElement(String43_50.convertString(src.getDescriptionElement())); + tgt.setDescriptionElement(String43_50.convertStringToMarkdown(src.getDescriptionElement())); for (org.hl7.fhir.r4b.model.Attachment t : src.getImage()) tgt.addImage(Attachment43_50.convertAttachment(t)); if (src.hasPatient()) tgt.setPatient(Reference43_50.convertReference(src.getPatient())); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/CapabilityStatement43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/CapabilityStatement43_50.java index 756d5879c..1b844c3c4 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/CapabilityStatement43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/CapabilityStatement43_50.java @@ -244,7 +244,7 @@ public class CapabilityStatement43_50 { org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementImplementationComponent tgt = new org.hl7.fhir.r5.model.CapabilityStatement.CapabilityStatementImplementationComponent(); ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt); if (src.hasDescription()) - tgt.setDescriptionElement(String43_50.convertString(src.getDescriptionElement())); + tgt.setDescriptionElement(String43_50.convertStringToMarkdown(src.getDescriptionElement())); if (src.hasUrl()) tgt.setUrlElement(Url43_50.convertUrl(src.getUrlElement())); if (src.hasCustodian()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/CarePlan43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/CarePlan43_50.java index a814a38fb..85db2cec1 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/CarePlan43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/CarePlan43_50.java @@ -273,8 +273,8 @@ public class CarePlan43_50 { for (org.hl7.fhir.r4b.model.Annotation t : src.getProgress()) tgt.addProgress(Annotation43_50.convertAnnotation(t)); if (src.hasReference()) tgt.setPlannedActivityReference(Reference43_50.convertReference(src.getReference())); - if (src.hasDetail()) - tgt.setPlannedActivityDetail(convertCarePlanActivityDetailComponent(src.getDetail())); +// if (src.hasDetail()) +// tgt.setPlannedActivityDetail(convertCarePlanActivityDetailComponent(src.getDetail())); return tgt; } @@ -292,244 +292,244 @@ public class CarePlan43_50 { for (org.hl7.fhir.r5.model.Annotation t : src.getProgress()) tgt.addProgress(Annotation43_50.convertAnnotation(t)); if (src.hasPlannedActivityReference()) tgt.setReference(Reference43_50.convertReference(src.getPlannedActivityReference())); - if (src.hasPlannedActivityDetail()) - tgt.setDetail(convertCarePlanActivityDetailComponent(src.getPlannedActivityDetail())); +// if (src.hasPlannedActivityDetail()) +// tgt.setDetail(convertCarePlanActivityDetailComponent(src.getPlannedActivityDetail())); return tgt; } - public static org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent convertCarePlanActivityDetailComponent(org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityDetailComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent tgt = new org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent(); - ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt); - if (src.hasKind()) - tgt.setKindElement(convertCarePlanActivityKind(src.getKindElement())); - for (org.hl7.fhir.r4b.model.CanonicalType t : src.getInstantiatesCanonical()) - tgt.getInstantiatesCanonical().add(Canonical43_50.convertCanonical(t)); - for (org.hl7.fhir.r4b.model.UriType t : src.getInstantiatesUri()) - tgt.getInstantiatesUri().add(Uri43_50.convertUri(t)); - if (src.hasCode()) - tgt.setCode(CodeableConcept43_50.convertCodeableConcept(src.getCode())); - for (org.hl7.fhir.r4b.model.CodeableConcept t : src.getReasonCode()) - tgt.addReason(CodeableConcept43_50.convertCodeableConceptToCodeableReference(t)); - for (org.hl7.fhir.r4b.model.Reference t : src.getReasonReference()) - tgt.addReason(Reference43_50.convertReferenceToCodeableReference(t)); - for (org.hl7.fhir.r4b.model.Reference t : src.getGoal()) tgt.addGoal(Reference43_50.convertReference(t)); - if (src.hasStatus()) - tgt.setStatusElement(convertCarePlanActivityStatus(src.getStatusElement())); - if (src.hasStatusReason()) - tgt.setStatusReason(CodeableConcept43_50.convertCodeableConcept(src.getStatusReason())); - if (src.hasDoNotPerform()) - tgt.setDoNotPerformElement(Boolean43_50.convertBoolean(src.getDoNotPerformElement())); - if (src.hasScheduled()) - tgt.setScheduled(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getScheduled())); - if (src.hasLocation()) - tgt.getLocation().setReference(Reference43_50.convertReference(src.getLocation())); - for (org.hl7.fhir.r4b.model.Reference t : src.getPerformer()) tgt.addPerformer(Reference43_50.convertReference(t)); - if (src.hasProduct()) - tgt.setProduct(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getProduct())); - if (src.hasDailyAmount()) - tgt.setDailyAmount(SimpleQuantity43_50.convertSimpleQuantity(src.getDailyAmount())); - if (src.hasQuantity()) - tgt.setQuantity(SimpleQuantity43_50.convertSimpleQuantity(src.getQuantity())); - if (src.hasDescription()) - tgt.setDescriptionElement(String43_50.convertString(src.getDescriptionElement())); - return tgt; - } - - public static org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityDetailComponent convertCarePlanActivityDetailComponent(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityDetailComponent tgt = new org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityDetailComponent(); - ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt); - if (src.hasKind()) - tgt.setKindElement(convertCarePlanActivityKind(src.getKindElement())); - for (org.hl7.fhir.r5.model.CanonicalType t : src.getInstantiatesCanonical()) - tgt.getInstantiatesCanonical().add(Canonical43_50.convertCanonical(t)); - for (org.hl7.fhir.r5.model.UriType t : src.getInstantiatesUri()) - tgt.getInstantiatesUri().add(Uri43_50.convertUri(t)); - if (src.hasCode()) - tgt.setCode(CodeableConcept43_50.convertCodeableConcept(src.getCode())); - for (CodeableReference t : src.getReason()) - if (t.hasConcept()) - tgt.addReasonCode(CodeableConcept43_50.convertCodeableConcept(t.getConcept())); - for (CodeableReference t : src.getReason()) - if (t.hasReference()) - tgt.addReasonReference(Reference43_50.convertReference(t.getReference())); - for (org.hl7.fhir.r5.model.Reference t : src.getGoal()) tgt.addGoal(Reference43_50.convertReference(t)); - if (src.hasStatus()) - tgt.setStatusElement(convertCarePlanActivityStatus(src.getStatusElement())); - if (src.hasStatusReason()) - tgt.setStatusReason(CodeableConcept43_50.convertCodeableConcept(src.getStatusReason())); - if (src.hasDoNotPerform()) - tgt.setDoNotPerformElement(Boolean43_50.convertBoolean(src.getDoNotPerformElement())); - if (src.hasScheduled()) - tgt.setScheduled(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getScheduled())); - if (src.getLocation().hasReference()) - tgt.setLocation(Reference43_50.convertReference(src.getLocation().getReference())); - for (org.hl7.fhir.r5.model.Reference t : src.getPerformer()) tgt.addPerformer(Reference43_50.convertReference(t)); - if (src.hasProduct()) - tgt.setProduct(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getProduct())); - if (src.hasDailyAmount()) - tgt.setDailyAmount(SimpleQuantity43_50.convertSimpleQuantity(src.getDailyAmount())); - if (src.hasQuantity()) - tgt.setQuantity(SimpleQuantity43_50.convertSimpleQuantity(src.getQuantity())); - if (src.hasDescription()) - tgt.setDescriptionElement(String43_50.convertString(src.getDescriptionElement())); - return tgt; - } - - static public org.hl7.fhir.r5.model.Enumeration convertCarePlanActivityKind(org.hl7.fhir.r4b.model.Enumeration src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKindEnumFactory()); - ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); - switch (src.getValue()) { - case APPOINTMENT: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.APPOINTMENT); - break; - case COMMUNICATIONREQUEST: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.COMMUNICATIONREQUEST); - break; - case DEVICEREQUEST: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.DEVICEREQUEST); - break; - case MEDICATIONREQUEST: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.MEDICATIONREQUEST); - break; - case NUTRITIONORDER: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.NUTRITIONORDER); - break; - case TASK: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.TASK); - break; - case SERVICEREQUEST: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.SERVICEREQUEST); - break; - case VISIONPRESCRIPTION: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.VISIONPRESCRIPTION); - break; - default: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.NULL); - break; - } - return tgt; - } - - static public org.hl7.fhir.r4b.model.Enumeration convertCarePlanActivityKind(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4b.model.Enumeration tgt = new org.hl7.fhir.r4b.model.Enumeration<>(new org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityKindEnumFactory()); - ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); - switch (src.getValue()) { - case APPOINTMENT: - tgt.setValue(org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityKind.APPOINTMENT); - break; - case COMMUNICATIONREQUEST: - tgt.setValue(org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityKind.COMMUNICATIONREQUEST); - break; - case DEVICEREQUEST: - tgt.setValue(org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityKind.DEVICEREQUEST); - break; - case MEDICATIONREQUEST: - tgt.setValue(org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityKind.MEDICATIONREQUEST); - break; - case NUTRITIONORDER: - tgt.setValue(org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityKind.NUTRITIONORDER); - break; - case TASK: - tgt.setValue(org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityKind.TASK); - break; - case SERVICEREQUEST: - tgt.setValue(org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityKind.SERVICEREQUEST); - break; - case VISIONPRESCRIPTION: - tgt.setValue(org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityKind.VISIONPRESCRIPTION); - break; - default: - tgt.setValue(org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityKind.NULL); - break; - } - return tgt; - } - - static public org.hl7.fhir.r5.model.Enumeration convertCarePlanActivityStatus(org.hl7.fhir.r4b.model.Enumeration src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatusEnumFactory()); - ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); - switch (src.getValue()) { - case NOTSTARTED: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.NOTSTARTED); - break; - case SCHEDULED: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.SCHEDULED); - break; - case INPROGRESS: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.INPROGRESS); - break; - case ONHOLD: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.ONHOLD); - break; - case COMPLETED: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.COMPLETED); - break; - case CANCELLED: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.CANCELLED); - break; - case STOPPED: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.STOPPED); - break; - case UNKNOWN: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.UNKNOWN); - break; - case ENTEREDINERROR: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.ENTEREDINERROR); - break; - default: - tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.NULL); - break; - } - return tgt; - } - - static public org.hl7.fhir.r4b.model.Enumeration convertCarePlanActivityStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { - if (src == null || src.isEmpty()) - return null; - org.hl7.fhir.r4b.model.Enumeration tgt = new org.hl7.fhir.r4b.model.Enumeration<>(new org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityStatusEnumFactory()); - ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); - switch (src.getValue()) { - case NOTSTARTED: - tgt.setValue(org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityStatus.NOTSTARTED); - break; - case SCHEDULED: - tgt.setValue(org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityStatus.SCHEDULED); - break; - case INPROGRESS: - tgt.setValue(org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityStatus.INPROGRESS); - break; - case ONHOLD: - tgt.setValue(org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityStatus.ONHOLD); - break; - case COMPLETED: - tgt.setValue(org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityStatus.COMPLETED); - break; - case CANCELLED: - tgt.setValue(org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityStatus.CANCELLED); - break; - case STOPPED: - tgt.setValue(org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityStatus.STOPPED); - break; - case UNKNOWN: - tgt.setValue(org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityStatus.UNKNOWN); - break; - case ENTEREDINERROR: - tgt.setValue(org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityStatus.ENTEREDINERROR); - break; - default: - tgt.setValue(org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityStatus.NULL); - break; - } - return tgt; - } +// public static org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent convertCarePlanActivityDetailComponent(org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityDetailComponent src) throws FHIRException { +// if (src == null) +// return null; +// org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent tgt = new org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent(); +// ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt); +// if (src.hasKind()) +// tgt.setKindElement(convertCarePlanActivityKind(src.getKindElement())); +// for (org.hl7.fhir.r4b.model.CanonicalType t : src.getInstantiatesCanonical()) +// tgt.getInstantiatesCanonical().add(Canonical43_50.convertCanonical(t)); +// for (org.hl7.fhir.r4b.model.UriType t : src.getInstantiatesUri()) +// tgt.getInstantiatesUri().add(Uri43_50.convertUri(t)); +// if (src.hasCode()) +// tgt.setCode(CodeableConcept43_50.convertCodeableConcept(src.getCode())); +// for (org.hl7.fhir.r4b.model.CodeableConcept t : src.getReasonCode()) +// tgt.addReason(CodeableConcept43_50.convertCodeableConceptToCodeableReference(t)); +// for (org.hl7.fhir.r4b.model.Reference t : src.getReasonReference()) +// tgt.addReason(Reference43_50.convertReferenceToCodeableReference(t)); +// for (org.hl7.fhir.r4b.model.Reference t : src.getGoal()) tgt.addGoal(Reference43_50.convertReference(t)); +// if (src.hasStatus()) +// tgt.setStatusElement(convertCarePlanActivityStatus(src.getStatusElement())); +// if (src.hasStatusReason()) +// tgt.setStatusReason(CodeableConcept43_50.convertCodeableConcept(src.getStatusReason())); +// if (src.hasDoNotPerform()) +// tgt.setDoNotPerformElement(Boolean43_50.convertBoolean(src.getDoNotPerformElement())); +// if (src.hasScheduled()) +// tgt.setScheduled(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getScheduled())); +// if (src.hasLocation()) +// tgt.getLocation().setReference(Reference43_50.convertReference(src.getLocation())); +// for (org.hl7.fhir.r4b.model.Reference t : src.getPerformer()) tgt.addPerformer(Reference43_50.convertReference(t)); +// if (src.hasProduct()) +// tgt.setProduct(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getProduct())); +// if (src.hasDailyAmount()) +// tgt.setDailyAmount(SimpleQuantity43_50.convertSimpleQuantity(src.getDailyAmount())); +// if (src.hasQuantity()) +// tgt.setQuantity(SimpleQuantity43_50.convertSimpleQuantity(src.getQuantity())); +// if (src.hasDescription()) +// tgt.setDescriptionElement(String43_50.convertString(src.getDescriptionElement())); +// return tgt; +// } +// +// public static org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityDetailComponent convertCarePlanActivityDetailComponent(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityPlannedActivityDetailComponent src) throws FHIRException { +// if (src == null) +// return null; +// org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityDetailComponent tgt = new org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityDetailComponent(); +// ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt); +// if (src.hasKind()) +// tgt.setKindElement(convertCarePlanActivityKind(src.getKindElement())); +// for (org.hl7.fhir.r5.model.CanonicalType t : src.getInstantiatesCanonical()) +// tgt.getInstantiatesCanonical().add(Canonical43_50.convertCanonical(t)); +// for (org.hl7.fhir.r5.model.UriType t : src.getInstantiatesUri()) +// tgt.getInstantiatesUri().add(Uri43_50.convertUri(t)); +// if (src.hasCode()) +// tgt.setCode(CodeableConcept43_50.convertCodeableConcept(src.getCode())); +// for (CodeableReference t : src.getReason()) +// if (t.hasConcept()) +// tgt.addReasonCode(CodeableConcept43_50.convertCodeableConcept(t.getConcept())); +// for (CodeableReference t : src.getReason()) +// if (t.hasReference()) +// tgt.addReasonReference(Reference43_50.convertReference(t.getReference())); +// for (org.hl7.fhir.r5.model.Reference t : src.getGoal()) tgt.addGoal(Reference43_50.convertReference(t)); +// if (src.hasStatus()) +// tgt.setStatusElement(convertCarePlanActivityStatus(src.getStatusElement())); +// if (src.hasStatusReason()) +// tgt.setStatusReason(CodeableConcept43_50.convertCodeableConcept(src.getStatusReason())); +// if (src.hasDoNotPerform()) +// tgt.setDoNotPerformElement(Boolean43_50.convertBoolean(src.getDoNotPerformElement())); +// if (src.hasScheduled()) +// tgt.setScheduled(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getScheduled())); +// if (src.getLocation().hasReference()) +// tgt.setLocation(Reference43_50.convertReference(src.getLocation().getReference())); +// for (org.hl7.fhir.r5.model.Reference t : src.getPerformer()) tgt.addPerformer(Reference43_50.convertReference(t)); +// if (src.hasProduct()) +// tgt.setProduct(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getProduct())); +// if (src.hasDailyAmount()) +// tgt.setDailyAmount(SimpleQuantity43_50.convertSimpleQuantity(src.getDailyAmount())); +// if (src.hasQuantity()) +// tgt.setQuantity(SimpleQuantity43_50.convertSimpleQuantity(src.getQuantity())); +// if (src.hasDescription()) +// tgt.setDescriptionElement(String43_50.convertString(src.getDescriptionElement())); +// return tgt; +// } +// +// static public org.hl7.fhir.r5.model.Enumeration convertCarePlanActivityKind(org.hl7.fhir.r4b.model.Enumeration src) throws FHIRException { +// if (src == null || src.isEmpty()) +// return null; +// org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKindEnumFactory()); +// ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); +// switch (src.getValue()) { +// case APPOINTMENT: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.APPOINTMENT); +// break; +// case COMMUNICATIONREQUEST: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.COMMUNICATIONREQUEST); +// break; +// case DEVICEREQUEST: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.DEVICEREQUEST); +// break; +// case MEDICATIONREQUEST: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.MEDICATIONREQUEST); +// break; +// case NUTRITIONORDER: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.NUTRITIONORDER); +// break; +// case TASK: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.TASK); +// break; +// case SERVICEREQUEST: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.SERVICEREQUEST); +// break; +// case VISIONPRESCRIPTION: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.VISIONPRESCRIPTION); +// break; +// default: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityKind.NULL); +// break; +// } +// return tgt; +// } +// +// static public org.hl7.fhir.r4b.model.Enumeration convertCarePlanActivityKind(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { +// if (src == null || src.isEmpty()) +// return null; +// org.hl7.fhir.r4b.model.Enumeration tgt = new org.hl7.fhir.r4b.model.Enumeration<>(new org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityKindEnumFactory()); +// ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); +// switch (src.getValue()) { +// case APPOINTMENT: +// tgt.setValue(org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityKind.APPOINTMENT); +// break; +// case COMMUNICATIONREQUEST: +// tgt.setValue(org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityKind.COMMUNICATIONREQUEST); +// break; +// case DEVICEREQUEST: +// tgt.setValue(org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityKind.DEVICEREQUEST); +// break; +// case MEDICATIONREQUEST: +// tgt.setValue(org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityKind.MEDICATIONREQUEST); +// break; +// case NUTRITIONORDER: +// tgt.setValue(org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityKind.NUTRITIONORDER); +// break; +// case TASK: +// tgt.setValue(org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityKind.TASK); +// break; +// case SERVICEREQUEST: +// tgt.setValue(org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityKind.SERVICEREQUEST); +// break; +// case VISIONPRESCRIPTION: +// tgt.setValue(org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityKind.VISIONPRESCRIPTION); +// break; +// default: +// tgt.setValue(org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityKind.NULL); +// break; +// } +// return tgt; +// } +// +// static public org.hl7.fhir.r5.model.Enumeration convertCarePlanActivityStatus(org.hl7.fhir.r4b.model.Enumeration src) throws FHIRException { +// if (src == null || src.isEmpty()) +// return null; +// org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatusEnumFactory()); +// ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); +// switch (src.getValue()) { +// case NOTSTARTED: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.NOTSTARTED); +// break; +// case SCHEDULED: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.SCHEDULED); +// break; +// case INPROGRESS: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.INPROGRESS); +// break; +// case ONHOLD: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.ONHOLD); +// break; +// case COMPLETED: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.COMPLETED); +// break; +// case CANCELLED: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.CANCELLED); +// break; +// case STOPPED: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.STOPPED); +// break; +// case UNKNOWN: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.UNKNOWN); +// break; +// case ENTEREDINERROR: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.ENTEREDINERROR); +// break; +// default: +// tgt.setValue(org.hl7.fhir.r5.model.CarePlan.CarePlanActivityStatus.NULL); +// break; +// } +// return tgt; +// } +// +// static public org.hl7.fhir.r4b.model.Enumeration convertCarePlanActivityStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { +// if (src == null || src.isEmpty()) +// return null; +// org.hl7.fhir.r4b.model.Enumeration tgt = new org.hl7.fhir.r4b.model.Enumeration<>(new org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityStatusEnumFactory()); +// ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); +// switch (src.getValue()) { +// case NOTSTARTED: +// tgt.setValue(org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityStatus.NOTSTARTED); +// break; +// case SCHEDULED: +// tgt.setValue(org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityStatus.SCHEDULED); +// break; +// case INPROGRESS: +// tgt.setValue(org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityStatus.INPROGRESS); +// break; +// case ONHOLD: +// tgt.setValue(org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityStatus.ONHOLD); +// break; +// case COMPLETED: +// tgt.setValue(org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityStatus.COMPLETED); +// break; +// case CANCELLED: +// tgt.setValue(org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityStatus.CANCELLED); +// break; +// case STOPPED: +// tgt.setValue(org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityStatus.STOPPED); +// break; +// case UNKNOWN: +// tgt.setValue(org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityStatus.UNKNOWN); +// break; +// case ENTEREDINERROR: +// tgt.setValue(org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityStatus.ENTEREDINERROR); +// break; +// default: +// tgt.setValue(org.hl7.fhir.r4b.model.CarePlan.CarePlanActivityStatus.NULL); +// break; +// } +// return tgt; +// } } \ No newline at end of file diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/ClaimResponse43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/ClaimResponse43_50.java index 272d33d33..962d9442c 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/ClaimResponse43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/ClaimResponse43_50.java @@ -353,7 +353,7 @@ public class ClaimResponse43_50 { if (src.hasAmount()) tgt.setAmount(Money43_50.convertMoney(src.getAmount())); if (src.hasValue()) - tgt.setValueElement(Decimal43_50.convertDecimal(src.getValueElement())); + tgt.setQuantity(Decimal43_50.convertDecimalToQuantity(src.getValueElement())); return tgt; } @@ -368,8 +368,8 @@ public class ClaimResponse43_50 { tgt.setReason(CodeableConcept43_50.convertCodeableConcept(src.getReason())); if (src.hasAmount()) tgt.setAmount(Money43_50.convertMoney(src.getAmount())); - if (src.hasValue()) - tgt.setValueElement(Decimal43_50.convertDecimal(src.getValueElement())); + if (src.hasQuantity()) + tgt.setValueElement(Decimal43_50.convertDecimal(src.getQuantity().getValueElement())); return tgt; } @@ -691,7 +691,7 @@ public class ClaimResponse43_50 { if (src.hasNumber()) tgt.setNumberElement(PositiveInt43_50.convertPositiveInt(src.getNumberElement())); if (src.hasType()) - tgt.setTypeElement(Enumerations43_50.convertNoteType(src.getTypeElement())); + tgt.getType().addCoding().setSystem("http://hl7.org/fhir/note-type").setCode(src.getType().toCode()); if (src.hasText()) tgt.setTextElement(String43_50.convertString(src.getTextElement())); if (src.hasLanguage()) @@ -706,8 +706,8 @@ public class ClaimResponse43_50 { ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt); if (src.hasNumber()) tgt.setNumberElement(PositiveInt43_50.convertPositiveInt(src.getNumberElement())); - if (src.hasType()) - tgt.setTypeElement(Enumerations43_50.convertNoteType(src.getTypeElement())); + if (src.hasType() && src.getType().hasCoding("http://hl7.org/fhir/note-type")) + tgt.setType(org.hl7.fhir.r4b.model.Enumerations.NoteType.fromCode(src.getType().getCode("http://hl7.org/fhir/note-type"))); if (src.hasText()) tgt.setTextElement(String43_50.convertString(src.getTextElement())); if (src.hasLanguage()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/ConceptMap43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/ConceptMap43_50.java index b26cc19a0..aca58d330 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/ConceptMap43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/ConceptMap43_50.java @@ -93,7 +93,7 @@ public class ConceptMap43_50 { if (src.hasTarget()) tgt.setTargetScope(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getTarget())); for (org.hl7.fhir.r4b.model.ConceptMap.ConceptMapGroupComponent t : src.getGroup()) - tgt.addGroup(convertConceptMapGroupComponent(t)); + tgt.addGroup(convertConceptMapGroupComponent(t, tgt)); return tgt; } @@ -137,11 +137,11 @@ public class ConceptMap43_50 { if (src.hasTargetScope()) tgt.setTarget(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getTargetScope())); for (org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent t : src.getGroup()) - tgt.addGroup(convertConceptMapGroupComponent(t)); + tgt.addGroup(convertConceptMapGroupComponent(t, src)); return tgt; } - public static org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent convertConceptMapGroupComponent(org.hl7.fhir.r4b.model.ConceptMap.ConceptMapGroupComponent src) throws FHIRException { + public static org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent convertConceptMapGroupComponent(org.hl7.fhir.r4b.model.ConceptMap.ConceptMapGroupComponent src, org.hl7.fhir.r5.model.ConceptMap tgtMap) throws FHIRException { if (src == null) return null; org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent tgt = new org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent(); @@ -151,7 +151,7 @@ public class ConceptMap43_50 { if (src.hasTarget() || src.hasTargetVersion()) tgt.setTargetElement(convertUriAndVersionToCanonical(src.getTargetElement(), src.getTargetVersionElement())); for (org.hl7.fhir.r4b.model.ConceptMap.SourceElementComponent t : src.getElement()) - tgt.addElement(convertSourceElementComponent(t)); + tgt.addElement(convertSourceElementComponent(t, tgtMap)); if (src.hasUnmapped()) tgt.setUnmapped(convertConceptMapGroupUnmappedComponent(src.getUnmapped())); return tgt; @@ -172,7 +172,7 @@ public class ConceptMap43_50 { return tgt; } - public static org.hl7.fhir.r4b.model.ConceptMap.ConceptMapGroupComponent convertConceptMapGroupComponent(org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent src) throws FHIRException { + public static org.hl7.fhir.r4b.model.ConceptMap.ConceptMapGroupComponent convertConceptMapGroupComponent(org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent src, org.hl7.fhir.r5.model.ConceptMap srcMap) throws FHIRException { if (src == null) return null; org.hl7.fhir.r4b.model.ConceptMap.ConceptMapGroupComponent tgt = new org.hl7.fhir.r4b.model.ConceptMap.ConceptMapGroupComponent(); @@ -188,13 +188,13 @@ public class ConceptMap43_50 { tgt.setTargetVersion(cp.getVersion()); } for (org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent t : src.getElement()) - tgt.addElement(convertSourceElementComponent(t)); + tgt.addElement(convertSourceElementComponent(t, srcMap)); if (src.hasUnmapped()) tgt.setUnmapped(convertConceptMapGroupUnmappedComponent(src.getUnmapped())); return tgt; } - public static org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent convertSourceElementComponent(org.hl7.fhir.r4b.model.ConceptMap.SourceElementComponent src) throws FHIRException { + public static org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent convertSourceElementComponent(org.hl7.fhir.r4b.model.ConceptMap.SourceElementComponent src, org.hl7.fhir.r5.model.ConceptMap tgtMap) throws FHIRException { if (src == null) return null; org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent(); @@ -207,13 +207,13 @@ public class ConceptMap43_50 { if (t.getEquivalence() == org.hl7.fhir.r4b.model.ConceptMap.ConceptMapEquivalence.UNMATCHED) { tgt.setNoMap(true); } else { - tgt.addTarget(convertTargetElementComponent(t)); + tgt.addTarget(convertTargetElementComponent(t, tgtMap)); } } return tgt; } - public static org.hl7.fhir.r4b.model.ConceptMap.SourceElementComponent convertSourceElementComponent(org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent src) throws FHIRException { + public static org.hl7.fhir.r4b.model.ConceptMap.SourceElementComponent convertSourceElementComponent(org.hl7.fhir.r5.model.ConceptMap.SourceElementComponent src, org.hl7.fhir.r5.model.ConceptMap srcMap) throws FHIRException { if (src == null) return null; org.hl7.fhir.r4b.model.ConceptMap.SourceElementComponent tgt = new org.hl7.fhir.r4b.model.ConceptMap.SourceElementComponent(); @@ -226,12 +226,12 @@ public class ConceptMap43_50 { tgt.addTarget(new org.hl7.fhir.r4b.model.ConceptMap.TargetElementComponent().setEquivalence(org.hl7.fhir.r4b.model.ConceptMap.ConceptMapEquivalence.UNMATCHED)); } else { for (org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent t : src.getTarget()) - tgt.addTarget(convertTargetElementComponent(t)); + tgt.addTarget(convertTargetElementComponent(t, srcMap)); } return tgt; } - public static org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.r4b.model.ConceptMap.TargetElementComponent src) throws FHIRException { + public static org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.r4b.model.ConceptMap.TargetElementComponent src, org.hl7.fhir.r5.model.ConceptMap tgtMap) throws FHIRException { if (src == null) return null; org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent(); @@ -245,13 +245,13 @@ public class ConceptMap43_50 { if (src.hasComment()) tgt.setCommentElement(String43_50.convertString(src.getCommentElement())); for (org.hl7.fhir.r4b.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) - tgt.addDependsOn(convertOtherElementComponent(t)); + tgt.addDependsOn(convertOtherElementComponent(t, tgtMap)); for (org.hl7.fhir.r4b.model.ConceptMap.OtherElementComponent t : src.getProduct()) - tgt.addProduct(convertOtherElementComponent(t)); + tgt.addProduct(convertOtherElementComponent(t, tgtMap)); return tgt; } - public static org.hl7.fhir.r4b.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent src) throws FHIRException { + public static org.hl7.fhir.r4b.model.ConceptMap.TargetElementComponent convertTargetElementComponent(org.hl7.fhir.r5.model.ConceptMap.TargetElementComponent src, org.hl7.fhir.r5.model.ConceptMap srcMap) throws FHIRException { if (src == null) return null; org.hl7.fhir.r4b.model.ConceptMap.TargetElementComponent tgt = new org.hl7.fhir.r4b.model.ConceptMap.TargetElementComponent(); @@ -267,9 +267,9 @@ public class ConceptMap43_50 { if (src.hasComment()) tgt.setCommentElement(String43_50.convertString(src.getCommentElement())); for (org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent t : src.getDependsOn()) - tgt.addDependsOn(convertOtherElementComponent(t)); + tgt.addDependsOn(convertOtherElementComponent(t, srcMap)); for (org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent t : src.getProduct()) - tgt.addProduct(convertOtherElementComponent(t)); + tgt.addProduct(convertOtherElementComponent(t, srcMap)); return tgt; } @@ -349,13 +349,13 @@ public class ConceptMap43_50 { return tgt; } - public static org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.r4b.model.ConceptMap.OtherElementComponent src) throws FHIRException { + public static org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.r4b.model.ConceptMap.OtherElementComponent src, org.hl7.fhir.r5.model.ConceptMap tgtMap) throws FHIRException { if (src == null) return null; org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent(); ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt); if (src.hasProperty()) - tgt.setPropertyElement(Uri43_50.convertUri(src.getPropertyElement())); + tgt.setAttribute(tgtMap.registerAttribute(src.getProperty())); if (src.hasSystem()) { tgt.setValue(new Coding().setSystem(src.getSystem()).setCode(src.getValue()).setDisplay(src.getDisplay())); } else if (src.hasValueElement()) { @@ -364,13 +364,13 @@ public class ConceptMap43_50 { return tgt; } - public static org.hl7.fhir.r4b.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent src) throws FHIRException { + public static org.hl7.fhir.r4b.model.ConceptMap.OtherElementComponent convertOtherElementComponent(org.hl7.fhir.r5.model.ConceptMap.OtherElementComponent src, org.hl7.fhir.r5.model.ConceptMap srcMap) throws FHIRException { if (src == null) return null; org.hl7.fhir.r4b.model.ConceptMap.OtherElementComponent tgt = new org.hl7.fhir.r4b.model.ConceptMap.OtherElementComponent(); ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt); - if (src.hasProperty()) - tgt.setPropertyElement(Uri43_50.convertUri(src.getPropertyElement())); + if (src.hasAttribute()) + tgt.setProperty(srcMap.getAttributeUri(src.getAttribute())); if (src.hasValueCoding()) { tgt.setSystem(src.getValueCoding().getSystem()); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Consent43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Consent43_50.java index 5fc36a676..331ca4730 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Consent43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Consent43_50.java @@ -72,7 +72,7 @@ public class Consent43_50 { for (org.hl7.fhir.r4b.model.Consent.ConsentVerificationComponent t : src.getVerification()) tgt.addVerification(convertConsentVerificationComponent(t)); if (src.hasProvision()) - tgt.setProvision(convertprovisionComponent(src.getProvision())); + tgt.addProvision(convertprovisionComponent(src.getProvision())); return tgt; } @@ -108,7 +108,7 @@ public class Consent43_50 { for (org.hl7.fhir.r5.model.Consent.ConsentVerificationComponent t : src.getVerification()) tgt.addVerification(convertConsentVerificationComponent(t)); if (src.hasProvision()) - tgt.setProvision(convertprovisionComponent(src.getProvision())); + tgt.setProvision(convertprovisionComponent(src.getProvisionFirstRep())); return tgt; } @@ -225,8 +225,8 @@ public class Consent43_50 { return null; org.hl7.fhir.r5.model.Consent.ProvisionComponent tgt = new org.hl7.fhir.r5.model.Consent.ProvisionComponent(); ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt); - if (src.hasType()) - tgt.setTypeElement(convertConsentProvisionType(src.getTypeElement())); +// if (src.hasType()) +// tgt.setTypeElement(convertConsentProvisionType(src.getTypeElement())); if (src.hasPeriod()) tgt.setPeriod(Period43_50.convertPeriod(src.getPeriod())); for (org.hl7.fhir.r4b.model.Consent.ProvisionActorComponent t : src.getActor()) @@ -252,8 +252,8 @@ public class Consent43_50 { return null; org.hl7.fhir.r4b.model.Consent.ProvisionComponent tgt = new org.hl7.fhir.r4b.model.Consent.ProvisionComponent(); ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt); - if (src.hasType()) - tgt.setTypeElement(convertConsentProvisionType(src.getTypeElement())); +// if (src.hasType()) +// tgt.setTypeElement(convertConsentProvisionType(src.getTypeElement())); if (src.hasPeriod()) tgt.setPeriod(Period43_50.convertPeriod(src.getPeriod())); for (org.hl7.fhir.r5.model.Consent.ProvisionActorComponent t : src.getActor()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/DetectedIssue43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/DetectedIssue43_50.java index 1e6e9cfb6..49c034572 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/DetectedIssue43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/DetectedIssue43_50.java @@ -63,7 +63,7 @@ public class DetectedIssue43_50 { for (org.hl7.fhir.r4b.model.DetectedIssue.DetectedIssueEvidenceComponent t : src.getEvidence()) tgt.addEvidence(convertDetectedIssueEvidenceComponent(t)); if (src.hasDetail()) - tgt.setDetailElement(String43_50.convertString(src.getDetailElement())); + tgt.setDetailElement(String43_50.convertStringToMarkdown(src.getDetailElement())); if (src.hasReference()) tgt.setReferenceElement(Uri43_50.convertUri(src.getReferenceElement())); for (org.hl7.fhir.r4b.model.DetectedIssue.DetectedIssueMitigationComponent t : src.getMitigation()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Device43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Device43_50.java index 32a1bfa72..f387ef80e 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Device43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Device43_50.java @@ -72,7 +72,7 @@ public class Device43_50 { if (src.hasSerialNumber()) tgt.setSerialNumberElement(String43_50.convertString(src.getSerialNumberElement())); for (org.hl7.fhir.r4b.model.Device.DeviceDeviceNameComponent t : src.getDeviceName()) - tgt.addDeviceName(convertDeviceDeviceNameComponent(t)); + tgt.addName(convertDeviceDeviceNameComponent(t)); if (src.hasModelNumber()) tgt.setModelNumberElement(String43_50.convertString(src.getModelNumberElement())); if (src.hasPartNumber()) @@ -85,8 +85,8 @@ public class Device43_50 { tgt.addVersion(convertDeviceVersionComponent(t)); for (org.hl7.fhir.r4b.model.Device.DevicePropertyComponent t : src.getProperty()) tgt.addProperty(convertDevicePropertyComponent(t)); - if (src.hasPatient()) - tgt.getAssociationFirstRep().setHumanSubject(Reference43_50.convertReference(src.getPatient())); +// if (src.hasPatient()) +// tgt.getAssociationFirstRep().setHumanSubject(Reference43_50.convertReference(src.getPatient())); if (src.hasOwner()) tgt.setOwner(Reference43_50.convertReference(src.getOwner())); for (org.hl7.fhir.r4b.model.ContactPoint t : src.getContact()) @@ -130,7 +130,7 @@ public class Device43_50 { tgt.setLotNumberElement(String43_50.convertString(src.getLotNumberElement())); if (src.hasSerialNumber()) tgt.setSerialNumberElement(String43_50.convertString(src.getSerialNumberElement())); - for (org.hl7.fhir.r5.model.Device.DeviceDeviceNameComponent t : src.getDeviceName()) + for (org.hl7.fhir.r5.model.Device.DeviceNameComponent t : src.getName()) tgt.addDeviceName(convertDeviceDeviceNameComponent(t)); if (src.hasModelNumber()) tgt.setModelNumberElement(String43_50.convertString(src.getModelNumberElement())); @@ -144,8 +144,8 @@ public class Device43_50 { tgt.addVersion(convertDeviceVersionComponent(t)); for (org.hl7.fhir.r5.model.Device.DevicePropertyComponent t : src.getProperty()) tgt.addProperty(convertDevicePropertyComponent(t)); - if (src.getAssociationFirstRep().hasHumanSubject()) - tgt.setPatient(Reference43_50.convertReference(src.getAssociationFirstRep().getHumanSubject())); +// if (src.getAssociationFirstRep().hasHumanSubject()) +// tgt.setPatient(Reference43_50.convertReference(src.getAssociationFirstRep().getHumanSubject())); if (src.hasOwner()) tgt.setOwner(Reference43_50.convertReference(src.getOwner())); for (org.hl7.fhir.r5.model.ContactPoint t : src.getContact()) @@ -311,25 +311,25 @@ public class Device43_50 { return tgt; } - public static org.hl7.fhir.r5.model.Device.DeviceDeviceNameComponent convertDeviceDeviceNameComponent(org.hl7.fhir.r4b.model.Device.DeviceDeviceNameComponent src) throws FHIRException { + public static org.hl7.fhir.r5.model.Device.DeviceNameComponent convertDeviceDeviceNameComponent(org.hl7.fhir.r4b.model.Device.DeviceDeviceNameComponent src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r5.model.Device.DeviceDeviceNameComponent tgt = new org.hl7.fhir.r5.model.Device.DeviceDeviceNameComponent(); + org.hl7.fhir.r5.model.Device.DeviceNameComponent tgt = new org.hl7.fhir.r5.model.Device.DeviceNameComponent(); ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt); if (src.hasName()) - tgt.setNameElement(String43_50.convertString(src.getNameElement())); + tgt.setValueElement(String43_50.convertString(src.getNameElement())); if (src.hasType()) tgt.setTypeElement(convertDeviceNameType(src.getTypeElement())); return tgt; } - public static org.hl7.fhir.r4b.model.Device.DeviceDeviceNameComponent convertDeviceDeviceNameComponent(org.hl7.fhir.r5.model.Device.DeviceDeviceNameComponent src) throws FHIRException { + public static org.hl7.fhir.r4b.model.Device.DeviceDeviceNameComponent convertDeviceDeviceNameComponent(org.hl7.fhir.r5.model.Device.DeviceNameComponent src) throws FHIRException { if (src == null) return null; org.hl7.fhir.r4b.model.Device.DeviceDeviceNameComponent tgt = new org.hl7.fhir.r4b.model.Device.DeviceDeviceNameComponent(); ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt); - if (src.hasName()) - tgt.setNameElement(String43_50.convertString(src.getNameElement())); + if (src.hasValue()) + tgt.setNameElement(String43_50.convertString(src.getValueElement())); if (src.hasType()) tgt.setTypeElement(convertDeviceNameType(src.getTypeElement())); return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/DeviceDefinition43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/DeviceDefinition43_50.java index e205718d3..de7f93029 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/DeviceDefinition43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/DeviceDefinition43_50.java @@ -85,8 +85,8 @@ public class DeviceDefinition43_50 { // if (src.hasOnlineInformation()) // tgt.setOnlineInformationElement(Uri43_50.convertUri(src.getOnlineInformationElement())); for (org.hl7.fhir.r4b.model.Annotation t : src.getNote()) tgt.addNote(Annotation43_50.convertAnnotation(t)); - if (src.hasParentDevice()) - tgt.setParentDevice(Reference43_50.convertReference(src.getParentDevice())); +// if (src.hasParentDevice()) +// tgt.setParentDevice(Reference43_50.convertReference(src.getParentDevice())); for (org.hl7.fhir.r4b.model.DeviceDefinition.DeviceDefinitionMaterialComponent t : src.getMaterial()) tgt.addMaterial(convertDeviceDefinitionMaterialComponent(t)); return tgt; @@ -132,8 +132,8 @@ public class DeviceDefinition43_50 { // if (src.hasOnlineInformation()) // tgt.setOnlineInformationElement(Uri43_50.convertUri(src.getOnlineInformationElement())); for (org.hl7.fhir.r5.model.Annotation t : src.getNote()) tgt.addNote(Annotation43_50.convertAnnotation(t)); - if (src.hasParentDevice()) - tgt.setParentDevice(Reference43_50.convertReference(src.getParentDevice())); +// if (src.hasParentDevice()) +// tgt.setParentDevice(Reference43_50.convertReference(src.getParentDevice())); for (org.hl7.fhir.r5.model.DeviceDefinition.DeviceDefinitionMaterialComponent t : src.getMaterial()) tgt.addMaterial(convertDeviceDefinitionMaterialComponent(t)); return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/DeviceMetric43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/DeviceMetric43_50.java index 217723d87..e23137b3e 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/DeviceMetric43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/DeviceMetric43_50.java @@ -50,18 +50,18 @@ public class DeviceMetric43_50 { tgt.setType(CodeableConcept43_50.convertCodeableConcept(src.getType())); if (src.hasUnit()) tgt.setUnit(CodeableConcept43_50.convertCodeableConcept(src.getUnit())); - if (src.hasSource()) - tgt.setSource(Reference43_50.convertReference(src.getSource())); if (src.hasParent()) - tgt.setParent(Reference43_50.convertReference(src.getParent())); + tgt.setDevice(Reference43_50.convertReference(src.getParent())); + if (src.hasSource()) + tgt.setDevice(Reference43_50.convertReference(src.getSource())); if (src.hasOperationalStatus()) tgt.setOperationalStatusElement(convertDeviceMetricOperationalStatus(src.getOperationalStatusElement())); if (src.hasColor()) tgt.setColorElement(convertDeviceMetricColor(src.getColorElement())); if (src.hasCategory()) tgt.setCategoryElement(convertDeviceMetricCategory(src.getCategoryElement())); - if (src.hasMeasurementPeriod()) - tgt.setMeasurementPeriod(Timing43_50.convertTiming(src.getMeasurementPeriod())); +// if (src.hasMeasurementPeriod()) +// tgt.setMeasurementPeriod(Timing43_50.convertTiming(src.getMeasurementPeriod())); for (org.hl7.fhir.r4b.model.DeviceMetric.DeviceMetricCalibrationComponent t : src.getCalibration()) tgt.addCalibration(convertDeviceMetricCalibrationComponent(t)); return tgt; @@ -78,18 +78,18 @@ public class DeviceMetric43_50 { tgt.setType(CodeableConcept43_50.convertCodeableConcept(src.getType())); if (src.hasUnit()) tgt.setUnit(CodeableConcept43_50.convertCodeableConcept(src.getUnit())); - if (src.hasSource()) - tgt.setSource(Reference43_50.convertReference(src.getSource())); - if (src.hasParent()) - tgt.setParent(Reference43_50.convertReference(src.getParent())); + if (src.hasDevice()) + tgt.setSource(Reference43_50.convertReference(src.getDevice())); +// if (src.hasParent()) +// tgt.setParent(Reference43_50.convertReference(src.getParent())); if (src.hasOperationalStatus()) tgt.setOperationalStatusElement(convertDeviceMetricOperationalStatus(src.getOperationalStatusElement())); if (src.hasColor()) tgt.setColorElement(convertDeviceMetricColor(src.getColorElement())); if (src.hasCategory()) tgt.setCategoryElement(convertDeviceMetricCategory(src.getCategoryElement())); - if (src.hasMeasurementPeriod()) - tgt.setMeasurementPeriod(Timing43_50.convertTiming(src.getMeasurementPeriod())); +// if (src.hasMeasurementPeriod()) +// tgt.setMeasurementPeriod(Timing43_50.convertTiming(src.getMeasurementPeriod())); for (org.hl7.fhir.r5.model.DeviceMetric.DeviceMetricCalibrationComponent t : src.getCalibration()) tgt.addCalibration(convertDeviceMetricCalibrationComponent(t)); return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/DeviceRequest43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/DeviceRequest43_50.java index 5dca83957..03954bbe3 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/DeviceRequest43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/DeviceRequest43_50.java @@ -1,6 +1,8 @@ package org.hl7.fhir.convertors.conv43_50.resources43_50; import org.hl7.fhir.convertors.context.ConversionContext43_50; +import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.CodeableConcept40_50; +import org.hl7.fhir.convertors.conv40_50.datatypes40_50.special40_50.Reference40_50; import org.hl7.fhir.convertors.conv43_50.datatypes43_50.general43_50.Annotation43_50; import org.hl7.fhir.convertors.conv43_50.datatypes43_50.general43_50.CodeableConcept43_50; import org.hl7.fhir.convertors.conv43_50.datatypes43_50.general43_50.Identifier43_50; @@ -82,9 +84,9 @@ public class DeviceRequest43_50 { if (src.hasRequester()) tgt.setRequester(Reference43_50.convertReference(src.getRequester())); if (src.hasPerformerType()) - tgt.setPerformerType(CodeableConcept43_50.convertCodeableConcept(src.getPerformerType())); + tgt.getPerformer().setConcept(CodeableConcept43_50.convertCodeableConcept(src.getPerformerType())); if (src.hasPerformer()) - tgt.setPerformer(Reference43_50.convertReference(src.getPerformer())); + tgt.getPerformer().setReference(Reference43_50.convertReference(src.getPerformer())); for (org.hl7.fhir.r4b.model.CodeableConcept t : src.getReasonCode()) tgt.addReason(CodeableConcept43_50.convertCodeableConceptToCodeableReference(t)); for (org.hl7.fhir.r4b.model.Reference t : src.getReasonReference()) @@ -136,10 +138,10 @@ public class DeviceRequest43_50 { tgt.setAuthoredOnElement(DateTime43_50.convertDateTime(src.getAuthoredOnElement())); if (src.hasRequester()) tgt.setRequester(Reference43_50.convertReference(src.getRequester())); - if (src.hasPerformerType()) - tgt.setPerformerType(CodeableConcept43_50.convertCodeableConcept(src.getPerformerType())); - if (src.hasPerformer()) - tgt.setPerformer(Reference43_50.convertReference(src.getPerformer())); + if (src.getPerformer().hasConcept()) + tgt.setPerformerType(CodeableConcept43_50.convertCodeableConcept(src.getPerformer().getConcept())); + if (src.getPerformer().hasReference()) + tgt.setPerformer(Reference43_50.convertReference(src.getPerformer().getReference())); for (CodeableReference t : src.getReason()) if (t.hasConcept()) tgt.addReasonCode(CodeableConcept43_50.convertCodeableConcept(t.getConcept())); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/DiagnosticReport43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/DiagnosticReport43_50.java index e3d5d0c23..810020f53 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/DiagnosticReport43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/DiagnosticReport43_50.java @@ -70,7 +70,7 @@ public class DiagnosticReport43_50 { for (org.hl7.fhir.r4b.model.DiagnosticReport.DiagnosticReportMediaComponent t : src.getMedia()) tgt.addMedia(convertDiagnosticReportMediaComponent(t)); if (src.hasConclusion()) - tgt.setConclusionElement(String43_50.convertString(src.getConclusionElement())); + tgt.setConclusionElement(String43_50.convertStringToMarkdown(src.getConclusionElement())); for (org.hl7.fhir.r4b.model.CodeableConcept t : src.getConclusionCode()) tgt.addConclusionCode(CodeableConcept43_50.convertCodeableConcept(t)); for (org.hl7.fhir.r4b.model.Attachment t : src.getPresentedForm()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/DocumentManifest43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/DocumentManifest43_50.java deleted file mode 100644 index 5ec057a89..000000000 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/DocumentManifest43_50.java +++ /dev/null @@ -1,124 +0,0 @@ -package org.hl7.fhir.convertors.conv43_50.resources43_50; - -import org.hl7.fhir.convertors.context.ConversionContext43_50; -import org.hl7.fhir.convertors.conv43_50.datatypes43_50.general43_50.CodeableConcept43_50; -import org.hl7.fhir.convertors.conv43_50.datatypes43_50.general43_50.Identifier43_50; -import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.DateTime43_50; -import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.String43_50; -import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Uri43_50; -import org.hl7.fhir.convertors.conv43_50.datatypes43_50.special43_50.Reference43_50; -import org.hl7.fhir.exceptions.FHIRException; - -/* - Copyright (c) 2011+, HL7, Inc. - All rights reserved. - - Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of HL7 nor the names of its contributors may be used to - endorse or promote products derived from this software without specific - prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. - -*/ -// Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 -public class DocumentManifest43_50 { - - public static org.hl7.fhir.r5.model.DocumentManifest convertDocumentManifest(org.hl7.fhir.r4b.model.DocumentManifest src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r5.model.DocumentManifest tgt = new org.hl7.fhir.r5.model.DocumentManifest(); - ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyDomainResource(src, tgt); - if (src.hasMasterIdentifier()) - tgt.setMasterIdentifier(Identifier43_50.convertIdentifier(src.getMasterIdentifier())); - for (org.hl7.fhir.r4b.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(Identifier43_50.convertIdentifier(t)); - if (src.hasStatus()) - tgt.setStatusElement(Enumerations43_50.convertDocumentReferenceStatus(src.getStatusElement())); - if (src.hasType()) - tgt.setType(CodeableConcept43_50.convertCodeableConcept(src.getType())); - if (src.hasSubject()) - tgt.setSubject(Reference43_50.convertReference(src.getSubject())); - if (src.hasCreated()) - tgt.setCreatedElement(DateTime43_50.convertDateTime(src.getCreatedElement())); - for (org.hl7.fhir.r4b.model.Reference t : src.getAuthor()) tgt.addAuthor(Reference43_50.convertReference(t)); - for (org.hl7.fhir.r4b.model.Reference t : src.getRecipient()) tgt.addRecipient(Reference43_50.convertReference(t)); - if (src.hasSource()) - tgt.setSourceElement(Uri43_50.convertUri(src.getSourceElement())); - if (src.hasDescription()) - tgt.setDescriptionElement(String43_50.convertString(src.getDescriptionElement())); - for (org.hl7.fhir.r4b.model.Reference t : src.getContent()) tgt.addContent(Reference43_50.convertReference(t)); - for (org.hl7.fhir.r4b.model.DocumentManifest.DocumentManifestRelatedComponent t : src.getRelated()) - tgt.addRelated(convertDocumentManifestRelatedComponent(t)); - return tgt; - } - - public static org.hl7.fhir.r4b.model.DocumentManifest convertDocumentManifest(org.hl7.fhir.r5.model.DocumentManifest src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4b.model.DocumentManifest tgt = new org.hl7.fhir.r4b.model.DocumentManifest(); - ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyDomainResource(src, tgt); - if (src.hasMasterIdentifier()) - tgt.setMasterIdentifier(Identifier43_50.convertIdentifier(src.getMasterIdentifier())); - for (org.hl7.fhir.r5.model.Identifier t : src.getIdentifier()) - tgt.addIdentifier(Identifier43_50.convertIdentifier(t)); - if (src.hasStatus()) - tgt.setStatusElement(Enumerations43_50.convertDocumentReferenceStatus(src.getStatusElement())); - if (src.hasType()) - tgt.setType(CodeableConcept43_50.convertCodeableConcept(src.getType())); - if (src.hasSubject()) - tgt.setSubject(Reference43_50.convertReference(src.getSubject())); - if (src.hasCreated()) - tgt.setCreatedElement(DateTime43_50.convertDateTime(src.getCreatedElement())); - for (org.hl7.fhir.r5.model.Reference t : src.getAuthor()) tgt.addAuthor(Reference43_50.convertReference(t)); - for (org.hl7.fhir.r5.model.Reference t : src.getRecipient()) tgt.addRecipient(Reference43_50.convertReference(t)); - if (src.hasSource()) - tgt.setSourceElement(Uri43_50.convertUri(src.getSourceElement())); - if (src.hasDescription()) - tgt.setDescriptionElement(String43_50.convertString(src.getDescriptionElement())); - for (org.hl7.fhir.r5.model.Reference t : src.getContent()) tgt.addContent(Reference43_50.convertReference(t)); - for (org.hl7.fhir.r5.model.DocumentManifest.DocumentManifestRelatedComponent t : src.getRelated()) - tgt.addRelated(convertDocumentManifestRelatedComponent(t)); - return tgt; - } - - public static org.hl7.fhir.r5.model.DocumentManifest.DocumentManifestRelatedComponent convertDocumentManifestRelatedComponent(org.hl7.fhir.r4b.model.DocumentManifest.DocumentManifestRelatedComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r5.model.DocumentManifest.DocumentManifestRelatedComponent tgt = new org.hl7.fhir.r5.model.DocumentManifest.DocumentManifestRelatedComponent(); - ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt); - if (src.hasIdentifier()) - tgt.setIdentifier(Identifier43_50.convertIdentifier(src.getIdentifier())); - if (src.hasRef()) - tgt.setRef(Reference43_50.convertReference(src.getRef())); - return tgt; - } - - public static org.hl7.fhir.r4b.model.DocumentManifest.DocumentManifestRelatedComponent convertDocumentManifestRelatedComponent(org.hl7.fhir.r5.model.DocumentManifest.DocumentManifestRelatedComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4b.model.DocumentManifest.DocumentManifestRelatedComponent tgt = new org.hl7.fhir.r4b.model.DocumentManifest.DocumentManifestRelatedComponent(); - ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt); - if (src.hasIdentifier()) - tgt.setIdentifier(Identifier43_50.convertIdentifier(src.getIdentifier())); - if (src.hasRef()) - tgt.setRef(Reference43_50.convertReference(src.getRef())); - return tgt; - } -} \ No newline at end of file diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Encounter43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Encounter43_50.java index 6add01984..ebac8f281 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Encounter43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Encounter43_50.java @@ -10,6 +10,7 @@ import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.PositiveI import org.hl7.fhir.convertors.conv43_50.datatypes43_50.special43_50.Reference43_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CodeableReference; +import org.hl7.fhir.r5.model.Encounter.ReasonComponent; /* Copyright (c) 2011+, HL7, Inc. @@ -51,12 +52,12 @@ public class Encounter43_50 { tgt.addIdentifier(Identifier43_50.convertIdentifier(t)); if (src.hasStatus()) tgt.setStatusElement(convertEncounterStatus(src.getStatusElement())); - for (org.hl7.fhir.r4b.model.Encounter.StatusHistoryComponent t : src.getStatusHistory()) - tgt.addStatusHistory(convertStatusHistoryComponent(t)); +// for (org.hl7.fhir.r4b.model.Encounter.StatusHistoryComponent t : src.getStatusHistory()) +// tgt.addStatusHistory(convertStatusHistoryComponent(t)); if (src.hasClass_()) tgt.addClass_(new org.hl7.fhir.r5.model.CodeableConcept().addCoding(Coding43_50.convertCoding(src.getClass_()))); - for (org.hl7.fhir.r4b.model.Encounter.ClassHistoryComponent t : src.getClassHistory()) - tgt.addClassHistory(convertClassHistoryComponent(t)); +// for (org.hl7.fhir.r4b.model.Encounter.ClassHistoryComponent t : src.getClassHistory()) +// tgt.addClassHistory(convertClassHistoryComponent(t)); for (org.hl7.fhir.r4b.model.CodeableConcept t : src.getType()) tgt.addType(CodeableConcept43_50.convertCodeableConcept(t)); if (src.hasServiceType()) @@ -77,14 +78,14 @@ public class Encounter43_50 { if (src.hasLength()) tgt.setLength(Duration43_50.convertDuration(src.getLength())); for (org.hl7.fhir.r4b.model.CodeableConcept t : src.getReasonCode()) - tgt.addReason(CodeableConcept43_50.convertCodeableConceptToCodeableReference(t)); + tgt.addReason().addValue(CodeableConcept43_50.convertCodeableConceptToCodeableReference(t)); for (org.hl7.fhir.r4b.model.Reference t : src.getReasonReference()) - tgt.addReason(Reference43_50.convertReferenceToCodeableReference(t)); + tgt.addReason().addValue(Reference43_50.convertReferenceToCodeableReference(t)); for (org.hl7.fhir.r4b.model.Encounter.DiagnosisComponent t : src.getDiagnosis()) tgt.addDiagnosis(convertDiagnosisComponent(t)); for (org.hl7.fhir.r4b.model.Reference t : src.getAccount()) tgt.addAccount(Reference43_50.convertReference(t)); if (src.hasHospitalization()) - tgt.setAdmission(convertEncounterHospitalizationComponent(src.getHospitalization())); + tgt.setAdmission(convertEncounterHospitalizationComponent(src.getHospitalization(), tgt)); for (org.hl7.fhir.r4b.model.Encounter.EncounterLocationComponent t : src.getLocation()) tgt.addLocation(convertEncounterLocationComponent(t)); if (src.hasServiceProvider()) @@ -103,12 +104,12 @@ public class Encounter43_50 { tgt.addIdentifier(Identifier43_50.convertIdentifier(t)); if (src.hasStatus()) tgt.setStatusElement(convertEncounterStatus(src.getStatusElement())); - for (org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent t : src.getStatusHistory()) - tgt.addStatusHistory(convertStatusHistoryComponent(t)); +// for (org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent t : src.getStatusHistory()) +// tgt.addStatusHistory(convertStatusHistoryComponent(t)); if (src.hasClass_()) tgt.setClass_(Coding43_50.convertCoding(src.getClass_FirstRep().getCodingFirstRep())); - for (org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent t : src.getClassHistory()) - tgt.addClassHistory(convertClassHistoryComponent(t)); +// for (org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent t : src.getClassHistory()) +// tgt.addClassHistory(convertClassHistoryComponent(t)); for (org.hl7.fhir.r5.model.CodeableConcept t : src.getType()) tgt.addType(CodeableConcept43_50.convertCodeableConcept(t)); if (src.getServiceTypeFirstRep().hasConcept()) @@ -128,17 +129,19 @@ public class Encounter43_50 { tgt.setPeriod(Period43_50.convertPeriod(src.getActualPeriod())); if (src.hasLength()) tgt.setLength(Duration43_50.convertDuration(src.getLength())); - for (CodeableReference t : src.getReason()) - if (t.hasConcept()) - tgt.addReasonCode(CodeableConcept43_50.convertCodeableConcept(t.getConcept())); - for (CodeableReference t : src.getReason()) - if (t.hasReference()) - tgt.addReasonReference(Reference43_50.convertReference(t.getReference())); + for (ReasonComponent t1 : src.getReason()) + for (CodeableReference t : t1.getValue()) + if (t.hasConcept()) + tgt.addReasonCode(CodeableConcept43_50.convertCodeableConcept(t.getConcept())); + for (ReasonComponent t1 : src.getReason()) + for (CodeableReference t : t1.getValue()) + if (t.hasReference()) + tgt.addReasonReference(Reference43_50.convertReference(t.getReference())); for (org.hl7.fhir.r5.model.Encounter.DiagnosisComponent t : src.getDiagnosis()) tgt.addDiagnosis(convertDiagnosisComponent(t)); for (org.hl7.fhir.r5.model.Reference t : src.getAccount()) tgt.addAccount(Reference43_50.convertReference(t)); - if (src.hasAdmission()) - tgt.setHospitalization(convertEncounterHospitalizationComponent(src.getAdmission())); + if (src.hasAdmission() || src.hasDietPreference() || src.hasSpecialArrangement() || src.hasSpecialCourtesy()) + tgt.setHospitalization(convertEncounterHospitalizationComponent(src.getAdmission(), src)); for (org.hl7.fhir.r5.model.Encounter.EncounterLocationComponent t : src.getLocation()) tgt.addLocation(convertEncounterLocationComponent(t)); if (src.hasServiceProvider()) @@ -148,47 +151,47 @@ public class Encounter43_50 { return tgt; } - static public org.hl7.fhir.r5.model.Enumeration convertEncounterStatus(org.hl7.fhir.r4b.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r5.model.Enumeration convertEncounterStatus(org.hl7.fhir.r4b.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; - org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Encounter.EncounterStatusEnumFactory()); + org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.EncounterStatusEnumFactory()); ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); switch (src.getValue()) { case PLANNED: - tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.PLANNED); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.PLANNED); break; case ARRIVED: - tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.INPROGRESS); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.INPROGRESS); break; case TRIAGED: - tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.INPROGRESS); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.INPROGRESS); break; case INPROGRESS: - tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.INPROGRESS); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.INPROGRESS); break; case ONLEAVE: - tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.INPROGRESS); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.INPROGRESS); break; case FINISHED: - tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.COMPLETED); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.COMPLETED); break; case CANCELLED: - tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.CANCELLED); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.CANCELLED); break; case ENTEREDINERROR: - tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.ENTEREDINERROR); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.ENTEREDINERROR); break; case UNKNOWN: - tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.UNKNOWN); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.UNKNOWN); break; default: - tgt.setValue(org.hl7.fhir.r5.model.Encounter.EncounterStatus.NULL); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.EncounterStatus.NULL); break; } return tgt; } - static public org.hl7.fhir.r4b.model.Enumeration convertEncounterStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r4b.model.Enumeration convertEncounterStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4b.model.Enumeration tgt = new org.hl7.fhir.r4b.model.Enumeration<>(new org.hl7.fhir.r4b.model.Encounter.EncounterStatusEnumFactory()); @@ -218,54 +221,54 @@ public class Encounter43_50 { } return tgt; } - - public static org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent convertStatusHistoryComponent(org.hl7.fhir.r4b.model.Encounter.StatusHistoryComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent tgt = new org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent(); - ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt); - if (src.hasStatus()) - tgt.setStatusElement(convertEncounterStatus(src.getStatusElement())); - if (src.hasPeriod()) - tgt.setPeriod(Period43_50.convertPeriod(src.getPeriod())); - return tgt; - } - - public static org.hl7.fhir.r4b.model.Encounter.StatusHistoryComponent convertStatusHistoryComponent(org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4b.model.Encounter.StatusHistoryComponent tgt = new org.hl7.fhir.r4b.model.Encounter.StatusHistoryComponent(); - ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt); - if (src.hasStatus()) - tgt.setStatusElement(convertEncounterStatus(src.getStatusElement())); - if (src.hasPeriod()) - tgt.setPeriod(Period43_50.convertPeriod(src.getPeriod())); - return tgt; - } - - public static org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent convertClassHistoryComponent(org.hl7.fhir.r4b.model.Encounter.ClassHistoryComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent tgt = new org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent(); - ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt); - if (src.hasClass_()) - tgt.setClass_(Coding43_50.convertCoding(src.getClass_())); - if (src.hasPeriod()) - tgt.setPeriod(Period43_50.convertPeriod(src.getPeriod())); - return tgt; - } - - public static org.hl7.fhir.r4b.model.Encounter.ClassHistoryComponent convertClassHistoryComponent(org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent src) throws FHIRException { - if (src == null) - return null; - org.hl7.fhir.r4b.model.Encounter.ClassHistoryComponent tgt = new org.hl7.fhir.r4b.model.Encounter.ClassHistoryComponent(); - ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt); - if (src.hasClass_()) - tgt.setClass_(Coding43_50.convertCoding(src.getClass_())); - if (src.hasPeriod()) - tgt.setPeriod(Period43_50.convertPeriod(src.getPeriod())); - return tgt; - } +// +// public static org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent convertStatusHistoryComponent(org.hl7.fhir.r4b.model.Encounter.StatusHistoryComponent src) throws FHIRException { +// if (src == null) +// return null; +// org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent tgt = new org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent(); +// ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt); +// if (src.hasStatus()) +// tgt.setStatusElement(convertEncounterStatus(src.getStatusElement())); +// if (src.hasPeriod()) +// tgt.setPeriod(Period43_50.convertPeriod(src.getPeriod())); +// return tgt; +// } +// +// public static org.hl7.fhir.r4b.model.Encounter.StatusHistoryComponent convertStatusHistoryComponent(org.hl7.fhir.r5.model.Encounter.StatusHistoryComponent src) throws FHIRException { +// if (src == null) +// return null; +// org.hl7.fhir.r4b.model.Encounter.StatusHistoryComponent tgt = new org.hl7.fhir.r4b.model.Encounter.StatusHistoryComponent(); +// ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt); +// if (src.hasStatus()) +// tgt.setStatusElement(convertEncounterStatus(src.getStatusElement())); +// if (src.hasPeriod()) +// tgt.setPeriod(Period43_50.convertPeriod(src.getPeriod())); +// return tgt; +// } +// +// public static org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent convertClassHistoryComponent(org.hl7.fhir.r4b.model.Encounter.ClassHistoryComponent src) throws FHIRException { +// if (src == null) +// return null; +// org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent tgt = new org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent(); +// ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt); +// if (src.hasClass_()) +// tgt.setClass_(Coding43_50.convertCoding(src.getClass_())); +// if (src.hasPeriod()) +// tgt.setPeriod(Period43_50.convertPeriod(src.getPeriod())); +// return tgt; +// } +// +// public static org.hl7.fhir.r4b.model.Encounter.ClassHistoryComponent convertClassHistoryComponent(org.hl7.fhir.r5.model.Encounter.ClassHistoryComponent src) throws FHIRException { +// if (src == null) +// return null; +// org.hl7.fhir.r4b.model.Encounter.ClassHistoryComponent tgt = new org.hl7.fhir.r4b.model.Encounter.ClassHistoryComponent(); +// ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt); +// if (src.hasClass_()) +// tgt.setClass_(Coding43_50.convertCoding(src.getClass_())); +// if (src.hasPeriod()) +// tgt.setPeriod(Period43_50.convertPeriod(src.getPeriod())); +// return tgt; +// } public static org.hl7.fhir.r5.model.Encounter.EncounterParticipantComponent convertEncounterParticipantComponent(org.hl7.fhir.r4b.model.Encounter.EncounterParticipantComponent src) throws FHIRException { if (src == null) @@ -301,11 +304,11 @@ public class Encounter43_50 { org.hl7.fhir.r5.model.Encounter.DiagnosisComponent tgt = new org.hl7.fhir.r5.model.Encounter.DiagnosisComponent(); ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt); if (src.hasCondition()) - tgt.setCondition(Reference43_50.convertReference(src.getCondition())); + tgt.addCondition(Reference43_50.convertReferenceToCodeableReference(src.getCondition())); if (src.hasUse()) - tgt.setUse(CodeableConcept43_50.convertCodeableConcept(src.getUse())); - if (src.hasRank()) - tgt.setRankElement(PositiveInt43_50.convertPositiveInt(src.getRankElement())); + tgt.addUse(CodeableConcept43_50.convertCodeableConcept(src.getUse())); +// if (src.hasRank()) +// tgt.setRankElement(PositiveInt43_50.convertPositiveInt(src.getRankElement())); return tgt; } @@ -314,16 +317,16 @@ public class Encounter43_50 { return null; org.hl7.fhir.r4b.model.Encounter.DiagnosisComponent tgt = new org.hl7.fhir.r4b.model.Encounter.DiagnosisComponent(); ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt); - if (src.hasCondition()) - tgt.setCondition(Reference43_50.convertReference(src.getCondition())); + if (src.hasCondition() && src.getConditionFirstRep().hasReference()) + tgt.setCondition(Reference43_50.convertReference(src.getConditionFirstRep().getReference())); if (src.hasUse()) - tgt.setUse(CodeableConcept43_50.convertCodeableConcept(src.getUse())); - if (src.hasRank()) - tgt.setRankElement(PositiveInt43_50.convertPositiveInt(src.getRankElement())); + tgt.setUse(CodeableConcept43_50.convertCodeableConcept(src.getUseFirstRep())); +// if (src.hasRank()) +// tgt.setRankElement(PositiveInt43_50.convertPositiveInt(src.getRankElement())); return tgt; } - public static org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent convertEncounterHospitalizationComponent(org.hl7.fhir.r4b.model.Encounter.EncounterHospitalizationComponent src) throws FHIRException { + public static org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent convertEncounterHospitalizationComponent(org.hl7.fhir.r4b.model.Encounter.EncounterHospitalizationComponent src, org.hl7.fhir.r5.model.Encounter tgte) throws FHIRException { if (src == null) return null; org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent tgt = new org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent(); @@ -337,11 +340,11 @@ public class Encounter43_50 { if (src.hasReAdmission()) tgt.setReAdmission(CodeableConcept43_50.convertCodeableConcept(src.getReAdmission())); for (org.hl7.fhir.r4b.model.CodeableConcept t : src.getDietPreference()) - tgt.addDietPreference(CodeableConcept43_50.convertCodeableConcept(t)); + tgte.addDietPreference(CodeableConcept43_50.convertCodeableConcept(t)); for (org.hl7.fhir.r4b.model.CodeableConcept t : src.getSpecialCourtesy()) - tgt.addSpecialCourtesy(CodeableConcept43_50.convertCodeableConcept(t)); + tgte.addSpecialCourtesy(CodeableConcept43_50.convertCodeableConcept(t)); for (org.hl7.fhir.r4b.model.CodeableConcept t : src.getSpecialArrangement()) - tgt.addSpecialArrangement(CodeableConcept43_50.convertCodeableConcept(t)); + tgte.addSpecialArrangement(CodeableConcept43_50.convertCodeableConcept(t)); if (src.hasDestination()) tgt.setDestination(Reference43_50.convertReference(src.getDestination())); if (src.hasDischargeDisposition()) @@ -349,7 +352,7 @@ public class Encounter43_50 { return tgt; } - public static org.hl7.fhir.r4b.model.Encounter.EncounterHospitalizationComponent convertEncounterHospitalizationComponent(org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent src) throws FHIRException { + public static org.hl7.fhir.r4b.model.Encounter.EncounterHospitalizationComponent convertEncounterHospitalizationComponent(org.hl7.fhir.r5.model.Encounter.EncounterAdmissionComponent src, org.hl7.fhir.r5.model.Encounter srce) throws FHIRException { if (src == null) return null; org.hl7.fhir.r4b.model.Encounter.EncounterHospitalizationComponent tgt = new org.hl7.fhir.r4b.model.Encounter.EncounterHospitalizationComponent(); @@ -362,11 +365,11 @@ public class Encounter43_50 { tgt.setAdmitSource(CodeableConcept43_50.convertCodeableConcept(src.getAdmitSource())); if (src.hasReAdmission()) tgt.setReAdmission(CodeableConcept43_50.convertCodeableConcept(src.getReAdmission())); - for (org.hl7.fhir.r5.model.CodeableConcept t : src.getDietPreference()) + for (org.hl7.fhir.r5.model.CodeableConcept t : srce.getDietPreference()) tgt.addDietPreference(CodeableConcept43_50.convertCodeableConcept(t)); - for (org.hl7.fhir.r5.model.CodeableConcept t : src.getSpecialCourtesy()) + for (org.hl7.fhir.r5.model.CodeableConcept t : srce.getSpecialCourtesy()) tgt.addSpecialCourtesy(CodeableConcept43_50.convertCodeableConcept(t)); - for (org.hl7.fhir.r5.model.CodeableConcept t : src.getSpecialArrangement()) + for (org.hl7.fhir.r5.model.CodeableConcept t : srce.getSpecialArrangement()) tgt.addSpecialArrangement(CodeableConcept43_50.convertCodeableConcept(t)); if (src.hasDestination()) tgt.setDestination(Reference43_50.convertReference(src.getDestination())); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Endpoint43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Endpoint43_50.java index e5dc7f51d..4dcb8222f 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Endpoint43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Endpoint43_50.java @@ -1,6 +1,7 @@ package org.hl7.fhir.convertors.conv43_50.resources43_50; import org.hl7.fhir.convertors.context.ConversionContext43_50; +import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.CodeableConcept30_50; import org.hl7.fhir.convertors.conv43_50.datatypes43_50.general43_50.CodeableConcept43_50; import org.hl7.fhir.convertors.conv43_50.datatypes43_50.general43_50.Coding43_50; import org.hl7.fhir.convertors.conv43_50.datatypes43_50.general43_50.ContactPoint43_50; @@ -11,6 +12,7 @@ import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.String43_ import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Url43_50; import org.hl7.fhir.convertors.conv43_50.datatypes43_50.special43_50.Reference43_50; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r5.model.Endpoint.EndpointPayloadComponent; /* Copyright (c) 2011+, HL7, Inc. @@ -63,9 +65,9 @@ public class Endpoint43_50 { if (src.hasPeriod()) tgt.setPeriod(Period43_50.convertPeriod(src.getPeriod())); for (org.hl7.fhir.r4b.model.CodeableConcept t : src.getPayloadType()) - tgt.addPayloadType(CodeableConcept43_50.convertCodeableConcept(t)); + tgt.addPayload().addType(CodeableConcept43_50.convertCodeableConcept(t)); for (org.hl7.fhir.r4b.model.CodeType t : src.getPayloadMimeType()) - tgt.getPayloadMimeType().add(Code43_50.convertCode(t)); + tgt.addPayload().getMimeType().add(Code43_50.convertCode(t)); if (src.hasAddress()) tgt.setAddressElement(Url43_50.convertUrl(src.getAddressElement())); for (org.hl7.fhir.r4b.model.StringType t : src.getHeader()) tgt.getHeader().add(String43_50.convertString(t)); @@ -91,10 +93,12 @@ public class Endpoint43_50 { tgt.addContact(ContactPoint43_50.convertContactPoint(t)); if (src.hasPeriod()) tgt.setPeriod(Period43_50.convertPeriod(src.getPeriod())); - for (org.hl7.fhir.r5.model.CodeableConcept t : src.getPayloadType()) - tgt.addPayloadType(CodeableConcept43_50.convertCodeableConcept(t)); - for (org.hl7.fhir.r5.model.CodeType t : src.getPayloadMimeType()) - tgt.getPayloadMimeType().add(Code43_50.convertCode(t)); + for (EndpointPayloadComponent t : src.getPayload()) + if (t.hasType()) + tgt.addPayloadType(CodeableConcept43_50.convertCodeableConcept(t.getTypeFirstRep())); + for (EndpointPayloadComponent t : src.getPayload()) + if (t.hasMimeType()) + tgt.getPayloadMimeType().add(Code43_50.convertCode(t.getMimeType().get(0))); if (src.hasAddress()) tgt.setAddressElement(Url43_50.convertUrl(src.getAddressElement())); for (org.hl7.fhir.r5.model.StringType t : src.getHeader()) tgt.getHeader().add(String43_50.convertString(t)); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Enumerations43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Enumerations43_50.java index 148f3ee18..ad4bc7f2c 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Enumerations43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Enumerations43_50.java @@ -405,29 +405,29 @@ public class Enumerations43_50 { return tgt; } - static public org.hl7.fhir.r5.model.Enumeration convertNoteType(org.hl7.fhir.r4b.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r5.model.Enumeration convertNoteType(org.hl7.fhir.r4b.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; - org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.NoteTypeEnumFactory()); + org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.PaymentReconciliation.NoteTypeEnumFactory()); ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); switch (src.getValue()) { case DISPLAY: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.NoteType.DISPLAY); + tgt.setValue(org.hl7.fhir.r5.model.PaymentReconciliation.NoteType.DISPLAY); break; case PRINT: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.NoteType.PRINT); + tgt.setValue(org.hl7.fhir.r5.model.PaymentReconciliation.NoteType.PRINT); break; case PRINTOPER: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.NoteType.PRINTOPER); + tgt.setValue(org.hl7.fhir.r5.model.PaymentReconciliation.NoteType.PRINTOPER); break; default: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.NoteType.NULL); + tgt.setValue(org.hl7.fhir.r5.model.PaymentReconciliation.NoteType.NULL); break; } return tgt; } - static public org.hl7.fhir.r4b.model.Enumeration convertNoteType(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r4b.model.Enumeration convertNoteType(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4b.model.Enumeration tgt = new org.hl7.fhir.r4b.model.Enumeration<>(new org.hl7.fhir.r4b.model.Enumerations.NoteTypeEnumFactory()); @@ -449,29 +449,29 @@ public class Enumerations43_50 { return tgt; } - static public org.hl7.fhir.r5.model.Enumeration convertDocumentReferenceStatus(org.hl7.fhir.r4b.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r5.model.Enumeration convertDocumentReferenceStatus(org.hl7.fhir.r4b.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; - org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatusEnumFactory()); + org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatusEnumFactory()); ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); switch (src.getValue()) { case CURRENT: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatus.CURRENT); + tgt.setValue(org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus.CURRENT); break; case SUPERSEDED: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatus.SUPERSEDED); + tgt.setValue(org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus.SUPERSEDED); break; case ENTEREDINERROR: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatus.ENTEREDINERROR); + tgt.setValue(org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus.ENTEREDINERROR); break; default: - tgt.setValue(org.hl7.fhir.r5.model.Enumerations.DocumentReferenceStatus.NULL); + tgt.setValue(org.hl7.fhir.r5.model.DocumentReference.DocumentReferenceStatus.NULL); break; } return tgt; } - static public org.hl7.fhir.r4b.model.Enumeration convertDocumentReferenceStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r4b.model.Enumeration convertDocumentReferenceStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4b.model.Enumeration tgt = new org.hl7.fhir.r4b.model.Enumeration<>(new org.hl7.fhir.r4b.model.Enumerations.DocumentReferenceStatusEnumFactory()); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/EpisodeOfCare43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/EpisodeOfCare43_50.java index 6f9ba59a0..f53141413 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/EpisodeOfCare43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/EpisodeOfCare43_50.java @@ -197,11 +197,11 @@ public class EpisodeOfCare43_50 { org.hl7.fhir.r5.model.EpisodeOfCare.DiagnosisComponent tgt = new org.hl7.fhir.r5.model.EpisodeOfCare.DiagnosisComponent(); ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt); if (src.hasCondition()) - tgt.setCondition(Reference43_50.convertReferenceToCodeableReference(src.getCondition())); + tgt.addCondition(Reference43_50.convertReferenceToCodeableReference(src.getCondition())); if (src.hasRole()) - tgt.setRole(CodeableConcept43_50.convertCodeableConcept(src.getRole())); - if (src.hasRank()) - tgt.setRankElement(PositiveInt43_50.convertPositiveInt(src.getRankElement())); + tgt.setUse(CodeableConcept43_50.convertCodeableConcept(src.getRole())); +// if (src.hasRank()) +// tgt.setRankElement(PositiveInt43_50.convertPositiveInt(src.getRankElement())); return tgt; } @@ -211,11 +211,11 @@ public class EpisodeOfCare43_50 { org.hl7.fhir.r4b.model.EpisodeOfCare.DiagnosisComponent tgt = new org.hl7.fhir.r4b.model.EpisodeOfCare.DiagnosisComponent(); ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt); if (src.hasCondition()) - tgt.setCondition(Reference43_50.convertCodeableReferenceToReference(src.getCondition())); - if (src.hasRole()) - tgt.setRole(CodeableConcept43_50.convertCodeableConcept(src.getRole())); - if (src.hasRank()) - tgt.setRankElement(PositiveInt43_50.convertPositiveInt(src.getRankElement())); + tgt.setCondition(Reference43_50.convertCodeableReferenceToReference(src.getConditionFirstRep())); + if (src.hasUse()) + tgt.setRole(CodeableConcept43_50.convertCodeableConcept(src.getUse())); +// if (src.hasRank()) +// tgt.setRankElement(PositiveInt43_50.convertPositiveInt(src.getRankElement())); return tgt; } } \ No newline at end of file diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/EventDefinition43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/EventDefinition43_50.java index 60dd4ba8d..b62bad0dc 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/EventDefinition43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/EventDefinition43_50.java @@ -85,7 +85,7 @@ public class EventDefinition43_50 { if (src.hasPurpose()) tgt.setPurposeElement(MarkDown43_50.convertMarkdown(src.getPurposeElement())); if (src.hasUsage()) - tgt.setUsageElement(String43_50.convertString(src.getUsageElement())); + tgt.setUsageElement(String43_50.convertStringToMarkdown(src.getUsageElement())); if (src.hasCopyright()) tgt.setCopyrightElement(MarkDown43_50.convertMarkdown(src.getCopyrightElement())); if (src.hasApprovalDate()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/ExplanationOfBenefit43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/ExplanationOfBenefit43_50.java index 1d7db11e1..6ba19204f 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/ExplanationOfBenefit43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/ExplanationOfBenefit43_50.java @@ -750,7 +750,7 @@ public class ExplanationOfBenefit43_50 { if (src.hasAmount()) tgt.setAmount(Money43_50.convertMoney(src.getAmount())); if (src.hasValue()) - tgt.setValueElement(Decimal43_50.convertDecimal(src.getValueElement())); + tgt.setQuantity(Decimal43_50.convertDecimalToQuantity(src.getValueElement())); return tgt; } @@ -765,8 +765,8 @@ public class ExplanationOfBenefit43_50 { tgt.setReason(CodeableConcept43_50.convertCodeableConcept(src.getReason())); if (src.hasAmount()) tgt.setAmount(Money43_50.convertMoney(src.getAmount())); - if (src.hasValue()) - tgt.setValueElement(Decimal43_50.convertDecimal(src.getValueElement())); + if (src.hasQuantity()) + tgt.setValueElement(Decimal43_50.convertDecimal(src.getQuantity().getValueElement())); return tgt; } @@ -1164,7 +1164,7 @@ public class ExplanationOfBenefit43_50 { if (src.hasNumber()) tgt.setNumberElement(PositiveInt43_50.convertPositiveInt(src.getNumberElement())); if (src.hasType()) - tgt.setTypeElement(Enumerations43_50.convertNoteType(src.getTypeElement())); + tgt.getType().addCoding().setSystem("http://hl7.org/fhir/note-type").setCode(src.getType().toCode()); if (src.hasText()) tgt.setTextElement(String43_50.convertString(src.getTextElement())); if (src.hasLanguage()) @@ -1179,8 +1179,8 @@ public class ExplanationOfBenefit43_50 { ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt); if (src.hasNumber()) tgt.setNumberElement(PositiveInt43_50.convertPositiveInt(src.getNumberElement())); - if (src.hasType()) - tgt.setTypeElement(Enumerations43_50.convertNoteType(src.getTypeElement())); + if (src.hasType() && src.getType().hasCoding("http://hl7.org/fhir/note-type")) + tgt.setType(org.hl7.fhir.r4b.model.Enumerations.NoteType.fromCode(src.getType().getCode("http://hl7.org/fhir/note-type"))); if (src.hasText()) tgt.setTextElement(String43_50.convertString(src.getTextElement())); if (src.hasLanguage()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/GuidanceResponse43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/GuidanceResponse43_50.java index e06749874..4396f1342 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/GuidanceResponse43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/GuidanceResponse43_50.java @@ -68,11 +68,11 @@ public class GuidanceResponse43_50 { tgt.addReason(Reference43_50.convertReferenceToCodeableReference(t)); for (org.hl7.fhir.r4b.model.Annotation t : src.getNote()) tgt.addNote(Annotation43_50.convertAnnotation(t)); for (org.hl7.fhir.r4b.model.Reference t : src.getEvaluationMessage()) - tgt.addEvaluationMessage(Reference43_50.convertReference(t)); + tgt.setEvaluationMessage(Reference43_50.convertReference(t)); if (src.hasOutputParameters()) tgt.setOutputParameters(Reference43_50.convertReference(src.getOutputParameters())); if (src.hasResult()) - tgt.setResult(Reference43_50.convertReference(src.getResult())); + tgt.addResult(Reference43_50.convertReference(src.getResult())); for (org.hl7.fhir.r4b.model.DataRequirement t : src.getDataRequirement()) tgt.addDataRequirement(DataRequirement43_50.convertDataRequirement(t)); return tgt; @@ -106,12 +106,12 @@ public class GuidanceResponse43_50 { if (t.hasReference()) tgt.addReasonReference(Reference43_50.convertReference(t.getReference())); for (org.hl7.fhir.r5.model.Annotation t : src.getNote()) tgt.addNote(Annotation43_50.convertAnnotation(t)); - for (org.hl7.fhir.r5.model.Reference t : src.getEvaluationMessage()) - tgt.addEvaluationMessage(Reference43_50.convertReference(t)); + if (src.hasEvaluationMessage()) + tgt.addEvaluationMessage(Reference43_50.convertReference(src.getEvaluationMessage())); if (src.hasOutputParameters()) tgt.setOutputParameters(Reference43_50.convertReference(src.getOutputParameters())); if (src.hasResult()) - tgt.setResult(Reference43_50.convertReference(src.getResult())); + tgt.setResult(Reference43_50.convertReference(src.getResultFirstRep())); for (org.hl7.fhir.r5.model.DataRequirement t : src.getDataRequirement()) tgt.addDataRequirement(DataRequirement43_50.convertDataRequirement(t)); return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/HealthcareService43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/HealthcareService43_50.java index 142126b0f..51bdd6c94 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/HealthcareService43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/HealthcareService43_50.java @@ -64,7 +64,7 @@ public class HealthcareService43_50 { if (src.hasName()) tgt.setNameElement(String43_50.convertString(src.getNameElement())); if (src.hasComment()) - tgt.setCommentElement(String43_50.convertString(src.getCommentElement())); + tgt.setCommentElement(String43_50.convertStringToMarkdown(src.getCommentElement())); if (src.hasExtraDetails()) tgt.setExtraDetailsElement(MarkDown43_50.convertMarkdown(src.getExtraDetailsElement())); if (src.hasPhoto()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/ImagingStudy43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/ImagingStudy43_50.java index c32b35170..9a827043e 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/ImagingStudy43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/ImagingStudy43_50.java @@ -66,8 +66,8 @@ public class ImagingStudy43_50 { for (org.hl7.fhir.r4b.model.Reference t : src.getBasedOn()) tgt.addBasedOn(Reference43_50.convertReference(t)); if (src.hasReferrer()) tgt.setReferrer(Reference43_50.convertReference(src.getReferrer())); - for (org.hl7.fhir.r4b.model.Reference t : src.getInterpreter()) - tgt.addInterpreter(Reference43_50.convertReference(t)); +// for (org.hl7.fhir.r4b.model.Reference t : src.getInterpreter()) +// tgt.addInterpreter(Reference43_50.convertReference(t)); for (org.hl7.fhir.r4b.model.Reference t : src.getEndpoint()) tgt.addEndpoint(Reference43_50.convertReference(t)); if (src.hasNumberOfSeries()) tgt.setNumberOfSeriesElement(UnsignedInt43_50.convertUnsignedInt(src.getNumberOfSeriesElement())); @@ -112,8 +112,8 @@ public class ImagingStudy43_50 { for (org.hl7.fhir.r5.model.Reference t : src.getBasedOn()) tgt.addBasedOn(Reference43_50.convertReference(t)); if (src.hasReferrer()) tgt.setReferrer(Reference43_50.convertReference(src.getReferrer())); - for (org.hl7.fhir.r5.model.Reference t : src.getInterpreter()) - tgt.addInterpreter(Reference43_50.convertReference(t)); +// for (org.hl7.fhir.r5.model.Reference t : src.getInterpreter()) +// tgt.addInterpreter(Reference43_50.convertReference(t)); for (org.hl7.fhir.r5.model.Reference t : src.getEndpoint()) tgt.addEndpoint(Reference43_50.convertReference(t)); if (src.hasNumberOfSeries()) tgt.setNumberOfSeriesElement(UnsignedInt43_50.convertUnsignedInt(src.getNumberOfSeriesElement())); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/ImmunizationEvaluation43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/ImmunizationEvaluation43_50.java index db420b84b..13bb0ca4d 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/ImmunizationEvaluation43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/ImmunizationEvaluation43_50.java @@ -63,7 +63,7 @@ public class ImmunizationEvaluation43_50 { for (org.hl7.fhir.r4b.model.CodeableConcept t : src.getDoseStatusReason()) tgt.addDoseStatusReason(CodeableConcept43_50.convertCodeableConcept(t)); if (src.hasDescription()) - tgt.setDescriptionElement(String43_50.convertString(src.getDescriptionElement())); + tgt.setDescriptionElement(String43_50.convertStringToMarkdown(src.getDescriptionElement())); if (src.hasSeries()) tgt.setSeriesElement(String43_50.convertString(src.getSeriesElement())); if (src.hasDoseNumber()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/ImmunizationRecommendation43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/ImmunizationRecommendation43_50.java index 5958eaf20..3816ef0d0 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/ImmunizationRecommendation43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/ImmunizationRecommendation43_50.java @@ -93,7 +93,7 @@ public class ImmunizationRecommendation43_50 { for (org.hl7.fhir.r4b.model.ImmunizationRecommendation.ImmunizationRecommendationRecommendationDateCriterionComponent t : src.getDateCriterion()) tgt.addDateCriterion(convertImmunizationRecommendationRecommendationDateCriterionComponent(t)); if (src.hasDescription()) - tgt.setDescriptionElement(String43_50.convertString(src.getDescriptionElement())); + tgt.setDescriptionElement(String43_50.convertStringToMarkdown(src.getDescriptionElement())); if (src.hasSeries()) tgt.setSeriesElement(String43_50.convertString(src.getSeriesElement())); if (src.hasDoseNumber()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Library43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Library43_50.java index 52d84854e..4ef60c6ab 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Library43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Library43_50.java @@ -89,7 +89,7 @@ public class Library43_50 { if (src.hasPurpose()) tgt.setPurposeElement(MarkDown43_50.convertMarkdown(src.getPurposeElement())); if (src.hasUsage()) - tgt.setUsageElement(String43_50.convertString(src.getUsageElement())); + tgt.setUsageElement(String43_50.convertStringToMarkdown(src.getUsageElement())); if (src.hasCopyright()) tgt.setCopyrightElement(MarkDown43_50.convertMarkdown(src.getCopyrightElement())); if (src.hasApprovalDate()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/ListResource43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/ListResource43_50.java index 4a58d4bc3..bdb1d2cf7 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/ListResource43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/ListResource43_50.java @@ -57,7 +57,7 @@ public class ListResource43_50 { if (src.hasCode()) tgt.setCode(CodeableConcept43_50.convertCodeableConcept(src.getCode())); if (src.hasSubject()) - tgt.setSubject(Reference43_50.convertReference(src.getSubject())); + tgt.addSubject(Reference43_50.convertReference(src.getSubject())); if (src.hasEncounter()) tgt.setEncounter(Reference43_50.convertReference(src.getEncounter())); if (src.hasDate()) @@ -90,7 +90,7 @@ public class ListResource43_50 { if (src.hasCode()) tgt.setCode(CodeableConcept43_50.convertCodeableConcept(src.getCode())); if (src.hasSubject()) - tgt.setSubject(Reference43_50.convertReference(src.getSubject())); + tgt.setSubject(Reference43_50.convertReference(src.getSubjectFirstRep())); if (src.hasEncounter()) tgt.setEncounter(Reference43_50.convertReference(src.getEncounter())); if (src.hasDate()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Location43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Location43_50.java index 23278bb41..5ad705c4c 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Location43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Location43_50.java @@ -59,7 +59,7 @@ public class Location43_50 { tgt.setNameElement(String43_50.convertString(src.getNameElement())); for (org.hl7.fhir.r4b.model.StringType t : src.getAlias()) tgt.getAlias().add(String43_50.convertString(t)); if (src.hasDescription()) - tgt.setDescriptionElement(String43_50.convertString(src.getDescriptionElement())); + tgt.setDescriptionElement(String43_50.convertStringToMarkdown(src.getDescriptionElement())); if (src.hasMode()) tgt.setModeElement(convertLocationMode(src.getModeElement())); for (org.hl7.fhir.r4b.model.CodeableConcept t : src.getType()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Measure43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Measure43_50.java index efa911a71..8a6b6ccb1 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Measure43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Measure43_50.java @@ -87,7 +87,7 @@ public class Measure43_50 { if (src.hasPurpose()) tgt.setPurposeElement(MarkDown43_50.convertMarkdown(src.getPurposeElement())); if (src.hasUsage()) - tgt.setUsageElement(String43_50.convertString(src.getUsageElement())); + tgt.setUsageElement(String43_50.convertStringToMarkdown(src.getUsageElement())); if (src.hasCopyright()) tgt.setCopyrightElement(MarkDown43_50.convertMarkdown(src.getCopyrightElement())); if (src.hasApprovalDate()) @@ -119,9 +119,9 @@ public class Measure43_50 { for (org.hl7.fhir.r4b.model.CodeableConcept t : src.getType()) tgt.addType(CodeableConcept43_50.convertCodeableConcept(t)); if (src.hasRiskAdjustment()) - tgt.setRiskAdjustmentElement(String43_50.convertString(src.getRiskAdjustmentElement())); + tgt.setRiskAdjustmentElement(String43_50.convertStringToMarkdown(src.getRiskAdjustmentElement())); if (src.hasRateAggregation()) - tgt.setRateAggregationElement(String43_50.convertString(src.getRateAggregationElement())); + tgt.setRateAggregationElement(String43_50.convertStringToMarkdown(src.getRateAggregationElement())); if (src.hasRationale()) tgt.setRationaleElement(MarkDown43_50.convertMarkdown(src.getRationaleElement())); if (src.hasClinicalRecommendationStatement()) @@ -237,7 +237,7 @@ public class Measure43_50 { if (src.hasCode()) tgt.setCode(CodeableConcept43_50.convertCodeableConcept(src.getCode())); if (src.hasDescription()) - tgt.setDescriptionElement(String43_50.convertString(src.getDescriptionElement())); + tgt.setDescriptionElement(String43_50.convertStringToMarkdown(src.getDescriptionElement())); for (org.hl7.fhir.r4b.model.Measure.MeasureGroupPopulationComponent t : src.getPopulation()) tgt.addPopulation(convertMeasureGroupPopulationComponent(t)); for (org.hl7.fhir.r4b.model.Measure.MeasureGroupStratifierComponent t : src.getStratifier()) @@ -269,7 +269,7 @@ public class Measure43_50 { if (src.hasCode()) tgt.setCode(CodeableConcept43_50.convertCodeableConcept(src.getCode())); if (src.hasDescription()) - tgt.setDescriptionElement(String43_50.convertString(src.getDescriptionElement())); + tgt.setDescriptionElement(String43_50.convertStringToMarkdown(src.getDescriptionElement())); if (src.hasCriteria()) tgt.setCriteria(Expression43_50.convertExpression(src.getCriteria())); return tgt; @@ -297,7 +297,7 @@ public class Measure43_50 { if (src.hasCode()) tgt.setCode(CodeableConcept43_50.convertCodeableConcept(src.getCode())); if (src.hasDescription()) - tgt.setDescriptionElement(String43_50.convertString(src.getDescriptionElement())); + tgt.setDescriptionElement(String43_50.convertStringToMarkdown(src.getDescriptionElement())); if (src.hasCriteria()) tgt.setCriteria(Expression43_50.convertExpression(src.getCriteria())); for (org.hl7.fhir.r4b.model.Measure.MeasureGroupStratifierComponentComponent t : src.getComponent()) @@ -329,7 +329,7 @@ public class Measure43_50 { if (src.hasCode()) tgt.setCode(CodeableConcept43_50.convertCodeableConcept(src.getCode())); if (src.hasDescription()) - tgt.setDescriptionElement(String43_50.convertString(src.getDescriptionElement())); + tgt.setDescriptionElement(String43_50.convertStringToMarkdown(src.getDescriptionElement())); if (src.hasCriteria()) tgt.setCriteria(Expression43_50.convertExpression(src.getCriteria())); return tgt; @@ -359,7 +359,7 @@ public class Measure43_50 { for (org.hl7.fhir.r4b.model.CodeableConcept t : src.getUsage()) tgt.addUsage(CodeableConcept43_50.convertCodeableConcept(t)); if (src.hasDescription()) - tgt.setDescriptionElement(String43_50.convertString(src.getDescriptionElement())); + tgt.setDescriptionElement(String43_50.convertStringToMarkdown(src.getDescriptionElement())); if (src.hasCriteria()) tgt.setCriteria(Expression43_50.convertExpression(src.getCriteria())); return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Medication43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Medication43_50.java index 3c773eb4c..1bf50f668 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Medication43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Medication43_50.java @@ -56,8 +56,8 @@ public class Medication43_50 { tgt.setMarketingAuthorizationHolder(Reference43_50.convertReference(src.getManufacturer())); if (src.hasForm()) tgt.setDoseForm(CodeableConcept43_50.convertCodeableConcept(src.getForm())); - if (src.hasAmount()) - tgt.setTotalVolume(Ratio43_50.convertRatio(src.getAmount())); +// if (src.hasAmount()) +// tgt.setTotalVolume(Ratio43_50.convertRatio(src.getAmount())); for (org.hl7.fhir.r4b.model.Medication.MedicationIngredientComponent t : src.getIngredient()) tgt.addIngredient(convertMedicationIngredientComponent(t)); if (src.hasBatch()) @@ -80,8 +80,8 @@ public class Medication43_50 { tgt.setManufacturer(Reference43_50.convertReference(src.getMarketingAuthorizationHolder())); if (src.hasDoseForm()) tgt.setForm(CodeableConcept43_50.convertCodeableConcept(src.getDoseForm())); - if (src.hasTotalVolume()) - tgt.setAmount(Ratio43_50.convertRatio(src.getTotalVolume())); +// if (src.hasTotalVolume()) +// tgt.setAmount(Ratio43_50.convertRatio(src.getTotalVolume())); for (org.hl7.fhir.r5.model.Medication.MedicationIngredientComponent t : src.getIngredient()) tgt.addIngredient(convertMedicationIngredientComponent(t)); if (src.hasBatch()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/MedicationAdministration43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/MedicationAdministration43_50.java index 41ae656b3..cc8ac9775 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/MedicationAdministration43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/MedicationAdministration43_50.java @@ -76,7 +76,7 @@ public class MedicationAdministration43_50 { tgt.addReason(Reference43_50.convertReferenceToCodeableReference(t)); if (src.hasRequest()) tgt.setRequest(Reference43_50.convertReference(src.getRequest())); - for (org.hl7.fhir.r4b.model.Reference t : src.getDevice()) tgt.addDevice(Reference43_50.convertReference(t)); + for (org.hl7.fhir.r4b.model.Reference t : src.getDevice()) tgt.addDevice(Reference43_50.convertReferenceToCodeableReference(t)); for (org.hl7.fhir.r4b.model.Annotation t : src.getNote()) tgt.addNote(Annotation43_50.convertAnnotation(t)); if (src.hasDosage()) tgt.setDosage(convertMedicationAdministrationDosageComponent(src.getDosage())); @@ -122,7 +122,9 @@ public class MedicationAdministration43_50 { tgt.addReasonReference(Reference43_50.convertReference(t.getReference())); if (src.hasRequest()) tgt.setRequest(Reference43_50.convertReference(src.getRequest())); - for (org.hl7.fhir.r5.model.Reference t : src.getDevice()) tgt.addDevice(Reference43_50.convertReference(t)); + for (CodeableReference t : src.getDevice()) + if (t.hasReference()) + tgt.addDevice(Reference43_50.convertReference(t.getReference())); for (org.hl7.fhir.r5.model.Annotation t : src.getNote()) tgt.addNote(Annotation43_50.convertAnnotation(t)); if (src.hasDosage()) tgt.setDosage(convertMedicationAdministrationDosageComponent(src.getDosage())); @@ -209,7 +211,7 @@ public class MedicationAdministration43_50 { if (src.hasFunction()) tgt.setFunction(CodeableConcept43_50.convertCodeableConcept(src.getFunction())); if (src.hasActor()) - tgt.setActor(Reference43_50.convertReference(src.getActor())); + tgt.setActor(Reference43_50.convertReferenceToCodeableReference(src.getActor())); return tgt; } @@ -220,8 +222,8 @@ public class MedicationAdministration43_50 { ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt); if (src.hasFunction()) tgt.setFunction(CodeableConcept43_50.convertCodeableConcept(src.getFunction())); - if (src.hasActor()) - tgt.setActor(Reference43_50.convertReference(src.getActor())); + if (src.hasActor() && src.getActor().hasReference()) + tgt.setActor(Reference43_50.convertReference(src.getActor().getReference())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/MedicationRequest43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/MedicationRequest43_50.java index 0bf468df3..5a6bf1efd 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/MedicationRequest43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/MedicationRequest43_50.java @@ -104,7 +104,7 @@ public class MedicationRequest43_50 { for (org.hl7.fhir.r4b.model.Reference t : src.getInsurance()) tgt.addInsurance(Reference43_50.convertReference(t)); for (org.hl7.fhir.r4b.model.Annotation t : src.getNote()) tgt.addNote(Annotation43_50.convertAnnotation(t)); for (org.hl7.fhir.r4b.model.Dosage t : src.getDosageInstruction()) - tgt.getDose().addDosageInstruction(Dosage43_50.convertDosage(t)); + tgt.addDosageInstruction(Dosage43_50.convertDosage(t)); if (src.hasDispenseRequest()) tgt.setDispenseRequest(convertMedicationRequestDispenseRequestComponent(src.getDispenseRequest())); if (src.hasSubstitution()) @@ -178,7 +178,7 @@ public class MedicationRequest43_50 { tgt.setCourseOfTherapyType(CodeableConcept43_50.convertCodeableConcept(src.getCourseOfTherapyType())); for (org.hl7.fhir.r5.model.Reference t : src.getInsurance()) tgt.addInsurance(Reference43_50.convertReference(t)); for (org.hl7.fhir.r5.model.Annotation t : src.getNote()) tgt.addNote(Annotation43_50.convertAnnotation(t)); - for (org.hl7.fhir.r5.model.Dosage t : src.getDose().getDosageInstruction()) + for (org.hl7.fhir.r5.model.Dosage t : src.getDosageInstruction()) tgt.addDosageInstruction(Dosage43_50.convertDosage(t)); if (src.hasDispenseRequest()) tgt.setDispenseRequest(convertMedicationRequestDispenseRequestComponent(src.getDispenseRequest())); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/MedicationStatement43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/MedicationStatement43_50.java index 259d5e962..e7723274d 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/MedicationStatement43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/MedicationStatement43_50.java @@ -41,10 +41,10 @@ import org.hl7.fhir.r5.model.CodeableReference; // Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0 public class MedicationStatement43_50 { - public static org.hl7.fhir.r5.model.MedicationUsage convertMedicationStatement(org.hl7.fhir.r4b.model.MedicationStatement src) throws FHIRException { + public static org.hl7.fhir.r5.model.MedicationStatement convertMedicationStatement(org.hl7.fhir.r4b.model.MedicationStatement src) throws FHIRException { if (src == null) return null; - org.hl7.fhir.r5.model.MedicationUsage tgt = new org.hl7.fhir.r5.model.MedicationUsage(); + org.hl7.fhir.r5.model.MedicationStatement tgt = new org.hl7.fhir.r5.model.MedicationStatement(); ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyDomainResource(src, tgt); for (org.hl7.fhir.r4b.model.Identifier t : src.getIdentifier()) tgt.addIdentifier(Identifier43_50.convertIdentifier(t)); @@ -83,7 +83,7 @@ public class MedicationStatement43_50 { return tgt; } - public static org.hl7.fhir.r4b.model.MedicationStatement convertMedicationStatement(org.hl7.fhir.r5.model.MedicationUsage src) throws FHIRException { + public static org.hl7.fhir.r4b.model.MedicationStatement convertMedicationStatement(org.hl7.fhir.r5.model.MedicationStatement src) throws FHIRException { if (src == null) return null; org.hl7.fhir.r4b.model.MedicationStatement tgt = new org.hl7.fhir.r4b.model.MedicationStatement(); @@ -127,44 +127,44 @@ public class MedicationStatement43_50 { return tgt; } - static public org.hl7.fhir.r5.model.Enumeration convertMedicationStatementStatus(org.hl7.fhir.r4b.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r5.model.Enumeration convertMedicationStatementStatus(org.hl7.fhir.r4b.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; - org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodesEnumFactory()); + org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodesEnumFactory()); ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); switch (src.getValue()) { case ACTIVE: - tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.RECORDED); + tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.RECORDED); break; case COMPLETED: - tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.RECORDED); + tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.RECORDED); break; case ENTEREDINERROR: - tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.ENTEREDINERROR); + tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.ENTEREDINERROR); break; case INTENDED: - tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.RECORDED); + tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.RECORDED); break; case STOPPED: - tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.RECORDED); + tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.RECORDED); break; case ONHOLD: - tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.RECORDED); + tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.RECORDED); break; case UNKNOWN: - tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.RECORDED); + tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.RECORDED); break; case NOTTAKEN: - tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.RECORDED); + tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.RECORDED); break; default: - tgt.setValue(org.hl7.fhir.r5.model.MedicationUsage.MedicationUsageStatusCodes.NULL); + tgt.setValue(org.hl7.fhir.r5.model.MedicationStatement.MedicationStatementStatusCodes.NULL); break; } return tgt; } - static public org.hl7.fhir.r4b.model.Enumeration convertMedicationStatementStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r4b.model.Enumeration convertMedicationStatementStatus(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4b.model.Enumeration tgt = new org.hl7.fhir.r4b.model.Enumeration<>(new org.hl7.fhir.r4b.model.MedicationStatement.MedicationStatusCodesEnumFactory()); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/MessageHeader43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/MessageHeader43_50.java index 602a4977d..c4b65d6d5 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/MessageHeader43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/MessageHeader43_50.java @@ -51,8 +51,8 @@ public class MessageHeader43_50 { tgt.addDestination(convertMessageDestinationComponent(t)); if (src.hasSender()) tgt.setSender(Reference43_50.convertReference(src.getSender())); - if (src.hasEnterer()) - tgt.setEnterer(Reference43_50.convertReference(src.getEnterer())); +// if (src.hasEnterer()) +// tgt.setEnterer(Reference43_50.convertReference(src.getEnterer())); if (src.hasAuthor()) tgt.setAuthor(Reference43_50.convertReference(src.getAuthor())); if (src.hasSource()) @@ -80,8 +80,8 @@ public class MessageHeader43_50 { tgt.addDestination(convertMessageDestinationComponent(t)); if (src.hasSender()) tgt.setSender(Reference43_50.convertReference(src.getSender())); - if (src.hasEnterer()) - tgt.setEnterer(Reference43_50.convertReference(src.getEnterer())); +// if (src.hasEnterer()) +// tgt.setEnterer(Reference43_50.convertReference(src.getEnterer())); if (src.hasAuthor()) tgt.setAuthor(Reference43_50.convertReference(src.getAuthor())); if (src.hasSource()) @@ -108,7 +108,7 @@ public class MessageHeader43_50 { if (src.hasTarget()) tgt.setTarget(Reference43_50.convertReference(src.getTarget())); if (src.hasEndpoint()) - tgt.setEndpointElement(Url43_50.convertUrl(src.getEndpointElement())); + tgt.setEndpoint(Url43_50.convertUrl(src.getEndpointElement())); if (src.hasReceiver()) tgt.setReceiver(Reference43_50.convertReference(src.getReceiver())); return tgt; @@ -123,8 +123,8 @@ public class MessageHeader43_50 { tgt.setNameElement(String43_50.convertString(src.getNameElement())); if (src.hasTarget()) tgt.setTarget(Reference43_50.convertReference(src.getTarget())); - if (src.hasEndpoint()) - tgt.setEndpointElement(Url43_50.convertUrl(src.getEndpointElement())); + if (src.hasEndpointUrlType()) + tgt.setEndpointElement(Url43_50.convertUrl(src.getEndpointUrlType())); if (src.hasReceiver()) tgt.setReceiver(Reference43_50.convertReference(src.getReceiver())); return tgt; @@ -144,7 +144,7 @@ public class MessageHeader43_50 { if (src.hasContact()) tgt.setContact(ContactPoint43_50.convertContactPoint(src.getContact())); if (src.hasEndpoint()) - tgt.setEndpointElement(Url43_50.convertUrl(src.getEndpointElement())); + tgt.setEndpoint(Url43_50.convertUrl(src.getEndpointElement())); return tgt; } @@ -161,8 +161,8 @@ public class MessageHeader43_50 { tgt.setVersionElement(String43_50.convertString(src.getVersionElement())); if (src.hasContact()) tgt.setContact(ContactPoint43_50.convertContactPoint(src.getContact())); - if (src.hasEndpoint()) - tgt.setEndpointElement(Url43_50.convertUrl(src.getEndpointElement())); + if (src.hasEndpointUrlType()) + tgt.setEndpointElement(Url43_50.convertUrl(src.getEndpointUrlType())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/NutritionOrder43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/NutritionOrder43_50.java index 981f0067a..efca42402 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/NutritionOrder43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/NutritionOrder43_50.java @@ -414,7 +414,7 @@ public class NutritionOrder43_50 { if (src.hasMaxVolumeToDeliver()) tgt.setMaxVolumeToDeliver(SimpleQuantity43_50.convertSimpleQuantity(src.getMaxVolumeToDeliver())); if (src.hasAdministrationInstruction()) - tgt.setAdministrationInstructionElement(String43_50.convertString(src.getAdministrationInstructionElement())); + tgt.setAdministrationInstructionElement(String43_50.convertStringToMarkdown(src.getAdministrationInstructionElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Observation43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Observation43_50.java index 8a61c6a8f..b7ff0d8b0 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Observation43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Observation43_50.java @@ -232,7 +232,7 @@ public class Observation43_50 { if (src.hasAge()) tgt.setAge(Range43_50.convertRange(src.getAge())); if (src.hasText()) - tgt.setTextElement(String43_50.convertString(src.getTextElement())); + tgt.setTextElement(String43_50.convertStringToMarkdown(src.getTextElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/OperationDefinition43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/OperationDefinition43_50.java index ffc2f1998..6484bf154 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/OperationDefinition43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/OperationDefinition43_50.java @@ -14,6 +14,9 @@ import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.String43_ import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Uri43_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CodeType; +import org.hl7.fhir.r5.model.Enumeration; +import org.hl7.fhir.r5.model.Enumerations.VersionIndependentResourceTypesAll; +import org.hl7.fhir.r5.model.Enumerations.VersionIndependentResourceTypesAllEnumFactory; /* Copyright (c) 2011+, HL7, Inc. @@ -87,7 +90,7 @@ public class OperationDefinition43_50 { tgt.setCommentElement(MarkDown43_50.convertMarkdown(src.getCommentElement())); if (src.hasBase()) tgt.setBaseElement(Canonical43_50.convertCanonical(src.getBaseElement())); - for (org.hl7.fhir.r4b.model.CodeType t : src.getResource()) tgt.getResource().add(Code43_50.convertCode(t)); + for (org.hl7.fhir.r4b.model.CodeType t : src.getResource()) tgt.getResource().add(new Enumeration(new VersionIndependentResourceTypesAllEnumFactory(), Code43_50.convertCode(t))); if (src.hasSystem()) tgt.setSystemElement(Boolean43_50.convertBoolean(src.getSystemElement())); if (src.hasType()) @@ -146,7 +149,7 @@ public class OperationDefinition43_50 { tgt.setCommentElement(MarkDown43_50.convertMarkdown(src.getCommentElement())); if (src.hasBase()) tgt.setBaseElement(Canonical43_50.convertCanonical(src.getBaseElement())); - for (CodeType t : src.getResource()) tgt.getResource().add(Code43_50.convertCode(t)); + for (Enumeration t : src.getResource()) tgt.getResource().add(Code43_50.convertCode(t.getCodeType())); if (src.hasSystem()) tgt.setSystemElement(Boolean43_50.convertBoolean(src.getSystemElement())); if (src.hasType()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/PaymentNotice43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/PaymentNotice43_50.java index 8dcc77a1e..981fbd10a 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/PaymentNotice43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/PaymentNotice43_50.java @@ -56,7 +56,7 @@ public class PaymentNotice43_50 { if (src.hasCreated()) tgt.setCreatedElement(DateTime43_50.convertDateTime(src.getCreatedElement())); if (src.hasProvider()) - tgt.setProvider(Reference43_50.convertReference(src.getProvider())); + tgt.setReporter(Reference43_50.convertReference(src.getProvider())); if (src.hasPayment()) tgt.setPayment(Reference43_50.convertReference(src.getPayment())); if (src.hasPaymentDate()) @@ -87,8 +87,8 @@ public class PaymentNotice43_50 { tgt.setResponse(Reference43_50.convertReference(src.getResponse())); if (src.hasCreated()) tgt.setCreatedElement(DateTime43_50.convertDateTime(src.getCreatedElement())); - if (src.hasProvider()) - tgt.setProvider(Reference43_50.convertReference(src.getProvider())); + if (src.hasReporter()) + tgt.setProvider(Reference43_50.convertReference(src.getReporter())); if (src.hasPayment()) tgt.setPayment(Reference43_50.convertReference(src.getPayment())); if (src.hasPaymentDate()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/PlanDefinition43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/PlanDefinition43_50.java index 00cc40ce7..e9f45267b 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/PlanDefinition43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/PlanDefinition43_50.java @@ -95,7 +95,7 @@ public class PlanDefinition43_50 { if (src.hasPurpose()) tgt.setPurposeElement(MarkDown43_50.convertMarkdown(src.getPurposeElement())); if (src.hasUsage()) - tgt.setUsageElement(String43_50.convertString(src.getUsageElement())); + tgt.setUsageElement(String43_50.convertStringToMarkdown(src.getUsageElement())); if (src.hasCopyright()) tgt.setCopyrightElement(MarkDown43_50.convertMarkdown(src.getCopyrightElement())); if (src.hasApprovalDate()) @@ -277,9 +277,9 @@ public class PlanDefinition43_50 { if (src.hasTitle()) tgt.setTitleElement(String43_50.convertString(src.getTitleElement())); if (src.hasDescription()) - tgt.setDescriptionElement(String43_50.convertString(src.getDescriptionElement())); + tgt.setDescriptionElement(String43_50.convertStringToMarkdown(src.getDescriptionElement())); if (src.hasTextEquivalent()) - tgt.setTextEquivalentElement(String43_50.convertString(src.getTextEquivalentElement())); + tgt.setTextEquivalentElement(String43_50.convertStringToMarkdown(src.getTextEquivalentElement())); if (src.hasPriority()) tgt.setPriorityElement(convertRequestPriority(src.getPriorityElement())); for (org.hl7.fhir.r4b.model.CodeableConcept t : src.getCode()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Practitioner43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Practitioner43_50.java index 9f1e1f64d..6331a748b 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Practitioner43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Practitioner43_50.java @@ -12,6 +12,7 @@ import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Boolean43 import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Date43_50; import org.hl7.fhir.convertors.conv43_50.datatypes43_50.special43_50.Reference43_50; import org.hl7.fhir.exceptions.FHIRException; +import org.hl7.fhir.r5.model.Practitioner.PractitionerCommunicationComponent; /* Copyright (c) 2011+, HL7, Inc. @@ -65,7 +66,7 @@ public class Practitioner43_50 { for (org.hl7.fhir.r4b.model.Practitioner.PractitionerQualificationComponent t : src.getQualification()) tgt.addQualification(convertPractitionerQualificationComponent(t)); for (org.hl7.fhir.r4b.model.CodeableConcept t : src.getCommunication()) - tgt.addCommunication(CodeableConcept43_50.convertCodeableConcept(t)); + tgt.addCommunication().setLanguage(CodeableConcept43_50.convertCodeableConcept(t)); return tgt; } @@ -89,8 +90,8 @@ public class Practitioner43_50 { for (org.hl7.fhir.r5.model.Attachment t : src.getPhoto()) tgt.addPhoto(Attachment43_50.convertAttachment(t)); for (org.hl7.fhir.r5.model.Practitioner.PractitionerQualificationComponent t : src.getQualification()) tgt.addQualification(convertPractitionerQualificationComponent(t)); - for (org.hl7.fhir.r5.model.CodeableConcept t : src.getCommunication()) - tgt.addCommunication(CodeableConcept43_50.convertCodeableConcept(t)); + for (PractitionerCommunicationComponent t : src.getCommunication()) + tgt.addCommunication(CodeableConcept43_50.convertCodeableConcept(t.getLanguage())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Resource43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Resource43_50.java index c75d10f54..8e872c578 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Resource43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Resource43_50.java @@ -117,8 +117,8 @@ public class Resource43_50 { return DeviceUseStatement43_50.convertDeviceUseStatement((org.hl7.fhir.r4b.model.DeviceUseStatement) src); if (src instanceof org.hl7.fhir.r4b.model.DiagnosticReport) return DiagnosticReport43_50.convertDiagnosticReport((org.hl7.fhir.r4b.model.DiagnosticReport) src); - if (src instanceof org.hl7.fhir.r4b.model.DocumentManifest) - return DocumentManifest43_50.convertDocumentManifest((org.hl7.fhir.r4b.model.DocumentManifest) src); +// if (src instanceof org.hl7.fhir.r4b.model.DocumentManifest) +// return DocumentManifest43_50.convertDocumentManifest((org.hl7.fhir.r4b.model.DocumentManifest) src); if (src instanceof org.hl7.fhir.r4b.model.DocumentReference) return DocumentReference43_50.convertDocumentReference((org.hl7.fhir.r4b.model.DocumentReference) src); if (src instanceof org.hl7.fhir.r4b.model.Encounter) @@ -348,8 +348,8 @@ public class Resource43_50 { return DeviceUseStatement43_50.convertDeviceUseStatement((org.hl7.fhir.r5.model.DeviceUsage) src); if (src instanceof org.hl7.fhir.r5.model.DiagnosticReport) return DiagnosticReport43_50.convertDiagnosticReport((org.hl7.fhir.r5.model.DiagnosticReport) src); - if (src instanceof org.hl7.fhir.r5.model.DocumentManifest) - return DocumentManifest43_50.convertDocumentManifest((org.hl7.fhir.r5.model.DocumentManifest) src); +// if (src instanceof org.hl7.fhir.r5.model.DocumentManifest) +// return DocumentManifest43_50.convertDocumentManifest((org.hl7.fhir.r5.model.DocumentManifest) src); if (src instanceof org.hl7.fhir.r5.model.DocumentReference) return DocumentReference43_50.convertDocumentReference((org.hl7.fhir.r5.model.DocumentReference) src); if (src instanceof org.hl7.fhir.r5.model.Encounter) @@ -415,8 +415,8 @@ public class Resource43_50 { return MedicationKnowledge43_50.convertMedicationKnowledge((org.hl7.fhir.r5.model.MedicationKnowledge) src); if (src instanceof org.hl7.fhir.r5.model.MedicationRequest) return MedicationRequest43_50.convertMedicationRequest((org.hl7.fhir.r5.model.MedicationRequest) src); - if (src instanceof org.hl7.fhir.r5.model.MedicationUsage) - return MedicationStatement43_50.convertMedicationStatement((org.hl7.fhir.r5.model.MedicationUsage) src); + if (src instanceof org.hl7.fhir.r5.model.MedicationStatement) + return MedicationStatement43_50.convertMedicationStatement((org.hl7.fhir.r5.model.MedicationStatement) src); if (src instanceof org.hl7.fhir.r5.model.MessageDefinition) return MessageDefinition43_50.convertMessageDefinition((org.hl7.fhir.r5.model.MessageDefinition) src); if (src instanceof org.hl7.fhir.r5.model.MessageHeader) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Schedule43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Schedule43_50.java index c986a9269..ce2c0d696 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Schedule43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Schedule43_50.java @@ -60,7 +60,7 @@ public class Schedule43_50 { if (src.hasPlanningHorizon()) tgt.setPlanningHorizon(Period43_50.convertPeriod(src.getPlanningHorizon())); if (src.hasComment()) - tgt.setCommentElement(String43_50.convertString(src.getCommentElement())); + tgt.setCommentElement(String43_50.convertStringToMarkdown(src.getCommentElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/SearchParameter43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/SearchParameter43_50.java index 1964bd53a..ff8345787 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/SearchParameter43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/SearchParameter43_50.java @@ -15,6 +15,9 @@ import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.String43_ import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Uri43_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CodeType; +import org.hl7.fhir.r5.model.Enumeration; +import org.hl7.fhir.r5.model.Enumerations.VersionIndependentResourceTypesAll; +import org.hl7.fhir.r5.model.Enumerations.VersionIndependentResourceTypesAllEnumFactory; /* Copyright (c) 2011+, HL7, Inc. @@ -80,7 +83,7 @@ public class SearchParameter43_50 { tgt.setPurposeElement(MarkDown43_50.convertMarkdown(src.getPurposeElement())); if (src.hasCode()) tgt.setCodeElement(Code43_50.convertCode(src.getCodeElement())); - for (org.hl7.fhir.r4b.model.CodeType t : src.getBase()) tgt.getBase().add(Code43_50.convertCode(t)); + for (org.hl7.fhir.r4b.model.CodeType t : src.getBase()) tgt.getBase().add(new Enumeration(new VersionIndependentResourceTypesAllEnumFactory(), Code43_50.convertCode(t))); if (src.hasType()) tgt.setTypeElement(Enumerations43_50.convertSearchParamType(src.getTypeElement())); if (src.hasExpression()) @@ -89,7 +92,7 @@ public class SearchParameter43_50 { // tgt.setXpathElement(String43_50.convertString(src.getXpathElement())); if (src.hasXpathUsage()) tgt.setProcessingModeElement(convertXPathUsageType(src.getXpathUsageElement())); - for (org.hl7.fhir.r4b.model.CodeType t : src.getTarget()) tgt.getTarget().add(Code43_50.convertCode(t)); + for (org.hl7.fhir.r4b.model.CodeType t : src.getTarget()) tgt.getTarget().add(new Enumeration(new VersionIndependentResourceTypesAllEnumFactory(), Code43_50.convertCode(t))); if (src.hasMultipleOr()) tgt.setMultipleOrElement(Boolean43_50.convertBoolean(src.getMultipleOrElement())); if (src.hasMultipleAnd()) @@ -139,7 +142,7 @@ public class SearchParameter43_50 { tgt.setPurposeElement(MarkDown43_50.convertMarkdown(src.getPurposeElement())); if (src.hasCode()) tgt.setCodeElement(Code43_50.convertCode(src.getCodeElement())); - for (CodeType t : src.getBase()) tgt.getBase().add(Code43_50.convertCode(t)); + for (Enumeration t : src.getBase()) tgt.getBase().add(Code43_50.convertCode(t.getCodeType())); if (src.hasType()) tgt.setTypeElement(Enumerations43_50.convertSearchParamType(src.getTypeElement())); if (src.hasExpression()) @@ -148,7 +151,7 @@ public class SearchParameter43_50 { // tgt.setXpathElement(String43_50.convertString(src.getXpathElement())); if (src.hasProcessingMode()) tgt.setXpathUsageElement(convertXPathUsageType(src.getProcessingModeElement())); - for (CodeType t : src.getTarget()) tgt.getTarget().add(Code43_50.convertCode(t)); + for (Enumeration t : src.getTarget()) tgt.getTarget().add(Code43_50.convertCode(t.getCodeType())); if (src.hasMultipleOr()) tgt.setMultipleOrElement(Boolean43_50.convertBoolean(src.getMultipleOrElement())); if (src.hasMultipleAnd()) @@ -215,47 +218,47 @@ public class SearchParameter43_50 { return tgt; } - static public org.hl7.fhir.r5.model.Enumeration convertSearchComparator(org.hl7.fhir.r4b.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r5.model.Enumeration convertSearchComparator(org.hl7.fhir.r4b.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; - org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.SearchParameter.SearchComparatorEnumFactory()); + org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.SearchComparatorEnumFactory()); ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); switch (src.getValue()) { case EQ: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchComparator.EQ); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchComparator.EQ); break; case NE: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchComparator.NE); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchComparator.NE); break; case GT: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchComparator.GT); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchComparator.GT); break; case LT: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchComparator.LT); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchComparator.LT); break; case GE: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchComparator.GE); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchComparator.GE); break; case LE: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchComparator.LE); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchComparator.LE); break; case SA: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchComparator.SA); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchComparator.SA); break; case EB: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchComparator.EB); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchComparator.EB); break; case AP: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchComparator.AP); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchComparator.AP); break; default: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchComparator.NULL); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchComparator.NULL); break; } return tgt; } - static public org.hl7.fhir.r4b.model.Enumeration convertSearchComparator(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r4b.model.Enumeration convertSearchComparator(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4b.model.Enumeration tgt = new org.hl7.fhir.r4b.model.Enumeration<>(new org.hl7.fhir.r4b.model.SearchParameter.SearchComparatorEnumFactory()); @@ -295,56 +298,56 @@ public class SearchParameter43_50 { return tgt; } - static public org.hl7.fhir.r5.model.Enumeration convertSearchModifierCode(org.hl7.fhir.r4b.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r5.model.Enumeration convertSearchModifierCode(org.hl7.fhir.r4b.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; - org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.SearchParameter.SearchModifierCodeEnumFactory()); + org.hl7.fhir.r5.model.Enumeration tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Enumerations.SearchModifierCodeEnumFactory()); ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); switch (src.getValue()) { case MISSING: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.MISSING); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.MISSING); break; case EXACT: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.EXACT); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.EXACT); break; case CONTAINS: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.CONTAINS); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.CONTAINS); break; case NOT: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.NOT); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.NOT); break; case TEXT: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.TEXT); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.TEXT); break; case IN: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.IN); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.IN); break; case NOTIN: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.NOTIN); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.NOTIN); break; case BELOW: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.BELOW); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.BELOW); break; case ABOVE: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.ABOVE); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.ABOVE); break; case TYPE: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.TYPE); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.TYPE); break; case IDENTIFIER: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.IDENTIFIER); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.IDENTIFIER); break; case OFTYPE: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.OFTYPE); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.OFTYPE); break; default: - tgt.setValue(org.hl7.fhir.r5.model.SearchParameter.SearchModifierCode.NULL); + tgt.setValue(org.hl7.fhir.r5.model.Enumerations.SearchModifierCode.NULL); break; } return tgt; } - static public org.hl7.fhir.r4b.model.Enumeration convertSearchModifierCode(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { + static public org.hl7.fhir.r4b.model.Enumeration convertSearchModifierCode(org.hl7.fhir.r5.model.Enumeration src) throws FHIRException { if (src == null || src.isEmpty()) return null; org.hl7.fhir.r4b.model.Enumeration tgt = new org.hl7.fhir.r4b.model.Enumeration<>(new org.hl7.fhir.r4b.model.SearchParameter.SearchModifierCodeEnumFactory()); diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/ServiceRequest43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/ServiceRequest43_50.java index 166c25a7b..2528dd4de 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/ServiceRequest43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/ServiceRequest43_50.java @@ -1,6 +1,7 @@ package org.hl7.fhir.convertors.conv43_50.resources43_50; import org.hl7.fhir.convertors.context.ConversionContext43_50; +import org.hl7.fhir.convertors.conv40_50.datatypes40_50.special40_50.Reference40_50; import org.hl7.fhir.convertors.conv43_50.datatypes43_50.general43_50.Annotation43_50; import org.hl7.fhir.convertors.conv43_50.datatypes43_50.general43_50.CodeableConcept43_50; import org.hl7.fhir.convertors.conv43_50.datatypes43_50.general43_50.Identifier43_50; @@ -12,6 +13,7 @@ import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Uri43_50; import org.hl7.fhir.convertors.conv43_50.datatypes43_50.special43_50.Reference43_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CodeableReference; +import org.hl7.fhir.r5.model.ServiceRequest.ServiceRequestOrderDetailComponent; /* Copyright (c) 2011+, HL7, Inc. @@ -72,7 +74,7 @@ public class ServiceRequest43_50 { if (src.hasCode()) tgt.setCode(CodeableConcept43_50.convertCodeableConceptToCodeableReference(src.getCode())); for (org.hl7.fhir.r4b.model.CodeableConcept t : src.getOrderDetail()) - tgt.addOrderDetail(CodeableConcept43_50.convertCodeableConcept(t)); + tgt.addOrderDetail().getParameter().setValue(CodeableConcept43_50.convertCodeableConcept(t)); if (src.hasQuantity()) tgt.setQuantity(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getQuantity())); if (src.hasSubject()) @@ -100,13 +102,13 @@ public class ServiceRequest43_50 { tgt.addReason(Reference43_50.convertReferenceToCodeableReference(t)); for (org.hl7.fhir.r4b.model.Reference t : src.getInsurance()) tgt.addInsurance(Reference43_50.convertReference(t)); for (org.hl7.fhir.r4b.model.Reference t : src.getSupportingInfo()) - tgt.addSupportingInfo(Reference43_50.convertReference(t)); + tgt.addSupportingInfo(Reference43_50.convertReferenceToCodeableReference(t)); for (org.hl7.fhir.r4b.model.Reference t : src.getSpecimen()) tgt.addSpecimen(Reference43_50.convertReference(t)); for (org.hl7.fhir.r4b.model.CodeableConcept t : src.getBodySite()) tgt.addBodySite(CodeableConcept43_50.convertCodeableConcept(t)); for (org.hl7.fhir.r4b.model.Annotation t : src.getNote()) tgt.addNote(Annotation43_50.convertAnnotation(t)); if (src.hasPatientInstruction()) - tgt.setPatientInstructionElement(String43_50.convertString(src.getPatientInstructionElement())); + tgt.addPatientInstruction().setInstruction(String43_50.convertStringToMarkdown(src.getPatientInstructionElement())); for (org.hl7.fhir.r4b.model.Reference t : src.getRelevantHistory()) tgt.addRelevantHistory(Reference43_50.convertReference(t)); return tgt; @@ -139,8 +141,11 @@ public class ServiceRequest43_50 { tgt.setDoNotPerformElement(Boolean43_50.convertBoolean(src.getDoNotPerformElement())); if (src.hasCode()) tgt.setCode(CodeableConcept43_50.convertCodeableReferenceToCodeableConcept(src.getCode())); - for (org.hl7.fhir.r5.model.CodeableConcept t : src.getOrderDetail()) - tgt.addOrderDetail(CodeableConcept43_50.convertCodeableConcept(t)); + for (ServiceRequestOrderDetailComponent t : src.getOrderDetail()) { + if (t.getParameter().hasValueCodeableConcept()) { + tgt.addOrderDetail(CodeableConcept43_50.convertCodeableConcept(t.getParameter().getValueCodeableConcept())); + } + } if (src.hasQuantity()) tgt.setQuantity(ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().convertType(src.getQuantity())); if (src.hasSubject()) @@ -171,14 +176,15 @@ public class ServiceRequest43_50 { if (t.hasReference()) tgt.addReasonReference(Reference43_50.convertReference(t.getReference())); for (org.hl7.fhir.r5.model.Reference t : src.getInsurance()) tgt.addInsurance(Reference43_50.convertReference(t)); - for (org.hl7.fhir.r5.model.Reference t : src.getSupportingInfo()) - tgt.addSupportingInfo(Reference43_50.convertReference(t)); + for (CodeableReference t : src.getSupportingInfo()) + if (t.hasReference()) + tgt.addSupportingInfo(Reference43_50.convertReference(t.getReference())); for (org.hl7.fhir.r5.model.Reference t : src.getSpecimen()) tgt.addSpecimen(Reference43_50.convertReference(t)); for (org.hl7.fhir.r5.model.CodeableConcept t : src.getBodySite()) tgt.addBodySite(CodeableConcept43_50.convertCodeableConcept(t)); for (org.hl7.fhir.r5.model.Annotation t : src.getNote()) tgt.addNote(Annotation43_50.convertAnnotation(t)); - if (src.hasPatientInstruction()) - tgt.setPatientInstructionElement(String43_50.convertString(src.getPatientInstructionElement())); + if (src.getPatientInstructionFirstRep().hasInstructionMarkdownType()) + tgt.setPatientInstructionElement(String43_50.convertString(src.getPatientInstructionFirstRep().getInstructionMarkdownType())); for (org.hl7.fhir.r5.model.Reference t : src.getRelevantHistory()) tgt.addRelevantHistory(Reference43_50.convertReference(t)); return tgt; diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/SpecimenDefinition43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/SpecimenDefinition43_50.java index d8451835e..f6d2d8d79 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/SpecimenDefinition43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/SpecimenDefinition43_50.java @@ -95,7 +95,7 @@ public class SpecimenDefinition43_50 { if (src.hasContainer()) tgt.setContainer(convertSpecimenDefinitionTypeTestedContainerComponent(src.getContainer())); if (src.hasRequirement()) - tgt.setRequirementElement(String43_50.convertString(src.getRequirementElement())); + tgt.setRequirementElement(String43_50.convertStringToMarkdown(src.getRequirementElement())); if (src.hasRetentionTime()) tgt.setRetentionTime(Duration43_50.convertDuration(src.getRetentionTime())); for (org.hl7.fhir.r4b.model.CodeableConcept t : src.getRejectionCriterion()) @@ -179,7 +179,7 @@ public class SpecimenDefinition43_50 { if (src.hasCap()) tgt.setCap(CodeableConcept43_50.convertCodeableConcept(src.getCap())); if (src.hasDescription()) - tgt.setDescriptionElement(String43_50.convertString(src.getDescriptionElement())); + tgt.setDescriptionElement(String43_50.convertStringToMarkdown(src.getDescriptionElement())); if (src.hasCapacity()) tgt.setCapacity(SimpleQuantity43_50.convertSimpleQuantity(src.getCapacity())); if (src.hasMinimumVolume()) @@ -187,7 +187,7 @@ public class SpecimenDefinition43_50 { for (org.hl7.fhir.r4b.model.SpecimenDefinition.SpecimenDefinitionTypeTestedContainerAdditiveComponent t : src.getAdditive()) tgt.addAdditive(convertSpecimenDefinitionTypeTestedContainerAdditiveComponent(t)); if (src.hasPreparation()) - tgt.setPreparationElement(String43_50.convertString(src.getPreparationElement())); + tgt.setPreparationElement(String43_50.convertStringToMarkdown(src.getPreparationElement())); return tgt; } @@ -247,7 +247,7 @@ public class SpecimenDefinition43_50 { if (src.hasMaxDuration()) tgt.setMaxDuration(Duration43_50.convertDuration(src.getMaxDuration())); if (src.hasInstruction()) - tgt.setInstructionElement(String43_50.convertString(src.getInstructionElement())); + tgt.setInstructionElement(String43_50.convertStringToMarkdown(src.getInstructionElement())); return tgt; } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/StructureMap43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/StructureMap43_50.java index 4104faa2f..11d92aaf9 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/StructureMap43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/StructureMap43_50.java @@ -546,7 +546,7 @@ public class StructureMap43_50 { org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleTargetComponent tgt = new org.hl7.fhir.r5.model.StructureMap.StructureMapGroupRuleTargetComponent(); ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyBackboneElement(src, tgt); if (src.hasContext()) - tgt.setContextElement(Id43_50.convertId(src.getContextElement())); + tgt.setContextElement(Id43_50.convertIdToString(src.getContextElement())); if (src.hasContextType() && src.getContextType() != org.hl7.fhir.r4b.model.StructureMap.StructureMapContextType.VARIABLE) throw new Error("This conversion is not supported. Consult code maintainers"); // this should never happens - no one knows what the intent was here. if (src.hasElement()) @@ -605,7 +605,7 @@ public class StructureMap43_50 { tgt.setValue(org.hl7.fhir.r5.model.StructureMap.StructureMapTargetListMode.LAST); break; case COLLATE: - tgt.setValue(org.hl7.fhir.r5.model.StructureMap.StructureMapTargetListMode.COLLATE); + tgt.setValue(org.hl7.fhir.r5.model.StructureMap.StructureMapTargetListMode.SINGLE); break; default: tgt.setValue(org.hl7.fhir.r5.model.StructureMap.StructureMapTargetListMode.NULL); @@ -629,7 +629,7 @@ public class StructureMap43_50 { case LAST: tgt.setValue(org.hl7.fhir.r4b.model.StructureMap.StructureMapTargetListMode.LAST); break; - case COLLATE: + case SINGLE: tgt.setValue(org.hl7.fhir.r4b.model.StructureMap.StructureMapTargetListMode.COLLATE); break; default: diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Substance43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Substance43_50.java index 12c4ae9c0..33e32e588 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Substance43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/Substance43_50.java @@ -55,7 +55,7 @@ public class Substance43_50 { if (src.hasCode()) tgt.getCode().setConcept(CodeableConcept43_50.convertCodeableConcept(src.getCode())); if (src.hasDescription()) - tgt.setDescriptionElement(String43_50.convertString(src.getDescriptionElement())); + tgt.setDescriptionElement(String43_50.convertStringToMarkdown(src.getDescriptionElement())); for (org.hl7.fhir.r4b.model.Substance.SubstanceInstanceComponent t : src.getInstance()) convertSubstanceInstanceComponent(t, tgt); for (org.hl7.fhir.r4b.model.Substance.SubstanceIngredientComponent t : src.getIngredient()) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/TerminologyCapabilities43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/TerminologyCapabilities43_50.java index 77ba260ca..d0d602a99 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/TerminologyCapabilities43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/TerminologyCapabilities43_50.java @@ -15,8 +15,8 @@ import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Url43_50; import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r4b.model.CodeType; import org.hl7.fhir.r5.model.Enumeration; -import org.hl7.fhir.r5.model.TerminologyCapabilities.CommonLanguages; -import org.hl7.fhir.r5.model.TerminologyCapabilities.CommonLanguagesEnumFactory; +import org.hl7.fhir.r5.model.Enumerations.CommonLanguages; +import org.hl7.fhir.r5.model.Enumerations.CommonLanguagesEnumFactory; /* Copyright (c) 2011+, HL7, Inc. diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/TestScript43_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/TestScript43_50.java index cc2aa7f79..e340f3f14 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/TestScript43_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv43_50/resources43_50/TestScript43_50.java @@ -878,7 +878,7 @@ public class TestScript43_50 { tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.NOTMODIFIED); break; case BAD: - tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.BAD); + tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.BADREQUEST); break; case FORBIDDEN: tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.FORBIDDEN); @@ -899,7 +899,7 @@ public class TestScript43_50 { tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.PRECONDITIONFAILED); break; case UNPROCESSABLE: - tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.UNPROCESSABLE); + tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.UNPROCESSABLECONTENT); break; default: tgt.setValue(org.hl7.fhir.r5.model.TestScript.AssertionResponseTypes.NULL); @@ -926,7 +926,7 @@ public class TestScript43_50 { case NOTMODIFIED: tgt.setValue(org.hl7.fhir.r4b.model.TestScript.AssertionResponseTypes.NOTMODIFIED); break; - case BAD: + case BADREQUEST: tgt.setValue(org.hl7.fhir.r4b.model.TestScript.AssertionResponseTypes.BAD); break; case FORBIDDEN: @@ -947,7 +947,7 @@ public class TestScript43_50 { case PRECONDITIONFAILED: tgt.setValue(org.hl7.fhir.r4b.model.TestScript.AssertionResponseTypes.PRECONDITIONFAILED); break; - case UNPROCESSABLE: + case UNPROCESSABLECONTENT: tgt.setValue(org.hl7.fhir.r4b.model.TestScript.AssertionResponseTypes.UNPROCESSABLE); break; default: diff --git a/org.hl7.fhir.convertors/src/test/resources/test_script_r5.json b/org.hl7.fhir.convertors/src/test/resources/test_script_r5.json index 8c6e796f2..2d1273f43 100644 --- a/org.hl7.fhir.convertors/src/test/resources/test_script_r5.json +++ b/org.hl7.fhir.convertors/src/test/resources/test_script_r5.json @@ -190,7 +190,7 @@ { "assert": { "description": "Confirm that the returned HTTP status is 400(Bad Request).", - "response": "bad", + "response": "badRequest", "warningOnly": false } } diff --git a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/ValidationEngine.java b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/ValidationEngine.java index b04abb4c2..d64638e17 100644 --- a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/ValidationEngine.java +++ b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/ValidationEngine.java @@ -358,6 +358,9 @@ public class ValidationEngine implements IValidatorResourceFetcher, IValidationP engine.initContext(timeTracker); engine.setIgLoader(new IgLoader(engine.getPcm(), engine.getContext(), engine.getVersion(), engine.isDebug())); loadTx(engine); + if (VersionUtilities.isR5Ver(version)) { + engine.loadPackage("hl7.fhir.uv.extensions", null); + } return engine; } @@ -374,6 +377,9 @@ public class ValidationEngine implements IValidatorResourceFetcher, IValidationP if (THO) { loadTx(engine); } + if (VersionUtilities.isR5Ver(version)) { + engine.loadPackage("hl7.fhir.uv.extensions", null); + } return engine; } @@ -394,6 +400,7 @@ public class ValidationEngine implements IValidatorResourceFetcher, IValidationP if (pid != null) { engine.loadPackage(pid, null); } + } } diff --git a/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/conversion/tests/SnapShotGenerationXTests.java b/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/conversion/tests/SnapShotGenerationXTests.java index a6fb05b77..cd6342a49 100644 --- a/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/conversion/tests/SnapShotGenerationXTests.java +++ b/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/conversion/tests/SnapShotGenerationXTests.java @@ -19,6 +19,7 @@ import org.hl7.fhir.exceptions.PathEngineException; import org.hl7.fhir.r5.conformance.profile.BindingResolution; import org.hl7.fhir.r5.conformance.profile.ProfileKnowledgeProvider; import org.hl7.fhir.r5.conformance.profile.ProfileUtilities; +import org.hl7.fhir.r5.conformance.profile.ProfileUtilities.AllowUnknownProfile; import org.hl7.fhir.r5.formats.IParser.OutputStyle; import org.hl7.fhir.r5.formats.XmlParser; import org.hl7.fhir.r5.model.Base; @@ -481,6 +482,7 @@ public class SnapShotGenerationXTests { ProfileUtilities pu = new ProfileUtilities(UtilitiesXTests.context(version), messages, null); pu.setNewSlicingProcessing(true); pu.setIds(test.included, false); + pu.setAllowUnknownProfile(AllowUnknownProfile.ALL_TYPES); StructureDefinition base = UtilitiesXTests.context(version).fetchResource(StructureDefinition.class, test.included.getBaseDefinition()); if (base != null) { pu.generateSnapshot(base, test.included, test.included.getUrl(), "http://test.org/profile", test.included.getName()); @@ -507,6 +509,7 @@ public class SnapShotGenerationXTests { pu.setThrowException(false); pu.setDebug(test.isDebug()); pu.setIds(test.getSource(), false); + pu.setAllowUnknownProfile(AllowUnknownProfile.ALL_TYPES); if (test.isSort()) { List errors = new ArrayList(); int lastCount = output.getDifferential().getElement().size(); diff --git a/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.r5/lang.cache b/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.r5/lang.cache index 9eff9c452..4bd7fa4e8 100644 --- a/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.r5/lang.cache +++ b/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.r5/lang.cache @@ -9,3 +9,26 @@ v: { "class" : "SERVER_ERROR" } ------------------------------------------------------------------------------------- +{"hierarchical" : false, "valueSet" :{ + "resourceType" : "ValueSet", + "compose" : { + "inactive" : true, + "include" : [{ + "system" : "urn:ietf:bcp:47" + }] + } +}}#### +e: { + "error" : "Cannot invoke \"org.hl7.fhir.r5.terminologies.TerminologyClient.expandValueset(org.hl7.fhir.r5.model.ValueSet, org.hl7.fhir.r5.model.Parameters, java.util.Map)\" because \"this.txClient\" is null" +} +------------------------------------------------------------------------------------- +{"hierarchical" : false, "url": "http://hl7.org/fhir/ValueSet/all-languages", "version": "5.0.0-snapshot3"}#### +e: { + "error" : "Cannot invoke \"org.hl7.fhir.r5.terminologies.TerminologyClient.expandValueset(org.hl7.fhir.r5.model.ValueSet, org.hl7.fhir.r5.model.Parameters, java.util.Map)\" because \"this.txClient\" is null" +} +------------------------------------------------------------------------------------- +{"hierarchical" : false, "url": "http://hl7.org/fhir/ValueSet/all-languages", "version": "5.0.0-draft-final"}#### +e: { + "error" : "Cannot invoke \"org.hl7.fhir.r5.terminologies.TerminologyClient.expandValueset(org.hl7.fhir.r5.model.ValueSet, org.hl7.fhir.r5.model.Parameters, java.util.Map)\" because \"this.txClient\" is null" +} +------------------------------------------------------------------------------------- diff --git a/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.r5/mimetypes.cache b/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.r5/mimetypes.cache index c33c3bd38..055da37e4 100644 --- a/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.r5/mimetypes.cache +++ b/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.r5/mimetypes.cache @@ -22,3 +22,8 @@ e: { "error" : "Cannot invoke \"org.hl7.fhir.r5.terminologies.TerminologyClient.expandValueset(org.hl7.fhir.r5.model.ValueSet, org.hl7.fhir.r5.model.Parameters, java.util.Map)\" because \"this.txClient\" is null" } ------------------------------------------------------------------------------------- +{"hierarchical" : false, "url": "http://hl7.org/fhir/ValueSet/mimetypes", "version": "5.0.0-draft-final"}#### +e: { + "error" : "Cannot invoke \"org.hl7.fhir.r5.terminologies.TerminologyClient.expandValueset(org.hl7.fhir.r5.model.ValueSet, org.hl7.fhir.r5.model.Parameters, java.util.Map)\" because \"this.txClient\" is null" +} +------------------------------------------------------------------------------------- diff --git a/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.r5/toolsCodeSystemobligation.cache b/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.r5/toolsCodeSystemobligation.cache new file mode 100644 index 000000000..bfb27535e --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.r5/toolsCodeSystemobligation.cache @@ -0,0 +1,31 @@ +------------------------------------------------------------------------------------- +{"code" : { + "system" : "http://hl7.org/fhir/tools/CodeSystem/obligation", + "code" : "will-send" +}, "valueSet" :null, "lang":"en-US", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}#### +v: { + "severity" : "error", + "error" : "Local Error: Unable to resolve system http://hl7.org/fhir/tools/CodeSystem/obligation. Server Error: Attempt to use Terminology server when no Terminology server is available", + "class" : "SERVER_ERROR" +} +------------------------------------------------------------------------------------- +{"code" : { + "system" : "http://hl7.org/fhir/tools/CodeSystem/obligation", + "code" : "display" +}, "valueSet" :null, "lang":"en-US", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}#### +v: { + "severity" : "error", + "error" : "Local Error: Unable to resolve system http://hl7.org/fhir/tools/CodeSystem/obligation. Server Error: Attempt to use Terminology server when no Terminology server is available", + "class" : "SERVER_ERROR" +} +------------------------------------------------------------------------------------- +{"code" : { + "system" : "http://hl7.org/fhir/tools/CodeSystem/obligation", + "code" : "preserve" +}, "valueSet" :null, "lang":"en-US", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}#### +v: { + "severity" : "error", + "error" : "Local Error: Unable to resolve system http://hl7.org/fhir/tools/CodeSystem/obligation. Server Error: Attempt to use Terminology server when no Terminology server is available", + "class" : "SERVER_ERROR" +} +------------------------------------------------------------------------------------- diff --git a/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.r5/ucum.cache b/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.r5/ucum.cache index ec58d45e1..17756fb4d 100644 --- a/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.r5/ucum.cache +++ b/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.r5/ucum.cache @@ -129,3 +129,8 @@ e: { "error" : "Cannot invoke \"org.hl7.fhir.r5.terminologies.TerminologyClient.expandValueset(org.hl7.fhir.r5.model.ValueSet, org.hl7.fhir.r5.model.Parameters, java.util.Map)\" because \"this.txClient\" is null" } ------------------------------------------------------------------------------------- +{"hierarchical" : false, "url": "http://hl7.org/fhir/ValueSet/units-of-time", "version": "5.0.0-draft-final"}#### +e: { + "error" : "Cannot invoke \"org.hl7.fhir.r5.terminologies.TerminologyClient.expandValueset(org.hl7.fhir.r5.model.ValueSet, org.hl7.fhir.r5.model.Parameters, java.util.Map)\" because \"this.txClient\" is null" +} +------------------------------------------------------------------------------------- diff --git a/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/5.0.0/all-systems.cache b/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/5.0.0/all-systems.cache index 0f9793d2e..e0e6911b4 100644 --- a/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/5.0.0/all-systems.cache +++ b/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/5.0.0/all-systems.cache @@ -151,3 +151,97 @@ v: { "system" : "urn:ietf:bcp:47" } ------------------------------------------------------------------------------------- +{"code" : { + "code" : "nl-NL" +}, "url": "http://hl7.org/fhir/ValueSet/all-languages", "version": "5.0.0-snapshot3", "lang":"nl-NL", "useServer":"true", "useClient":"true", "guessSystem":"true", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}#### +v: { + "display" : "Dutch (Region=Netherlands)", + "code" : "nl-NL", + "system" : "urn:ietf:bcp:47" +} +------------------------------------------------------------------------------------- +{"code" : { + "code" : "en-AU" +}, "url": "http://hl7.org/fhir/ValueSet/all-languages", "version": "5.0.0-snapshot3", "lang":"en-AU", "useServer":"true", "useClient":"true", "guessSystem":"true", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}#### +v: { + "display" : "English (Region=Australia)", + "code" : "en-AU", + "system" : "urn:ietf:bcp:47" +} +------------------------------------------------------------------------------------- +{"code" : { + "code" : "fr-CA" +}, "url": "http://hl7.org/fhir/ValueSet/languages", "version": "5.0.0-draft-final", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"true", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}#### +v: { + "display" : "French (Canada)", + "code" : "fr-CA", + "system" : "urn:ietf:bcp:47" +} +------------------------------------------------------------------------------------- +{"code" : { + "system" : "http://snomed.info/sct", + "code" : "439401001", + "display" : "Diagnosis" +}, "url": "http://hl7.org/fhir/ValueSet/condition-category", "version": "5.0.0-draft-final", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"true"}#### +v: { + "display" : "Diagnosis (observable entity)", + "code" : "439401001", + "system" : "http://snomed.info/sct" +} +------------------------------------------------------------------------------------- +{"code" : { + "code" : "d" +}, "url": "http://hl7.org/fhir/ValueSet/units-of-time", "version": "5.0.0-draft-final", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"true", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}#### +v: { + "display" : "天", + "code" : "d", + "system" : "http://unitsofmeasure.org" +} +------------------------------------------------------------------------------------- +{"code" : { + "code" : "text/plain" +}, "url": "http://hl7.org/fhir/ValueSet/mimetypes", "version": "5.0.0-draft-final", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"true", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}#### +v: { + "display" : "text/plain", + "code" : "text/plain", + "system" : "urn:ietf:bcp:13" +} +------------------------------------------------------------------------------------- +{"code" : { + "system" : "http://snomed.info/sct", + "code" : "271649006", + "display" : "Systolic blood pressure" +}, "url": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult", "version": "5.0.0-draft-final", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"false"}#### +v: { + "display" : "Systolic blood pressure", + "code" : "271649006", + "system" : "http://snomed.info/sct" +} +------------------------------------------------------------------------------------- +{"code" : { + "code" : "nl-NL" +}, "url": "http://hl7.org/fhir/ValueSet/all-languages", "version": "5.0.0-draft-final", "lang":"nl-NL", "useServer":"true", "useClient":"true", "guessSystem":"true", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}#### +v: { + "display" : "Dutch (Region=Netherlands)", + "code" : "nl-NL", + "system" : "urn:ietf:bcp:47" +} +------------------------------------------------------------------------------------- +{"code" : { + "code" : "en-AU" +}, "url": "http://hl7.org/fhir/ValueSet/all-languages", "version": "5.0.0-draft-final", "lang":"en-AU", "useServer":"true", "useClient":"true", "guessSystem":"true", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}#### +v: { + "display" : "English (Region=Australia)", + "code" : "en-AU", + "system" : "urn:ietf:bcp:47" +} +------------------------------------------------------------------------------------- +{"code" : { + "code" : "en" +}, "url": "http://hl7.org/fhir/ValueSet/languages", "version": "5.0.0-draft-final", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"true", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}#### +v: { + "display" : "English", + "code" : "en", + "system" : "urn:ietf:bcp:47" +} +------------------------------------------------------------------------------------- diff --git a/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/5.0.0/animal-genderstatus.cache b/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/5.0.0/animal-genderstatus.cache new file mode 100644 index 000000000..e3cfecaf6 --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/5.0.0/animal-genderstatus.cache @@ -0,0 +1,11 @@ +------------------------------------------------------------------------------------- +{"code" : { + "system" : "http://hl7.org/fhir/animal-genderstatus", + "code" : "neutered" +}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}#### +v: { + "display" : "Neutered", + "code" : "neutered", + "system" : "http://hl7.org/fhir/animal-genderstatus" +} +------------------------------------------------------------------------------------- diff --git a/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/5.0.0/animal-species.cache b/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/5.0.0/animal-species.cache new file mode 100644 index 000000000..7cd31206a --- /dev/null +++ b/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/5.0.0/animal-species.cache @@ -0,0 +1,12 @@ +------------------------------------------------------------------------------------- +{"code" : { + "system" : "http://hl7.org/fhir/animal-species", + "code" : "canislf", + "display" : "Dog" +}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}#### +v: { + "display" : "Dog", + "code" : "canislf", + "system" : "http://hl7.org/fhir/animal-species" +} +------------------------------------------------------------------------------------- diff --git a/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/5.0.0/lang.cache b/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/5.0.0/lang.cache index 1e3b75aed..58f91a64f 100644 --- a/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/5.0.0/lang.cache +++ b/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/5.0.0/lang.cache @@ -49,3 +49,43 @@ v: { "system" : "urn:ietf:bcp:47" } ------------------------------------------------------------------------------------- +{"code" : { + "system" : "urn:ietf:bcp:47", + "code" : "fr-CA" +}, "url": "http://hl7.org/fhir/ValueSet/all-languages--0", "version": "5.0.0-snapshot3", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}#### +v: { + "display" : "French (Region=Canada)", + "code" : "fr-CA", + "system" : "urn:ietf:bcp:47" +} +------------------------------------------------------------------------------------- +{"code" : { + "system" : "urn:ietf:bcp:47", + "code" : "fr-CA" +}, "url": "http://hl7.org/fhir/ValueSet/all-languages", "version": "5.0.0-snapshot3", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"true"}#### +v: { + "display" : "French (Region=Canada)", + "code" : "fr-CA", + "system" : "urn:ietf:bcp:47" +} +------------------------------------------------------------------------------------- +{"code" : { + "system" : "urn:ietf:bcp:47", + "code" : "fr-CA" +}, "url": "http://hl7.org/fhir/ValueSet/all-languages--0", "version": "5.0.0-draft-final", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}#### +v: { + "display" : "French (Region=Canada)", + "code" : "fr-CA", + "system" : "urn:ietf:bcp:47" +} +------------------------------------------------------------------------------------- +{"code" : { + "system" : "urn:ietf:bcp:47", + "code" : "fr-CA" +}, "url": "http://hl7.org/fhir/ValueSet/all-languages", "version": "5.0.0-draft-final", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"true"}#### +v: { + "display" : "French (Region=Canada)", + "code" : "fr-CA", + "system" : "urn:ietf:bcp:47" +} +------------------------------------------------------------------------------------- diff --git a/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/5.0.0/loinc.cache b/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/5.0.0/loinc.cache index 0b2a82b4c..9d0a337ef 100644 --- a/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/5.0.0/loinc.cache +++ b/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/5.0.0/loinc.cache @@ -501,3 +501,110 @@ v: { "system" : "http://loinc.org" } ------------------------------------------------------------------------------------- +{"code" : { + "system" : "http://loinc.org", + "code" : "85354-9" +}, "url": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult--0", "version": "5.0.0-draft-final", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}#### +v: { + "display" : "Blood pressure panel with all children optional", + "code" : "85354-9", + "system" : "http://loinc.org" +} +------------------------------------------------------------------------------------- +{"code" : { + "system" : "http://loinc.org", + "code" : "85354-9", + "display" : "Blood pressure panel with all children optional" +}, "url": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult", "version": "5.0.0-draft-final", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"false"}#### +v: { + "display" : "Blood pressure panel with all children optional", + "code" : "85354-9", + "system" : "http://loinc.org" +} +------------------------------------------------------------------------------------- +{"code" : { + "system" : "http://loinc.org", + "code" : "8480-6" +}, "url": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult--0", "version": "5.0.0-draft-final", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}#### +v: { + "display" : "Systolic blood pressure", + "code" : "8480-6", + "system" : "http://loinc.org" +} +------------------------------------------------------------------------------------- +{"code" : { + "system" : "http://loinc.org", + "code" : "8480-6", + "display" : "Systolic blood pressure" +}, "url": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult", "version": "5.0.0-draft-final", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"false"}#### +v: { + "display" : "Systolic blood pressure", + "code" : "8480-6", + "system" : "http://loinc.org" +} +------------------------------------------------------------------------------------- +{"code" : { + "system" : "http://loinc.org", + "code" : "8462-4" +}, "url": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult--0", "version": "5.0.0-draft-final", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}#### +v: { + "display" : "Diastolic blood pressure", + "code" : "8462-4", + "system" : "http://loinc.org" +} +------------------------------------------------------------------------------------- +{"code" : { + "system" : "http://loinc.org", + "code" : "8462-4", + "display" : "Diastolic blood pressure" +}, "url": "http://hl7.org/fhir/ValueSet/observation-vitalsignresult", "version": "5.0.0-draft-final", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"false"}#### +v: { + "display" : "Diastolic blood pressure", + "code" : "8462-4", + "system" : "http://loinc.org" +} +------------------------------------------------------------------------------------- +{"code" : { + "system" : "http://loinc.org", + "code" : "56445-0" +}, "url": "http://hl7.org/fhir/ValueSet/doc-typecodes--0", "version": "5.0.0-draft-final", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}#### +v: { + "display" : "Medication summary Document", + "code" : "56445-0", + "system" : "http://loinc.org" +} +------------------------------------------------------------------------------------- +{"code" : { + "system" : "http://loinc.org", + "version" : "2.73", + "code" : "56445-0", + "display" : "Medication summary Doc" +}, "url": "http://hl7.org/fhir/ValueSet/doc-typecodes", "version": "5.0.0-draft-final", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"false"}#### +v: { + "display" : "Medication summary Document", + "code" : "56445-0", + "system" : "http://loinc.org" +} +------------------------------------------------------------------------------------- +{"code" : { + "system" : "http://loinc.org", + "code" : "56445-0" +}, "url": "http://hl7.org/fhir/ValueSet/doc-typecodes--0", "version": "5.0.0-draft-final", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}#### +v: { + "display" : "Medication summary Document", + "code" : "56445-0", + "system" : "http://loinc.org" +} +------------------------------------------------------------------------------------- +{"code" : { + "system" : "http://loinc.org", + "version" : "current", + "code" : "56445-0", + "display" : "Medication summary Doc" +}, "url": "http://hl7.org/fhir/ValueSet/doc-typecodes", "version": "5.0.0-draft-final", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"true"}#### +v: { + "display" : "Medication summary Document", + "code" : "56445-0", + "system" : "http://loinc.org" +} +------------------------------------------------------------------------------------- diff --git a/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/5.0.0/snomed.cache b/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/5.0.0/snomed.cache index c677e3b82..65bededef 100644 --- a/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/5.0.0/snomed.cache +++ b/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/5.0.0/snomed.cache @@ -445,3 +445,140 @@ v: { "system" : "http://snomed.info/sct" } ------------------------------------------------------------------------------------- +{"code" : { + "system" : "http://snomed.info/sct", + "code" : "122555007", + "display" : "Venous blood specimen" +}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}#### +v: { + "display" : "Venous blood specimen", + "code" : "122555007", + "system" : "http://snomed.info/sct" +} +------------------------------------------------------------------------------------- +{"code" : { + "system" : "http://snomed.info/sct", + "code" : "263678003", + "display" : "At rest" +}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}#### +v: { + "display" : "At rest", + "code" : "263678003", + "system" : "http://snomed.info/sct" +} +------------------------------------------------------------------------------------- +{"code" : { + "system" : "http://snomed.info/sct", + "code" : "119364003", + "display" : "Serum specimen" +}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}#### +v: { + "display" : "Serum specimen", + "code" : "119364003", + "system" : "http://snomed.info/sct" +} +------------------------------------------------------------------------------------- +{"code" : { + "system" : "http://snomed.info/sct", + "code" : "61088005", + "display" : "plastic" +}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}#### +v: { + "display" : "Plastic", + "code" : "61088005", + "system" : "http://snomed.info/sct" +} +------------------------------------------------------------------------------------- +{"code" : { + "system" : "http://snomed.info/sct", + "code" : "702281005", + "display" : "Evacuated blood collection tube, thrombin/clot activator/gel separator" +}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}#### +v: { + "display" : "Evacuated blood collection tube, thrombin/clot activator/gel separator", + "code" : "702281005", + "system" : "http://snomed.info/sct" +} +------------------------------------------------------------------------------------- +{"code" : { + "system" : "http://snomed.info/sct", + "code" : "119361006", + "display" : "Plasma specimen" +}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}#### +v: { + "display" : "Plasma specimen", + "code" : "119361006", + "system" : "http://snomed.info/sct" +} +------------------------------------------------------------------------------------- +{"code" : { + "system" : "http://snomed.info/sct", + "code" : "32039001", + "display" : "glass" +}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}#### +v: { + "display" : "Glass", + "code" : "32039001", + "system" : "http://snomed.info/sct" +} +------------------------------------------------------------------------------------- +{"code" : { + "system" : "http://snomed.info/sct", + "code" : "90655003" +}, "url": "http://hl7.org/fhir/ValueSet/c80-practice-codes--0", "version": "5.0.0-draft-final", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}#### +v: { + "severity" : "error", + "error" : "The code provided (http://snomed.info/sct#90655003) is not valid (from http://tx.fhir.org/r4)" +} +------------------------------------------------------------------------------------- +{"code" : { + "system" : "http://snomed.info/sct", + "code" : "24484000" +}, "url": "http://hl7.org/fhir/ValueSet/condition-severity--0", "version": "5.0.0-draft-final", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"true"}#### +v: { + "display" : "Severe", + "code" : "24484000", + "system" : "http://snomed.info/sct" +} +------------------------------------------------------------------------------------- +{"code" : { + "system" : "http://snomed.info/sct", + "code" : "24484000", + "display" : "Severe" +}, "url": "http://hl7.org/fhir/ValueSet/condition-severity", "version": "5.0.0-draft-final", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"true"}#### +v: { + "display" : "Severe", + "code" : "24484000", + "system" : "http://snomed.info/sct" +} +------------------------------------------------------------------------------------- +{"code" : { + "system" : "http://snomed.info/sct", + "code" : "109006" +}, "url": "http://hl7.org/fhir/ValueSet/clinical-findings--0", "version": "5.0.0-draft-final", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}#### +v: { + "display" : "Anxiety disorder of childhood OR adolescence", + "code" : "109006", + "system" : "http://snomed.info/sct" +} +------------------------------------------------------------------------------------- +{"code" : { + "system" : "http://snomed.info/sct", + "code" : "109006", + "display" : "Anxiety disorder of childhood OR adolescence" +}, "url": "http://hl7.org/fhir/ValueSet/clinical-findings", "version": "5.0.0-draft-final", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"NO_MEMBERSHIP_CHECK", "versionFlexible":"false"}#### +v: { + "display" : "Anxiety disorder of childhood OR adolescence", + "code" : "109006", + "system" : "http://snomed.info/sct" +} +------------------------------------------------------------------------------------- +{"code" : { + "system" : "http://snomed.info/sct", + "code" : "106004" +}, "url": "http://hl7.org/fhir/ValueSet/clinical-findings--0", "version": "5.0.0-draft-final", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}#### +v: { + "severity" : "error", + "error" : "The code provided (http://snomed.info/sct#106004) is not valid (from http://tx.fhir.org/r4)" +} +------------------------------------------------------------------------------------- diff --git a/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/5.0.0/ucum.cache b/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/5.0.0/ucum.cache index 2e2f3e110..8bc862865 100644 --- a/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/5.0.0/ucum.cache +++ b/org.hl7.fhir.validation/src/test/resources/txCache/org.hl7.fhir.validation/5.0.0/ucum.cache @@ -89,3 +89,33 @@ v: { "system" : "http://unitsofmeasure.org" } ------------------------------------------------------------------------------------- +{"code" : { + "system" : "http://unitsofmeasure.org", + "code" : "mL" +}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}#### +v: { + "display" : "mL", + "code" : "mL", + "system" : "http://unitsofmeasure.org" +} +------------------------------------------------------------------------------------- +{"code" : { + "system" : "http://unitsofmeasure.org", + "code" : "Cel" +}, "valueSet" :null, "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}#### +v: { + "display" : "Cel", + "code" : "Cel", + "system" : "http://unitsofmeasure.org" +} +------------------------------------------------------------------------------------- +{"code" : { + "system" : "http://unitsofmeasure.org", + "code" : "mm[Hg]" +}, "url": "http://hl7.org/fhir/ValueSet/ucum-vitals-common--0", "version": "5.0.0-draft-final", "lang":"null", "useServer":"true", "useClient":"false", "guessSystem":"false", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}#### +v: { + "display" : "millimeter of mercury", + "code" : "mm[Hg]", + "system" : "http://unitsofmeasure.org" +} +-------------------------------------------------------------------------------------