CaseSensitive=false for search by resource identifiers

123 views
Skip to first unread message

Tromix Vl

unread,
May 27, 2022, 3:28:34 AM5/27/22
to HAPI FHIR
Hi

According to the documentation, identifier is a token. The documentation says that I can use the CodeSystem.caseSensitive parameter for the token to make the lookup case insensitive.

For tokens, matches are literal (e.g. not based on subsumption or other code system features). Match is case sensitive unless the underlying semantics for the context indicate that the token should be interpreted case-insensitively (see, e.g. CodeSystem.caseSensitive). Note that matches on _id are always case sensitive. If the underlying data type is string then the search is not case sensitive.

I'm trying to use this but it doesn't work. Judging by the source code, I don't really see how the caseSensitive parameter can be used at all for query. TokenPredicateBuilder builds a hash for the value that will be searched without checking this parameter. 

It is used for validation, but not for token lookup.

My test resources:

{
  "resourceType": "CodeSystem",
  "id": "foo-1",
  "version": "3.1.1",
  "name": "FOOSys",
  "title": "FOOSys",
  "status": "active",
  "date": "2020-08-28T10:54:27+10:00",
  "publisher": "HL7 US Realm Steering Committee",
  "jurisdiction": [
    {
      "coding": [
        {
          "system": "urn:iso:std:iso:3166",
          "code": "US",
          "display": "United States of America"
        }
      ]
    }
  ],
  "caseSensitive": false,
  "content": "complete",
  "concept": [
    {
      "code": "FOO"
    }
  ]
}

{
    "resourceType": "Patient",
    "id": "123",
    "active": true,
    "identifier": [
        {
            "type": {
                "coding": [
                    {
                        "system": "https://www.foo.com/fhir/CodeSystems/id-org",
                        "code": "FOO"
                    }
                ]
            },
            "system": "https://www.foo.com/fhir/CodeSystems/id-org",
            "value": "UNKNOWN"
        }
    ],
    "name": [
        {
            "family": "Chalmers"
        }
    ],
    "gender": "male"
}

Then I try
1) R4/Patient?identifier=https://www.foo.com/fhir/CodeSystems/id-org|UNKNOWN - return then patient
2) R4/Patient?identifier=https://www.foo.com/fhir/CodeSystems/id-org|unknown
- does not return a patient

Can you please tell me, 
1) Does the CaseSensitive parameter work for the search? 
2) How to use it if "yes"?
Reply all
Reply to author
Forward
0 new messages