Resources
Overview
The Netsmart General Purpose FHIR R4 API supports multiple FHIR resources for comprehensive healthcare data integration. Each resource follows consistent patterns for operations, authentication, and data formats.
Important: Always validate resource support and available operations by retrieving the current CapabilityStatement from /metadata before implementing integrations.
Supported Headers
| Header | Direction | Description |
|---|---|---|
| Authorization | Request | Required. Includes bearer token to authorize the request. |
| Accept | Request | application/fhir+json | application/fhir+xmlPreferred format of response payload. |
| Content-Type | Response | Format of response payload. Default: application/fhir+xml;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. |
Accept and Content-Type
This API supports accepting and returning resources as XML and JSON.
This API defaults to XML to support constraints of some of our early adopters.
You can specify your preference by using the Accept header.
| JSON | XML |
|---|---|
application/fhir+json | application/fhir+xml |
application/json | application/xml |
The content type used in the response will be returned in the Content-Type header.
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/v4/{Resource}/{id} \
-H "Authorization: {Bearer Token}" \
-H "Accept: application/fhir+json"
curl -X GET https://fhirtest.netsmartcloud.com/v4/{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/v4/{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/v4/{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/v4/{Resource}?parameter=value¶meter=value" \
-H "Authorization: {Bearer Token}" \
-H "Accept: application/fhir+json"
curl -X GET "https://fhirtest.netsmartcloud.com/v4/{Resource}?parameter=value¶meter=value" \
-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/v4/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/v4/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"
Create
- Production
- Preview
curl -X POST https://fhir.netsmartcloud.com/v4/{Resource} \
-H "Authorization: {Bearer Token}" \
-H "Accept: application/fhir+json" \
-H "Content-Type: application/x-form-urlencoded" \
-d @resource.json
curl -X POST https://fhirtest.netsmartcloud.com/v4/{Resource} \
-H "Authorization: {Bearer Token}" \
-H "Accept: application/fhir+json" \
-H "Content-Type: application/x-form-urlencoded" \
-d @resource.json
Update
- Production
- Preview
curl -X PUT https://fhir.netsmartcloud.com/v4/{Resource}/{id} \
-H "Authorization: {Bearer token}" \
-H "Content-Type: application/fhir+json" \
-d @resource.json
curl -X PUT https://fhirtest.netsmartcloud.com/v4/{Resource}/{id} \
-H "Authorization: {Bearer token}" \
-H "Content-Type: application/fhir+json" \
-d @resource.json
Validation Workflow
Before implementing resource operations:
- Retrieve CapabilityStatement - Get current capabilities from
/metadata - Validate Resource Support - Check
rest.resourcearray for supported resources - Check Operations - Verify supported operations in
interactionarrays - Validate Search Parameters - Confirm search parameters in
searchParamarrays - Test Implementation - Verify operations with actual API calls
Error Handling
For comprehensive error handling information, including HTTP status codes, common error scenarios, and troubleshooting guidance, see Common Errors.
Integration Patterns
Resource Relationships
Many resources reference other resources through FHIR references. Common patterns include:
- Patient-centric resources - Most clinical resources reference Patient
- Encounter-based resources - Clinical activities often reference Encounter
- Provider resources - Practitioner and Organization resources support care delivery
- Administrative resources - Coverage and related resources support billing workflows
Include Parameters
Use _include and _revinclude parameters to retrieve related resources in a single request where supported:
# Include referenced practitioners in encounter search
curl -X GET "https://fhir.netsmartcloud.com/v4/Encounter?_include=Encounter:practitioner" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/fhir+json"
Related Documentation
- CapabilityStatement - API capabilities and supported operations
- Extensions - Supported FHIR extensions for enhanced data
- Operations - Custom operations beyond standard CRUD
- Common Errors - Error handling and troubleshooting
Support
For questions about resource implementation or integration patterns, contact Netsmart support through your designated support channels.