This wiki has undergone a migration to Confluence found Here
<meta name="googlebot" content="noindex">

FHIR Has Parameter Issue Page

From HL7Wiki
Jump to navigation Jump to search

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:

http://foo.com/Observation?_has:Patient:subject:gender=male&_has:Patient:subject:birthDate=2011-01-01

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