Stream: implementers
Topic: search code with implicit system
Christiaan Knaap (Mar 22 2018 at 14:07):
The datatype 'code' carries an implicit system, defined as part of the definition of the element, and not carried in the instance (spec section 4.1).
You can search on code values with a Token search. Consider Patient.gender as an example, with these four possible searches:
1. /Patient?gender=male
2. /Patient?gender=|male
3. /Patient?gender=http://hl7.org/fhir/ValueSet/administrative-gender|
4. /Patient?gender=http://hl7.org/fhir/ValueSet/administrative-gender|male
#1 is the normal way of searching this, but the others are also valid Token searches.
Question: should examples 2, 3 and/or 4 return results?
On test.fhir.org, HAPI and Vonk they currently don't. We are fixing this for Vonk, hence the question...
For 2: Since the system is implicitly always defined, it may make sense that this does not return any results.
But for 3 & 4: Since the system matches the implicit system, I'd expect results.
This is somewhat related to the decision about removing default values, since here the system has a 'default' value, but afaik this case is not covered by that decision.
Grahame Grieve (Mar 22 2018 at 19:25):
2 should not return. 3 and 4 should. I would expect them to on test.fhir.org
Anand Mohan Tumuluri (Mar 23 2018 at 16:18):
Shouldn't the system be http://hl7.org/fhir/administrative-gender? May be thats why its not working.
Never mind, it doesnt work even with http://hl7.org/fhir/administrative-gender.
Lloyd McKenzie (Mar 23 2018 at 16:28):
Note that you'd need to escape the URL
Christiaan Knaap (Apr 06 2018 at 15:53):
Sorry for the late reply but thanks for the answers. We implemented it as I suggested and @Grahame Grieve confirmed.
Last updated: Apr 12 2022 at 19:14 UTC