check activeOnly parameter
This commit is contained in:
parent
157fd68eca
commit
fd76766da7
|
@ -427,7 +427,7 @@ public class ValueSetExpanderSimple extends ValueSetWorker implements ValueSetEx
|
|||
focus.getExpansion().setTimestampElement(DateTimeType.now());
|
||||
focus.getExpansion().setIdentifier(Factory.createUUID());
|
||||
for (ParametersParameterComponent p : expParams.getParameter()) {
|
||||
if (Utilities.existsInList(p.getName(), "includeDesignations", "excludeNested"))
|
||||
if (Utilities.existsInList(p.getName(), "includeDesignations", "excludeNested", "activeOnly"))
|
||||
focus.getExpansion().addParameter().setName(p.getName()).setValue(p.getValue());
|
||||
}
|
||||
|
||||
|
@ -487,10 +487,24 @@ public class ValueSetExpanderSimple extends ValueSetWorker implements ValueSetEx
|
|||
first = false;
|
||||
else
|
||||
canBeHeirarchy = false;
|
||||
includeCodes(inc, exp, expParams, canBeHeirarchy, compose.hasInactive() && !compose.getInactive(), extensions, valueSet);
|
||||
includeCodes(inc, exp, expParams, canBeHeirarchy, compose.hasInactive() ? !compose.getInactive() : checkNoInActiveFromParam(expParams), extensions, valueSet);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* returns true if activeOnly = true
|
||||
* @param expParams
|
||||
* @return
|
||||
*/
|
||||
private boolean checkNoInActiveFromParam(Parameters expParams) {
|
||||
for (ParametersParameterComponent p : expParams.getParameter()) {
|
||||
if (p.getName().equals("activeOnly")) {
|
||||
return p.getValueBooleanType().getValue();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private ValueSet importValueSet(String value, ValueSetExpansionComponent exp, Parameters expParams, boolean noInactive, ValueSet valueSet) throws ETooCostly, TerminologyServiceException, FileNotFoundException, IOException, FHIRFormatError {
|
||||
if (value == null)
|
||||
throw fail("unable to find value set with no identity");
|
||||
|
|
Loading…
Reference in New Issue