0

I've created a slice on Patient.identifier where one of the identifiers is for a health card number and the other is for a case record number. The one for the health card number contains a custom extension that is used to identify the reason why the value hasn't been obtained (similar to the default FHRI extension data-absent-reason).

I've marked the appropriate elements both within the Patient.identifier.extension and on the extension itself with isSummary=true so that the extension would show up in the search results when _summary=true parameter is used. However this does not seem to work as HAPI-FHIR seems to be unaware that the runtime definition for this extension should be custom and has the isSummary attribute set.

Am I doing something wrong within HAPI-FHIR that prevents it from using my extension definition when generating the runtime definition of the custom extension?

HAPI-FHIR version: 2.4

1 Answers1

0

The isSummary attribute is set by the working group responsible for the resource, and cannot be set to a different value. See the table on interpretation of elements in ElementDefinition: http://www.hl7.org/fhir/elementdefinition.html#interpretation. For isSummary, this tells you that the field is optional to set, but must follow the value of the base structure.

Perhaps you could try to make the extension mandatory, and see if that helps. Mandatory elements should be included in a summary, but I'm not sure if that also holds for items you've profiled to be mandatory.

Please also take a look at the STU note on known issues with summary, which will be addressed in R4: http://www.hl7.org/fhir/search.html#summary.

Mirjam Baltus
  • 2,035
  • 9
  • 13