From b49e791cd161fa6ce1ab277e1428e5afa934e98c Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Fri, 11 Feb 2022 09:36:47 +1100 Subject: [PATCH 01/12] Updates for changes to package.json type --- .../fhir/r4/utils/NPMPackageGenerator.java | 2 +- .../fhir/r5/utils/NPMPackageGenerator.java | 2 +- .../hl7/fhir/utilities/npm/NpmPackage.java | 2 +- .../fhir/utilities/npm/PackageGenerator.java | 24 +++++++++++++++---- 4 files changed, 23 insertions(+), 7 deletions(-) diff --git a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/NPMPackageGenerator.java b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/NPMPackageGenerator.java index 9b6ce7b4f..a4de7f3b9 100644 --- a/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/NPMPackageGenerator.java +++ b/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/utils/NPMPackageGenerator.java @@ -111,7 +111,7 @@ public class NPMPackageGenerator { p.remove("name"); p.addProperty("name", id); p.remove("type"); - p.addProperty("type", PackageType.SUBSET.getCode()); + p.addProperty("type", PackageType.CONFORMANCE.getCode()); p.remove("title"); p.addProperty("title", name); return new NPMPackageGenerator(destFile, p); diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/NPMPackageGenerator.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/NPMPackageGenerator.java index 21d771f36..906151e44 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/NPMPackageGenerator.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/NPMPackageGenerator.java @@ -120,7 +120,7 @@ public class NPMPackageGenerator { p.remove("name"); p.addProperty("name", id); p.remove("type"); - p.addProperty("type", PackageType.SUBSET.getCode()); + p.addProperty("type", PackageType.CONFORMANCE.getCode()); p.remove("title"); p.addProperty("title", name); if (notForPublication) { diff --git a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/npm/NpmPackage.java b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/npm/NpmPackage.java index 8d974c6be..2569c2901 100644 --- a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/npm/NpmPackage.java +++ b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/npm/NpmPackage.java @@ -769,7 +769,7 @@ public class NpmPackage { } public boolean isType(PackageType template) { - return template.getCode().equals(type()); + return template.getCode().equals(type()) || template.getOldCode().equals(type()) ; } public String type() { diff --git a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/npm/PackageGenerator.java b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/npm/PackageGenerator.java index bb3714841..c7ef42656 100644 --- a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/npm/PackageGenerator.java +++ b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/npm/PackageGenerator.java @@ -52,15 +52,31 @@ import com.google.gson.JsonSyntaxException; public class PackageGenerator { public enum PackageType { - CORE, IG, TOOL, TEMPLATE, SUBSET; + CONFORMANCE, IG, CORE, EXAMPLES, GROUP, TOOL, IG_TEMPLATE; + // CORE, IG, TOOL, TEMPLATE, SUBSET; public String getCode() { switch (this) { - case CORE: return "fhir.core"; + case CONFORMANCE: return "Conformance"; + case IG: return "IG"; + case CORE: return "Core"; + case EXAMPLES: return "Examples"; + case GROUP: return "Group"; + case TOOL: return "Tool"; + case IG_TEMPLATE: return "IG-Template"; + } + throw new Error("Unknown Type"); + } + + String getOldCode() { + switch (this) { + case CONFORMANCE: return "xxx"; case IG: return "fhir.ig"; + case CORE: return "fhir.core"; + case EXAMPLES: return "fhir.examples"; + case GROUP: return "fhir.group"; case TOOL: return "fhir.tool"; - case TEMPLATE: return "fhir.template"; - case SUBSET: return "fhir.subset"; + case IG_TEMPLATE: return "fhir.template"; } throw new Error("Unknown Type"); } From 0fa757b426a51699d308a276318213e7977ce01e Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Sat, 12 Feb 2022 07:53:23 +1100 Subject: [PATCH 02/12] Fix markdown relative link issues + start working on additional bindings extension --- .../loaders/loaderR5/BaseLoaderR5.java | 5 ++ .../loaderR5/ILoaderKnowledgeProviderR5.java | 2 + .../NullLoaderKnowledgeProviderR5.java | 5 ++ .../fhir/r5/conformance/ProfileUtilities.java | 47 ++++++++++++++++--- .../hl7/fhir/r5/utils/ToolingExtensions.java | 1 + .../src/test/resources/txCache/loinc.cache | 45 ++++++++++++++++++ .../resources/txCache/4.0.1/all-systems.cache | 8 ++++ 7 files changed, 106 insertions(+), 7 deletions(-) create mode 100644 org.hl7.fhir.r5/src/test/resources/txCache/loinc.cache diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/loaders/loaderR5/BaseLoaderR5.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/loaders/loaderR5/BaseLoaderR5.java index 63a799d32..58e5b2ff0 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/loaders/loaderR5/BaseLoaderR5.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/loaders/loaderR5/BaseLoaderR5.java @@ -38,6 +38,11 @@ public abstract class BaseLoaderR5 implements IContextResourceLoader { public void setPath(Resource r) { String path = lkp.getResourcePath(r); + if (lkp.getWebRoot() != null) { + r.setUserData("webroot", lkp.getWebRoot()); + } else { + r.setUserData("webroot", ""); + } if (path != null) { r.setUserData("path", path); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/loaders/loaderR5/ILoaderKnowledgeProviderR5.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/loaders/loaderR5/ILoaderKnowledgeProviderR5.java index 9ed940ea0..3a8c1ca3b 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/loaders/loaderR5/ILoaderKnowledgeProviderR5.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/loaders/loaderR5/ILoaderKnowledgeProviderR5.java @@ -16,4 +16,6 @@ public interface ILoaderKnowledgeProviderR5 { String getResourcePath(Resource resource); ILoaderKnowledgeProviderR5 forNewPackage(NpmPackage npm) throws JsonSyntaxException, IOException; + + String getWebRoot(); } diff --git a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/loaders/loaderR5/NullLoaderKnowledgeProviderR5.java b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/loaders/loaderR5/NullLoaderKnowledgeProviderR5.java index 15986d5bb..6af390878 100644 --- a/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/loaders/loaderR5/NullLoaderKnowledgeProviderR5.java +++ b/org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/loaders/loaderR5/NullLoaderKnowledgeProviderR5.java @@ -13,4 +13,9 @@ public class NullLoaderKnowledgeProviderR5 implements ILoaderKnowledgeProviderR5 public ILoaderKnowledgeProviderR5 forNewPackage(NpmPackage npm) { return this; } + + @Override + public String getWebRoot() { + return null; + } } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ProfileUtilities.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ProfileUtilities.java index 59de6012d..8123817b5 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ProfileUtilities.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/ProfileUtilities.java @@ -104,6 +104,7 @@ import org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionMappingCompo import org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionSnapshotComponent; import org.hl7.fhir.r5.model.StructureDefinition.TypeDerivationRule; import org.hl7.fhir.r5.model.UriType; +import org.hl7.fhir.r5.model.UsageContext; import org.hl7.fhir.r5.model.ValueSet; import org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionComponent; import org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionContainsComponent; @@ -2480,19 +2481,19 @@ public class ProfileUtilities extends TranslatingUtilities { if (webUrl != null) { // also, must touch up the markdown if (element.hasDefinition()) - element.setDefinition(processRelativeUrls(element.getDefinition(), webUrl, baseSpecUrl(), context.getResourceNames(), masterSourceFileNames)); + element.setDefinition(processRelativeUrls(element.getDefinition(), webUrl, baseSpecUrl(), context.getResourceNames(), masterSourceFileNames, true)); if (element.hasComment()) - element.setComment(processRelativeUrls(element.getComment(), webUrl, baseSpecUrl(), context.getResourceNames(), masterSourceFileNames)); + element.setComment(processRelativeUrls(element.getComment(), webUrl, baseSpecUrl(), context.getResourceNames(), masterSourceFileNames, true)); if (element.hasRequirements()) - element.setRequirements(processRelativeUrls(element.getRequirements(), webUrl, baseSpecUrl(), context.getResourceNames(), masterSourceFileNames)); + element.setRequirements(processRelativeUrls(element.getRequirements(), webUrl, baseSpecUrl(), context.getResourceNames(), masterSourceFileNames, true)); if (element.hasMeaningWhenMissing()) - element.setMeaningWhenMissing(processRelativeUrls(element.getMeaningWhenMissing(), webUrl, baseSpecUrl(), context.getResourceNames(), masterSourceFileNames)); + element.setMeaningWhenMissing(processRelativeUrls(element.getMeaningWhenMissing(), webUrl, baseSpecUrl(), context.getResourceNames(), masterSourceFileNames, true)); } } return element; } - public static String processRelativeUrls(String markdown, String webUrl, String basePath, List resourceNames, Set filenames) { + public static String processRelativeUrls(String markdown, String webUrl, String basePath, List resourceNames, Set filenames, boolean processRelatives) { StringBuilder b = new StringBuilder(); int i = 0; while (i < markdown.length()) { @@ -2520,7 +2521,13 @@ public class ProfileUtilities extends TranslatingUtilities { } else { b.append("]("); // disabled 7-Dec 2021 GDG - we don't want to fool with relative URLs at all? - // b.append(webUrl); + // re-enabled 11-Feb 2022 GDG - we do want to do this. At least, $assemble in davinci-dtr, where the markdown comes from the SDC IG, and an SDC local reference must be changed to point to SDC. in this case, it's called when generating snapshots + // added processRelatives parameter to deal with this (well, to try) + if (processRelatives) { + b.append(webUrl); + } else { + System.out.println("Not making "+url+" relative to '"+webUrl+"'"); + } i = i + 1; } } else @@ -2778,7 +2785,9 @@ public class ProfileUtilities extends TranslatingUtilities { profile = source.getType().size() == 1 && source.getTypeFirstRep().hasProfile() ? context.fetchResource(StructureDefinition.class, source.getTypeFirstRep().getProfile().get(0).getValue()) : null; if (profile != null) { ElementDefinition e = profile.getSnapshot().getElement().get(0); - base.setDefinition(e.getDefinition()); + String webroot = profile.getUserString("webroot"); + + base.setDefinition(processRelativeUrls(e.getDefinition(), webroot, baseSpecUrl(), context.getResourceNames(), masterSourceFileNames, true)); base.setShort(e.getShort()); if (e.hasCommentElement()) base.setCommentElement(e.getCommentElement()); @@ -4688,6 +4697,13 @@ public class ProfileUtilities extends TranslatingUtilities { c.getPieces().add(gen.new Piece(null, ": ", null)); c.addMarkdownNoPara(PublicationHacker.fixBindingDescriptions(context, binding.getDescriptionElement()).asStringValue(), checkForNoChange(PublicationHacker.fixBindingDescriptions(context, binding.getDescriptionElement()))); } + if (binding.hasExtension(ToolingExtensions.EXT_BINDING_ADDITIONAL)) { + c.addPiece(gen.new Piece("br")); + c.getPieces().add(checkForNoChange(binding, gen.new Piece(null, translate("sd.table", "Additional Bindings")+": ", null).addStyle("font-weight:bold"))); + for (Extension ext : binding.getExtensionsByUrl(ToolingExtensions.EXT_BINDING_ADDITIONAL)) { + renderAdditionalBinding(gen, c, ext); + } + } } for (ElementDefinitionConstraintComponent inv : definition.getConstraint()) { if (!inv.hasSource() || profile == null || inv.getSource().equals(profile.getUrl()) || allInvariants) { @@ -4767,6 +4783,23 @@ public class ProfileUtilities extends TranslatingUtilities { return c; } + private void renderAdditionalBinding(HierarchicalTableGenerator gen, Cell c, Extension ext) { + // 2 purpose value-set-link ([context]) {documentation} +// String purpose = ext.getExtensionString("purpose"); +// String valueSet = ext.getExtensionString("valueSet"); +// String doco = ext.getExtensionString("documentation"); +// UsageContext usage = (ext.hasExtension("usage")) ? ext.getExtensionByUrl("usage").getValueUsageContext() : null; +// +// purpose: code - defines how the binding is used +// usage : UsageContext - defines the contexts in which this binding is used for it's purpose +// valueSet : canonical(ValueSet) +// documentation : markdown +// !! +// c.getPieces().add(checkForNoChange(inv, gen.new Piece(null, inv.getKey()+": ", null).addStyle("font-weight:bold"))); +// c.getPieces().add(checkForNoChange(inv, gen.new Piece(null, gt(inv.getHumanElement()), null))); + + } + private BindingResolution makeNullBr(ElementDefinitionBindingComponent binding) { BindingResolution br = new BindingResolution(); br.url = "http://none.none/none"; diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/ToolingExtensions.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/ToolingExtensions.java index 1815f56cf..6ef84e898 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/ToolingExtensions.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/ToolingExtensions.java @@ -200,6 +200,7 @@ public class ToolingExtensions { public static final String EXT_VALUESET_SYSTEM = "http://hl7.org/fhir/StructureDefinition/valueset-system"; public static final String EXT_EXPAND_RULES = "http://hl7.org/fhir/StructureDefinition/valueset-expand-rules"; public static final String EXT_EXPAND_GROUP = "http://hl7.org/fhir/StructureDefinition/valueset-expand-group"; + public static final String EXT_BINDING_ADDITIONAL = "http://hl7.org/fhir/tools/StructureDefinition/additional-binding"; // specific extension helpers diff --git a/org.hl7.fhir.r5/src/test/resources/txCache/loinc.cache b/org.hl7.fhir.r5/src/test/resources/txCache/loinc.cache new file mode 100644 index 000000000..8e1e3c41a --- /dev/null +++ b/org.hl7.fhir.r5/src/test/resources/txCache/loinc.cache @@ -0,0 +1,45 @@ +------------------------------------------------------------------------------------- +{"hierarchical" : false, "valueSet" :{ + "resourceType" : "ValueSet", + "compose" : { + "include" : [{ + "system" : "http://loinc.org", + "concept" : [{ + "extension" : [{ + "url" : "http://hl7.org/fhir/StructureDefinition/valueset-label", + "valueString" : "A." + }], + "code" : "LA20752-4", + "display" : "Within 24 hours" + }, + { + "extension" : [{ + "url" : "http://hl7.org/fhir/StructureDefinition/valueset-label", + "valueString" : "B." + }], + "code" : "LA20753-2", + "display" : "After 24 hours but before 3 days" + }, + { + "extension" : [{ + "url" : "http://hl7.org/fhir/StructureDefinition/valueset-label", + "valueString" : "C." + }], + "code" : "LA20754-0", + "display" : "Three days or later" + }, + { + "extension" : [{ + "url" : "http://hl7.org/fhir/StructureDefinition/valueset-label", + "valueString" : "D." + }], + "code" : "LA4489-6", + "display" : "Unknown" + }] + }] + } +}}#### +e: { + "error" : "Cannot invoke \"org.hl7.fhir.r5.terminologies.TerminologyClient.expandValueset(org.hl7.fhir.r5.model.ValueSet, org.hl7.fhir.r5.model.Parameters, java.util.Map)\" because \"this.txClient\" is null" +} +------------------------------------------------------------------------------------- diff --git a/org.hl7.fhir.validation/src/test/resources/txCache/4.0.1/all-systems.cache b/org.hl7.fhir.validation/src/test/resources/txCache/4.0.1/all-systems.cache index d61c0a93c..733b04079 100644 --- a/org.hl7.fhir.validation/src/test/resources/txCache/4.0.1/all-systems.cache +++ b/org.hl7.fhir.validation/src/test/resources/txCache/4.0.1/all-systems.cache @@ -1591,3 +1591,11 @@ v: { "error" : "Unable to find code 10821000202101 in http://snomed.info/sct (version http://snomed.info/sct/900000000000207008/version/20210731); The code \"10821000202101\" is not valid in the system http://snomed.info/sct; The code provided (http://snomed.info/sct#10821000202101) is not valid in the value set 'no-colonoscopy-sedation-level' (from http://tx.fhir.org/r4)" } ------------------------------------------------------------------------------------- +{"code" : { + "code" : "pdf" +}, "url": "http://hl7.org/fhir/ValueSet/mimetypes", "version": "4.0.1", "lang":"null", "useServer":"true", "useClient":"true", "guessSystem":"true", "valueSetMode":"ALL_CHECKS", "versionFlexible":"false"}#### +v: { + "severity" : "error", + "error" : "The code \"pdf\" is not valid in the system urn:ietf:bcp:13; The code provided (urn:ietf:bcp:13#pdf) is not valid in the value set 'Mime Types' (from http://tx.fhir.org/r4)" +} +------------------------------------------------------------------------------------- From 76ed4abba77b6e593653302851397c4cfa53e02c Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Sat, 12 Feb 2022 07:55:59 +1100 Subject: [PATCH 03/12] Changes for debugging on OSX (fhir-tools-settings.conf) --- .../fhir/r5/test/utils/TestingUtilities.java | 13 ++-- .../fhir/utilities/ToolGlobalSettings.java | 70 +++++++++++++++++++ .../org/hl7/fhir/utilities/Utilities.java | 2 + .../npm/FilesystemPackageCacheManager.java | 6 +- .../utilities/tests/BaseTestingUtilities.java | 14 ++++ 5 files changed, 95 insertions(+), 10 deletions(-) create mode 100644 org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/ToolGlobalSettings.java diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/test/utils/TestingUtilities.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/test/utils/TestingUtilities.java index 7adcb333e..78af02088 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/test/utils/TestingUtilities.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/test/utils/TestingUtilities.java @@ -21,6 +21,7 @@ import org.hl7.fhir.r5.context.TerminologyCache; import org.hl7.fhir.r5.model.Parameters; import org.hl7.fhir.utilities.CSFile; import org.hl7.fhir.utilities.TextFile; +import org.hl7.fhir.utilities.ToolGlobalSettings; import org.hl7.fhir.utilities.Utilities; import org.hl7.fhir.utilities.VersionUtilities; import org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager; @@ -164,14 +165,10 @@ public class TestingUtilities extends BaseTestingUtilities { public static String checkXMLIsSame(String f1, String f2) throws Exception { String result = compareXml(f1, f2); if (result != null && SHOW_DIFF) { - String diff = Utilities.path(System.getenv("ProgramFiles"), "WinMerge", "WinMergeU.exe"); - if (new File(diff).exists()) { + String diff = ToolGlobalSettings.hasComparePath() ? ToolGlobalSettings.getComparePath() : Utilities.path(System.getenv("ProgramFiles"), "WinMerge", "WinMergeU.exe"); + if (new File(diff).exists() || Utilities.isToken(diff)) { List command = new ArrayList(); - command.add("\"" + diff + "\" \"" + f1 + "\" \"" + f2 + "\""); - - ProcessBuilder builder = new ProcessBuilder(command); - builder.directory(new CSFile("c:\\temp")); - builder.start(); + Process p = Runtime.getRuntime().exec(new String[]{diff, f1, f2}); } } return result; @@ -490,6 +487,8 @@ public class TestingUtilities extends BaseTestingUtilities { String path = Utilities.path("C:\\temp", name); Utilities.createDirectory(path); return path; + } else if (ToolGlobalSettings.hasTempPath()) { + return ToolGlobalSettings.getTempPath(); } else if (new File("/tmp").exists()) { String path = Utilities.path("/tmp", name); Utilities.createDirectory(path); diff --git a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/ToolGlobalSettings.java b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/ToolGlobalSettings.java new file mode 100644 index 000000000..62cd18975 --- /dev/null +++ b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/ToolGlobalSettings.java @@ -0,0 +1,70 @@ +package org.hl7.fhir.utilities; + +import java.io.IOException; + +public class ToolGlobalSettings { + + private static boolean inited = false; + + private static String npmPath; + private static String rubyPath; + private static String testsPath; + private static String comparePath; + private static String tempPath; + + public static String getNpmPath() { + init(); + return npmPath; + } + public static String getRubyPath() { + init(); + return rubyPath; + } + public static String getTestsPath() { + init(); + return testsPath; + } + + public static boolean hasNpmPath() { + init(); + return npmPath != null; + } + public static boolean hasRubyPath() { + init(); + return rubyPath != null; + } + public static boolean hasTestsPath() { + init(); + return testsPath != null; + } + + public static String getComparePath() { + return comparePath; + } + public static boolean hasComparePath() { + return comparePath != null; + } + public static String getTempPath() { + return tempPath; + } + public static boolean hasTempPath() { + return tempPath != null; + } + private static void init() { + if (!inited) { + inited = true; + IniFile ini; + try { + ini = new IniFile(Utilities.path(Utilities.path(System.getProperty("user.home"), ".fhir", "fhir-tool-settings.conf"))); + if (ini.hasSection("paths")) { + npmPath = ini.getStringProperty("paths", "npm"); + rubyPath = ini.getStringProperty("paths", "ruby"); + testsPath = ini.getStringProperty("paths", "tests"); + comparePath = ini.getStringProperty("paths", "compare"); + tempPath = ini.getStringProperty("paths", "temp"); + } + } catch (IOException e) { + } + } + } +} \ No newline at end of file diff --git a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/Utilities.java b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/Utilities.java index db22d051a..5f9228083 100644 --- a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/Utilities.java +++ b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/Utilities.java @@ -596,6 +596,8 @@ public class Utilities { if ("[tmp]".equals(a)) { if (hasCTempDir()) { a = "c:\\temp"; + } else if (ToolGlobalSettings.hasTempPath()) { + a = ToolGlobalSettings.getTempPath(); } else { a = System.getProperty("java.io.tmpdir"); } diff --git a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/npm/FilesystemPackageCacheManager.java b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/npm/FilesystemPackageCacheManager.java index a07b631a5..af45003e4 100644 --- a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/npm/FilesystemPackageCacheManager.java +++ b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/npm/FilesystemPackageCacheManager.java @@ -626,12 +626,12 @@ public class FilesystemPackageCacheManager extends BasePackageCacheManager imple JsonObject json = JsonTrackingParser.fetchJson(Utilities.pathURL(url, "package.manifest.json")); String currDate = JSONUtil.str(json, "date"); String packDate = p.date(); - if (!currDate.equals(packDate)) + if (!currDate.equals(packDate)) { return null; // nup, we need a new copy - return p; + } } catch (Exception e) { - return p; } + return p; } private boolean checkBuildLoaded() { diff --git a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/tests/BaseTestingUtilities.java b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/tests/BaseTestingUtilities.java index 4ed5ba296..3619d213b 100644 --- a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/tests/BaseTestingUtilities.java +++ b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/tests/BaseTestingUtilities.java @@ -3,6 +3,7 @@ package org.hl7.fhir.utilities.tests; import org.apache.commons.io.IOUtils; import org.hl7.fhir.utilities.CSFile; import org.hl7.fhir.utilities.TextFile; +import org.hl7.fhir.utilities.ToolGlobalSettings; import org.hl7.fhir.utilities.Utilities; import java.io.*; @@ -22,7 +23,11 @@ public class BaseTestingUtilities { * the name of the project directory to something other than 'fhir-test-cases', or move it to another location, not * at the same directory level as the core project. */ + String dir = System.getenv("FHIR-TEST-CASES"); + if (dir == null && ToolGlobalSettings.hasTestsPath()) { + dir = ToolGlobalSettings.getTestsPath(); + } if (dir != null && new CSFile(dir).exists()) { String n = Utilities.path(dir, Utilities.path(paths)); // ok, we'll resolve this locally @@ -44,6 +49,9 @@ public class BaseTestingUtilities { public static InputStream loadTestResourceStream(String... paths) throws IOException { String dir = System.getenv("FHIR-TEST-CASES"); + if (dir == null && ToolGlobalSettings.hasTestsPath()) { + dir = ToolGlobalSettings.getTestsPath(); + } if (dir != null && new File(dir).exists()) { String n = Utilities.path(dir, Utilities.path(paths)); return new FileInputStream(n); @@ -59,6 +67,9 @@ public class BaseTestingUtilities { public static byte[] loadTestResourceBytes(String... paths) throws IOException { String dir = System.getenv("FHIR-TEST-CASES"); + if (dir == null && ToolGlobalSettings.hasTestsPath()) { + dir = ToolGlobalSettings.getTestsPath(); + } if (dir != null && new File(dir).exists()) { String n = Utilities.path(dir, Utilities.path(paths)); return TextFile.fileToBytes(n); @@ -74,6 +85,9 @@ public class BaseTestingUtilities { public static boolean findTestResource(String... paths) throws IOException { String dir = System.getenv("FHIR-TEST-CASES"); + if (dir == null && ToolGlobalSettings.hasTestsPath()) { + dir = ToolGlobalSettings.getTestsPath(); + } if (dir != null && new File(dir).exists()) { String n = Utilities.path(dir, Utilities.path(paths)); return new File(n).exists(); From fb1a08dca8e131b85edc30e7e5f3494799292195 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Sat, 12 Feb 2022 08:27:29 +1100 Subject: [PATCH 04/12] Rendering improvements: partial dates, questionnaire links, and patient renderer --- .../hl7/fhir/r5/renderers/DataRenderer.java | 63 ++++++++++++++++--- .../fhir/r5/renderers/PatientRenderer.java | 6 +- .../r5/renderers/ProfileDrivenRenderer.java | 4 +- .../r5/renderers/QuestionnaireRenderer.java | 2 +- .../fhir/r5/renderers/RendererFactory.java | 3 + .../r5/renderers/utils/RenderingContext.java | 37 ++++++++++- .../r5/test/NarrativeGenerationTests.java | 10 +-- 7 files changed, 101 insertions(+), 24 deletions(-) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/DataRenderer.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/DataRenderer.java index db77f5ba3..1af3777b9 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/DataRenderer.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/DataRenderer.java @@ -1,5 +1,9 @@ package org.hl7.fhir.r5.renderers; +import static java.time.temporal.ChronoField.DAY_OF_MONTH; +import static java.time.temporal.ChronoField.MONTH_OF_YEAR; +import static java.time.temporal.ChronoField.YEAR; + import java.io.IOException; import java.io.UnsupportedEncodingException; import java.math.BigDecimal; @@ -9,8 +13,12 @@ import java.text.SimpleDateFormat; import java.time.LocalDate; import java.time.ZoneId; import java.time.ZonedDateTime; +import java.time.chrono.IsoChronology; import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeFormatterBuilder; import java.time.format.FormatStyle; +import java.time.format.ResolverStyle; +import java.time.format.SignStyle; import java.util.Currency; import java.util.List; import java.util.TimeZone; @@ -39,6 +47,7 @@ import org.hl7.fhir.r5.model.DataRequirement.SortDirection; import org.hl7.fhir.r5.model.ContactPoint.ContactPointSystem; import org.hl7.fhir.r5.model.DataType; import org.hl7.fhir.r5.model.DateTimeType; +import org.hl7.fhir.r5.model.DateType; import org.hl7.fhir.r5.model.Enumeration; import org.hl7.fhir.r5.model.Expression; import org.hl7.fhir.r5.model.Extension; @@ -413,15 +422,8 @@ public class DataRenderer extends Renderer { // mode - if rendering mode is technical, format defaults to XML format // locale - otherwise, format defaults to SHORT for the Locale (which defaults to default Locale) if (isOnlyDate(type.getPrecision())) { - DateTimeFormatter fmt = context.getDateFormat(); - if (fmt == null) { - if (context.isTechnicalMode()) { - fmt = DateTimeFormatter.ISO_DATE; - } else { - fmt = DateTimeFormatter.ofLocalizedDate(FormatStyle.SHORT).withLocale(context.getLocale()); - } - } - + + DateTimeFormatter fmt = getDateFormatForPrecision(type); LocalDate date = LocalDate.of(type.getYear(), type.getMonth()+1, type.getDay()); return fmt.format(date); } @@ -440,6 +442,43 @@ public class DataRenderer extends Renderer { zdt = zdt.withZoneSameInstant(zone); } return fmt.format(zdt); + } + + private DateTimeFormatter getDateFormatForPrecision(BaseDateTimeType type) { + DateTimeFormatter fmt = getContextDateFormat(type); + if (fmt != null) { + return fmt; + } + if (context.isTechnicalMode()) { + switch (type.getPrecision()) { + case YEAR: + return new DateTimeFormatterBuilder().appendValue(YEAR, 4, 10, SignStyle.EXCEEDS_PAD).toFormatter(); + case MONTH: + return new DateTimeFormatterBuilder().appendValue(YEAR, 4, 10, SignStyle.EXCEEDS_PAD).appendLiteral('-').appendValue(MONTH_OF_YEAR, 2).toFormatter(); + default: + return DateTimeFormatter.ISO_DATE; + } + } else { + switch (type.getPrecision()) { + case YEAR: + return DateTimeFormatter.ofPattern("uuuu"); + case MONTH: + return DateTimeFormatter.ofPattern("MMM uuuu"); + default: + return DateTimeFormatter.ofLocalizedDate(FormatStyle.SHORT).withLocale(context.getLocale()); + } + } + } + + private DateTimeFormatter getContextDateFormat(BaseDateTimeType type) { + switch (type.getPrecision()) { + case YEAR: + return context.getDateYearFormat(); + case MONTH: + return context.getDateYearMonthFormat(); + default: + return context.getDateFormat(); + } } private boolean isOnlyDate(TemporalPrecisionEnum temporalPrecisionEnum) { @@ -533,6 +572,12 @@ public class DataRenderer extends Renderer { } } + public void renderDate(XhtmlNode x, Base e) { + if (e.hasPrimitiveValue()) { + x.addText(displayDateTime((DateType) e)); + } + } + public void renderDateTime(XhtmlNode x, String s) { if (s != null) { DateTimeType dt = new DateTimeType(s); diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/PatientRenderer.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/PatientRenderer.java index 61028def1..e7cb7b097 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/PatientRenderer.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/PatientRenderer.java @@ -4,6 +4,8 @@ import java.io.IOException; import java.io.UnsupportedEncodingException; import org.apache.poi.hssf.record.chart.DatRecord; +import org.hl7.fhir.exceptions.DefinitionException; +import org.hl7.fhir.exceptions.FHIRFormatError; import org.hl7.fhir.r5.model.DateTimeType; import org.hl7.fhir.r5.model.DateType; import org.hl7.fhir.r5.model.DomainResource; @@ -219,5 +221,7 @@ public class PatientRenderer extends ResourceRenderer { } } - +// @Override +//// public boolean render(XhtmlNode x, ResourceWrapper r) throws FHIRFormatError, DefinitionException, IOException { +// } } \ No newline at end of file diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/ProfileDrivenRenderer.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/ProfileDrivenRenderer.java index bcade79dc..a2cb61823 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/ProfileDrivenRenderer.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/ProfileDrivenRenderer.java @@ -312,9 +312,7 @@ public class ProfileDrivenRenderer extends ResourceRenderer { x.addText(new Base64().encodeAsString(((Base64BinaryType) e).getValue())); else if (e instanceof org.hl7.fhir.r5.model.DateType) { org.hl7.fhir.r5.model.DateType dt = ((org.hl7.fhir.r5.model.DateType) e); - if (((org.hl7.fhir.r5.model.DateType) e).hasValue()) { - x.addText(((org.hl7.fhir.r5.model.DateType) e).toHumanDisplay()); - } + renderDate(x, dt); } else if (e instanceof Enumeration) { Object ev = ((Enumeration) e).getValue(); x.addText(ev == null ? "" : ev.toString()); // todo: look up a display name if there is one diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/QuestionnaireRenderer.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/QuestionnaireRenderer.java index b289fb969..8fb94ee2c 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/QuestionnaireRenderer.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/QuestionnaireRenderer.java @@ -712,7 +712,7 @@ public class QuestionnaireRenderer extends TerminologyRenderer { XhtmlNode ans = item(ul, "Answers"); if (!Utilities.noString(i.getAnswerValueSet()) && i.getAnswerValueSet().startsWith("#")) { ValueSet vs = (ValueSet) q.getContained(i.getAnswerValueSet().substring(1)); - if (vs == null) { + if (vs == null || !vs.hasUserData("path")) { ans.tx(i.getAnswerValueSet()); } else { ans.ah(vs.getUserString("path")).tx(vs.present()); diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/RendererFactory.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/RendererFactory.java index 1bc818f10..9d974bb21 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/RendererFactory.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/RendererFactory.java @@ -114,6 +114,9 @@ public class RendererFactory { if ("Library".equals(resource.getName())) { return new LibraryRenderer(context); } + if ("Patient".equals(resource.getName())) { + return new PatientRenderer(context); + } if ("DiagnosticReport".equals(resource.getName())) { return new DiagnosticReportRenderer(context); } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/utils/RenderingContext.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/utils/RenderingContext.java index c7617f119..c65b8bde7 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/utils/RenderingContext.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/utils/RenderingContext.java @@ -127,6 +127,8 @@ public class RenderingContext { private ZoneId timeZoneId; private DateTimeFormatter dateTimeFormat; private DateTimeFormatter dateFormat; + private DateTimeFormatter dateYearFormat; + private DateTimeFormatter dateYearMonthFormat; /** * @@ -359,7 +361,16 @@ public class RenderingContext { res.definitionsTarget = definitionsTarget; res.destDir = destDir; res.addGeneratedNarrativeHeader = addGeneratedNarrativeHeader; - + res.questionnaireMode = questionnaireMode; + res.header = header; + res.selfLink = selfLink; + res.inlineGraphics = inlineGraphics; + res.timeZoneId = timeZoneId; + res.dateTimeFormat = dateTimeFormat; + res.dateFormat = dateFormat; + res.dateYearFormat = dateYearFormat; + res.dateYearMonthFormat = dateYearMonthFormat; + return res; } @@ -514,6 +525,30 @@ public class RenderingContext { this.dateFormat = DateTimeFormatter.ofPattern(dateFormat); } + public DateTimeFormatter getDateYearFormat() { + return dateYearFormat; + } + + public void setDateYearFormat(DateTimeFormatter dateYearFormat) { + this.dateYearFormat = dateYearFormat; + } + + public void setDateYearFormatString(String dateYearFormat) { + this.dateYearFormat = DateTimeFormatter.ofPattern(dateYearFormat); + } + + public DateTimeFormatter getDateYearMonthFormat() { + return dateYearMonthFormat; + } + + public void setDateYearMonthFormat(DateTimeFormatter dateYearMonthFormat) { + this.dateYearMonthFormat = dateYearMonthFormat; + } + + public void setDateYearMonthFormatString(String dateYearMonthFormat) { + this.dateYearMonthFormat = DateTimeFormatter.ofPattern(dateYearMonthFormat); + } + public ResourceRendererMode getMode() { return mode; } diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/NarrativeGenerationTests.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/NarrativeGenerationTests.java index 3688ef86d..f2e3ee3df 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/NarrativeGenerationTests.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/NarrativeGenerationTests.java @@ -111,15 +111,7 @@ public class NarrativeGenerationTests { List objects = new ArrayList<>(); while (test != null && test.getNodeName().equals("test")) { TestDetails t = new TestDetails(test); - if (t.getId().equals("sdc")) { - if (SystemUtils.OS_NAME.contains(WINDOWS)) { - objects.add(Arguments.of(t.getId(), t)); - } else { - System.out.println("sdc test not being adding because the current OS will not pass the test..."); - } - } else { - objects.add(Arguments.of(t.getId(), t)); - } + objects.add(Arguments.of(t.getId(), t)); test = XMLUtil.getNextSibling(test); } return objects.stream(); From e4d886dfec6e59a8aabd30173f3ad9b6067dabf8 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Sat, 12 Feb 2022 08:27:56 +1100 Subject: [PATCH 05/12] Fix handling of cross version extensions on choice types --- .../java/org/hl7/fhir/r5/utils/XVerExtensionManager.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/XVerExtensionManager.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/XVerExtensionManager.java index ddf283329..5d7a69a4f 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/XVerExtensionManager.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/XVerExtensionManager.java @@ -67,6 +67,9 @@ public class XVerExtensionManager { } JsonObject root = lists.get(v); JsonObject path = root.getAsJsonObject(e); + if (path == null) { + path = root.getAsJsonObject(e+"[x]"); + } if (path == null) { return XVerExtensionStatus.Unknown; } @@ -90,6 +93,9 @@ public class XVerExtensionManager { String e = url.substring(54); JsonObject root = lists.get(verSource); JsonObject path = root.getAsJsonObject(e); + if (path == null) { + path = root.getAsJsonObject(e+"[x]"); + } StructureDefinition sd = new StructureDefinition(); sd.setUserData(XVER_EXT_MARKER, "true"); From 7700a0cb1119d6cfb600a9e9719f8799f96edf1d Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Sat, 12 Feb 2022 08:29:00 +1100 Subject: [PATCH 06/12] missed rendering fix --- .../org/hl7/fhir/r5/renderers/PatientRenderer.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/PatientRenderer.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/PatientRenderer.java index e7cb7b097..e2362a923 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/PatientRenderer.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/PatientRenderer.java @@ -198,13 +198,13 @@ public class PatientRenderer extends ResourceRenderer { public void describe(XhtmlNode x, HumanName name, String gender, DateType dob, Identifier id) throws UnsupportedEncodingException, IOException { if (name == null) { - x.b().tx("Unnamed Patient"); // todo: is this appropriate? + x.b().tx("Anonymous Patient"); // todo: is this appropriate? } else { render(x.b(), name); } x.tx(" "); if (gender == null) { - x.tx("??"); + x.tx("(no stated gender)"); } else { x.tx(gender); } @@ -221,7 +221,9 @@ public class PatientRenderer extends ResourceRenderer { } } -// @Override -//// public boolean render(XhtmlNode x, ResourceWrapper r) throws FHIRFormatError, DefinitionException, IOException { -// } + @Override + public boolean render(XhtmlNode x, ResourceWrapper r) throws FHIRFormatError, DefinitionException, IOException { + describe(x, r); + return false; + } } \ No newline at end of file From b861ca47445467cfd8d57fd63c85218db29a8366 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Sat, 12 Feb 2022 09:07:07 +1100 Subject: [PATCH 07/12] clean up --- .../main/java/org/hl7/fhir/r5/renderers/PatientRenderer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/PatientRenderer.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/PatientRenderer.java index e2362a923..e372568c1 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/PatientRenderer.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/PatientRenderer.java @@ -178,7 +178,7 @@ public class PatientRenderer extends ResourceRenderer { b.append(display(name)); b.append(" "); if (dob == null) { - b.append("??"); + b.append("(no stated gender)"); } else { b.append(gender); } From 38a1770bb6863354cd4b1ad84eb11605c14e3974 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Sat, 12 Feb 2022 09:29:58 +1100 Subject: [PATCH 08/12] fix compile changes From ea3ae8d82cfb08dd121f8c4cbde5113253422b95 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Sat, 12 Feb 2022 09:53:33 +1100 Subject: [PATCH 09/12] fix bug in ini file --- .../src/main/java/org/hl7/fhir/utilities/IniFile.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java index f67d984aa..839f3cc7b 100644 --- a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java +++ b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java @@ -1512,9 +1512,11 @@ public final class IniFile } public boolean hasSection(String sectionName) { - for (String s : getAllSectionNames()) { - if (s.equalsIgnoreCase(sectionName)) { - return true; + if (getAllSectionNames() != null) { + for (String s : getAllSectionNames()) { + if (s.equalsIgnoreCase(sectionName)) { + return true; + } } } return false; From 7bf1af867179ba4d94cb4b118659d9a513b65beb Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Sat, 12 Feb 2022 10:56:32 +1100 Subject: [PATCH 10/12] r4b fixes From 2a8dbcf8a431e72eb673a1188a4fed0c2ccb929d Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Sat, 12 Feb 2022 11:00:41 +1100 Subject: [PATCH 11/12] fix r4b compile problem --- .../main/java/org/hl7/fhir/r4b/utils/NPMPackageGenerator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.hl7.fhir.r4b/src/main/java/org/hl7/fhir/r4b/utils/NPMPackageGenerator.java b/org.hl7.fhir.r4b/src/main/java/org/hl7/fhir/r4b/utils/NPMPackageGenerator.java index 7687c59e3..1f092a411 100644 --- a/org.hl7.fhir.r4b/src/main/java/org/hl7/fhir/r4b/utils/NPMPackageGenerator.java +++ b/org.hl7.fhir.r4b/src/main/java/org/hl7/fhir/r4b/utils/NPMPackageGenerator.java @@ -120,7 +120,7 @@ public class NPMPackageGenerator { p.remove("name"); p.addProperty("name", id); p.remove("type"); - p.addProperty("type", PackageType.SUBSET.getCode()); + p.addProperty("type", PackageType.CONFORMANCE.getCode()); p.remove("title"); p.addProperty("title", name); if (notForPublication) { From c1758e3e8ac5566e7b735d21b051c0635526e7c2 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Sat, 12 Feb 2022 14:22:17 +1100 Subject: [PATCH 12/12] update dependency on test cases --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ffb18644c..3a6b36f78 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ 5.4.0 - 1.1.88 + 1.1.89-SNAPSHOT 5.7.1 1.7.1 3.0.0-M5