Resources
The US Core v1 Patient Access API supports a number of HL7 FHIR R4 resources. Each supported resource shares some characteristics in common.
Supported Headers
| Header | Direction | Description |
|---|---|---|
| Authorization | Request | Required. Includes bearer token to authorize the request. |
| Content-Type | Request & Response | Preferred format of response payload. Default: application/fhir+json;charset=UTF-8 |
| X-Correlation-Id | Response | Used to provide the requester’s transaction ID back in the response when it is not accepted as the transaction ID for Netsmart logging. |
| X-Request-ID | Request & Response | Unique transaction ID for logging purposes. Typically, a UUID. If this header is passed in the request, Netsmart will either accept it as the transaction ID or return it in the response X-Correlation-Id header. |
Content-Type
This API supports accepting and returning resources as XML and JSON.
You can specify your preference by using the Content-Type header.
| JSON | XML |
|---|---|
application/fhir+json | application/fhir+xml |
application/json | application/xml |
Operations
Resources on this endpoint will support one or more of the following operations. This section describes how to implement each operation. Please consult the resource-specific documentation to determine which operations are supported.
Read
- Production
- Preview
curl -X GET https://fhir.netsmartcloud.com/uscore/v1/{Resource}/{id} \
-H "Authorization: {Bearer Token}" \
-H "Accept: application/fhir+json"
curl -X GET https://fhirtest.netsmartcloud.com/uscore/v1/{Resource}/{id} \
-H "Authorization: {Bearer Token}" \
-H "Accept: application/fhir+json"
Search
Common Parameters
| Name | Type | Description |
|---|---|---|
| page | string | Page index (one-based). Default: 1 |
| _count | special | Integer. Number of result to return per page. Default: 100. Max: 500 |
| _sort | special | SortSpec. Sort option. |
Via POST (recommended)
The POST method is recommended as it keeps health information out of the URL.
- Production
- Preview
curl -X POST https://fhir.netsmartcloud.com/uscore/v1/{Resource}/_search \
-H "Authorization: {Bearer Token}" \
-H "Accept: application/fhir+json" \
-H "Content-Type: application/x-form-urlencoded" \
-d "parameter=value%20parameter=value"
curl -X POST https://fhirtest.netsmartcloud.com/uscore/v1/{Resource}/_search \
-H "Authorization: {Bearer Token}" \
-H "Accept: application/fhir+json" \
-H "Content-Type: application/x-form-urlencoded" \
-d "parameter=value%20parameter=value"
Via GET
- Production
- Preview
curl -X GET "https://fhir.netsmartcloud.com/uscore/v1/{Resource}?parameter=value¶meter=value" \
-H "Authorization: {Bearer Token}" \
-H "Accept: application/fhir+json"
curl -X GET https://fhirtest.netsmartcloud.com/uscore/v1/{Resource}/{id} \
-H "Authorization: {Bearer Token}" \
-H "Accept: application/fhir+json"
Search Example
The following example illustrates using the common search parameters with the Patient resource. The API will return the second set of 5 matching results for Patients with the family name like "Baker".
- Production
- Preview
curl -X POST https://fhir.netsmartcloud.com/uscore/v1/Patient/_search \
-H "Authorization: {Bearer Token}" \
-H "Accept: application/fhir+json" \
-H "Content-Type: application/x-form-urlencoded" \
-d "family=Baker%20page=2%20_count=5"
curl -X POST https://fhirtest.netsmartcloud.com/uscore/v1/Patient/_search \
-H "Authorization: {Bearer Token}" \
-H "Accept: application/fhir+json" \
-H "Content-Type: application/x-form-urlencoded" \
-d "family=Baker%20page=2%20_count=5"
Error Handling
For common errors and troubleshooting guidance, see Common Errors.