fhirbase-plv8
fhirbase-plv8 copied to clipboard
Check: combination of include & chained params may do not work
GET Encounter/_include=Encounter:patient&patient:Patient.name=f&page=1
return Patient in bundle, but no Encounter
The chained searches seem to fail:
SELECT fhir_create_resource('{"allowId": true, "resource": {"resourceType":"Organization","id":"f001","identifier":[{"use":"official","system":"systm1","value":"91654"},{"use":"usual","system":"systm1","value":"17-0112278"}],"type":{"coding":[{"system":"systm1","code":"V6","display":"University Medical Hospital"},{"system":"http://hl7.org/fhir/organization-type","code":"prov","display":"Healthcare Provider"}]},"name":"Burgers University Medical Center","telecom":[{"system":"phone","value":"022-655 2300","use":"work"}],"address":[{"use":"work","line":["Galapagosweg 91"],"city":"Den Burg","postalCode":"9105 PZ","country":"NLD"},{"use":"work","line":["PO Box 2311"],"city":"Den Burg","postalCode":"9100 AA","country":"NLD"}],"contact":[{"purpose":{"coding":[{"system":"http://hl7.org/fhir/contactentity-type","code":"PRESS"}]},"telecom":[{"system":"phone","value":"022-655 2334"}]},{"purpose":{"coding":[{"system":"http://hl7.org/fhir/contactentity-type","code":"PATINF"}]},"telecom":[{"system":"phone","value":"022-655 2335"}]}]}}'); SELECT fhir_create_resource('{"allowId": true, "resource": {"resourceType":"Practitioner","id":"f001","identifier":[{"use":"official","system":"urn:oid:2.16.528.1.1007.3.1","value":"938273695"},{"use":"usual","system":"urn:oid:2.16.840.1.113883.2.4.6.3","value":"129IDH4OP733"}],"name":{"use":"official","family":["van den broek"],"given":["Eric"],"suffix":["MD"]},"telecom":[{"system":"phone","value":"0205568263","use":"work"},{"system":"email","value":"[email protected]","use":"work"},{"system":"fax","value":"0205664440","use":"work"}],"address":[{"use":"work","line":["Galapagosweg 91"],"city":"Den Burg","postalCode":"9105 PZ","country":"NLD"}],"gender":"male","birthDate":"1975-12-07","practitionerRole":[{"managingOrganization":{"reference":"Organization/f001","display":"BMC"},"role":{"coding":[{"system":"urn:oid:2.16.840.1.113883.2.4.15.111","code":"01.000","display":"Arts"}],"text":"Care role"},"specialty":[{"coding":[{"system":"urn:oid:2.16.840.1.113883.2.4.15.111","code":"01.018","display":"Ear-, Nose and Throat"}],"text":"specialization"}]}]}}') SELECT fhir_create_resource('{"allowId": true, "resource": {"id": "RitaGunn", "name":[{"use":"official","given":["Rita"],"family":["Gunn"]}],"active":true,"careProvider":[{"reference":"Organization/f001","display":"Burgers-Organization1"},{"reference":"Practitioner/f001","display":"DocEric-Practitioner1"}],"resourceType":"Patient"}}'); SELECT fhir_create_resource('{"allowId":true,"resource":{"id":"JamesDean","name":[{"use":"official","given":["James"],"family":["Dean"]}],"active":true,"careProvider":[{"reference":"Organization/f001","display":"Burgers-Organization1"}],"resourceType":"Patient"}}');
-- basic reference searches: SELECT fhir_search('{"resourceType": "Patient", "queryString": "careprovider=nonexisting"}'); -- ok SELECT fhir_search('{"resourceType": "Patient", "queryString": "careprovider=f001"}'); -- ok, 2 patients SELECT fhir_search('{"resourceType": "Patient", "queryString": "careprovider=Practitioner/f001"}'); -- ok, 1 patient, RitaGunn SELECT fhir_search('{"resourceType": "Patient", "queryString": "careprovider=Practitioner/nonexisting"}'); -- ok SELECT fhir_search('{"resourceType": "Patient", "queryString": "careprovider=Organization/f001"}'); -- ok, both patients SELECT fhir_search('{"resourceType": "Patient", "queryString": "careprovider=Organization/nonexisting"}'); -- ok
-- chained parameters syntax used for basic search: SELECT fhir_search('{"resourceType": "Patient", "queryString": "careprovider:Practitioner=nonexistingPractitionerId"}'); -- not supported SELECT fhir_search('{"resourceType": "Patient", "queryString": "careprovider:Practitioner=f001"}'); -- not supported SELECT fhir_search('{"resourceType": "Patient", "queryString": "careprovider:Practitioner.id=f001"}'); --not supported SELECT fhir_search('{"resourceType": "Patient", "queryString": "careprovider:Practitioner._id=f001"}'); -- not supported
-- chained params: SELECT fhir_search('{"resourceType": "Patient", "queryString": "careprovider.identifier=91654"}'); -- not especially useful but not supported SELECT fhir_search('{"resourceType": "Patient", "queryString": "careprovider:Practitioner.given=nonexisting"}'); SELECT fhir_search('{"resourceType": "Patient", "queryString": "careprovider:Practitioner.given=Eric"}'); -- got practitioner instead of the patient SELECT fhir_search('{"resourceType": "Patient", "queryString": "careprovider:Organization.identifier=91654"}'); -- got the organization twice instead of two patients SELECT fhir_search('{"resourceType": "Patient", "queryString": "careprovider:Organization.identifier=nonexisting"}');
Has this issue been fixed ? If not what's status on that ?