Difference between revisions of "FHIR Has Parameter Issue Page"
James agnew (talk | contribs) |
Chris Grenz (talk | contribs) |
||
Line 16: | Line 16: | ||
* AND: return Observations for males who were born on 2011-01-01 (my preference) | * AND: return Observations for males who were born on 2011-01-01 (my preference) | ||
* OR: return Observations for males and Observations for people born on 2011-01-01 | * OR: return Observations for males and Observations for people born on 2011-01-01 | ||
+ | |||
+ | CGG: Not sure of the etiquette for discussion pages... | ||
+ | |||
+ | We've implemented _has with the following rules: | ||
+ | * _has and the first 2 modifiers define a search parameter "group", so in the above example, all query parms with <code>_has:Patient:subject</code> will be ANDed together. | ||
+ | * The third modifier (and beyond) are treated as search parameters on the first modifier, and any search allowed on the first would be acceptable. So this is valid: | ||
+ | * Evaluate the deepest nestings first and work "up", similarly to chained parameters. | ||
+ | |||
+ | "Find all patients with observations of code in the given valueset" | ||
+ | |||
+ | <code>Patient?_has:Observation:subject:code:in=http://terms.mayo.edu/valueset/2.16.840.1.113883.3.2.11.4.37</code> | ||
+ | |||
+ | as is: | ||
+ | |||
+ | "Find all patients with observations made by the device with model 5000" | ||
+ | <code>Patient?_has:Observation:subject:_has:Provenance:target:agent:Device.model=5000</code> | ||
+ | |||
+ | And (AND at the nested level): | ||
+ | |||
+ | "Find all patients with observations made by the device manufactured by ACME model 5000" | ||
+ | <code>Patient?_has:Observation:subject:_has:Provenance:target:agent:Device.manufacturer=ACME&_has:Observation:subject:_has:Provenance:target:agent:Device.model=5000</code> |
Latest revision as of 19:04, 10 May 2016
This is the discussion page to discuss the proposed _has parameter.
Discussion
- Issue 1: Multiple _has to the same target type
If a query has two _has parameters which point to the same type, do they have an AND or an OR relationship on the target? In other words, given the following URL:
Does this URL mean
- AND: return Observations for males who were born on 2011-01-01 (my preference)
- OR: return Observations for males and Observations for people born on 2011-01-01
CGG: Not sure of the etiquette for discussion pages...
We've implemented _has with the following rules:
- _has and the first 2 modifiers define a search parameter "group", so in the above example, all query parms with
_has:Patient:subject
will be ANDed together. - The third modifier (and beyond) are treated as search parameters on the first modifier, and any search allowed on the first would be acceptable. So this is valid:
- Evaluate the deepest nestings first and work "up", similarly to chained parameters.
"Find all patients with observations of code in the given valueset"
Patient?_has:Observation:subject:code:in=http://terms.mayo.edu/valueset/2.16.840.1.113883.3.2.11.4.37
as is:
"Find all patients with observations made by the device with model 5000"
Patient?_has:Observation:subject:_has:Provenance:target:agent:Device.model=5000
And (AND at the nested level):
"Find all patients with observations made by the device manufactured by ACME model 5000"
Patient?_has:Observation:subject:_has:Provenance:target:agent:Device.manufacturer=ACME&_has:Observation:subject:_has:Provenance:target:agent:Device.model=5000