1

Is there a way to etxract the resources of a type for a specific version id.

e.g something like this

http://fhir-server/hapi-fhir-jpaserver/fhir/Organization?versionId>30

I can go to the database and execute the below query to get results but same way if exists using the REST query?

select RES_VER, RES_TYPE 
from HFJ_RESOURCE 
where RES_VER >= 10 and Res_type = 'Practitioner'
James Z
  • 12,209
  • 10
  • 24
  • 44

2 Answers2

1

You cannot do this based on the versionId for the resources, since the versionId does not have to be an incremental number. It could be something like a GUID, only holding meaning for the server.

What you can do, is ask for the complete history for that resource type, and for example limit that based on the date. An example:

GET [base]/Observation/_history?_at=lt2020-10-26

See http://hl7.org/fhir/http.html#history for more information.

Mirjam Baltus
  • 2,035
  • 9
  • 13
0
GET [base]/[type]/[id]/_history/[vid] {?_format=[mime-type]}

See http://hl7.org/fhir/http.html#vread

bogdan ioan
  • 378
  • 3
  • 7