Aidbox / Issues

Issue tracker for Aidbox FHIR backend by Health Samurai
7 stars 0 forks source link

LastN Observations default max value #15

Closed androBermudez closed 6 years ago

androBermudez commented 6 years ago

Using the Observation $lastn operator returns repeated observations if max parameter is not supplieded. In fhir documentation, the second example, suggests that the default value is 1.

http://hl7.org/fhir/2018May/observation-operation-lastn.html

mlapshin commented 6 years ago

@androBermudez I can't reproduce this, could you please provide me with sample observations bundle and $lastn endpoint query?

androBermudez commented 6 years ago

this is the url /Observation/$lastn?_count=200&_totalMethod=count&subject=f8128b15-00c6-4e05-8d2c-5c23b6a6a81f&category=vital-signs

This is the bundle: bundle.zip

What is the default max value?

mlapshin commented 6 years ago

Default value for max parameter is 5. You can override it putting max=N in the query string. NB _count and _totalMethod parameters are ignored for $lastn endpoint, so you can remove them from query string.

Using the Observation $lastn operator returns repeated observations if max parameter is not supplieded.

I can't see any repeated observations (same observation resource with same ID) in the bundle you've provided. Can you clarify what do you mean under "repeated observations"?

androBermudez commented 6 years ago

The main doubt was the default value of the max parameter. Now it is clear. Closing the issue.