fix handling of ValueSetVersion parameter in txTests

This commit is contained in:
Grahame Grieve 2024-12-24 07:32:07 +11:00
parent 36a23c4a21
commit 62f95eb15c

View File

@ -123,7 +123,12 @@ private static TxTestData testData;
private void expand(String id, ValidationEngine engine, Resource req, String resp, String lang, String fp, JsonObject ext) throws IOException {
org.hl7.fhir.r5.model.Parameters p = ( org.hl7.fhir.r5.model.Parameters) req;
ValueSet vs = engine.getContext().fetchResource(ValueSet.class, p.getParameterValue("url").primitiveValue());
ValueSet vs;
if (p.hasParameter("valueSetVersion")) {
vs = engine.getContext().fetchResource(ValueSet.class, p.getParameterValue("url").primitiveValue(), p.getParameterValue("valueSetVersion").primitiveValue());
} else {
vs = engine.getContext().fetchResource(ValueSet.class, p.getParameterValue("url").primitiveValue());
}
boolean hierarchical = p.hasParameter("excludeNested") ? p.getParameterBool("excludeNested") == false : true;
Assertions.assertNotNull(vs);
if (lang != null && !p.hasParameter("displayLanguage")) {