knightingale
knightingale

Reputation: 11

Custom Search Parameter for Extensions Resource on FHIR

Does FHIR support search based on Extension values?

I have added this extension under the ImagingStudy Resource

{
  "extension": [
    {
      "url": "http://hl7.org/fhir/SearchParameter/institution-name",
      "valueString": "Apollo"
    }
  ]
}

Is it possible to have a custom search parameter added for this extension such that it can be searched accordingly? If possible, how can I register it?

Upvotes: 0

Views: 781

Answers (1)

Lloyd McKenzie
Lloyd McKenzie

Reputation: 6793

It's definitely possible to define search parameters that look at extensions. There's an example of one here: http://hl7.org/fhir/searchparameter-example-extension.html

However, the process of getting a given server to support those search parameters depends on what server you're using. Some of the reference implementation servers have an ability to generically support any 'normal' SearchParameter that is appropriately registered. Other servers will require custom coding to support new parameters.

Note that having an extension with a canonical URL that looks like a SearchParameter is going to be confusing to most implementers. If you're using a FHIR-based canonical URL, it should be a StructureDefinition.

Upvotes: 1

Related Questions