ONC.GetCCD

This method takes the API key and the time period in months and returns a CCDA Version 2.1 clinical document for the api key requested. The following header elements are not included as part of the xml data that is returned:

<xml version="1.0" encoding="UTF-8"?>
<xml-stylesheet type="text/xsl" href="CDA.xsl"?>

Example Request

<request>
  <security>
    <key>UserID~Password~cw_API</key>
    <version>1.0</version>
    <userid />
    <account>39985F47-62E0-4533-918F-317695A6BFEB</account>
  </security>
  <api_key>123</api_key>
  <start_date>01/01/2019</start_date>
  <end_date>03/01/2019</end_date>
  <time_period_months>36</time_period_months>
</request>
ParentTagTypeMax LengthDescription
requestsecuritytag-Contains security information for accessing the APIs
securitykeystring(required)-Security information is used to access the API. The key is made up of a user identifier, password, and connection point separated by a tilde character. The user identifier and password were assigned to you when you signed up to use the API’s. The connection point will always be cw_api.
securityversionstring-Used for backward compatibility. For now, always use 1.0.
securityuseridstring-UserId for the user of your application. Currently not used.
securityaccountstring-Account identifier. This will always be 39985F47-62E0-4533-918F-317695A6BFEB
requestedapi_keystring50 charapi_key that is returned from the ONC.FindPatient method.
requestedstart_datestring50 charStarting date to return patient-related information (default=01/01/1901). The setting has no effect on Demographics, Allergies, Medications, Problems, Unique Device Identifiers, and Social History
requestedend_datestring50 charStarting date to return patient-related information (default=01/01/3001). The setting has no effect on Demographics, Allergies, Medications, Problems, Unique Device Identifiers, and Social History

Example Response

<response xmlns="http://www.isalushealthcare.webservices/">
  <ClinicalDocument xsi:schemaLocation="urn:hl7-org:v3 http://xreg2.nist.gov:8080/hitspValidation/schema/cdar2c32/infrastructure/cda/C32_CDA.xsd"
    xmlns:sdtc="urn:hl7-org:sdtc"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="urn:hl7-org:v3">
    <realmCode code="US" />
              CCDA Data Here  
  </ClinicalDocument>
</response>

Error

In the event that the API call results in an error, the response will contain an <error> node. Within this section, we will return an error code and a description of the error that can be used to display back to the end user.

<response xmlns="http://www.isalushealthcare.webservices/">
  <error>
    <code>1</code>
    <description>API Key is not valid</description>
  </error>
</response>