Reputation: 4006
Is it possible to get a count for the number of Patients on an FHIR server. Searching for FHIR and count I get several results for using _count to limit the number of records returned by a query, but I'm not seeing anything that shows how to get a count for the number of Patients on a FHIR Patient server.
Upvotes: 4
Views: 4466
Reputation: 11225
To get the total amount of patient
https://.../?_summary=count&_type=Patient
To get the total amount of patient with their versions
https://../Patient/?_summary=count
Upvotes: 0
Reputation: 1971
You could use _total
https://syntheticmass.mitre.org/v1/fhir/Patient?apikey=<your key here>&_total=accurate
Which should return something along these lines (see example below). You can access the total # of Patients resources via the total element in the returned Bundle
{
"entry":[
...
],
"link":[
...
],
"resourceType":"Bundle",
"total":500,
"type":"searchset"
}
Read more about this option from the fhir wiki
Upvotes: 4
Reputation: 4006
It looks like this is being done with the _summary=count parameter:
https://syntheticmass.mitre.org/v1/fhir/Patient?_summary=count&apikey=API_KEY_GOES_HERE
Unfortunately it looks like this isn't supported by syntheicmass
{
"issue": [
{
"code": "value",
"details": {
"text": "invalid_query"
},
"diagnostics": "generic::unimplemented: _summary argument is not supported yet.",
"severity": "error"
}
],
"resourceType": "OperationOutcome"
}
Upvotes: 8