How to post many measurements/observations (heart rate) with one POST request?

I am working on device/application which measures heart rate. I did found that heart rate can be posted as observation as described here. From the example I see, that it takes only one measurement.

The heart rate device can be offline for some time and in the mean time can generate many heart rate measurements. To do many post requests is inappropriate and requires more resources.

Question:
What is the way to post many measurements with one post request?

If the measurements are made at regular intervals, you could use a single Observation and capture all the results as SampledData. Otherwise, you can submit multiple Observations (and possibly other resources too) using batch or transaction

2 Likes

Thanks @lloyd for the information.

As I am working on health wristlet/bracelet which measures heart rate all the time. And for me it looks, that it is better to use transactional POST request.

Another question related to same topic. How to get heart rate min and max values (these values were posted as observations to FHIR server) for particular day (2021-02-04) and particular patient (Patient/30d3de6f-e800-47fa-b610-b02c7c8e9d57)?

Take a look at the $stats operation

2 Likes

Thanks. It is what I need. :wink: