Patient :identifier Search Parameter Support

HDR FHIR supports patient identifier search for all resources.

The FHIR standard defines a modifier :identifier that can be used to limit the reference search parameter. In this manner, the system allows for searching by identifier rather than literal reference.

Example:

GET [base]/Consent?patient:identifier=http://ns.electronichealth.net.au/id/hi/ihi/1.0|8003608833630130

The example is a search for all Consent resources that reference a patient by a particular patient identifier. When the :identifier modifier is used, the search value works as a token search.

In this case, patient resource will not be created before, and it will be attached while persisting the resource.

Sample Message:

{
  "resourceType": "Consent",
  "id": "consent-example-basic1255",
  "text": {
    "status": "generated",
    "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n\t\t\t<p>\n\tAuthorize Normal access for Treatment\n\t\t\t</p>\n\t\t\t<p>\n    Patient &quot;P. van de Heuvel&quot; wishes to have all of the PHI collected at the Good Health Psychiatric Hospital \n   available for normal treatment use.\n\t\t\t</p>\n\t\t</div>"
  },
  "status": "active",
  "scope": {
    "coding": [
      {
        "system": "http://terminology.hl7.org/CodeSystem/consentscope",
        "code": "patient-privacy"
      }
    ]
  },
  "category": [
    {
      "coding": [
        {
          "system": "http://loinc.org",
          "code": "59284-0"
        }
      ]
    }
  ],
  "patient": [{
        "identifier": {
            "system": "http://test.com",
            "value": "12345"
        }
  }],
  "dateTime": "2016-05-11",
  "organization": [
    {
      "reference": "Organization/rrrrf001"
    }
  ],
  "sourceAttachment": {
    "title": "The terms of the consent in lawyer speak."
  },
  "policyRule": {
    "coding": [
      {
        "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
        "code": "OPTIN"
      }
    ]
  },
  "provision": {
    "period": {
      "start": "1964-01-01",
      "end": "2016-01-01"
    }
  }
}

When the above message is persisted, indexed patient references will generate an index in the HFJ_SPIDX_TOKEN table for the patient identifier.

Now you can search Consent resources that reference a patient by a patient identifier using the GET operation like below.

GET [base]/Consent?patient:identifier=http://test.com|12345