From a632594a67bccdc9fe11da37325b2d5db74b0d37 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Thu, 24 Oct 2024 07:16:36 +1030 Subject: [PATCH] track OID status --- .../org/hl7/fhir/r5/context/BaseWorkerContext.java | 11 ++++++----- .../java/org/hl7/fhir/r5/context/IWorkerContext.java | 7 ++++++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/BaseWorkerContext.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/BaseWorkerContext.java index 29a98c91c..8996c6f05 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/BaseWorkerContext.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/BaseWorkerContext.java @@ -499,7 +499,7 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte if (!oidCacheManual.containsKey(s)) { oidCacheManual.put(s, new HashSet<>()); } - oidCacheManual.get(s).add(new OIDDefinition(r.fhirType(), s, url, ((CanonicalResource) r).getVersion(), null)); + oidCacheManual.get(s).add(new OIDDefinition(r.fhirType(), s, url, ((CanonicalResource) r).getVersion(), null, null)); } } } @@ -3189,7 +3189,8 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte String rt = rs.getString(1); String url = rs.getString(2); String version = rs.getString(3); - summary.addOID(new OIDDefinition(rt, oid, url, version, os.pid)); + String status = rs.getString(4); + summary.addOID(new OIDDefinition(rt, oid, url, version, os.pid, status)); } } } catch (Exception e) { @@ -3201,13 +3202,13 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte switch (oid) { case "2.16.840.1.113883.6.1" : - summary.addOID(new OIDDefinition("CodeSystem", "2.16.840.1.113883.6.1", "http://loinc.org", null, null)); + summary.addOID(new OIDDefinition("CodeSystem", "2.16.840.1.113883.6.1", "http://loinc.org", null, null, null)); break; case "2.16.840.1.113883.6.8" : - summary.addOID(new OIDDefinition("CodeSystem", "2.16.840.1.113883.6.8", "http://unitsofmeasure.org", null, null)); + summary.addOID(new OIDDefinition("CodeSystem", "2.16.840.1.113883.6.8", "http://unitsofmeasure.org", null, null, null)); break; case "2.16.840.1.113883.6.96" : - summary.addOID(new OIDDefinition("CodeSystem", "2.16.840.1.113883.6.96", "http://snomed.info/sct", null, null)); + summary.addOID(new OIDDefinition("CodeSystem", "2.16.840.1.113883.6.96", "http://snomed.info/sct", null, null, null)); break; default: } diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/IWorkerContext.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/IWorkerContext.java index 256868682..46d8d8a6a 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/IWorkerContext.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/IWorkerContext.java @@ -139,13 +139,15 @@ public interface IWorkerContext { private String url; private String version; private String packageSrc; - protected OIDDefinition(String type, String oid, String url, String version, String packageSrc) { + private String status; + protected OIDDefinition(String type, String oid, String url, String version, String status, String packageSrc) { super(); this.type = type; this.oid = oid; this.url = url; this.version = version == null ? "" : version; this.packageSrc = packageSrc; + this.status = status; } public String getType() { return type; @@ -159,6 +161,9 @@ public interface IWorkerContext { public String getVersion() { return version; } + public String getStatus() { + return status; + } public String getPackageSrc() { return packageSrc; }