From fadb727e87737d33e26606aacb530bcafc6c46e1 Mon Sep 17 00:00:00 2001 From: markiantorno Date: Thu, 8 Sep 2022 15:20:07 +0000 Subject: [PATCH 01/19] Updating version to: 5.6.61-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 74041af2b..7b06c6ab5 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -4,4 +4,4 @@ ## Other code changes -* Rendering improvements for Patient and extension summary \ No newline at end of file +* 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 239212643..d6c87bc27 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.60 + 5.6.61-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.dstu2/pom.xml b/org.hl7.fhir.dstu2/pom.xml index 573e27c2c..ece6f9274 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.60 + 5.6.61-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.dstu2016may/pom.xml b/org.hl7.fhir.dstu2016may/pom.xml index 7def946b3..0f7275edb 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.60 + 5.6.61-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.dstu3/pom.xml b/org.hl7.fhir.dstu3/pom.xml index 20ca58260..23969fd04 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.60 + 5.6.61-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.r4/pom.xml b/org.hl7.fhir.r4/pom.xml index 903b30563..42a544fca 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.60 + 5.6.61-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.r4b/pom.xml b/org.hl7.fhir.r4b/pom.xml index 25610bc56..00e874c51 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.60 + 5.6.61-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.r5/pom.xml b/org.hl7.fhir.r5/pom.xml index 6b7ac155b..563d0944d 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.60 + 5.6.61-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.report/pom.xml b/org.hl7.fhir.report/pom.xml index 868d63280..7ee6e6b82 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.60 + 5.6.61-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.utilities/pom.xml b/org.hl7.fhir.utilities/pom.xml index 71a055706..017b515b6 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.60 + 5.6.61-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.validation.cli/pom.xml b/org.hl7.fhir.validation.cli/pom.xml index 798df695f..15aa09812 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.60 + 5.6.61-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.validation/pom.xml b/org.hl7.fhir.validation/pom.xml index 7203a5531..4e18da3e2 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.60 + 5.6.61-SNAPSHOT ../pom.xml diff --git a/pom.xml b/pom.xml index 1ba0075da..84e8c6944 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ HAPI FHIR --> org.hl7.fhir.core - 5.6.60 + 5.6.61-SNAPSHOT pom From cf77cd171715dc8ea1a84119765641480eef3250 Mon Sep 17 00:00:00 2001 From: dotasek Date: Thu, 8 Sep 2022 17:50:39 -0400 Subject: [PATCH 02/19] Add new param to BaseAdvisor_40_50 --- .../convertors/advisors/impl/BaseAdvisor_40_50.java | 12 +++++++++++- .../resources40_50/ImplementationGuide40_50.java | 11 ++++++----- .../conv40_50/resources40_50/Resource40_50.java | 2 +- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/advisors/impl/BaseAdvisor_40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/advisors/impl/BaseAdvisor_40_50.java index b9f5a75b4..31d456130 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/advisors/impl/BaseAdvisor_40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/advisors/impl/BaseAdvisor_40_50.java @@ -11,14 +11,21 @@ import org.hl7.fhir.exceptions.FHIRException; public class BaseAdvisor_40_50 extends BaseAdvisor50 { private static final List TestScriptIgnoredUrls = Arrays.asList("http://hl7.org/fhir/5.0/StructureDefinition/extension-TestScript.scope"); + private boolean convertImplementationGuideDefinitionParameterComponent = true; public BaseAdvisor_40_50() { + } public BaseAdvisor_40_50(Boolean failFast) { this.failFast = failFast; } - + + public BaseAdvisor_40_50(Boolean failFast, Boolean convertImplementationGuideDefinitionParameterComponent) { + this.failFast = failFast; + this.convertImplementationGuideDefinitionParameterComponent = convertImplementationGuideDefinitionParameterComponent; + } + @Override public boolean ignoreExtension(@Nonnull String path, @@ -30,4 +37,7 @@ public class BaseAdvisor_40_50 extends BaseAdvisor50 Date: Fri, 9 Sep 2022 09:03:16 +1000 Subject: [PATCH 03/19] example generation improvements --- RELEASE_NOTES.md | 3 ++- .../main/java/org/hl7/fhir/utilities/turtle/Turtle.java | 2 +- .../java/org/hl7/fhir/utilities/xml/XhtmlGenerator.java | 8 ++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 74041af2b..0c859a477 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -4,4 +4,5 @@ ## Other code changes -* Rendering improvements for Patient and extension summary \ No newline at end of file +* Rendering improvements for Patient and extension summary +* Improved HTML compliance (img.alt) \ No newline at end of file diff --git a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/turtle/Turtle.java b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/turtle/Turtle.java index a555698a3..122399b0e 100644 --- a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/turtle/Turtle.java +++ b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/turtle/Turtle.java @@ -384,7 +384,7 @@ public class Turtle { public String asHtml() throws Exception { StringBuilder b = new StringBuilder(); - b.append("
\r\n");
+    b.append("
\r\n");
     commitPrefixes(b);
     for (Section s : sections) {
       commitSection(b, s);
diff --git a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/xml/XhtmlGenerator.java b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/xml/XhtmlGenerator.java
index 21a5ec567..6cd47e532 100644
--- a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/xml/XhtmlGenerator.java
+++ b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/xml/XhtmlGenerator.java
@@ -53,7 +53,7 @@ import org.w3c.dom.Text;
 
 public class XhtmlGenerator {
 
-	private static final int LINE_LIMIT = 85;
+	private static final int LINE_LIMIT = 78;
   private XhtmlGeneratorAdorner adorner;
 	
   public XhtmlGenerator(XhtmlGeneratorAdorner adorner) {
@@ -66,7 +66,7 @@ public class XhtmlGenerator {
     
     out.write("
\r\n"); out.write("

Example Instance \""+name+"\""+(desc == null ? "" : ": "+Utilities.escapeXml(desc))+"

\r\n"); - out.write("
\r\n");
+    out.write("
\r\n");
 
     XhtmlGeneratorAdornerState state = null; // adorner == null ? new XhtmlGeneratorAdornerState("", "") : adorner.getState(this, null, null);
     for (int i = 0; i < doc.getChildNodes().getLength(); i++)
@@ -86,7 +86,7 @@ public class XhtmlGenerator {
     out.write("
\r\n"); out.write("

"+Utilities.escapeXml(desc)+"

\r\n"); if (adorn) { - out.write("
\r\n");
+      out.write("
\r\n");
       out.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n");
       out.write("\r\n");
 
@@ -95,7 +95,7 @@ public class XhtmlGenerator {
 	  		writeNode(out, doc.getChildNodes().item(i), state, level);
       out.write("
\r\n"); } else { - out.write("\r\n"); + out.write("\r\n"); for (int i = 0; i < doc.getChildNodes().getLength(); i++) writeNodePlain(out, doc.getChildNodes().item(i), level); From 28b9757500bf02ce5480f7a343299330a38dc2a4 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Fri, 9 Sep 2022 09:04:12 +1000 Subject: [PATCH 04/19] release notes --- RELEASE_NOTES.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 370606ea8..962a30fb0 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -4,4 +4,5 @@ ## Other code changes -* Improved HTML compliance (img.alt) \ No newline at end of file +* Improved HTML compliance (img.alt) +* Improved example generation From 1679376f38e70f38b9da1a94cdbfb4595b6cb3f5 Mon Sep 17 00:00:00 2001 From: dotasek Date: Thu, 8 Sep 2022 20:44:30 -0400 Subject: [PATCH 05/19] Improved param name + re-introduce logic. --- .../advisors/impl/BaseAdvisor_40_50.java | 10 ++++---- .../ImplementationGuide40_50.java | 24 +++++++++---------- .../resources40_50/Resource40_50.java | 2 +- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/advisors/impl/BaseAdvisor_40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/advisors/impl/BaseAdvisor_40_50.java index 31d456130..b834ab658 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/advisors/impl/BaseAdvisor_40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/advisors/impl/BaseAdvisor_40_50.java @@ -11,7 +11,7 @@ import org.hl7.fhir.exceptions.FHIRException; public class BaseAdvisor_40_50 extends BaseAdvisor50 { private static final List TestScriptIgnoredUrls = Arrays.asList("http://hl7.org/fhir/5.0/StructureDefinition/extension-TestScript.scope"); - private boolean convertImplementationGuideDefinitionParameterComponent = true; + private boolean produceIllegalParameters = false; public BaseAdvisor_40_50() { @@ -21,9 +21,9 @@ public class BaseAdvisor_40_50 extends BaseAdvisor50 Date: Thu, 8 Sep 2022 20:47:35 -0400 Subject: [PATCH 06/19] Make pretty --- .../resources40_50/ImplementationGuide40_50.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ImplementationGuide40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ImplementationGuide40_50.java index e1d14ed19..78abb644a 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ImplementationGuide40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ImplementationGuide40_50.java @@ -2344,11 +2344,11 @@ public class ImplementationGuide40_50 { if (produceIllegalParameters) { tgt.addParameter(convertImplementationGuideDefinitionParameterComponent(t)); } else { - org.hl7.fhir.r4.model.Extension e = new org.hl7.fhir.r4.model.Extension(EXT_IG_DEFINITION_PARAMETER); - org.hl7.fhir.r4.model.Extension eCode = new org.hl7.fhir.r4.model.Extension("code", new org.hl7.fhir.r4.model.StringType(t.getCode().getCode())); - org.hl7.fhir.r4.model.Extension eValue = new org.hl7.fhir.r4.model.Extension("value", new org.hl7.fhir.r4.model.StringType(t.getValue())); - e.addExtension(eCode); - e.addExtension(eValue); + org.hl7.fhir.r4.model.Extension e = new org.hl7.fhir.r4.model.Extension(EXT_IG_DEFINITION_PARAMETER); + org.hl7.fhir.r4.model.Extension eCode = new org.hl7.fhir.r4.model.Extension("code", new org.hl7.fhir.r4.model.StringType(t.getCode().getCode())); + org.hl7.fhir.r4.model.Extension eValue = new org.hl7.fhir.r4.model.Extension("value", new org.hl7.fhir.r4.model.StringType(t.getValue())); + e.addExtension(eCode); + e.addExtension(eValue); tgt.addExtension(e); } } From a54b8162c68acb63e9a8d05f76a5de06eafef9ad Mon Sep 17 00:00:00 2001 From: dotasek Date: Thu, 8 Sep 2022 20:58:33 -0400 Subject: [PATCH 07/19] Restore commented logic --- .../conv40_50/resources40_50/ImplementationGuide40_50.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ImplementationGuide40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ImplementationGuide40_50.java index 78abb644a..da65141e1 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ImplementationGuide40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ImplementationGuide40_50.java @@ -18,6 +18,7 @@ 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; import org.hl7.fhir.r5.model.ImplementationGuide; +import org.hl7.fhir.utilities.Utilities; /* Copyright (c) 2011+, HL7, Inc. @@ -2340,8 +2341,8 @@ public class ImplementationGuide40_50 { if (src.hasPage()) tgt.setPage(convertImplementationGuideDefinitionPageComponent(src.getPage())); for (org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionParameterComponent t : src.getParameter()) { -// if (Utilities.existsInList(t.getCode().getCode(), "apply", "path-resource", "path-pages", "path-tx-cache", "expansion-parameter", "rule-broken-links", "generate-xml", "generate-json", "generate-turtle", "html-template")) - if (produceIllegalParameters) { +// if ( Utilities.existsInList(t.getCode().getCode(), "apply", "path-resource", "path-pages", "path-tx-cache", "expansion-parameter", "rule-broken-links", "generate-xml", "generate-json", "generate-turtle", "html-template")) + if (produceIllegalParameters || Utilities.existsInList(t.getCode().getCode(), "apply", "path-resource", "path-pages", "path-tx-cache", "expansion-parameter", "rule-broken-links", "generate-xml", "generate-json", "generate-turtle", "html-template")) { tgt.addParameter(convertImplementationGuideDefinitionParameterComponent(t)); } else { org.hl7.fhir.r4.model.Extension e = new org.hl7.fhir.r4.model.Extension(EXT_IG_DEFINITION_PARAMETER); From 9783fcfe7bbb40d114c1f2ef88b1bad3f15775d4 Mon Sep 17 00:00:00 2001 From: dotasek Date: Thu, 8 Sep 2022 21:00:23 -0400 Subject: [PATCH 08/19] Delete comment --- .../conv40_50/resources40_50/ImplementationGuide40_50.java | 1 - 1 file changed, 1 deletion(-) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ImplementationGuide40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ImplementationGuide40_50.java index da65141e1..912acac58 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ImplementationGuide40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/resources40_50/ImplementationGuide40_50.java @@ -2341,7 +2341,6 @@ public class ImplementationGuide40_50 { if (src.hasPage()) tgt.setPage(convertImplementationGuideDefinitionPageComponent(src.getPage())); for (org.hl7.fhir.r5.model.ImplementationGuide.ImplementationGuideDefinitionParameterComponent t : src.getParameter()) { -// if ( Utilities.existsInList(t.getCode().getCode(), "apply", "path-resource", "path-pages", "path-tx-cache", "expansion-parameter", "rule-broken-links", "generate-xml", "generate-json", "generate-turtle", "html-template")) if (produceIllegalParameters || Utilities.existsInList(t.getCode().getCode(), "apply", "path-resource", "path-pages", "path-tx-cache", "expansion-parameter", "rule-broken-links", "generate-xml", "generate-json", "generate-turtle", "html-template")) { tgt.addParameter(convertImplementationGuideDefinitionParameterComponent(t)); } else { From 7214a32209d4175a58623251c683eb2281e07ae0 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Fri, 9 Sep 2022 20:57:30 +1000 Subject: [PATCH 09/19] more type characteristics work --- .../instance/type/StructureDefinitionValidator.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/StructureDefinitionValidator.java b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/StructureDefinitionValidator.java index 30209a35f..d89bdb288 100644 --- a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/StructureDefinitionValidator.java +++ b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/StructureDefinitionValidator.java @@ -288,6 +288,14 @@ public class StructureDefinitionValidator extends BaseValidator { case "Extension" :return addCharacteristicsForType(set, "can-bind"); case "Narrative" :return addCharacteristicsForType(set); case "Element" :return addCharacteristicsForType(set); + case "MoneyQuantity" :return addCharacteristicsForType(set); + case "SimpleQuantity" :return addCharacteristicsForType(set); + case "MarketingStatus" :return addCharacteristicsForType(set); + case "ExtendedContactDetail" :return addCharacteristicsForType(set); + case "VirtualServiceDetail" :return addCharacteristicsForType(set); + case "Availability" :return addCharacteristicsForType(set); + case "MonetaryComponent" :return addCharacteristicsForType(set); + case "BackboneElement" :return addCharacteristicsForType(set); default: if (context.getResourceNames().contains(tc)) From a307edc95ef32c5d855888d075f596a444ecc12b Mon Sep 17 00:00:00 2001 From: dotasek Date: Fri, 9 Sep 2022 16:09:49 -0400 Subject: [PATCH 10/19] Add test case --- .../ImplementationGuide40_50Test.java | 46 ++++++ .../resources/implementation_guide_50.json | 142 ++++++++++++++++++ 2 files changed, 188 insertions(+) create mode 100644 org.hl7.fhir.convertors/src/test/java/org/hl7/fhir/convertors/conv40_50/ImplementationGuide40_50Test.java create mode 100644 org.hl7.fhir.convertors/src/test/resources/implementation_guide_50.json diff --git a/org.hl7.fhir.convertors/src/test/java/org/hl7/fhir/convertors/conv40_50/ImplementationGuide40_50Test.java b/org.hl7.fhir.convertors/src/test/java/org/hl7/fhir/convertors/conv40_50/ImplementationGuide40_50Test.java new file mode 100644 index 000000000..aa9e6c18a --- /dev/null +++ b/org.hl7.fhir.convertors/src/test/java/org/hl7/fhir/convertors/conv40_50/ImplementationGuide40_50Test.java @@ -0,0 +1,46 @@ +package org.hl7.fhir.convertors.conv40_50; + +import org.hl7.fhir.convertors.advisors.impl.BaseAdvisor_40_50; +import org.hl7.fhir.convertors.conv40_50.resources40_50.ImplementationGuide40_50; +import org.hl7.fhir.convertors.factory.VersionConvertorFactory_40_50; +import org.hl7.fhir.r5.model.ImplementationGuide; +import org.junit.jupiter.api.Test; + +import java.io.IOException; +import java.io.InputStream; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +public class ImplementationGuide40_50Test { + + public void testProduceIllegalParameters() throws IOException { + ImplementationGuide r5_actual = getR5ImplementationGuide(); + + org.hl7.fhir.r4.model.ImplementationGuide converted = (org.hl7.fhir.r4.model.ImplementationGuide) VersionConvertorFactory_40_50.convertResource( + r5_actual, + new BaseAdvisor_40_50(true, true)); + + assertEquals(2, converted.getDefinition().getParameter().size()); + assertEquals("copyrightyear", converted.getDefinition().getParameter().get(1).getCode()); + assertEquals("2020+", converted.getDefinition().getParameter().get(1).getValue()); + } + + @Test + public void testDefaultParameters() throws IOException { + ImplementationGuide r5_actual = getR5ImplementationGuide(); + + org.hl7.fhir.r4.model.ImplementationGuide converted = (org.hl7.fhir.r4.model.ImplementationGuide) VersionConvertorFactory_40_50.convertResource(r5_actual); + + assertEquals(1, converted.getDefinition().getParameter().size()); + assertEquals("copyrightyear", converted.getDefinition().getExtension().get(0).getExtension().get(0).getValue().primitiveValue()); + assertEquals("2020+", converted.getDefinition().getExtension().get(0).getExtension().get(1).getValue().primitiveValue()); + + } + + private ImplementationGuide getR5ImplementationGuide() throws IOException { + ImplementationGuide r5_actual; + InputStream r5_stream = this.getClass().getResourceAsStream("/implementation_guide_50.json"); + r5_actual = (ImplementationGuide) new org.hl7.fhir.r5.formats.JsonParser().parse(r5_stream); + return r5_actual; + } +} diff --git a/org.hl7.fhir.convertors/src/test/resources/implementation_guide_50.json b/org.hl7.fhir.convertors/src/test/resources/implementation_guide_50.json new file mode 100644 index 000000000..85e113f2f --- /dev/null +++ b/org.hl7.fhir.convertors/src/test/resources/implementation_guide_50.json @@ -0,0 +1,142 @@ +{ + "resourceType": "ImplementationGuide", + "id": "example", + "text": { + "status": "generated", + "div": "

Generated Narrative: ImplementationGuide

Resource ImplementationGuide "example"

url: http://hl7.org/fhir/us/daf

version: 0

name: Data Access Framework (DAF)

status: draft

experimental: false

date: 2015-01-01

publisher: ONC / HL7 Joint project

contact: ONC: http://www.healthit.gov, HL7: http://hl7.org/fhir

description: The Data Access Framework (DAF) Initiative leverages the HL7 FHIR standards to standardize access to Meaningful Use Stage 2 structured information both within the organization and from external organizations

jurisdiction: United States of America (unknown#US)

copyright: Published by ONC under the standard FHIR license (CC0)

packageId: hl7.fhir.us.daf

license: CC0-1.0

fhirVersion: 5.0.0

DependsOns

-Uri
*http://hl7.org/fhir/ImplementationGuide/uscore

Globals

-TypeProfile
*Patienthttp://hl7.org/fhir/us/core/StructureDefinition/patient

definition

Groupings

-NameDescription
*testBase package (not broken up into multiple packages)

Resources

-ReferenceNameDescriptionProfile
*Patient/testTest ExampleA test example to show how an implementation guide workshttp://hl7.org/fhir/us/core/StructureDefinition/patient

page

name: patient-example.html

title: Example Patient Page

generation: html

Pages

-NameTitleGeneration
*list.htmlValue Set Pagehtml

Parameters

-CodeValue
*Apply Metadata Value (Details: http://hl7.org/fhir/guide-parameter-code code apply = 'Apply Metadata Value', stated as 'null')version

manifest

rendering: http://hl7.org/fhir/us/daf

Resources

-ReferenceProfileRelativePath
*Patient/testhttp://hl7.org/fhir/us/core/StructureDefinition/patientpatient-test.html#patient-test

Pages

-NameTitleAnchor
*patient-test.htmlTest Patient Examplepatient-test, tx, uml

image: fhir.png

other: fhir.css

" + }, + "url": "http://hl7.org/fhir/us/daf", + "version": "0", + "name": "Data Access Framework (DAF)", + "status": "draft", + "experimental": false, + "date": "2015-01-01", + "publisher": "ONC / HL7 Joint project", + "contact": [ + { + "name": "ONC", + "telecom": [ + { + "system": "url", + "value": "http://www.healthit.gov" + } + ] + }, + { + "name": "HL7", + "telecom": [ + { + "system": "url", + "value": "http://hl7.org/fhir" + } + ] + } + ], + "description": "The Data Access Framework (DAF) Initiative leverages the HL7 FHIR standards to standardize access to Meaningful Use Stage 2 structured information both within the organization and from external organizations", + "jurisdiction": [ + { + "coding": [ + { + "system": "urn:iso:std:iso:3166", + "code": "US" + } + ] + } + ], + "copyright": "Published by ONC under the standard FHIR license (CC0)", + "packageId": "hl7.fhir.us.daf", + "license": "CC0-1.0", + "fhirVersion": [ + "5.0.0" + ], + "dependsOn": [ + { + "uri": "http://hl7.org/fhir/ImplementationGuide/uscore" + } + ], + "global": [ + { + "type": "Patient", + "profile": "http://hl7.org/fhir/us/core/StructureDefinition/patient" + } + ], + "definition": { + "grouping": [ + { + "name": "test", + "description": "Base package (not broken up into multiple packages)" + } + ], + "resource": [ + { + "reference": { + "reference": "Patient/test" + }, + "name": "Test Example", + "description": "A test example to show how an implementation guide works", + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/patient" + ] + } + ], + "page": { + "name": "patient-example.html", + "title": "Example Patient Page", + "generation": "html", + "page": [ + { + "name": "list.html", + "title": "Value Set Page", + "generation": "html" + } + ] + }, + "parameter": [ + { + "code": { + "system": "http://hl7.org/fhir/guide-parameter-code", + "code": "apply" + }, + "value": "version" + }, + { + "code" : { + "system": "http://hl7.org/fhir/guide-parameter-code", + "code": "copyrightyear" + }, + "value": "2020+" + } + ] + }, + "manifest": { + "rendering": "http://hl7.org/fhir/us/daf", + "resource": [ + { + "reference": { + "reference": "Patient/test" + }, + "profile": [ + "http://hl7.org/fhir/us/core/StructureDefinition/patient" + ], + "relativePath": "patient-test.html#patient-test" + } + ], + "page": [ + { + "name": "patient-test.html", + "title": "Test Patient Example", + "anchor": [ + "patient-test", + "tx", + "uml" + ] + } + ], + "image": [ + "fhir.png" + ], + "other": [ + "fhir.css" + ] + } +} \ No newline at end of file From 0ab9f38057037a0ba08ec2a60381400b278bb9b8 Mon Sep 17 00:00:00 2001 From: dotasek Date: Fri, 9 Sep 2022 17:35:24 -0400 Subject: [PATCH 11/19] Update RELEASE_NOTES.md ***NO_CI*** --- RELEASE_NOTES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 962a30fb0..22e3854a7 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -6,3 +6,4 @@ * Improved HTML compliance (img.alt) * Improved example generation +* Improved handling of illegal parameters in ImplementationGuideDefinition From 9b9c12c97a2d9cfd9a381eb62198696bff88a234 Mon Sep 17 00:00:00 2001 From: markiantorno Date: Fri, 9 Sep 2022 21:56:43 +0000 Subject: [PATCH 12/19] Release: v5.6.61 ## Validator Changes * no changes ## Other code changes * Improved HTML compliance (img.alt) * Improved example generation * Improved handling of illegal parameters in ImplementationGuideDefinition ***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 d6c87bc27..46d48e2a7 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.61-SNAPSHOT + 5.6.61 ../pom.xml diff --git a/org.hl7.fhir.dstu2/pom.xml b/org.hl7.fhir.dstu2/pom.xml index ece6f9274..a74b9ab43 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.61-SNAPSHOT + 5.6.61 ../pom.xml diff --git a/org.hl7.fhir.dstu2016may/pom.xml b/org.hl7.fhir.dstu2016may/pom.xml index 0f7275edb..38806e19f 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.61-SNAPSHOT + 5.6.61 ../pom.xml diff --git a/org.hl7.fhir.dstu3/pom.xml b/org.hl7.fhir.dstu3/pom.xml index 23969fd04..7bf4581e7 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.61-SNAPSHOT + 5.6.61 ../pom.xml diff --git a/org.hl7.fhir.r4/pom.xml b/org.hl7.fhir.r4/pom.xml index 42a544fca..68cd74578 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.61-SNAPSHOT + 5.6.61 ../pom.xml diff --git a/org.hl7.fhir.r4b/pom.xml b/org.hl7.fhir.r4b/pom.xml index 00e874c51..bccab9953 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.61-SNAPSHOT + 5.6.61 ../pom.xml diff --git a/org.hl7.fhir.r5/pom.xml b/org.hl7.fhir.r5/pom.xml index 563d0944d..de6f366ad 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.61-SNAPSHOT + 5.6.61 ../pom.xml diff --git a/org.hl7.fhir.report/pom.xml b/org.hl7.fhir.report/pom.xml index 7ee6e6b82..1e4bb3e1e 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.61-SNAPSHOT + 5.6.61 ../pom.xml diff --git a/org.hl7.fhir.utilities/pom.xml b/org.hl7.fhir.utilities/pom.xml index 017b515b6..c12253077 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.61-SNAPSHOT + 5.6.61 ../pom.xml diff --git a/org.hl7.fhir.validation.cli/pom.xml b/org.hl7.fhir.validation.cli/pom.xml index 15aa09812..04558a81d 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.61-SNAPSHOT + 5.6.61 ../pom.xml diff --git a/org.hl7.fhir.validation/pom.xml b/org.hl7.fhir.validation/pom.xml index 4e18da3e2..8694d28c7 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.61-SNAPSHOT + 5.6.61 ../pom.xml diff --git a/pom.xml b/pom.xml index 84e8c6944..a15e599e7 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ HAPI FHIR --> org.hl7.fhir.core - 5.6.61-SNAPSHOT + 5.6.61 pom From 31238146a0cf00f42cc6727103a9311c13b737c6 Mon Sep 17 00:00:00 2001 From: markiantorno Date: Fri, 9 Sep 2022 22:13:28 +0000 Subject: [PATCH 13/19] Updating version to: 5.6.62-SNAPSHOT and incrementing test cases dependency. --- RELEASE_NOTES.md | 4 +--- 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(+), 15 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 22e3854a7..7b06c6ab5 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -4,6 +4,4 @@ ## Other code changes -* Improved HTML compliance (img.alt) -* Improved example generation -* Improved handling of illegal parameters in ImplementationGuideDefinition +* 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 46d48e2a7..86f1578c5 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.61 + 5.6.62-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.dstu2/pom.xml b/org.hl7.fhir.dstu2/pom.xml index a74b9ab43..e55b7e953 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.61 + 5.6.62-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.dstu2016may/pom.xml b/org.hl7.fhir.dstu2016may/pom.xml index 38806e19f..02701177c 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.61 + 5.6.62-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.dstu3/pom.xml b/org.hl7.fhir.dstu3/pom.xml index 7bf4581e7..48ff2e2cb 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.61 + 5.6.62-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.r4/pom.xml b/org.hl7.fhir.r4/pom.xml index 68cd74578..7dd4d363c 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.61 + 5.6.62-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.r4b/pom.xml b/org.hl7.fhir.r4b/pom.xml index bccab9953..64ef20898 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.61 + 5.6.62-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.r5/pom.xml b/org.hl7.fhir.r5/pom.xml index de6f366ad..8bbc0f64d 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.61 + 5.6.62-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.report/pom.xml b/org.hl7.fhir.report/pom.xml index 1e4bb3e1e..b2f924cd1 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.61 + 5.6.62-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.utilities/pom.xml b/org.hl7.fhir.utilities/pom.xml index c12253077..8345362c4 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.61 + 5.6.62-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.validation.cli/pom.xml b/org.hl7.fhir.validation.cli/pom.xml index 04558a81d..92c62bbe8 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.61 + 5.6.62-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.validation/pom.xml b/org.hl7.fhir.validation/pom.xml index 8694d28c7..a4e9f2cd8 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.61 + 5.6.62-SNAPSHOT ../pom.xml diff --git a/pom.xml b/pom.xml index a15e599e7..95de264b7 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ HAPI FHIR --> org.hl7.fhir.core - 5.6.61 + 5.6.62-SNAPSHOT pom From 0148208a14c053cd0556b281690fd08dec40da87 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Sat, 10 Sep 2022 15:02:29 +1000 Subject: [PATCH 14/19] Fix version problem with MessageHeader.entry --- .../primitive40_50/Canonical40_50.java | 29 +++++++++++++++++++ .../resources40_50/MessageHeader40_50.java | 14 ++++++--- 2 files changed, 39 insertions(+), 4 deletions(-) diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/datatypes40_50/primitive40_50/Canonical40_50.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/datatypes40_50/primitive40_50/Canonical40_50.java index 8b01c54cf..3e6cf10ec 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/datatypes40_50/primitive40_50/Canonical40_50.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv40_50/datatypes40_50/primitive40_50/Canonical40_50.java @@ -2,6 +2,8 @@ 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.r4.model.Type; +import org.hl7.fhir.r5.model.DataType; public class Canonical40_50 { public static org.hl7.fhir.r5.model.CanonicalType convertCanonical(org.hl7.fhir.r4.model.CanonicalType src) throws FHIRException { @@ -15,4 +17,31 @@ public class Canonical40_50 { ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); return tgt; } + + public static org.hl7.fhir.r5.model.UriType convertCanonicalToUri(org.hl7.fhir.r4.model.CanonicalType src) throws FHIRException { + org.hl7.fhir.r5.model.UriType tgt = src.hasValue() ? new org.hl7.fhir.r5.model.UriType(src.getValueAsString()) : new org.hl7.fhir.r5.model.UriType(); + ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); + return tgt; + } + + public static org.hl7.fhir.r4.model.UriType convertCanonicalToUri(org.hl7.fhir.r5.model.CanonicalType src) throws FHIRException { + org.hl7.fhir.r4.model.UriType tgt = src.hasValue() ? new org.hl7.fhir.r4.model.UriType(src.getValueAsString()) : new org.hl7.fhir.r4.model.UriType(); + ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); + return tgt; + } + + + + public static org.hl7.fhir.r5.model.CanonicalType convertUriToCanonical(org.hl7.fhir.r4.model.UriType src) throws FHIRException { + org.hl7.fhir.r5.model.CanonicalType tgt = src.hasValue() ? new org.hl7.fhir.r5.model.CanonicalType(src.getValueAsString()) : new org.hl7.fhir.r5.model.CanonicalType(); + ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); + return tgt; + } + + public static org.hl7.fhir.r4.model.CanonicalType convertUriToCanonical(org.hl7.fhir.r5.model.UriType src) throws FHIRException { + org.hl7.fhir.r4.model.CanonicalType tgt = src.hasValue() ? new org.hl7.fhir.r4.model.CanonicalType(src.getValueAsString()) : new org.hl7.fhir.r4.model.CanonicalType(); + 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/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 2feb5d60c..d36962143 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 @@ -2,6 +2,7 @@ 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.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; @@ -45,8 +46,11 @@ public class MessageHeader40_50 { return null; org.hl7.fhir.r5.model.MessageHeader tgt = new org.hl7.fhir.r5.model.MessageHeader(); ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyDomainResource(src, tgt); - if (src.hasEvent()) - tgt.setEvent(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getEvent())); + if (src.hasEventUriType()) + tgt.setEvent(Canonical40_50.convertUriToCanonical(src.getEventUriType())); + if (src.hasEventCoding()) + tgt.setEvent(Coding40_50.convertCoding(src.getEventCoding())); + for (org.hl7.fhir.r4.model.MessageHeader.MessageDestinationComponent t : src.getDestination()) tgt.addDestination(convertMessageDestinationComponent(t)); if (src.hasSender()) @@ -74,8 +78,10 @@ public class MessageHeader40_50 { return null; org.hl7.fhir.r4.model.MessageHeader tgt = new org.hl7.fhir.r4.model.MessageHeader(); ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyDomainResource(src, tgt); - if (src.hasEvent()) - tgt.setEvent(ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().convertType(src.getEvent())); + if (src.hasEventCanonicalType()) + tgt.setEvent(Canonical40_50.convertCanonicalToUri(src.getEventCanonicalType())); + if (src.hasEventCoding()) + tgt.setEvent(Coding40_50.convertCoding(src.getEventCoding())); for (org.hl7.fhir.r5.model.MessageHeader.MessageDestinationComponent t : src.getDestination()) tgt.addDestination(convertMessageDestinationComponent(t)); if (src.hasSender()) From 3fbb505722c6b003f310a9ac9105a16c54b2cbd2 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Sat, 10 Sep 2022 15:02:48 +1000 Subject: [PATCH 15/19] Fix concept link rendering problem --- .../fhir/r5/renderers/TerminologyRenderer.java | 6 +++++- .../hl7/fhir/r5/renderers/ValueSetRenderer.java | 17 +++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/TerminologyRenderer.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/TerminologyRenderer.java index bc288eba6..c8b2302ef 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/TerminologyRenderer.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/TerminologyRenderer.java @@ -115,7 +115,11 @@ public abstract class TerminologyRenderer extends ResourceRenderer { for (UsedConceptMap m : maps) { XhtmlNode td = tr.td(); XhtmlNode b = td.b(); - XhtmlNode a = b.ah(getContext().getSpecificationLink()+m.getLink()); + String link = m.getLink(); + if (!Utilities.isAbsoluteUrl(link)) { + link = getContext().getSpecificationLink()+link; + } + XhtmlNode a = b.ah(link); a.addText(m.getDetails().getName()); if (m.getDetails().isDoDescription() && m.getMap().hasDescription()) addMarkdown(td, m.getMap().getDescription()); diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/ValueSetRenderer.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/ValueSetRenderer.java index 485d8eb5e..5cd90ccdc 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/ValueSetRenderer.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/ValueSetRenderer.java @@ -844,14 +844,15 @@ public class ValueSetRenderer extends TerminologyRenderer { } private void addRefToCode(XhtmlNode td, String target, String vslink, String code) { - CodeSystem cs = getContext().getWorker().fetchCodeSystem(target); - String cslink = getCsRef(cs); - XhtmlNode a = null; - if (cslink != null) - a = td.ah(getContext().getSpecificationLink()+cslink+"#"+cs.getId()+"-"+code); - else - a = td.ah(getContext().getSpecificationLink()+vslink+"#"+code); - a.addText(code); + addCodeToTable(false, target, code, null, td); +// CodeSystem cs = getContext().getWorker().fetchCodeSystem(target); +// String cslink = getCsRef(cs); +// String link = cslink != null ? cslink+"#"+cs.getId()+"-"+code : vslink+"#"+code; +// if (!Utilities.isAbsoluteUrl(link)) { +// link = getContext().getSpecificationLink()+link; +// } +// XhtmlNode a = td.ah(link); +// a.addText(code); } private boolean generateComposition(XhtmlNode x, ValueSet vs, boolean header, List maps) throws FHIRException, IOException { From 5f4a31980151c0952d605467c45d91faae0f6f90 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Sat, 10 Sep 2022 15:02:59 +1000 Subject: [PATCH 16/19] more type characteristics fixing --- .../validation/instance/type/StructureDefinitionValidator.java | 1 + 1 file changed, 1 insertion(+) diff --git a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/StructureDefinitionValidator.java b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/StructureDefinitionValidator.java index d89bdb288..a33279035 100644 --- a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/StructureDefinitionValidator.java +++ b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/type/StructureDefinitionValidator.java @@ -295,6 +295,7 @@ public class StructureDefinitionValidator extends BaseValidator { case "VirtualServiceDetail" :return addCharacteristicsForType(set); case "Availability" :return addCharacteristicsForType(set); case "MonetaryComponent" :return addCharacteristicsForType(set); + case "ElementDefinition" :return addCharacteristicsForType(set); case "BackboneElement" :return addCharacteristicsForType(set); default: From b18f3adfce6514c5d11c1f8bc51bb4989fa15b01 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Sat, 10 Sep 2022 15:51:09 +1000 Subject: [PATCH 17/19] release notes --- RELEASE_NOTES.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 7b06c6ab5..037e4575e 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,7 +1,8 @@ ## Validator Changes -* no changes +* More fixing for Type Characteristics ## Other code changes -* no changes \ No newline at end of file +* Fix rendering of concept map code references +* Fix version conversion problem for MessageHeader.event \ No newline at end of file From 5286167c020ac3cf348b49d541ccc606f78dbdd9 Mon Sep 17 00:00:00 2001 From: markiantorno Date: Sat, 10 Sep 2022 06:14:00 +0000 Subject: [PATCH 18/19] Release: v5.6.62 ## Validator Changes * More fixing for Type Characteristics ## Other code changes * Fix rendering of concept map code references * Fix version conversion problem for MessageHeader.event ***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 86f1578c5..bbc883074 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.62-SNAPSHOT + 5.6.62 ../pom.xml diff --git a/org.hl7.fhir.dstu2/pom.xml b/org.hl7.fhir.dstu2/pom.xml index e55b7e953..b1dc0d083 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.62-SNAPSHOT + 5.6.62 ../pom.xml diff --git a/org.hl7.fhir.dstu2016may/pom.xml b/org.hl7.fhir.dstu2016may/pom.xml index 02701177c..8b72b36fb 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.62-SNAPSHOT + 5.6.62 ../pom.xml diff --git a/org.hl7.fhir.dstu3/pom.xml b/org.hl7.fhir.dstu3/pom.xml index 48ff2e2cb..48582ff8e 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.62-SNAPSHOT + 5.6.62 ../pom.xml diff --git a/org.hl7.fhir.r4/pom.xml b/org.hl7.fhir.r4/pom.xml index 7dd4d363c..b8a0fee7b 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.62-SNAPSHOT + 5.6.62 ../pom.xml diff --git a/org.hl7.fhir.r4b/pom.xml b/org.hl7.fhir.r4b/pom.xml index 64ef20898..f8ea3a87f 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.62-SNAPSHOT + 5.6.62 ../pom.xml diff --git a/org.hl7.fhir.r5/pom.xml b/org.hl7.fhir.r5/pom.xml index 8bbc0f64d..c85f3ba9a 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.62-SNAPSHOT + 5.6.62 ../pom.xml diff --git a/org.hl7.fhir.report/pom.xml b/org.hl7.fhir.report/pom.xml index b2f924cd1..9c33f7e0d 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.62-SNAPSHOT + 5.6.62 ../pom.xml diff --git a/org.hl7.fhir.utilities/pom.xml b/org.hl7.fhir.utilities/pom.xml index 8345362c4..f0c9fec59 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.62-SNAPSHOT + 5.6.62 ../pom.xml diff --git a/org.hl7.fhir.validation.cli/pom.xml b/org.hl7.fhir.validation.cli/pom.xml index 92c62bbe8..cf2432fea 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.62-SNAPSHOT + 5.6.62 ../pom.xml diff --git a/org.hl7.fhir.validation/pom.xml b/org.hl7.fhir.validation/pom.xml index a4e9f2cd8..59d515620 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.62-SNAPSHOT + 5.6.62 ../pom.xml diff --git a/pom.xml b/pom.xml index 95de264b7..7d1242fe1 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ HAPI FHIR --> org.hl7.fhir.core - 5.6.62-SNAPSHOT + 5.6.62 pom From 6169f92cb100d12537ee33c322bd64707aff66f6 Mon Sep 17 00:00:00 2001 From: markiantorno Date: Sat, 10 Sep 2022 06:33:43 +0000 Subject: [PATCH 19/19] Updating version to: 5.6.63-SNAPSHOT and incrementing test cases dependency. --- RELEASE_NOTES.md | 5 ++--- 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(+), 15 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 037e4575e..7b06c6ab5 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,8 +1,7 @@ ## Validator Changes -* More fixing for Type Characteristics +* no changes ## Other code changes -* Fix rendering of concept map code references -* Fix version conversion problem for MessageHeader.event \ No newline at end of file +* 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 bbc883074..00e52923c 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.62 + 5.6.63-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.dstu2/pom.xml b/org.hl7.fhir.dstu2/pom.xml index b1dc0d083..222c64b9e 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.62 + 5.6.63-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.dstu2016may/pom.xml b/org.hl7.fhir.dstu2016may/pom.xml index 8b72b36fb..83f348b2f 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.62 + 5.6.63-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.dstu3/pom.xml b/org.hl7.fhir.dstu3/pom.xml index 48582ff8e..14c8f1640 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.62 + 5.6.63-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.r4/pom.xml b/org.hl7.fhir.r4/pom.xml index b8a0fee7b..cf592d7e5 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.62 + 5.6.63-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.r4b/pom.xml b/org.hl7.fhir.r4b/pom.xml index f8ea3a87f..881600e62 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.62 + 5.6.63-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.r5/pom.xml b/org.hl7.fhir.r5/pom.xml index c85f3ba9a..bd16b450a 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.62 + 5.6.63-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.report/pom.xml b/org.hl7.fhir.report/pom.xml index 9c33f7e0d..70ae92996 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.62 + 5.6.63-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.utilities/pom.xml b/org.hl7.fhir.utilities/pom.xml index f0c9fec59..6faa45280 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.62 + 5.6.63-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.validation.cli/pom.xml b/org.hl7.fhir.validation.cli/pom.xml index cf2432fea..5cf9b9a10 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.62 + 5.6.63-SNAPSHOT ../pom.xml diff --git a/org.hl7.fhir.validation/pom.xml b/org.hl7.fhir.validation/pom.xml index 59d515620..d6ee82315 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.62 + 5.6.63-SNAPSHOT ../pom.xml diff --git a/pom.xml b/pom.xml index 7d1242fe1..d69242031 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ HAPI FHIR --> org.hl7.fhir.core - 5.6.62 + 5.6.63-SNAPSHOT pom