From 33cdfffa55cd4ac36a35a4b07ec15f917a78b063 Mon Sep 17 00:00:00 2001 From: dotasek Date: Sun, 23 Jan 2022 13:21:40 -0500 Subject: [PATCH] More consistent version management in TerminologyCache --- .../java/org/hl7/fhir/r5/context/TerminologyCache.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/TerminologyCache.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/TerminologyCache.java index af246c22d..56b76ab50 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/TerminologyCache.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/context/TerminologyCache.java @@ -186,11 +186,13 @@ public class TerminologyCache { public CacheToken generateValidationToken(ValidationOptions options, Coding code, ValueSet vs) { CacheToken ct = new CacheToken(); - if (code.hasSystem()) + if (code.hasSystem()) { ct.name = getNameForSystem(code.getSystem()); + ct.hasVersion = code.hasVersion(); + } else ct.name = NAME_FOR_NO_SYSTEM; - ct.hasVersion = code.hasVersion(); + JsonParser json = new JsonParser(); json.setOutputStyle(OutputStyle.PRETTY); ValueSet vsc = getVSEssense(vs); @@ -216,9 +218,10 @@ public class TerminologyCache { public CacheToken generateValidationToken(ValidationOptions options, CodeableConcept code, ValueSet vs) { CacheToken ct = new CacheToken(); for (Coding c : code.getCoding()) { - if (c.hasSystem()) + if (c.hasSystem()) { ct.setName(getNameForSystem(c.getSystem())); ct.hasVersion = c.hasVersion(); + } } JsonParser json = new JsonParser(); json.setOutputStyle(OutputStyle.PRETTY);