From 27732602e368d4c2667ffd96618a5ce283882297 Mon Sep 17 00:00:00 2001 From: dotasek Date: Tue, 1 Mar 2022 17:03:17 -0500 Subject: [PATCH] Extract package-id when default id unavailable --- .../main/java/org/hl7/fhir/utilities/npm/PackageClient.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/npm/PackageClient.java b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/npm/PackageClient.java index 35f3788b5..c8f492194 100644 --- a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/npm/PackageClient.java +++ b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/npm/PackageClient.java @@ -222,6 +222,11 @@ public class PackageClient { version = v; fVersion = e.getAsJsonArray("fhir-version").get(0).getAsString(); url = JSONUtil.str(e, "url"); + + String npmPackage = JSONUtil.str(e, "package"); + if (npmPackage != null && id == null) { + id = npmPackage.substring(0, npmPackage.indexOf("#")); + } } } }