From 157fd68eca6b566734fffb07ea993d3e424cf12c Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Thu, 1 Sep 2022 22:42:01 +1000 Subject: [PATCH] check inactive property as well as status property when checking for active codes --- .../org/hl7/fhir/r5/terminologies/CodeSystemUtilities.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/CodeSystemUtilities.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/CodeSystemUtilities.java index 523538ad4..74094c34a 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/CodeSystemUtilities.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/terminologies/CodeSystemUtilities.java @@ -326,8 +326,12 @@ public class CodeSystemUtilities { public static boolean isInactive(CodeSystem cs, ConceptDefinitionComponent def) throws FHIRException { for (ConceptPropertyComponent p : def.getProperty()) { - if ("status".equals(p.getCode()) && p.hasValueStringType()) + if ("status".equals(p.getCode()) && p.hasValueStringType()) { return "inactive".equals(p.getValueStringType().primitiveValue()) || "retired".equals(p.getValueStringType().primitiveValue()); + } + if ("inactive".equals(p.getCode()) && p.hasValueBooleanType()) { + return p.getValueBooleanType().getValue(); + } } return false; }