A couple of test fixes
This commit is contained in:
parent
444730373b
commit
d4d3178621
|
@ -362,7 +362,6 @@ public class ResourceProviderR4ValueSetTest extends BaseResourceProviderR4Test {
|
|||
createExternalCsAndLocalVs();
|
||||
assertNotNull(myLocalValueSetId);
|
||||
|
||||
//@formatter:off
|
||||
Parameters respParam = ourClient
|
||||
.operation()
|
||||
.onType(ValueSet.class)
|
||||
|
@ -370,7 +369,6 @@ public class ResourceProviderR4ValueSetTest extends BaseResourceProviderR4Test {
|
|||
.withParameter(Parameters.class, "url", new UriType(URL_MY_VALUE_SET))
|
||||
.execute();
|
||||
ValueSet expanded = (ValueSet) respParam.getParameter().get(0).getResource();
|
||||
//@formatter:on
|
||||
|
||||
String resp = myFhirCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(expanded);
|
||||
ourLog.info(resp);
|
||||
|
|
|
@ -179,14 +179,16 @@ public class ValueSetExpanderSimple implements ValueSetExpander {
|
|||
}
|
||||
|
||||
private void addCodes(ValueSetExpansionComponent expand, List<ValueSetExpansionParameterComponent> params, ExpansionProfile profile, List<ValueSet> filters) throws ETooCostly {
|
||||
if (expand.getContains().size() > maxExpansionSize)
|
||||
throw new ETooCostly("Too many codes to display (>" + Integer.toString(expand.getContains().size()) + ")");
|
||||
for (ValueSetExpansionParameterComponent p : expand.getParameter()) {
|
||||
if (!existsInParams(params, p.getName(), p.getValue()))
|
||||
params.add(p);
|
||||
}
|
||||
// if (expand != null) {
|
||||
if (expand.getContains().size() > maxExpansionSize)
|
||||
throw new ETooCostly("Too many codes to display (>" + Integer.toString(expand.getContains().size()) + ")");
|
||||
for (ValueSetExpansionParameterComponent p : expand.getParameter()) {
|
||||
if (!existsInParams(params, p.getName(), p.getValue()))
|
||||
params.add(p);
|
||||
}
|
||||
|
||||
copyImportContains(expand.getContains(), null, profile, filters);
|
||||
copyImportContains(expand.getContains(), null, profile, filters);
|
||||
// }
|
||||
}
|
||||
|
||||
private void excludeCode(String theSystem, String theCode) {
|
||||
|
|
|
@ -52,14 +52,15 @@ public class ValidationSupportChain implements IValidationSupport {
|
|||
for (IValidationSupport next : myChain) {
|
||||
if (isNotBlank(theInclude.getSystem())) {
|
||||
if (next.isCodeSystemSupported(theCtx, theInclude.getSystem())) {
|
||||
return next.expandValueSet(theCtx, theInclude);
|
||||
ValueSetExpansionComponent expansion = next.expandValueSet(theCtx, theInclude);
|
||||
if (expansion != null) {
|
||||
return expansion;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (UriType nextValueSet : theInclude.getValueSet()) {
|
||||
ValueSetExpansionComponent retVal = next.expandValueSet(theCtx, theInclude);
|
||||
if (retVal != null && retVal.getContains().size() > 0) {
|
||||
return retVal;
|
||||
}
|
||||
ValueSetExpansionComponent retVal = next.expandValueSet(theCtx, theInclude);
|
||||
if (retVal != null && retVal.getContains().size() > 0) {
|
||||
return retVal;
|
||||
}
|
||||
}
|
||||
return myChain.get(0).expandValueSet(theCtx, theInclude);
|
||||
|
|
|
@ -51,7 +51,10 @@ public class ValidationSupportChain implements IValidationSupport {
|
|||
public ValueSetExpander.ValueSetExpansionOutcome expandValueSet(FhirContext theCtx, ConceptSetComponent theInclude) {
|
||||
for (IValidationSupport next : myChain) {
|
||||
if (next.isCodeSystemSupported(theCtx, theInclude.getSystem())) {
|
||||
return next.expandValueSet(theCtx, theInclude);
|
||||
ValueSetExpander.ValueSetExpansionOutcome expansion = next.expandValueSet(theCtx, theInclude);
|
||||
if (expansion != null) {
|
||||
return expansion;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue