check inactive property as well as status property when checking for active codes
This commit is contained in:
parent
8e6cd3c16c
commit
157fd68eca
|
@ -326,9 +326,13 @@ public class CodeSystemUtilities {
|
||||||
|
|
||||||
public static boolean isInactive(CodeSystem cs, ConceptDefinitionComponent def) throws FHIRException {
|
public static boolean isInactive(CodeSystem cs, ConceptDefinitionComponent def) throws FHIRException {
|
||||||
for (ConceptPropertyComponent p : def.getProperty()) {
|
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());
|
return "inactive".equals(p.getValueStringType().primitiveValue()) || "retired".equals(p.getValueStringType().primitiveValue());
|
||||||
}
|
}
|
||||||
|
if ("inactive".equals(p.getCode()) && p.hasValueBooleanType()) {
|
||||||
|
return p.getValueBooleanType().getValue();
|
||||||
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue