Describe the bug
In DSTU2, there are only 2 or so composite SearchParameter types. As noted in https://github.ibm.com/watson-health-fhir-server/fhir-docs/blob/master/Conformance.md
In DSTU2, the composite SearchParameters are disabled (removed from the search-parameters.json.
Per the Spec https://www.hl7.org/fhir/valueset-search-param-type.html
composite | Composite | A composite search parameter that combines a search on two values together.
The SearchParameter drives a composite key from the parameter. In this case, when running an Observation resource, the entire resource is dropped into a single output value using the expression "expression" : "value.as(string)".
To Reproduce
In SearchUtil, there is a shortcircuit of the value public static <T> Map<SearchParameter, List<FHIRPathNode>> extractParameterValues(T resource) throws Exception {
- Disable the exception
!SearchParamType.COMPOSITE.equals(type).
- Ensure that there is at least one value.as()
{
"fullUrl" : "http://hl7.org/fhir/SearchParameter/Questionnaire-context-type-quantity",
"resource" : {
"resourceType" : "SearchParameter",
"id" : "Questionnaire-context-type-quantity",
"extension" : [{
"url" : "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
"valueCode" : "trial-use"
}],
"url" : "http://hl7.org/fhir/SearchParameter/Questionnaire-context-type-quantity",
"version" : "4.0.0",
"name" : "context-type-quantity",
"status" : "draft",
"experimental" : false,
"date" : "2018-12-27T22:37:54+11:00",
"publisher" : "Health Level Seven International (FHIR Infrastructure)",
"contact" : [{
"telecom" : [{
"system" : "url",
"value" : "http://hl7.org/fhir"
}]
},
{
"telecom" : [{
"system" : "url",
"value" : "http://www.hl7.org/Special/committees/fiwg/index.cfm"
}]
}],
"description" : "A use context type and quantity- or range-based value assigned to the questionnaire",
"code" : "context-type-quantity",
"base" : ["Questionnaire"],
"type" : "composite",
"expression" : "Questionnaire.useContext",
"xpathUsage" : "normal",
"multipleOr" : false,
"multipleAnd" : true,
"modifier" : ["missing"],
"component" : [{
"definition" : "http://hl7.org/fhir/SearchParameter/Questionnaire-context-type",
"expression" : "code"
},
{
"definition" : "http://hl7.org/fhir/SearchParameter/Questionnaire-context-quantity",
"expression" : "value.as(Quantity) | value.as(Range)"
}]
}
},
Expected behavior
A new search is available using composite types and searches.
Additional context
Specific to Search and Persistence.
Describe the bug
In DSTU2, there are only 2 or so
compositeSearchParameter types. As noted in https://github.ibm.com/watson-health-fhir-server/fhir-docs/blob/master/Conformance.mdIn DSTU2, the composite SearchParameters are disabled (removed from the
search-parameters.json.Per the Spec https://www.hl7.org/fhir/valueset-search-param-type.html
composite | Composite | A composite search parameter that combines a search on two values together.The SearchParameter drives a composite key from the parameter. In this case, when running an Observation resource, the entire resource is dropped into a single output value using the expression
"expression" : "value.as(string)".To Reproduce
In
SearchUtil, there is a shortcircuit of the valuepublic static <T> Map<SearchParameter, List<FHIRPathNode>> extractParameterValues(T resource) throws Exception {!SearchParamType.COMPOSITE.equals(type).Expected behavior
A new search is available using composite types and searches.
Additional context
Specific to Search and Persistence.