Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #1323 - Add support for ':of-type' modifier #2116

Merged
merged 5 commits into from
Mar 22, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/src/pages/Conformance.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: post
title: Conformance
description: Notes on the Conformance of the IBM FHIR Server
date: 2021-03-17 12:00:00 -0400
date: 2021-03-19 12:00:00 -0400
permalink: /conformance/
---

Expand Down Expand Up @@ -165,7 +165,7 @@ FHIR search modifiers are described at https://www.hl7.org/fhir/R4/search.html#m
|String |`:exact`,`:contains`,`:missing` |"starts with" search that is case-insensitive and accent-insensitive|
|Reference |`:[type]`,`:missing`,`:identifier` |exact match search and targets are implicitly added|
|URI |`:below`,`:above`,`:missing` |exact match search|
|Token |`:missing`,`:not` |exact match search|
|Token |`:missing`,`:not`,`:of-type` |exact match search|
|Number |`:missing` |implicit range search (see http://hl7.org/fhir/R4/search.html#number)|
|Date |`:missing` |implicit range search (see https://www.hl7.org/fhir/search.html#date)|
|Quantity |`:missing` |implicit range search (see http://hl7.org/fhir/R4/search.html#quantity)|
Expand All @@ -174,7 +174,7 @@ FHIR search modifiers are described at https://www.hl7.org/fhir/R4/search.html#m

Due to performance implications, the `:exact` modifier should be used for String searches where possible.

The `:text`, `:above`, `:below`, `:in`, `:not-in`, and `:of-type` modifiers are not supported in this version of the IBM FHIR server and use of these modifiers will result in an HTTP 400 error with an OperationOutcome that describes the failure.
The `:text`, `:above`, `:below`, `:in`, and `:not-in` modifiers are not supported in this version of the IBM FHIR server and use of these modifiers will result in an HTTP 400 error with an OperationOutcome that describes the failure.
tbieste marked this conversation as resolved.
Show resolved Hide resolved

### Search prefixes
FHIR search prefixes are described at https://www.hl7.org/fhir/R4/search.html#prefix.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public class JDBCConstants {
supportedModifiersMap.put(Type.STRING, Arrays.asList(Modifier.EXACT, Modifier.CONTAINS, Modifier.MISSING));
supportedModifiersMap.put(Type.REFERENCE, Arrays.asList(Modifier.TYPE, Modifier.MISSING, Modifier.IDENTIFIER));
supportedModifiersMap.put(Type.URI, Arrays.asList(Modifier.BELOW, Modifier.ABOVE, Modifier.MISSING));
supportedModifiersMap.put(Type.TOKEN, Arrays.asList(Modifier.MISSING, Modifier.NOT));
supportedModifiersMap.put(Type.TOKEN, Arrays.asList(Modifier.MISSING, Modifier.NOT, Modifier.OF_TYPE));
supportedModifiersMap.put(Type.NUMBER, Arrays.asList(Modifier.MISSING));
supportedModifiersMap.put(Type.DATE, Arrays.asList(Modifier.MISSING));
supportedModifiersMap.put(Type.QUANTITY, Arrays.asList(Modifier.MISSING));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1409,7 +1409,7 @@ private List<ExtractedParameterValue> extractSearchParameters(Resource fhirResou
// Of course, that would require adding extension-search-params to the Registry which would require the Registry to be tenant-aware.
// SearchParameter compSP = FHIRRegistry.getInstance().getResource(component.getDefinition().getValue(), SearchParameter.class);
SearchParameter compSP = SearchUtil.getSearchParameter(p.getResourceType(), component.getDefinition());
JDBCParameterBuildingVisitor parameterBuilder = new JDBCParameterBuildingVisitor(compSP);
JDBCParameterBuildingVisitor parameterBuilder = new JDBCParameterBuildingVisitor(p.getResourceType(), compSP);
FHIRPathNode node = nodes.iterator().next();
if (nodes.size() > 1 ) {
// TODO: support component expressions that result in multiple nodes
Expand Down Expand Up @@ -1455,7 +1455,6 @@ private List<ExtractedParameterValue> extractSearchParameters(Resource fhirResou
ExtractedParameterValue componentParam = parameters.get(0);
// override the component parameter name with the composite parameter name
componentParam.setName(SearchUtil.makeCompositeSubCode(code, componentParam.getName()));
componentParam.setResourceType(p.getResourceType());
componentParam.setBase(p.getBase());
p.addComponent(componentParam);
} else if (node.isSystemValue()){
Expand Down Expand Up @@ -1498,7 +1497,7 @@ private List<ExtractedParameterValue> extractSearchParameters(Resource fhirResou
}
}
} else { // ! SearchParamType.COMPOSITE.equals(sp.getType())
JDBCParameterBuildingVisitor parameterBuilder = new JDBCParameterBuildingVisitor(sp);
JDBCParameterBuildingVisitor parameterBuilder = new JDBCParameterBuildingVisitor(fhirResource.getClass().getSimpleName(), sp);

for (FHIRPathNode value : values) {

Expand Down Expand Up @@ -1542,7 +1541,6 @@ private List<ExtractedParameterValue> extractSearchParameters(Resource fhirResou
// retrieve the list of parameters built from all the FHIRPathElementNode values
List<ExtractedParameterValue> parameters = parameterBuilder.getResult();
for (ExtractedParameterValue p : parameters) {
p.setResourceType(fhirResource.getClass().getSimpleName());
allParameters.add(p);
if (log.isLoggable(Level.FINE)) {
log.fine("Extracted Parameter '" + p.getName() + "' from Resource.");
Expand Down
Loading