CapabilityStatement
GET https://api.flexpa.com/fhir/metadata
CapabilityStatement is a conformance FHIR Resource that is used to understand the exact capabilities that a payer (or any server) makes available. This is useful for applications to understand what data is available to them and what operations they can perform.
While all FHIR servers should support the metadata
operation, these resources are sometimes exposed through non-standard endpoints or formats. Where possible, Flexpa has standardized the response to make it easier for applications to understand what data is available to them and what operations they can perform.
#Sample request
This is a sample request using curl
ACCESS_TOKEN=flexpa-link-access-token
curl "https://api.flexpa.com/fhir/metadata" \
-H "Authorization: Bearer $ACCESS_TOKEN"
Additionally, since this data is public, unauthorized clients can also retrieve an endpoint's CapabilityStatement.
curl "https://api.flexpa.com/endpoints/[:id]/metadata"
Where id
refers to an Endpoint ID, and can be found in the Endpoints reference.
#Sample response
This is a sample response from Humana using Flexpa API in test mode
#Useful capabilities
In an endpoint's CapabilityStatement, there are several useful capabilities worth checking the presence of.
These capabilities are sometimes made available by payer FHIR servers to provide convenience to developers when querying data.
Because these capabilities are not universally supported by all payer servers, it is necessary to put in place fallback methods to query FHIR data in their absence.
The following examples are located in the rest[0].resource
array of an endpoint's CapabilityStatement and are defined per-resource.
#Patient $everything
Unique to the Patient resource, the $everything
operation pulls all patient data.
If supported, the operation
array will contain an object with the key-value pair "name": "everything"
.
{
"type": "Patient",
...
"operation": [
{
"name": "everything",
"definition": "http://hl7.org/fhir/OperationDefinition/Patient-everything",
"documentation": "This operation is used to return all the information related to a patient"
}
]
}
#searchParam
The searchParam
array describes the valid params that the server accepts in a URL query string.
The name of the param can be accessed in the name
property of each searchParam object.
{
"type": "Condition",
...
"searchParam": [
{
"name": "stage",
"definition": "http://hl7.org/fhir/SearchParameter/Condition-stage",
"type": "token",
"documentation": "Simple summary (disease specific)"
},
{
"name": "onset-age",
"definition": "http://hl7.org/fhir/SearchParameter/Condition-onset-age",
"type": "quantity",
"documentation": "Onsets as age or age range"
}
]
}
For example, to retrieve any Condition resources where the onset age was after 54:
ACCESS_TOKEN=flexpa-link-access-token
curl "https://api.flexpa.com/fhir/Condition?onset-age=gt54" \
-H "Authorization: Bearer $ACCESS_TOKEN"
#searchInclude
The searchInclude
array describes the valid values that can be referenced with the _include
search param.
{
"type": "ExplanationOfBenefit",
...
"searchInclude": [
"*",
"ExplanationOfBenefit:care-team",
"ExplanationOfBenefit:insurer"
]
}
For example, to retrieve the insurer that issued an ExplanationOfBenefit:
ACCESS_TOKEN=flexpa-link-access-token
curl "https://api.flexpa.com/fhir/ExplanationOfBenefit?_include=ExplanationOfBenefit:insurer" \
-H "Authorization: Bearer $ACCESS_TOKEN"
#Search operation
If a FHIR resource can be searched, the interaction
array will contain an object with code
equal to "search-type"
.
{
"type": "Coverage",
...
"interaction": [
{
"code": "read",
},
{
"code": "search-type",
}
]
}
For example, some Endpoints do not allow for searching across all Practitioners due to design considerations such as privacy.
If this is true for an Endpoint, the Practitioner resource in the Endpoints's CapabilityStatement will look like:
{
"type": "Practitioner",
...
"interaction": [
{
"code": "read"
}
]
}