Skip to content

Revinclude is case sensitive #173

@Andrzej-Pietrzak

Description

@Andrzej-Pietrzak

We're seeing _revinclude behave differently then _include, when references contain id's with uppercase characters the revinclude search doesn't find them.

For the following searches, the one the differences between results in upper case uuid's and lowercase uuid's, similarly for text identifiers:

SELECT fhir_create_resource('{"allowId": true, "resource": {"id":"fosterfamilypractice","name":"Foster Family Practice","identifier":[{"value":"FosterFamilyPractice","system":"urn:ietf:rfc:3986","assigner":{"display":"epicCare","reference":"Organization/09ab4028-5c1b-40c9-9666-3fa67fb784s2"}}],"resourceType":"Organization"}}');
SELECT fhir_create_resource('{"allowId": true, "resource": {"id":"54e57a7f-a57a-411f-bd5a-82134b79117b","name":"Neurology Unit","status":"active","resourceType":"Location","managingOrganization":{"display":"Foster Family Practice","reference":"Organization/fosterfamilypractice"}}}');

SELECT fhir_create_resource('{"allowId": true, "resource": {"id":"PiersFamilyPractice","name":"Piers Family Practice","identifier":[{"value":"PiersFamilyPractice","system":"urn:ietf:rfc:3986","assigner":{"display":"epicCare","reference":"Organization/09ab4028-5c1b-40c9-9666-3fa67fb784s2"}}],"resourceType":"Organization"}}');
SELECT fhir_create_resource('{"allowId": true, "resource": {"id":"location674","name":"Cardiology Unit","status":"active","resourceType":"Location","managingOrganization":{"display":"Piers Family Practice","reference":"Organization/PiersFamilyPractice"}}}');

SELECT fhir_create_resource('{"allowId": true, "resource": {"id":"EDF694FD-4CB0-46A6-B9AC-95D5AC7E9E02","name":"Erickson Family Practice","identifier":[{"value":"EricksonFamilyPractice","system":"urn:ietf:rfc:3986","assigner":{"display":"epicCare","reference":"Organization/09ab4028-5c1b-40c9-9666-3fa67fb784s2"}}],"resourceType":"Organization"}}');
SELECT fhir_create_resource('{"allowId": true, "resource": {"id":"1234","name":"Dermatology Unit","status":"active","resourceType":"Location","managingOrganization":{"display":"Erickson Family Practice","reference":"Organization/EDF694FD-4CB0-46A6-B9AC-95D5AC7E9E02"}}}');

SELECT fhir_create_resource('{"allowId": true, "resource": {"id":"c38183a4-ec1c-4f2b-b350-a09bde110398","name":"Simons Family Practice","identifier":[{"value":"SimonsFamilyPractice","system":"urn:ietf:rfc:3986","assigner":{"display":"epicCare","reference":"Organization/09ab4028-5c1b-40c9-9666-3fa67fb784s2"}}],"resourceType":"Organization"}}');
SELECT fhir_create_resource('{"allowId": true, "resource": {"id":"Location754","name":"Nephrology Unit","status":"active","resourceType":"Location","managingOrganization":{"display":"Simons Family Practice","reference":"Organization/c38183a4-ec1c-4f2b-b350-a09bde110398"}}}');

--

SELECT fhir_search('{"resourceType": "Organization", "queryString": "_id=fosterfamilypractice&_revinclude=Location:organization"}'); -- ok, got both
SELECT fhir_search('{"resourceType": "Location", "queryString": "_id=54e57a7f-a57a-411f-bd5a-82134b79117b&_include=organization"}'); -- ok, got both

SELECT fhir_search('{"resourceType": "Organization", "queryString": "_id=c38183a4-ec1c-4f2b-b350-a09bde110398&_revinclude=Location:organization"}');  -- ok, got both
SELECT fhir_search('{"resourceType": "Location", "queryString": "_id=Location754&_include=organization"}'); -- ok, got both

SELECT fhir_search('{"resourceType": "Organization", "queryString": "_id=PiersFamilyPractice&_revinclude=Location:organization"}'); -- nok, missing location
SELECT fhir_search('{"resourceType": "Location", "queryString": "_id=location674&_include=organization"}'); -- ok, got both

SELECT fhir_search('{"resourceType": "Organization", "queryString": "_id=EDF694FD-4CB0-46A6-B9AC-95D5AC7E9E02&_revinclude=Location:organization"}');  -- nok, missing location
SELECT fhir_search('{"resourceType": "Location", "queryString": "_id=Location754&_include=organization"}'); -- ok, got both

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions