CCD API
For new integrations, we recommend using the standardized US Core DocumentReference $docref operation instead of this legacy CCD API. The $docref operation provides:
- Standards-based FHIR approach for on-demand document generation
- Consistent interface across all FHIR APIs (supports both GET and POST methods)
- Support for both stable document search and on-demand generation
- Better integration with FHIR workflows
See DocumentReference $docref documentation for details.
Overview
The CareConnect CCD API enables an application to request the generation of Clinical Document Architecture (CDA) documents for a specific patient. This API supports various document types including Continuity of Care Documents (CCDs), consultation notes, discharge summaries, and other clinical documents.
Key Use Cases:
- Generate CCD documents for care transitions
- Create consultation notes for referrals
- Produce discharge summaries for patient handoffs
- Support regulatory reporting requirements
Base URLs:
- Production
- Preview
https://fhir.netsmartcloud.com/ccd
https://fhirtest.netsmartcloud.com/ccd
Supported CareRecords
The CCD API is supported by the following Netsmart CareRecords:
| CareRecord | Support |
|---|---|
| GEHRIMED | Yes |
| Homecare | Yes |
| myAvatar | Yes |
| myEvolv | Yes |
| myUnity | Yes |
| TIER | Yes |
Operations
Generate CDA Document
Generate a Clinical Document Architecture (CDA) document for a specific patient.
Endpoint: GET /ccd
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
patient | string | Yes | The Patient ID as assigned by the CareRecord |
documentTitle | string | No | The type of CDA document to generate. Default: CCD |
start | date | No | Start date for data inclusion (YYYY-MM-DD format) |
end | date | No | End date for data inclusion (YYYY-MM-DD format) |
Supported Document Types
| Document Type | documentTitle Value | LOINC Code | Status |
|---|---|---|---|
| Continuity of Care Document | CCD | 34133-9 | Default |
| Consultation Note | ConsultationNote | 11488-4 | Available |
| Discharge Summary | DischargeSummary | 18842-5 | Available |
| Electronic Initial Case Report | EICR | 55751-2 | Available |
| Emergency Healthcare Survey | EmergencyHealthcareSurvey | 75619-7 | Available |
| History and Physical Note | HistoryAndPhysicalNote | 34117-2 | Available |
| Inpatient Healthcare Survey | InpatientHealthcareSurvey | 75619-7 | Available |
| Outpatient Healthcare Survey | OutpatientHealthcareSurvey | 75619-7 | Available |
| Progress Note | ProgressNoteDoc | 11506-3 | Available |
| Public Health Case Report | PublicHealthCaseReport | 34133-9 | Available |
| Referral Note | ReferralNote | 57133-1 | Available |
| Unstructured Document | UnstructuredDocument | 34133-9 | Available |
| Transfer of Care | TransferOfCare | - | Reserved for future use |
Authentication
The CCD API uses OAuth 2.0 Client Credentials flow for authentication. You must obtain an access token before making API requests.
Required Scope
CCD- Required for accessing the CCD API
Request Access Token
- Production
- Preview
curl -X POST https://oauth.netsmartcloud.com/token \
-H "Accept: application/fhir+json" \
-H "Content-Type: application/x-form-urlencoded" \
-d grant_type=client_credentials \
-d client_id=YOUR_CLIENT_ID \
-d client_secret=YOUR_CLIENT_SECRET \
-d scope=CCD
curl -X POST https://oauthtest.netsmartcloud.com/token \
-H "Accept: application/fhir+json" \
-H "Content-Type: application/x-form-urlencoded" \
-d grant_type=client_credentials \
-d client_id=YOUR_CLIENT_ID \
-d client_secret=YOUR_CLIENT_SECRET \
-d scope=CCD
Examples
Basic CCD Request
- Production
- Preview
curl -X GET 'https://fhir.netsmartcloud.com/ccd?patient=123' \
-H "Authorization: Bearer {access_token}" \
-H "Accept: application/xml"
curl -X GET 'https://fhirtest.netsmartcloud.com/ccd?patient=123' \
-H "Authorization: Bearer {access_token}" \
-H "Accept: application/xml"
Advanced Examples
- Production
- Preview
curl -X GET 'https://fhir.netsmartcloud.com/ccd?patient=123&documentTitle=ConsultationNote&start=2024-01-01&end=2024-01-31' \
-H "Authorization: Bearer {access_token}" \
-H "Accept: application/xml"
curl -X GET 'https://fhir.netsmartcloud.com/ccd?patient=456&documentTitle=DischargeSummary' \
-H "Authorization: Bearer {access_token}" \
-H "Accept: application/xml"
curl -X GET 'https://fhirtest.netsmartcloud.com/ccd?patient=123&documentTitle=ConsultationNote&start=2024-01-01&end=2024-01-31' \
-H "Authorization: Bearer {access_token}" \
-H "Accept: application/xml"
curl -X GET 'https://fhirtest.netsmartcloud.com/ccd?patient=456&documentTitle=DischargeSummary' \
-H "Authorization: Bearer {access_token}" \
-H "Accept: application/xml"
Response Example
HTTP/2 200 OK
Date: Mon, 17 Jul 2023 20:31:58 GMT
Content-Type: application/xml;charset=ISO-8859-1
Content-Length: 91096
x-ntst-transaction-id: 755b292f-8a7b-4910-b08d-14cde37e191c
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="NTSTCCDStyles.xsl"?>
<ClinicalDocument xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:hl7-org:v3"
xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
<realmCode code="US"/>
<typeId root="2.16.840.1.113883.1.3" extension="POCD_HD000040"/>
<templateId root="2.16.840.1.113883.10.20.22.1.2" extension="2015-08-01"/>
<id extension="CCD-123" root="2.16.840.1.113883.19.5.99999.1"/>
<code code="34133-9" codeSystem="2.16.840.1.113883.6.1"
codeSystemName="LOINC" displayName="Summarization of Episode Note"/>
<title>Continuity of Care Document</title>
<!-- Additional CDA content -->
</ClinicalDocument>
Integration Patterns
Common Workflows
1. Care Transition Documentation
# Step 1: Generate CCD for patient transfer
GET /ccd?patient=123&documentTitle=CCD
# Step 2: Include in care transition workflow
# Use generated CDA document for handoff
2. Consultation Documentation
# Step 1: Generate consultation note
GET /ccd?patient=456&documentTitle=ConsultationNote&start=2024-01-15&end=2024-01-15
# Step 2: Share with referring provider
# Include consultation details and recommendations
Response Formats
- Content-Type:
application/xml;charset=ISO-8859-1 - Format: HL7 CDA R2 compliant XML
- Encoding: UTF-8
- Stylesheet: Includes XSL transformation for browser rendering
Error Handling
Common Error Scenarios
400 Bad Request
HTTP/2 400 Bad Request
Content-Type: application/json
{
"error": "Bad Request",
"message": "Missing required parameter: patient"
}
401 Unauthorized
HTTP/2 401 Unauthorized
Content-Type: application/json
{
"message": "Unauthorized"
}
Common Causes:
- Missing Authorization header
- Invalid or expired access token
- Insufficient scope (missing
CCDscope)
404 Not Found
HTTP/2 404 Not Found
Content-Type: application/json
{
"error": "Not Found",
"message": "Patient with ID '123' not found"
}
500 Internal Server Error
HTTP/2 500 Internal Server Error
Content-Type: application/json
{
"error": "Internal Server Error",
"message": "Failed to generate CDA document"
}
Troubleshooting Tips
- Authentication Issues: Verify access token and required
CCDscope - Patient Not Found: Confirm patient ID exists in target CareRecord
- Invalid Document Type: Check
documentTitleparameter against supported values - Date Format Errors: Ensure dates use YYYY-MM-DD format
- Generation Failures: Contact Netsmart support with transaction ID
Migration to FHIR DocumentReference $docref
For applications currently using the CCD API, we recommend migrating to the US Core DocumentReference $docref operation for on-demand document generation.
Benefits of Migration
- Standards-Based: Uses HL7 FHIR US Core standard operation
- Unified API: Single FHIR API for both document search and generation
- Better Discovery: CapabilityStatement documents available operations
- Consistent Authentication: Uses same OAuth flows as other FHIR resources
- Future-Proof: Aligned with industry standards and regulatory requirements
Migration Comparison
| Feature | Legacy CCD API | FHIR $docref Operation |
|---|---|---|
| Endpoint | GET /ccd?patient={id} | GET or POST /DocumentReference/$docref |
| Request Format | Query parameters | Query parameters (GET) or FHIR Parameters (POST) |
| Response Format | CDA XML document | FHIR Bundle with DocumentReference + Binary |
| Authentication | OAuth with CCD scope | OAuth with FHIR scopes |
| Standards | Custom API | US Core IG |
| Discovery | Documentation only | CapabilityStatement |
Example Migration
Legacy CCD API:
- Production
- Preview
curl -X GET 'https://fhir.netsmartcloud.com/ccd?patient=123' \
-H "Authorization: Bearer {access_token}" \
-H "Accept: application/xml"
curl -X GET 'https://fhirtest.netsmartcloud.com/ccd?patient=123' \
-H "Authorization: Bearer {access_token}" \
-H "Accept: application/xml"
FHIR $docref Operation (GET):
- Production
- Preview
curl -X GET 'https://fhir.netsmartcloud.com/provider/system-access/v2/DocumentReference/\$docref?patient=123' \
-H "Authorization: Bearer {access_token}" \
-H "Accept: application/fhir+json"
curl -X GET 'https://fhirtest.netsmartcloud.com/provider/system-access/v2/DocumentReference/\$docref?patient=123' \
-H "Authorization: Bearer {access_token}" \
-H "Accept: application/fhir+json"
FHIR $docref Operation (POST with type parameter):
- Production
- Preview
curl -X POST https://fhir.netsmartcloud.com/provider/system-access/v2/DocumentReference/\$docref \
-H "Authorization: Bearer {access_token}" \
-H "Accept: application/fhir+json" \
-H "Content-Type: application/fhir+json" \
-d '{
"resourceType": "Parameters",
"parameter": [
{
"name": "patient",
"valueId": "123"
},
{
"name": "type",
"valueCoding": {
"system": "http://loinc.org",
"code": "34133-9"
}
}
]
}'
curl -X POST https://fhirtest.netsmartcloud.com/provider/system-access/v2/DocumentReference/\$docref \
-H "Authorization: Bearer {access_token}" \
-H "Accept: application/fhir+json" \
-H "Content-Type: application/fhir+json" \
-d '{
"resourceType": "Parameters",
"parameter": [
{
"name": "patient",
"valueId": "123"
},
{
"name": "type",
"valueCoding": {
"system": "http://loinc.org",
"code": "34133-9"
}
}
]
}'
Migration Resources
- DocumentReference Resource Documentation
- US Core DocumentReference $docref Operation
- FHIR Authorization Guide
Technical Specifications
Standards Compliance
- HL7 CDA R2: Full compliance with Clinical Document Architecture Release 2
- C-CDA: Consolidated Clinical Document Architecture templates
- LOINC Codes: Standard document type identification
- XML Schema: Validates against HL7 CDA XSD
Security
- OAuth 2.0: Client Credentials flow authentication
- HTTPS: All communications encrypted in transit
- Access Control: Tenant-based data isolation
- Audit Logging: All requests logged with transaction IDs