Skip to main content

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

HeaderDirectionDescription
AuthorizationRequestRequired. Includes bearer token to authorize the request.
AcceptRequestapplication/fhir+json | application/fhir+xml
Preferred format of response payload.
Content-TypeResponseFormat of response payload.
Default: application/fhir+xml;charset=UTF-8
X-Correlation-IdResponseUsed 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-IDRequest & ResponseUnique 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.

JSONXML
application/fhir+jsonapplication/fhir+xml
application/jsonapplication/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

curl -X GET https://fhir.netsmartcloud.com/v4/{Resource}/{id} \
-H "Authorization: {Bearer Token}" \
-H "Accept: application/fhir+json"

Common Parameters

NameTypeDescription
pagestringPage index (one-based). Default: 1
_countspecialInteger. Number of result to return per page. Default: 100. Max: 500
_sortspecialSortSpec. Sort option.

Via POST (recommended)

The POST method is recommended as it keeps health information out of the URL.

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"

Via GET

curl -X GET "https://fhir.netsmartcloud.com/v4/{Resource}?parameter=value&parameter=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".

Example: Patient Search by Family Name
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"

Create

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

Update

curl -X PUT https://fhir.netsmartcloud.com/v4/{Resource}/{id} \
-H "Authorization: {Bearer token}" \
-H "Content-Type: application/fhir+json" \
-d @resource.json

Validation Workflow

Before implementing resource operations:

  1. Retrieve CapabilityStatement - Get current capabilities from /metadata
  2. Validate Resource Support - Check rest.resource array for supported resources
  3. Check Operations - Verify supported operations in interaction arrays
  4. Validate Search Parameters - Confirm search parameters in searchParam arrays
  5. 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"

Support

For questions about resource implementation or integration patterns, contact Netsmart support through your designated support channels.