From 1fc0ed4cbd887592be54a4c892c1cec82bb276b1 Mon Sep 17 00:00:00 2001 From: James Agnew Date: Mon, 28 Nov 2022 12:24:01 -0500 Subject: [PATCH 01/19] Add null guard to converter (#1013) * Add null guard to converter * One more guard * One more null guard Co-authored-by: dotasek --- .../resources10_40/ConceptMap10_40.java | 16 +++++++++++----- .../resources10_50/ConceptMap10_50.java | 16 +++++++++++----- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/resources10_40/ConceptMap10_40.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/resources10_40/ConceptMap10_40.java index c676399a1..ac1aa40cb 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/resources10_40/ConceptMap10_40.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_40/resources10_40/ConceptMap10_40.java @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_40.resources10_40; import java.util.ArrayList; import java.util.List; +import java.util.Objects; import org.hl7.fhir.convertors.SourceElementComponentWrapper; import org.hl7.fhir.convertors.context.ConversionContext10_40; @@ -18,6 +19,7 @@ import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r4.model.CanonicalType; import org.hl7.fhir.r4.model.ConceptMap; import org.hl7.fhir.r4.model.ConceptMap.ConceptMapGroupComponent; +import org.hl7.fhir.r4.model.Type; public class ConceptMap10_40 { @@ -55,10 +57,14 @@ public class ConceptMap10_40 { tgt.setPurpose(src.getRequirements()); if (src.hasCopyright()) tgt.setCopyright(src.getCopyright()); - org.hl7.fhir.r4.model.Type r = ConversionContext10_40.INSTANCE.getVersionConvertor_10_40().convertType(src.getSource()); - tgt.setSource(r instanceof org.hl7.fhir.r4.model.Reference ? new CanonicalType(((org.hl7.fhir.r4.model.Reference) r).getReference()) : r); - r = ConversionContext10_40.INSTANCE.getVersionConvertor_10_40().convertType(src.getTarget()); - tgt.setTarget(r instanceof org.hl7.fhir.r4.model.Reference ? new CanonicalType(((org.hl7.fhir.r4.model.Reference) r).getReference()) : r); + if (src.hasSource()) { + org.hl7.fhir.r4.model.Type r = ConversionContext10_40.INSTANCE.getVersionConvertor_10_40().convertType(src.getSource()); + tgt.setSource(r instanceof org.hl7.fhir.r4.model.Reference ? new CanonicalType(((org.hl7.fhir.r4.model.Reference) r).getReference()) : r); + } + if (src.hasTarget()) { + Type r = ConversionContext10_40.INSTANCE.getVersionConvertor_10_40().convertType(src.getTarget()); + tgt.setTarget(r instanceof org.hl7.fhir.r4.model.Reference ? new CanonicalType(((org.hl7.fhir.r4.model.Reference) r).getReference()) : r); + } for (org.hl7.fhir.dstu2.model.ConceptMap.SourceElementComponent t : src.getElement()) { List> ws = convertSourceElementComponent(t); for (SourceElementComponentWrapper w : ws) @@ -308,7 +314,7 @@ public class ConceptMap10_40 { static public ConceptMapGroupComponent getGroup(ConceptMap map, String srcs, String tgts) { for (ConceptMapGroupComponent grp : map.getGroup()) { - if (grp.getSource().equals(srcs) && grp.getTarget().equals(tgts)) + if (Objects.equals(grp.getSource(), srcs) && Objects.equals(grp.getTarget(), tgts)) return grp; } ConceptMapGroupComponent grp = map.addGroup(); 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 1e693c990..9b72d5d80 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 @@ -2,6 +2,7 @@ package org.hl7.fhir.convertors.conv10_50.resources10_50; import java.util.ArrayList; import java.util.List; +import java.util.Objects; import org.hl7.fhir.convertors.SourceElementComponentWrapper; import org.hl7.fhir.convertors.VersionConvertorConstants; @@ -20,6 +21,7 @@ import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.r5.model.CanonicalType; import org.hl7.fhir.r5.model.ConceptMap; import org.hl7.fhir.r5.model.ConceptMap.ConceptMapGroupComponent; +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.ConceptMapRelationship; @@ -61,10 +63,14 @@ public class ConceptMap10_50 { tgt.setPurpose(src.getRequirements()); if (src.hasCopyright()) tgt.setCopyright(src.getCopyright()); - org.hl7.fhir.r5.model.DataType r = ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getSource()); - tgt.setSourceScope(r instanceof org.hl7.fhir.r5.model.Reference ? new CanonicalType(((org.hl7.fhir.r5.model.Reference) r).getReference()) : r); - r = ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getTarget()); - tgt.setTargetScope(r instanceof org.hl7.fhir.r5.model.Reference ? new CanonicalType(((org.hl7.fhir.r5.model.Reference) r).getReference()) : r); + if (src.hasSource()) { + org.hl7.fhir.r5.model.DataType r = ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getSource()); + tgt.setSourceScope(r instanceof org.hl7.fhir.r5.model.Reference ? new CanonicalType(((org.hl7.fhir.r5.model.Reference) r).getReference()) : r); + } + if (src.hasTarget()) { + DataType r = ConversionContext10_50.INSTANCE.getVersionConvertor_10_50().convertType(src.getTarget()); + 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); for (SourceElementComponentWrapper w : ws) @@ -312,7 +318,7 @@ public class ConceptMap10_50 { static public ConceptMapGroupComponent getGroup(ConceptMap map, String srcs, String tgts) { for (ConceptMapGroupComponent grp : map.getGroup()) { - if (grp.getSource().equals(srcs) && grp.getTarget().equals(tgts)) + if (Objects.equals(grp.getSource(), srcs) && Objects.equals(grp.getTarget(), tgts)) return grp; } ConceptMapGroupComponent grp = map.addGroup(); From 7f6db2933a714bcc5f303ef52422b8669bbf4753 Mon Sep 17 00:00:00 2001 From: dotasek Date: Mon, 28 Nov 2022 12:42:55 -0500 Subject: [PATCH 02/19] Update RELEASE_NOTES.md ***NO_CI*** --- RELEASE_NOTES.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 3b263f099..2a44ea0e1 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,7 +1,16 @@ ## Validator Changes -* no changes +* Avoid repeated R5 Extension loading in ValidatorService +* Fix problems validating logical models +* Fix `-locale` parameter functionality +* Add Spanish internationalization phrases ## Other code changes -* no changes +* ProfileUtilities: Provide Standards Status in tree view +* JSONParser: numerous r4b/r5 speed improvements and fixes +* FHIRPathEngine: Catch exceptions resolving references in r5 +* Handle null source and target in ConceptMap conversions +* Provide consistent rendering of comments in examples in IGs +* Preparations for changes to IG Publisher narrative generation +* Fix for Identifier.use conversion in dstu3 From 2715d811dcfba5c2c196137f492700567129d4cd Mon Sep 17 00:00:00 2001 From: markiantorno Date: Mon, 28 Nov 2022 18:23:09 +0000 Subject: [PATCH 03/19] Release: v5.6.81 ## Validator Changes * Avoid repeated R5 Extension loading in ValidatorService * Fix problems validating logical models * Fix `-locale` parameter functionality * Add Spanish internationalization phrases ## Other code changes * ProfileUtilities: Provide Standards Status in tree view * JSONParser: numerous r4b/r5 speed improvements and fixes * FHIRPathEngine: Catch exceptions resolving references in r5 * Handle null source and target in ConceptMap conversions * Provide consistent rendering of comments in examples in IGs * Preparations for changes to IG Publisher narrative generation * Fix for Identifier.use conversion in dstu3 ***NO_CI*** --- org.hl7.fhir.convertors/pom.xml | 2 +- org.hl7.fhir.dstu2/pom.xml | 2 +- org.hl7.fhir.dstu2016may/pom.xml | 2 +- org.hl7.fhir.dstu3/pom.xml | 2 +- org.hl7.fhir.r4/pom.xml | 2 +- org.hl7.fhir.r4b/pom.xml | 2 +- org.hl7.fhir.r5/pom.xml | 2 +- org.hl7.fhir.report/pom.xml | 2 +- org.hl7.fhir.utilities/pom.xml | 2 +- org.hl7.fhir.validation.cli/pom.xml | 2 +- org.hl7.fhir.validation/pom.xml | 2 +- pom.xml | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/org.hl7.fhir.convertors/pom.xml b/org.hl7.fhir.convertors/pom.xml index b9347f921..f2cb4e737 100644 --- a/org.hl7.fhir.convertors/pom.xml +++ b/org.hl7.fhir.convertors/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.81-SNAPSHOT + 5.6.81 ../pom.xml diff --git a/org.hl7.fhir.dstu2/pom.xml b/org.hl7.fhir.dstu2/pom.xml index 19dce16b8..1524ff9dc 100644 --- a/org.hl7.fhir.dstu2/pom.xml +++ b/org.hl7.fhir.dstu2/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.81-SNAPSHOT + 5.6.81 ../pom.xml diff --git a/org.hl7.fhir.dstu2016may/pom.xml b/org.hl7.fhir.dstu2016may/pom.xml index ed61eec93..569da1bc1 100644 --- a/org.hl7.fhir.dstu2016may/pom.xml +++ b/org.hl7.fhir.dstu2016may/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.81-SNAPSHOT + 5.6.81 ../pom.xml diff --git a/org.hl7.fhir.dstu3/pom.xml b/org.hl7.fhir.dstu3/pom.xml index e909d2ef4..8e663e5e7 100644 --- a/org.hl7.fhir.dstu3/pom.xml +++ b/org.hl7.fhir.dstu3/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.81-SNAPSHOT + 5.6.81 ../pom.xml diff --git a/org.hl7.fhir.r4/pom.xml b/org.hl7.fhir.r4/pom.xml index 184574c52..7a145b235 100644 --- a/org.hl7.fhir.r4/pom.xml +++ b/org.hl7.fhir.r4/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.81-SNAPSHOT + 5.6.81 ../pom.xml diff --git a/org.hl7.fhir.r4b/pom.xml b/org.hl7.fhir.r4b/pom.xml index f7997acec..ded1629e7 100644 --- a/org.hl7.fhir.r4b/pom.xml +++ b/org.hl7.fhir.r4b/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.81-SNAPSHOT + 5.6.81 ../pom.xml diff --git a/org.hl7.fhir.r5/pom.xml b/org.hl7.fhir.r5/pom.xml index 4b98bef20..5b2825226 100644 --- a/org.hl7.fhir.r5/pom.xml +++ b/org.hl7.fhir.r5/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.81-SNAPSHOT + 5.6.81 ../pom.xml diff --git a/org.hl7.fhir.report/pom.xml b/org.hl7.fhir.report/pom.xml index a544ad6fe..e12f15e53 100644 --- a/org.hl7.fhir.report/pom.xml +++ b/org.hl7.fhir.report/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.81-SNAPSHOT + 5.6.81 ../pom.xml diff --git a/org.hl7.fhir.utilities/pom.xml b/org.hl7.fhir.utilities/pom.xml index 751d8e421..824158f99 100644 --- a/org.hl7.fhir.utilities/pom.xml +++ b/org.hl7.fhir.utilities/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.81-SNAPSHOT + 5.6.81 ../pom.xml diff --git a/org.hl7.fhir.validation.cli/pom.xml b/org.hl7.fhir.validation.cli/pom.xml index 40d21b5a7..6c9ba5370 100644 --- a/org.hl7.fhir.validation.cli/pom.xml +++ b/org.hl7.fhir.validation.cli/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.81-SNAPSHOT + 5.6.81 ../pom.xml diff --git a/org.hl7.fhir.validation/pom.xml b/org.hl7.fhir.validation/pom.xml index 98bd3f508..6b82bd506 100644 --- a/org.hl7.fhir.validation/pom.xml +++ b/org.hl7.fhir.validation/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.81-SNAPSHOT + 5.6.81 ../pom.xml diff --git a/pom.xml b/pom.xml index c37fa911a..6b1583a64 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ HAPI FHIR --> org.hl7.fhir.core - 5.6.81-SNAPSHOT + 5.6.81 pom From 63f905d184316d10e35227697df51e97d0d0fef7 Mon Sep 17 00:00:00 2001 From: markiantorno Date: Mon, 28 Nov 2022 18:44:16 +0000 Subject: [PATCH 04/19] Updating version to: 5.6.82-SNAPSHOT and incrementing test cases dependency. --- RELEASE_NOTES.md | 13 ++----------- org.hl7.fhir.convertors/pom.xml | 2 +- org.hl7.fhir.dstu2/pom.xml | 2 +- org.hl7.fhir.dstu2016may/pom.xml | 2 +- org.hl7.fhir.dstu3/pom.xml | 2 +- org.hl7.fhir.r4/pom.xml | 2 +- org.hl7.fhir.r4b/pom.xml | 2 +- org.hl7.fhir.r5/pom.xml | 2 +- org.hl7.fhir.report/pom.xml | 2 +- org.hl7.fhir.utilities/pom.xml | 2 +- org.hl7.fhir.validation.cli/pom.xml | 2 +- org.hl7.fhir.validation/pom.xml | 2 +- pom.xml | 2 +- 13 files changed, 14 insertions(+), 23 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 2a44ea0e1..7b06c6ab5 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,16 +1,7 @@ ## Validator Changes -* Avoid repeated R5 Extension loading in ValidatorService -* Fix problems validating logical models -* Fix `-locale` parameter functionality -* Add Spanish internationalization phrases +* no changes ## Other code changes -* ProfileUtilities: Provide Standards Status in tree view -* JSONParser: numerous r4b/r5 speed improvements and fixes -* FHIRPathEngine: Catch exceptions resolving references in r5 -* Handle null source and target in ConceptMap conversions -* Provide consistent rendering of comments in examples in IGs -* Preparations for changes to IG Publisher narrative generation -* Fix for Identifier.use conversion in dstu3 +* no changes \ No newline at end of file diff --git a/org.hl7.fhir.convertors/pom.xml b/org.hl7.fhir.convertors/pom.xml index f2cb4e737..6556b3d67 100644 --- a/org.hl7.fhir.convertors/pom.xml +++ b/org.hl7.fhir.convertors/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.81 + 5.6.82-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.dstu2/pom.xml b/org.hl7.fhir.dstu2/pom.xml index 1524ff9dc..73a2221ce 100644 --- a/org.hl7.fhir.dstu2/pom.xml +++ b/org.hl7.fhir.dstu2/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.81 + 5.6.82-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.dstu2016may/pom.xml b/org.hl7.fhir.dstu2016may/pom.xml index 569da1bc1..6aa35e703 100644 --- a/org.hl7.fhir.dstu2016may/pom.xml +++ b/org.hl7.fhir.dstu2016may/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.81 + 5.6.82-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.dstu3/pom.xml b/org.hl7.fhir.dstu3/pom.xml index 8e663e5e7..e35f9b801 100644 --- a/org.hl7.fhir.dstu3/pom.xml +++ b/org.hl7.fhir.dstu3/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.81 + 5.6.82-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.r4/pom.xml b/org.hl7.fhir.r4/pom.xml index 7a145b235..15bc62b3a 100644 --- a/org.hl7.fhir.r4/pom.xml +++ b/org.hl7.fhir.r4/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.81 + 5.6.82-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.r4b/pom.xml b/org.hl7.fhir.r4b/pom.xml index ded1629e7..7232b315d 100644 --- a/org.hl7.fhir.r4b/pom.xml +++ b/org.hl7.fhir.r4b/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.81 + 5.6.82-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.r5/pom.xml b/org.hl7.fhir.r5/pom.xml index 5b2825226..7e715d32a 100644 --- a/org.hl7.fhir.r5/pom.xml +++ b/org.hl7.fhir.r5/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.81 + 5.6.82-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.report/pom.xml b/org.hl7.fhir.report/pom.xml index e12f15e53..78c542111 100644 --- a/org.hl7.fhir.report/pom.xml +++ b/org.hl7.fhir.report/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.81 + 5.6.82-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.utilities/pom.xml b/org.hl7.fhir.utilities/pom.xml index 824158f99..9c1e9080f 100644 --- a/org.hl7.fhir.utilities/pom.xml +++ b/org.hl7.fhir.utilities/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.81 + 5.6.82-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.validation.cli/pom.xml b/org.hl7.fhir.validation.cli/pom.xml index 6c9ba5370..bba87e97a 100644 --- a/org.hl7.fhir.validation.cli/pom.xml +++ b/org.hl7.fhir.validation.cli/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.81 + 5.6.82-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.validation/pom.xml b/org.hl7.fhir.validation/pom.xml index 6b82bd506..9ce5ca115 100644 --- a/org.hl7.fhir.validation/pom.xml +++ b/org.hl7.fhir.validation/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.81 + 5.6.82-SNAPSHOT ../pom.xml diff --git a/pom.xml b/pom.xml index 6b1583a64..d48c9d34e 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ HAPI FHIR --> org.hl7.fhir.core - 5.6.81 + 5.6.82-SNAPSHOT pom From 82bd4e5c254214b02b8f8b148bf0620f952485c3 Mon Sep 17 00:00:00 2001 From: James Agnew Date: Tue, 29 Nov 2022 07:54:58 -0500 Subject: [PATCH 05/19] Work on cleanup --- .../fhir/r5/utils/GraphQLSchemaGenerator.java | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/GraphQLSchemaGenerator.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/GraphQLSchemaGenerator.java index 7fa04a878..dbcc72d72 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/GraphQLSchemaGenerator.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/GraphQLSchemaGenerator.java @@ -298,12 +298,12 @@ public class GraphQLSchemaGenerator { List list = new ArrayList<>(); StringBuilder b = new StringBuilder(); list.add(b); - b.append("type "); - b.append(sd.getName()); - StructureDefinition sdp = context.fetchResource(StructureDefinition.class, sd.getBaseDefinition()); - if (sdp != null) { + b.append("interface "); + b.append(sd.getName() + "Base"); + StructureDefinition baseSd = context.fetchResource(StructureDefinition.class, sd.getBaseDefinition()); + if (baseSd != null) { b.append(" implements "); - b.append(sdp.getType()); + b.append(baseSd.getType() + "Base"); } b.append(" {\r\n"); ElementDefinition ed = sd.getSnapshot().getElementFirstRep(); @@ -311,6 +311,17 @@ public class GraphQLSchemaGenerator { b.append("}"); b.append("\r\n"); b.append("\r\n"); + + b.append("type "); + b.append(sd.getName()); + b.append(" implements "); + b.append(sd.getName() + "Base"); + b.append(" {\r\n"); + generateProperties(existingTypeNames, list, b, sd.getName(), sd, ed, "type", ""); + b.append("}"); + b.append("\r\n"); + b.append("\r\n"); + for (StringBuilder bs : list) { writer.write(bs.toString()); } From 1048a483a204e81b218826dc225937ed036ea0c0 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Wed, 30 Nov 2022 03:29:04 +1100 Subject: [PATCH 06/19] Fix turtle generation (#1014) Co-authored-by: Grahame Grieve --- .../main/java/org/hl7/fhir/r5/elementmodel/TurtleParser.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/elementmodel/TurtleParser.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/elementmodel/TurtleParser.java index a9a47932c..07344bc62 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/elementmodel/TurtleParser.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/elementmodel/TurtleParser.java @@ -548,10 +548,10 @@ public class TurtleParser extends ParserBase { if (code.contains(":") || code.contains("=")) generateLinkedPredicate(t, code); else - t.linkedPredicate("a", "sct:" + urlescape(code), null); + t.linkedPredicate("a", "sct:" + urlescape(code), null, null); } else if ("http://loinc.org".equals(system)) { t.prefix("loinc", "http://loinc.org/rdf#"); - t.linkedPredicate("a", "loinc:"+urlescape(code).toUpperCase(), null); + t.linkedPredicate("a", "loinc:"+urlescape(code).toUpperCase(), null, null); } } private void generateLinkedPredicate(Complex t, String code) throws FHIRException { From 4bfe5208b0fa75e10ddd919502a8a013de8433e4 Mon Sep 17 00:00:00 2001 From: dotasek Date: Tue, 29 Nov 2022 12:10:39 -0500 Subject: [PATCH 07/19] Update RELEASE_NOTES.md ***NO_CI*** --- RELEASE_NOTES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 7b06c6ab5..5c74dc382 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -4,4 +4,4 @@ ## Other code changes -* no changes \ No newline at end of file +* Fix Turtle generation From b11bf21f9b0be5eb806b0fa8f07c03f0108a2116 Mon Sep 17 00:00:00 2001 From: markiantorno Date: Tue, 29 Nov 2022 18:05:15 +0000 Subject: [PATCH 08/19] Release: v5.6.82 ## Validator Changes * no changes ## Other code changes * Fix Turtle generation ***NO_CI*** --- org.hl7.fhir.convertors/pom.xml | 2 +- org.hl7.fhir.dstu2/pom.xml | 2 +- org.hl7.fhir.dstu2016may/pom.xml | 2 +- org.hl7.fhir.dstu3/pom.xml | 2 +- org.hl7.fhir.r4/pom.xml | 2 +- org.hl7.fhir.r4b/pom.xml | 2 +- org.hl7.fhir.r5/pom.xml | 2 +- org.hl7.fhir.report/pom.xml | 2 +- org.hl7.fhir.utilities/pom.xml | 2 +- org.hl7.fhir.validation.cli/pom.xml | 2 +- org.hl7.fhir.validation/pom.xml | 2 +- pom.xml | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/org.hl7.fhir.convertors/pom.xml b/org.hl7.fhir.convertors/pom.xml index 6556b3d67..3a597ace1 100644 --- a/org.hl7.fhir.convertors/pom.xml +++ b/org.hl7.fhir.convertors/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.82-SNAPSHOT + 5.6.82 ../pom.xml diff --git a/org.hl7.fhir.dstu2/pom.xml b/org.hl7.fhir.dstu2/pom.xml index 73a2221ce..990e9766e 100644 --- a/org.hl7.fhir.dstu2/pom.xml +++ b/org.hl7.fhir.dstu2/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.82-SNAPSHOT + 5.6.82 ../pom.xml diff --git a/org.hl7.fhir.dstu2016may/pom.xml b/org.hl7.fhir.dstu2016may/pom.xml index 6aa35e703..23b23a9e3 100644 --- a/org.hl7.fhir.dstu2016may/pom.xml +++ b/org.hl7.fhir.dstu2016may/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.82-SNAPSHOT + 5.6.82 ../pom.xml diff --git a/org.hl7.fhir.dstu3/pom.xml b/org.hl7.fhir.dstu3/pom.xml index e35f9b801..ce9af9f6c 100644 --- a/org.hl7.fhir.dstu3/pom.xml +++ b/org.hl7.fhir.dstu3/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.82-SNAPSHOT + 5.6.82 ../pom.xml diff --git a/org.hl7.fhir.r4/pom.xml b/org.hl7.fhir.r4/pom.xml index 15bc62b3a..4620de66e 100644 --- a/org.hl7.fhir.r4/pom.xml +++ b/org.hl7.fhir.r4/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.82-SNAPSHOT + 5.6.82 ../pom.xml diff --git a/org.hl7.fhir.r4b/pom.xml b/org.hl7.fhir.r4b/pom.xml index 7232b315d..58b2ddcef 100644 --- a/org.hl7.fhir.r4b/pom.xml +++ b/org.hl7.fhir.r4b/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.82-SNAPSHOT + 5.6.82 ../pom.xml diff --git a/org.hl7.fhir.r5/pom.xml b/org.hl7.fhir.r5/pom.xml index 7e715d32a..d3c678c71 100644 --- a/org.hl7.fhir.r5/pom.xml +++ b/org.hl7.fhir.r5/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.82-SNAPSHOT + 5.6.82 ../pom.xml diff --git a/org.hl7.fhir.report/pom.xml b/org.hl7.fhir.report/pom.xml index 78c542111..179b8d340 100644 --- a/org.hl7.fhir.report/pom.xml +++ b/org.hl7.fhir.report/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.82-SNAPSHOT + 5.6.82 ../pom.xml diff --git a/org.hl7.fhir.utilities/pom.xml b/org.hl7.fhir.utilities/pom.xml index 9c1e9080f..72413cc0e 100644 --- a/org.hl7.fhir.utilities/pom.xml +++ b/org.hl7.fhir.utilities/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.82-SNAPSHOT + 5.6.82 ../pom.xml diff --git a/org.hl7.fhir.validation.cli/pom.xml b/org.hl7.fhir.validation.cli/pom.xml index bba87e97a..d29740874 100644 --- a/org.hl7.fhir.validation.cli/pom.xml +++ b/org.hl7.fhir.validation.cli/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.82-SNAPSHOT + 5.6.82 ../pom.xml diff --git a/org.hl7.fhir.validation/pom.xml b/org.hl7.fhir.validation/pom.xml index 9ce5ca115..3415b3223 100644 --- a/org.hl7.fhir.validation/pom.xml +++ b/org.hl7.fhir.validation/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.82-SNAPSHOT + 5.6.82 ../pom.xml diff --git a/pom.xml b/pom.xml index d48c9d34e..8f6346f7e 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ HAPI FHIR --> org.hl7.fhir.core - 5.6.82-SNAPSHOT + 5.6.82 pom From ab00f53ee731168aedaabee6eb997a3a48588beb Mon Sep 17 00:00:00 2001 From: markiantorno Date: Tue, 29 Nov 2022 18:22:35 +0000 Subject: [PATCH 09/19] Updating version to: 5.6.83-SNAPSHOT and incrementing test cases dependency. --- RELEASE_NOTES.md | 2 +- org.hl7.fhir.convertors/pom.xml | 2 +- org.hl7.fhir.dstu2/pom.xml | 2 +- org.hl7.fhir.dstu2016may/pom.xml | 2 +- org.hl7.fhir.dstu3/pom.xml | 2 +- org.hl7.fhir.r4/pom.xml | 2 +- org.hl7.fhir.r4b/pom.xml | 2 +- org.hl7.fhir.r5/pom.xml | 2 +- org.hl7.fhir.report/pom.xml | 2 +- org.hl7.fhir.utilities/pom.xml | 2 +- org.hl7.fhir.validation.cli/pom.xml | 2 +- org.hl7.fhir.validation/pom.xml | 2 +- pom.xml | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 5c74dc382..7b06c6ab5 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -4,4 +4,4 @@ ## Other code changes -* Fix Turtle generation +* no changes \ No newline at end of file diff --git a/org.hl7.fhir.convertors/pom.xml b/org.hl7.fhir.convertors/pom.xml index 3a597ace1..98d793a3f 100644 --- a/org.hl7.fhir.convertors/pom.xml +++ b/org.hl7.fhir.convertors/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.82 + 5.6.83-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.dstu2/pom.xml b/org.hl7.fhir.dstu2/pom.xml index 990e9766e..5aba82f82 100644 --- a/org.hl7.fhir.dstu2/pom.xml +++ b/org.hl7.fhir.dstu2/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.82 + 5.6.83-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.dstu2016may/pom.xml b/org.hl7.fhir.dstu2016may/pom.xml index 23b23a9e3..022c87017 100644 --- a/org.hl7.fhir.dstu2016may/pom.xml +++ b/org.hl7.fhir.dstu2016may/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.82 + 5.6.83-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.dstu3/pom.xml b/org.hl7.fhir.dstu3/pom.xml index ce9af9f6c..e3f11b108 100644 --- a/org.hl7.fhir.dstu3/pom.xml +++ b/org.hl7.fhir.dstu3/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.82 + 5.6.83-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.r4/pom.xml b/org.hl7.fhir.r4/pom.xml index 4620de66e..6d2a95ea5 100644 --- a/org.hl7.fhir.r4/pom.xml +++ b/org.hl7.fhir.r4/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.82 + 5.6.83-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.r4b/pom.xml b/org.hl7.fhir.r4b/pom.xml index 58b2ddcef..665926532 100644 --- a/org.hl7.fhir.r4b/pom.xml +++ b/org.hl7.fhir.r4b/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.82 + 5.6.83-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.r5/pom.xml b/org.hl7.fhir.r5/pom.xml index d3c678c71..e452d8632 100644 --- a/org.hl7.fhir.r5/pom.xml +++ b/org.hl7.fhir.r5/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.82 + 5.6.83-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.report/pom.xml b/org.hl7.fhir.report/pom.xml index 179b8d340..7de2cd9fc 100644 --- a/org.hl7.fhir.report/pom.xml +++ b/org.hl7.fhir.report/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.82 + 5.6.83-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.utilities/pom.xml b/org.hl7.fhir.utilities/pom.xml index 72413cc0e..9eff6092f 100644 --- a/org.hl7.fhir.utilities/pom.xml +++ b/org.hl7.fhir.utilities/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.82 + 5.6.83-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.validation.cli/pom.xml b/org.hl7.fhir.validation.cli/pom.xml index d29740874..2eec3d73e 100644 --- a/org.hl7.fhir.validation.cli/pom.xml +++ b/org.hl7.fhir.validation.cli/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.82 + 5.6.83-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.validation/pom.xml b/org.hl7.fhir.validation/pom.xml index 3415b3223..1e26ec47f 100644 --- a/org.hl7.fhir.validation/pom.xml +++ b/org.hl7.fhir.validation/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.82 + 5.6.83-SNAPSHOT ../pom.xml diff --git a/pom.xml b/pom.xml index 8f6346f7e..f1ec9dcf8 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ HAPI FHIR --> org.hl7.fhir.core - 5.6.82 + 5.6.83-SNAPSHOT pom From ba828cbb0e0824e4365a45208e4da6f72342d048 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Tue, 29 Nov 2022 14:35:39 -0500 Subject: [PATCH 10/19] BugFix: Accepts null base in all implementations of FHIRPathEngines.evaluate(Base base, String path) to match all other evaluate methods. (#1015) --- .../src/main/java/org/hl7/fhir/dstu3/utils/FHIRPathEngine.java | 2 +- .../src/main/java/org/hl7/fhir/r4/utils/FHIRPathEngine.java | 2 +- .../src/main/java/org/hl7/fhir/r4b/utils/FHIRPathEngine.java | 2 +- .../src/main/java/org/hl7/fhir/r5/utils/FHIRPathEngine.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/org.hl7.fhir.dstu3/src/main/java/org/hl7/fhir/dstu3/utils/FHIRPathEngine.java b/org.hl7.fhir.dstu3/src/main/java/org/hl7/fhir/dstu3/utils/FHIRPathEngine.java index 0e50f7b6f..1c0b9fd34 100644 --- a/org.hl7.fhir.dstu3/src/main/java/org/hl7/fhir/dstu3/utils/FHIRPathEngine.java +++ b/org.hl7.fhir.dstu3/src/main/java/org/hl7/fhir/dstu3/utils/FHIRPathEngine.java @@ -341,7 +341,7 @@ public class FHIRPathEngine { if (base != null) list.add(base); log = new StringBuilder(); - return execute(new ExecutionContext(null, base.isResource() ? base : null, base, null, base), list, exp, true); + return execute(new ExecutionContext(null, base != null && base.isResource() ? base : null, base, null, base), list, exp, true); } /** diff --git a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/FHIRPathEngine.java b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/FHIRPathEngine.java index e057967b4..052133e85 100644 --- a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/FHIRPathEngine.java +++ b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/FHIRPathEngine.java @@ -522,7 +522,7 @@ public class FHIRPathEngine { if (base != null) list.add(base); log = new StringBuilder(); - return execute(new ExecutionContext(null, base.isResource() ? base : null, base.isResource() ? base : null, base, null, base), list, exp, true); + return execute(new ExecutionContext(null, base != null && base.isResource() ? base : null, base != null && base.isResource() ? base : null, base, null, base), list, exp, true); } /** diff --git a/org.hl7.fhir.r4b/src/main/java/org/hl7/fhir/r4b/utils/FHIRPathEngine.java b/org.hl7.fhir.r4b/src/main/java/org/hl7/fhir/r4b/utils/FHIRPathEngine.java index fe3bdca4d..b615bda2c 100644 --- a/org.hl7.fhir.r4b/src/main/java/org/hl7/fhir/r4b/utils/FHIRPathEngine.java +++ b/org.hl7.fhir.r4b/src/main/java/org/hl7/fhir/r4b/utils/FHIRPathEngine.java @@ -715,7 +715,7 @@ public class FHIRPathEngine { list.add(base); } log = new StringBuilder(); - return execute(new ExecutionContext(null, base.isResource() ? base : null, base.isResource() ? base : null, base, null, base), list, exp, true); + return execute(new ExecutionContext(null, base != null && base.isResource() ? base : null, base != null && base.isResource() ? base : null, base, null, base), list, exp, true); } /** diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/FHIRPathEngine.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/FHIRPathEngine.java index 3443e0363..bc3d6a9a1 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/FHIRPathEngine.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/FHIRPathEngine.java @@ -717,7 +717,7 @@ public class FHIRPathEngine { list.add(base); } log = new StringBuilder(); - return execute(new ExecutionContext(null, base.isResource() ? base : null, base.isResource() ? base : null, base, null, base), list, exp, true); + return execute(new ExecutionContext(null, base != null && base.isResource() ? base : null, base != null && base.isResource() ? base : null, base, null, base), list, exp, true); } /** From 929582d8f4556c6d8af8f5c81d2a2f262a589635 Mon Sep 17 00:00:00 2001 From: dotasek Date: Tue, 29 Nov 2022 14:36:26 -0500 Subject: [PATCH 11/19] Update RELEASE_NOTES.md ***NO_CI*** --- RELEASE_NOTES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 7b06c6ab5..205d3e0eb 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -4,4 +4,4 @@ ## Other code changes -* no changes \ No newline at end of file +* BugFix: NPE when using FhirPathEngine.evaluate with a null base object From 8f1f961315dc39e7d37814f3da8296c00938be4d Mon Sep 17 00:00:00 2001 From: dotasek Date: Tue, 29 Nov 2022 14:39:59 -0500 Subject: [PATCH 12/19] Revert "BugFix: Accepts null base in all implementations of FHIRPathEngines.evaluate(Base base, String path) to match all other evaluate methods. (#1015)" (#1017) This reverts commit ba828cbb0e0824e4365a45208e4da6f72342d048. --- .../src/main/java/org/hl7/fhir/dstu3/utils/FHIRPathEngine.java | 2 +- .../src/main/java/org/hl7/fhir/r4/utils/FHIRPathEngine.java | 2 +- .../src/main/java/org/hl7/fhir/r4b/utils/FHIRPathEngine.java | 2 +- .../src/main/java/org/hl7/fhir/r5/utils/FHIRPathEngine.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/org.hl7.fhir.dstu3/src/main/java/org/hl7/fhir/dstu3/utils/FHIRPathEngine.java b/org.hl7.fhir.dstu3/src/main/java/org/hl7/fhir/dstu3/utils/FHIRPathEngine.java index 1c0b9fd34..0e50f7b6f 100644 --- a/org.hl7.fhir.dstu3/src/main/java/org/hl7/fhir/dstu3/utils/FHIRPathEngine.java +++ b/org.hl7.fhir.dstu3/src/main/java/org/hl7/fhir/dstu3/utils/FHIRPathEngine.java @@ -341,7 +341,7 @@ public class FHIRPathEngine { if (base != null) list.add(base); log = new StringBuilder(); - return execute(new ExecutionContext(null, base != null && base.isResource() ? base : null, base, null, base), list, exp, true); + return execute(new ExecutionContext(null, base.isResource() ? base : null, base, null, base), list, exp, true); } /** diff --git a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/FHIRPathEngine.java b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/FHIRPathEngine.java index 052133e85..e057967b4 100644 --- a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/FHIRPathEngine.java +++ b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/FHIRPathEngine.java @@ -522,7 +522,7 @@ public class FHIRPathEngine { if (base != null) list.add(base); log = new StringBuilder(); - return execute(new ExecutionContext(null, base != null && base.isResource() ? base : null, base != null && base.isResource() ? base : null, base, null, base), list, exp, true); + return execute(new ExecutionContext(null, base.isResource() ? base : null, base.isResource() ? base : null, base, null, base), list, exp, true); } /** diff --git a/org.hl7.fhir.r4b/src/main/java/org/hl7/fhir/r4b/utils/FHIRPathEngine.java b/org.hl7.fhir.r4b/src/main/java/org/hl7/fhir/r4b/utils/FHIRPathEngine.java index b615bda2c..fe3bdca4d 100644 --- a/org.hl7.fhir.r4b/src/main/java/org/hl7/fhir/r4b/utils/FHIRPathEngine.java +++ b/org.hl7.fhir.r4b/src/main/java/org/hl7/fhir/r4b/utils/FHIRPathEngine.java @@ -715,7 +715,7 @@ public class FHIRPathEngine { list.add(base); } log = new StringBuilder(); - return execute(new ExecutionContext(null, base != null && base.isResource() ? base : null, base != null && base.isResource() ? base : null, base, null, base), list, exp, true); + return execute(new ExecutionContext(null, base.isResource() ? base : null, base.isResource() ? base : null, base, null, base), list, exp, true); } /** diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/FHIRPathEngine.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/FHIRPathEngine.java index bc3d6a9a1..3443e0363 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/FHIRPathEngine.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/FHIRPathEngine.java @@ -717,7 +717,7 @@ public class FHIRPathEngine { list.add(base); } log = new StringBuilder(); - return execute(new ExecutionContext(null, base != null && base.isResource() ? base : null, base != null && base.isResource() ? base : null, base, null, base), list, exp, true); + return execute(new ExecutionContext(null, base.isResource() ? base : null, base.isResource() ? base : null, base, null, base), list, exp, true); } /** From 4b09c2ff2dd1e4cee4801c3871131286de91cafb Mon Sep 17 00:00:00 2001 From: dotasek Date: Tue, 29 Nov 2022 14:40:26 -0500 Subject: [PATCH 13/19] Update RELEASE_NOTES.md ***NO_CI*** --- RELEASE_NOTES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 205d3e0eb..3b263f099 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -4,4 +4,4 @@ ## Other code changes -* BugFix: NPE when using FhirPathEngine.evaluate with a null base object +* no changes From 2744b5eeed56b9c7fa1f831d1cfe1b26f36f4f91 Mon Sep 17 00:00:00 2001 From: James Agnew Date: Tue, 29 Nov 2022 14:42:47 -0500 Subject: [PATCH 14/19] Fixes to schema generator --- .../fhir/r5/utils/GraphQLSchemaGenerator.java | 36 ++++++++++++++----- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/GraphQLSchemaGenerator.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/GraphQLSchemaGenerator.java index dbcc72d72..bd2bf1854 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/GraphQLSchemaGenerator.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/GraphQLSchemaGenerator.java @@ -277,8 +277,14 @@ public class GraphQLSchemaGenerator { private void generateElementBase(Writer writer, EnumSet operations) throws IOException { if (operations.contains(FHIROperationType.READ) || operations.contains(FHIROperationType.SEARCH)) { + writer.write("interface IElement {\r\n"); + writer.write(" id: String\r\n"); + writer.write(" extension: [Extension]\r\n"); + writer.write("}\r\n"); + writer.write("\r\n"); + writer.write("type ElementBase {\r\n"); - writer.write(" id: ID\r\n"); + writer.write(" id: String\r\n"); writer.write(" extension: [Extension]\r\n"); writer.write("}\r\n"); writer.write("\r\n"); @@ -299,12 +305,8 @@ public class GraphQLSchemaGenerator { StringBuilder b = new StringBuilder(); list.add(b); b.append("interface "); - b.append(sd.getName() + "Base"); - StructureDefinition baseSd = context.fetchResource(StructureDefinition.class, sd.getBaseDefinition()); - if (baseSd != null) { - b.append(" implements "); - b.append(baseSd.getType() + "Base"); - } + b.append("I" + sd.getName()); + generateTypeSuperinterfaceDeclaration(sd, b); b.append(" {\r\n"); ElementDefinition ed = sd.getSnapshot().getElementFirstRep(); generateProperties(existingTypeNames, list, b, sd.getName(), sd, ed, "type", ""); @@ -314,8 +316,7 @@ public class GraphQLSchemaGenerator { b.append("type "); b.append(sd.getName()); - b.append(" implements "); - b.append(sd.getName() + "Base"); + generateTypeSuperinterfaceDeclaration(sd, b); b.append(" {\r\n"); generateProperties(existingTypeNames, list, b, sd.getName(), sd, ed, "type", ""); b.append("}"); @@ -347,6 +348,23 @@ public class GraphQLSchemaGenerator { } + private void generateTypeSuperinterfaceDeclaration(StructureDefinition theParentSd, StringBuilder theBuilder) { + StructureDefinition baseSd = theParentSd; + boolean first = true; + while (baseSd != null && baseSd.getBaseDefinition() != null) { + baseSd = context.fetchResource(StructureDefinition.class, baseSd.getBaseDefinition()); + if (baseSd != null) { + if (first) { + theBuilder.append(" implements "); + first = false; + } else { + theBuilder.append(" & "); + } + theBuilder.append("I" + baseSd.getType()); + } + } + } + private void generateProperties(Map existingTypeNames, List list, StringBuilder b, String typeName, StructureDefinition sd, ElementDefinition ed, String mode, String suffix) throws IOException { List children = profileUtilities.getChildList(sd, ed); for (ElementDefinition child : children) { From 6d11fe95468e877160c8843ec3baf2d81890e2c2 Mon Sep 17 00:00:00 2001 From: dotasek Date: Tue, 29 Nov 2022 16:58:21 -0500 Subject: [PATCH 15/19] Update pom.xml Remove SNAPSHOT from fhir-test-cases version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f1ec9dcf8..1155c995a 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ 5.4.0 - 1.1.127-SNAPSHOT + 1.1.127 5.7.1 1.8.2 3.0.0-M5 From aaa28b504ccf1609b4e680c000514d1593fb1a98 Mon Sep 17 00:00:00 2001 From: dotasek Date: Tue, 29 Nov 2022 17:53:19 -0500 Subject: [PATCH 16/19] Update RELEASE_NOTES.md ***NO_CI*** --- RELEASE_NOTES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 3b263f099..b95790453 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -4,4 +4,4 @@ ## Other code changes -* no changes +Update FHIR test cases to released version From 4194cab4e0cae8bce5aad574a0f7d6f445879087 Mon Sep 17 00:00:00 2001 From: dotasek Date: Tue, 29 Nov 2022 17:53:45 -0500 Subject: [PATCH 17/19] Update RELEASE_NOTES.md ***NO_CI*** --- RELEASE_NOTES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index b95790453..577152047 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -4,4 +4,4 @@ ## Other code changes -Update FHIR test cases to released version +* Update FHIR test cases to released version From b939b3304036a375a2e7a1f7223f8d743fcebd86 Mon Sep 17 00:00:00 2001 From: markiantorno Date: Tue, 29 Nov 2022 23:29:15 +0000 Subject: [PATCH 18/19] Release: v5.6.83 ## Validator Changes * no changes ## Other code changes * Update FHIR test cases to released version ***NO_CI*** --- org.hl7.fhir.convertors/pom.xml | 2 +- org.hl7.fhir.dstu2/pom.xml | 2 +- org.hl7.fhir.dstu2016may/pom.xml | 2 +- org.hl7.fhir.dstu3/pom.xml | 2 +- org.hl7.fhir.r4/pom.xml | 2 +- org.hl7.fhir.r4b/pom.xml | 2 +- org.hl7.fhir.r5/pom.xml | 2 +- org.hl7.fhir.report/pom.xml | 2 +- org.hl7.fhir.utilities/pom.xml | 2 +- org.hl7.fhir.validation.cli/pom.xml | 2 +- org.hl7.fhir.validation/pom.xml | 2 +- pom.xml | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/org.hl7.fhir.convertors/pom.xml b/org.hl7.fhir.convertors/pom.xml index 98d793a3f..7befe51cf 100644 --- a/org.hl7.fhir.convertors/pom.xml +++ b/org.hl7.fhir.convertors/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.83-SNAPSHOT + 5.6.83 ../pom.xml diff --git a/org.hl7.fhir.dstu2/pom.xml b/org.hl7.fhir.dstu2/pom.xml index 5aba82f82..fabcf2057 100644 --- a/org.hl7.fhir.dstu2/pom.xml +++ b/org.hl7.fhir.dstu2/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.83-SNAPSHOT + 5.6.83 ../pom.xml diff --git a/org.hl7.fhir.dstu2016may/pom.xml b/org.hl7.fhir.dstu2016may/pom.xml index 022c87017..0c701c405 100644 --- a/org.hl7.fhir.dstu2016may/pom.xml +++ b/org.hl7.fhir.dstu2016may/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.83-SNAPSHOT + 5.6.83 ../pom.xml diff --git a/org.hl7.fhir.dstu3/pom.xml b/org.hl7.fhir.dstu3/pom.xml index e3f11b108..e71cb1f5a 100644 --- a/org.hl7.fhir.dstu3/pom.xml +++ b/org.hl7.fhir.dstu3/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.83-SNAPSHOT + 5.6.83 ../pom.xml diff --git a/org.hl7.fhir.r4/pom.xml b/org.hl7.fhir.r4/pom.xml index 6d2a95ea5..4f44a58b6 100644 --- a/org.hl7.fhir.r4/pom.xml +++ b/org.hl7.fhir.r4/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.83-SNAPSHOT + 5.6.83 ../pom.xml diff --git a/org.hl7.fhir.r4b/pom.xml b/org.hl7.fhir.r4b/pom.xml index 665926532..c28d962e8 100644 --- a/org.hl7.fhir.r4b/pom.xml +++ b/org.hl7.fhir.r4b/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.83-SNAPSHOT + 5.6.83 ../pom.xml diff --git a/org.hl7.fhir.r5/pom.xml b/org.hl7.fhir.r5/pom.xml index e452d8632..003870747 100644 --- a/org.hl7.fhir.r5/pom.xml +++ b/org.hl7.fhir.r5/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.83-SNAPSHOT + 5.6.83 ../pom.xml diff --git a/org.hl7.fhir.report/pom.xml b/org.hl7.fhir.report/pom.xml index 7de2cd9fc..5783caf2b 100644 --- a/org.hl7.fhir.report/pom.xml +++ b/org.hl7.fhir.report/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.83-SNAPSHOT + 5.6.83 ../pom.xml diff --git a/org.hl7.fhir.utilities/pom.xml b/org.hl7.fhir.utilities/pom.xml index 9eff6092f..1f4c15b7b 100644 --- a/org.hl7.fhir.utilities/pom.xml +++ b/org.hl7.fhir.utilities/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.83-SNAPSHOT + 5.6.83 ../pom.xml diff --git a/org.hl7.fhir.validation.cli/pom.xml b/org.hl7.fhir.validation.cli/pom.xml index 2eec3d73e..3a1769190 100644 --- a/org.hl7.fhir.validation.cli/pom.xml +++ b/org.hl7.fhir.validation.cli/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.83-SNAPSHOT + 5.6.83 ../pom.xml diff --git a/org.hl7.fhir.validation/pom.xml b/org.hl7.fhir.validation/pom.xml index 1e26ec47f..9cb9be10a 100644 --- a/org.hl7.fhir.validation/pom.xml +++ b/org.hl7.fhir.validation/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.83-SNAPSHOT + 5.6.83 ../pom.xml diff --git a/pom.xml b/pom.xml index 1155c995a..5613e7d41 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ HAPI FHIR --> org.hl7.fhir.core - 5.6.83-SNAPSHOT + 5.6.83 pom From 19e957ef53dc0247fb31a3f2b4714377c92fd2f9 Mon Sep 17 00:00:00 2001 From: markiantorno Date: Tue, 29 Nov 2022 23:46:32 +0000 Subject: [PATCH 19/19] Updating version to: 5.6.84-SNAPSHOT and incrementing test cases dependency. --- RELEASE_NOTES.md | 2 +- org.hl7.fhir.convertors/pom.xml | 2 +- org.hl7.fhir.dstu2/pom.xml | 2 +- org.hl7.fhir.dstu2016may/pom.xml | 2 +- org.hl7.fhir.dstu3/pom.xml | 2 +- org.hl7.fhir.r4/pom.xml | 2 +- org.hl7.fhir.r4b/pom.xml | 2 +- org.hl7.fhir.r5/pom.xml | 2 +- org.hl7.fhir.report/pom.xml | 2 +- org.hl7.fhir.utilities/pom.xml | 2 +- org.hl7.fhir.validation.cli/pom.xml | 2 +- org.hl7.fhir.validation/pom.xml | 2 +- pom.xml | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 577152047..7b06c6ab5 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -4,4 +4,4 @@ ## Other code changes -* Update FHIR test cases to released version +* no changes \ No newline at end of file diff --git a/org.hl7.fhir.convertors/pom.xml b/org.hl7.fhir.convertors/pom.xml index 7befe51cf..bfe581e61 100644 --- a/org.hl7.fhir.convertors/pom.xml +++ b/org.hl7.fhir.convertors/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.83 + 5.6.84-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.dstu2/pom.xml b/org.hl7.fhir.dstu2/pom.xml index fabcf2057..ff5454fab 100644 --- a/org.hl7.fhir.dstu2/pom.xml +++ b/org.hl7.fhir.dstu2/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.83 + 5.6.84-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.dstu2016may/pom.xml b/org.hl7.fhir.dstu2016may/pom.xml index 0c701c405..cd75f221a 100644 --- a/org.hl7.fhir.dstu2016may/pom.xml +++ b/org.hl7.fhir.dstu2016may/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.83 + 5.6.84-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.dstu3/pom.xml b/org.hl7.fhir.dstu3/pom.xml index e71cb1f5a..68f20fb67 100644 --- a/org.hl7.fhir.dstu3/pom.xml +++ b/org.hl7.fhir.dstu3/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.83 + 5.6.84-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.r4/pom.xml b/org.hl7.fhir.r4/pom.xml index 4f44a58b6..db9c9a653 100644 --- a/org.hl7.fhir.r4/pom.xml +++ b/org.hl7.fhir.r4/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.83 + 5.6.84-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.r4b/pom.xml b/org.hl7.fhir.r4b/pom.xml index c28d962e8..e4e6ab260 100644 --- a/org.hl7.fhir.r4b/pom.xml +++ b/org.hl7.fhir.r4b/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.83 + 5.6.84-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.r5/pom.xml b/org.hl7.fhir.r5/pom.xml index 003870747..b46de2273 100644 --- a/org.hl7.fhir.r5/pom.xml +++ b/org.hl7.fhir.r5/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.83 + 5.6.84-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.report/pom.xml b/org.hl7.fhir.report/pom.xml index 5783caf2b..231f0ec3e 100644 --- a/org.hl7.fhir.report/pom.xml +++ b/org.hl7.fhir.report/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.83 + 5.6.84-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.utilities/pom.xml b/org.hl7.fhir.utilities/pom.xml index 1f4c15b7b..1e251ac59 100644 --- a/org.hl7.fhir.utilities/pom.xml +++ b/org.hl7.fhir.utilities/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.83 + 5.6.84-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.validation.cli/pom.xml b/org.hl7.fhir.validation.cli/pom.xml index 3a1769190..f0827dda5 100644 --- a/org.hl7.fhir.validation.cli/pom.xml +++ b/org.hl7.fhir.validation.cli/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.83 + 5.6.84-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.validation/pom.xml b/org.hl7.fhir.validation/pom.xml index 9cb9be10a..ae27f01d9 100644 --- a/org.hl7.fhir.validation/pom.xml +++ b/org.hl7.fhir.validation/pom.xml @@ -5,7 +5,7 @@ ca.uhn.hapi.fhir org.hl7.fhir.core - 5.6.83 + 5.6.84-SNAPSHOT ../pom.xml diff --git a/pom.xml b/pom.xml index 5613e7d41..ef93c1adb 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ HAPI FHIR --> org.hl7.fhir.core - 5.6.83 + 5.6.84-SNAPSHOT pom