update test case dependency

This commit is contained in:
Grahame Grieve 2023-10-09 17:47:49 +11:00
parent 7b7484e08e
commit 97914518fa
4 changed files with 38 additions and 2 deletions

View File

@ -132,6 +132,7 @@ public class TypeDetails {
private List<ProfiledType> types = new ArrayList<ProfiledType>();
private CollectionStatus collectionStatus;
private Set<String> targets; // or, not and, canonical urls
private boolean choice;
public TypeDetails(CollectionStatus collectionStatus, String... names) {
super();
@ -308,6 +309,9 @@ public class TypeDetails {
}
targets.addAll(source.targets);
}
if (source.isChoice()) {
choice = true;
}
}
public TypeDetails union(TypeDetails right) {
@ -537,4 +541,12 @@ public class TypeDetails {
return collectionStatus != null && collectionStatus.isList();
}
// for SQL-on-FHIR: warnings when .ofType() is not paired with a choice element
public void setChoice(boolean b) {
choice = true;
}
public boolean isChoice() {
return choice;
}
}

View File

@ -74,6 +74,7 @@ import java.util.HashSet;
import org.apache.commons.lang3.StringUtils;
import org.fhir.ucum.Utilities;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.BackboneElement;
import org.hl7.fhir.r5.model.Base;
import org.hl7.fhir.r5.model.BooleanType;
import org.hl7.fhir.r5.model.CanonicalType;
@ -205,7 +206,7 @@ public class ToolingExtensions {
public static final String EXT_VS_KEYWORD = "http://hl7.org/fhir/StructureDefinition/valueset-keyWord";
public static final String EXT_WORKGROUP = "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg";
public static final String EXT_XML_NAMESPACE = "http://hl7.org/fhir/StructureDefinition/elementdefinition-namespace";
public static final String EXT_OLD_CONCEPTMAP_EQUIVALENCE = "http://hl7.org/fhir/1.0/StructureDefinition/extension-ConceptMap.element.target.equivalence";
public static final String EXT_OLD_CONCEPTMAP_EQUIVALENCE = "http://hl7.org/fhir/1.0/StructureDefinition/extension-ConceptMap.group.element.target.equivalence";
public static final String EXT_Q_IS_SUBJ = "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-isSubject";
public static final String EXT_Q_HIDDEN = "http://hl7.org/fhir/StructureDefinition/questionnaire-hidden";
public static final String EXT_Q_OTP_DISP = "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-optionalDisplay";
@ -674,6 +675,28 @@ public class ToolingExtensions {
resource.getExtension().add(new Extension(uri).setValue(new CodeType(value)));
}
public static void setCodeExtensionMod(DomainResource resource, String uri, String value) {
if (Utilities.noString(value))
return;
Extension ext = getExtension(resource, uri);
if (ext != null)
ext.setValue(new CodeType(value));
else
resource.getModifierExtension().add(new Extension(uri).setValue(new CodeType(value)));
}
public static void setCodeExtensionMod(BackboneElement resource, String uri, String value) {
if (Utilities.noString(value))
return;
Extension ext = getExtension(resource, uri);
if (ext != null)
ext.setValue(new CodeType(value));
else
resource.getModifierExtension().add(new Extension(uri).setValue(new CodeType(value)));
}
public static void setCodeExtension(Element element, String uri, String value) {
if (Utilities.noString(value))
return;

View File

@ -74,6 +74,7 @@ public class Runner implements IEvaluationContext {
}
fpe = new FHIRPathEngine(context);
fpe.setHostServices(this);
fpe.setEmitSQLonFHIRWarning(true);
if (viewDefinition == null) {
throw new FHIRException("No viewDefinition provided");
}

View File

@ -20,7 +20,7 @@
<properties>
<guava_version>32.0.1-jre</guava_version>
<hapi_fhir_version>6.4.1</hapi_fhir_version>
<validator_test_case_version>1.4.8</validator_test_case_version>
<validator_test_case_version>1.4.9-SNAPSHOT</validator_test_case_version>
<jackson_version>2.15.2</jackson_version>
<junit_jupiter_version>5.9.2</junit_jupiter_version>
<junit_platform_launcher_version>1.8.2</junit_platform_launcher_version>