Array property in FHIR Observation?

Is it possible to have component (property) in Observation which is an array value? If so how?
I need to persists an array of float values within an Observation.

You can repeat component with the same component.code multiple times. You can also look at the SampledData data type. What are you trying to covey?

@lloyd Thank you for your help.

I am trying to persist an measurement on a patient that has several float values.
These values are related to a measurement algorithm and persist the state of the measurement so it can be used as initial values for future measurements.

Having separate components (with same component.code) does not seem right to me as it is logically one property (component).

The property is still a string and this type adds additional properties I do not need (lowerLimit, upperLimit etc.). So it does not offer more than just using component.valueString.

Thus I have resorted to using component.valueString for this use case.

Repeating components would be the ‘appropriate’ solution. Making people parse strings to extract numeric values is certainly not the way Observation is intended to be used.

@lloyd Thanks for the correction. It seems odd though that SampleData seems to use strings for numeric values. Perhaps this will be fixed in a future release?

As feedback on FHIR, it seems it could use a more robust support for typical object modeling constructs that supports properties that are objects, array, arrays of objects etc in a more intuitive way. OpenAPI Specification may be a good resource to tap into for this.

A use case would be ability to add properties of the following types to FHIR Observation:

  • Primitive type
  • Object type - object definition of nested object would support all types of properties
  • Array type (items may be primitive or object)

Is something like this part of the roadmap?

Apologies if I am off in the weeds.

FHIR is quite familiar with OpenAPI. The choice of how to represent information is driven by limitations on representation of polymorphic elements. You can’t have a repeating element that can also have different data types (and Observation.value is one of those that can have multiple types). Also, in most cases, multiple values actually indicate distinct Observations. SampledData is handled as a special case and uses String for space optimization reasons - you don’t want a whole lot of overhead when you’re collecting a hundred measurements per second.

Can you explain exactly what the multiple float values represent in the measurement?

I have a similar problem.
I need to send a non-periodic array of data that is received from a spirometer to plot a Volume-Time chart.
And I can’t use the SampledData type because time is not a periodic parameter (it has to be explicitly specified for each volume value).
How to transfer such data according to the FHIR?

Right now, you’d be looking at using extensions. You could use a complex extension similar to SampledData, but one where you had strings for both data values and sample offsets. The receiver would match those two together.

1 Like