How to search a Claim using extension field

I have a Claim payload, that has an extension block:

"extension" : [{
   "url" : "http://hl7.org/fhir/StructureDefinition/iso-21090-EN-use",
   "valueString" : "REG"
}],

I want search this claim record using the extension but don't know how to do it.
I tried using GET request to https://<azure_fhir_server>/Claim?extension=REG but it says

 {
     "severity": "warning",
     "code": "not-supported",
     "diagnostics": "The search parameter 'extension' is not supported for resource type 'Claim'."
 }

1 answer

  • answered 2021-08-20 15:36 Nik Klassen

    By default you can only search on fields that are part of the FHIR spec. These are listed in a "Search Parameters" section on the page for each resource type, i.e. https://hl7.org/fhir/claim.html#search. To search on extensions you will need to create a custom SearchParameter https://docs.microsoft.com/en-us/azure/healthcare-apis/fhir/how-to-do-custom-search, i.e.

    POST {{FHIR_URL}}/SearchParameter
    
    {
      "resourceType" : "SearchParameter",
      "id" : "iso-21090-EN-use",
      "url" : "ttp://hl7.org/fhir/SearchParameter/iso-21090-EN-use",
      ... some required fields ...
      "code" : "iso-use",
      "base" : [
        "Claim"
      ],
      "type" : "token",
      "expression" : "Claim.extension.where(url = 'http://hl7.org/fhir/StructureDefinition/iso-21090-EN-use').value.string"
    }
    

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum