FHIR API Documentation
Introduction

Introduction

Product Name and Version

ChARM EHR 1.2

API Root Endpoint

https://ehr.charmtracker.com/api/ehr/v1/fhir

ChARM EHR V1.2 API program offers comprehensive set of REST APIs that allows third party developers to build applications by querying patient records stored in ChARM EHR.

API responses are formatted according to FHIR (Fast Healthcare Interoperability Resources) standard. FHIR is a HL7 specification for seamless transfer of healthcare information electronically. The standardized resource types make application development simpler.

Every resource is exposed as a URL, which can be obtained by accessing the API Root Endpoint.

Getting Started

Example

$ curl -X GET https://ehr.charmtracker.com/api/ehr/v1/fhir/patients/id -H "Authorization: Bearer 6e80ed905055deb9fd2d12d71f518a80" -H "api_key: 9f72e9eed37ad04d68590b221d47e63c"

All ChARM EHR APIs require two mandatory authorization headers.

Authorization - OAuth Access Token

api_key - API Key is practice specific and provided by the administrator of the account

If the user accessing the API is a patient then one more header below is required.

practice_id - Practice ID is provided by the administrator of the account. This header is required only if the user accessing the API is a patient(PHR user).It is not required for EHR users (providers and other practice members).

Authentication

ChARM EHR APIs are authenticated using OAuth 2, an open authorization protocol that grants third party applications limited access to users' account. The authentication and authorization are facilitated only between the end-user and the ChARM HTTPS service. OAuth 2 provides dependable security for your application data that can be accessed via web and mobile devices.

You can obtain an OAuth token by following the steps below:

  1. Register a Developer Account
  2. Get an Authorization Grant
  3. Get an Access Token

1. Register a Developer Account

For using ChARM APIs, you have to register a developer account with ChARM. Submit a request using ChARM API Access Request Form.Provide your contact information and details about the application you are planning to build.On receiving your request, our representatives will contact you to discuss your requirements and assist you in signing our API License Agreement.

Once the agreement is signed and the developer license is purchased, we will provide you a sandbox account in ChARM stage setup for doing your development. We will also provide a client ID and a client secret that are required to generate access token. The Client ID is used by ChARM EHR to verify the identity of the application and has a public visibility. The Client Secret is used to authorize the resources that can be accessed by the authenticated application.

Sample Request

GET https://accounts.charmtracker.com/oauth/v2/auth?scope=patient.demographics.READ&client_id={client_id}&state=tempstate&response_type=code&redirect_uri=https://app.example.com/oauth&access_type=offline

Sample Response

When you invoke the authorization grant API, the authorization grant is passed as a parameter to your redirect url as shown below.Retrieve the value returned for the 'code' parameter and use it to get the Access Token in the subsequent API.
https://app.example.com/oauth?state=tempstate&code=1000.47b8fa1a1676bda5da938decdf0cf0d6.d3f48797707de05fcac81d135dc7b6c0

2. Get an authorization grant

To get authorization grant from users, make a GET request to the URL below with associated parameters.

URL: https://accounts.charmtracker.com/oauth/v2/auth

Params:

User Privileges:

ChARM EHR FHIR APIs are accessible to practice members and patients. Practice members can use their ChARM EHR login credentials and patients can use their ChARM PHR credentials to authenticate.

Providers and other practice members can access the patient records based on the privileges allowed for their role. They cannot access the data for which they do not have privilege to view.

Patients can access only the patient records mapped to their PHR account. They cannot access other patients' records in EHR.

Available Scopes:

Scopes Scope operations available
patient.fullaccess charmhealth.patient.fullaccess.READ
patient.demographics charmhealth.patient.demographics.READ
patient.allergy charmhealth.patient.allergy.READ
patient.medication charmhealth.patient.medication.READ
patient.problem charmhealth.patient.problem.READ
patient.vital charmhealth.patient.vital.READ
patient.immunization charmhealth.patient.immunization.READ
patient.labresult charmhealth.patient.labresult.READ
patient.chartnote charmhealth.patient.chartnote.READ
patient.procedure charmhealth.patient.procedure.READ
patient.implant charmhealth.patient.implant.READ
patient.careteam charmhealth.patient.careteam.READ
patient.ccda charmhealth.patient.ccda.READ

Actions under each scope:

patient.fullaccess

Allows full access to patients' ALL records.

patient.demographics

Allows access to patients' demographic data.

patient.allergy

Allows access to patients' allergies.

patient.medication

Allows access to patients' medications.

patient.problem

Allows access to patients' problems.

patient.vital

Allows access to patients' vitals.

patient.immunization

Allows access to patients' immunizations.

patient.labresult

Allows access to patients' lab results.

patient.chartnote

Allows access to patients' chart notes.

patient.procedure

Allows access to patients' procedures.

patient.implant

Allows access to patients' implanted devices.

patient.careteam

Allows access to patients' care providers.

patient.ccda

Allows exporting patients' all medical records in CCDA format.

Sample Response

{ "access_token": "1000.c656b09869cfef3be0ca145e44143fa9.a11f43090a54d71dc0797ec92bf34b9e", "refresh_token": "1000.4038qw5a8a5af1234ce920a45sx388a6.a450db33ca9e80701b1a23c8fe98e62e", "expires_in_sec": 3600, "token_type": "Bearer", "expires_in": 3600000 }

3. Get an access token

After getting an authorization grant, POST it to the API below to get the access token and the refresh token.

URL: https://accounts.charmtracker.com/oauth/v2/token

Params:

Note: expires_in parameter in response contains expiry time of the access_token in milliseconds.

Sample Response

{ "access_token": "1000.e896b09869afef6be0ca145e44143fa9.a78f43090a54d71dc0797ec92bg44b9e", "expires_in_sec": 3600, "token_type": "Bearer", "expires_in": 3600000 }

Regenerating the access token with the refresh token

Once the access token expires, it can be regenerated using the refresh token by making a POST call to the API below.

URL: https://accounts.charmtracker.com/oauth/v2/token

Params:

Sample Response

{"status":"success"}

Revoking a Refresh Token

A Refresh Token can be revoked by calling the API below.

URL: https://accounts.charmtracker.com/oauth/v2/token/revoke

Params: token = <Refresh Token>

HTTP Methods

ChARM EHR API uses appropriate HTTP verbs for every action.

Method Description
GET Used for retrieving resources.
POST Used for creating resources and performing resource actions.
PUT Used for updating resources.
DELETE Used for deleting resources.

Response

Response Structure

A sample JSON response structure of ChARM APIs is below.
{ "code" : 0, "message" : "success", "data" : { "identifier" : "..." } }

Request Example

$ curl -X GET https://api.charmtracker.com/api/ehr/v1/fhir/patients/{patient_id}/ccda -H "Authorization: Bearer 6e80ed905055deb9fd2d12d71f518a80" -H "api_key: 9f72e9eed37ad04d68590b221d47e63c"

Most of the ChARM API responses are in JSON format.

Node Name Description
code ChARM EHR error code. This will be zero for a success response and non-zero in case of an error.
message Message for the invoked API.
data Comprises the invoked API’s Data.

Response Header Example

HTTP/1.1 200 OK Content-Disposition: attachment; filename="100001000000023049_CCDA.xml" Content-Type: application/xml;charset=UTF-8


Other Formats

Some APIs return data as attachments.For example when medical records are exported as CCDA, the HTTP response returns data as below.

Content-Disposition: attachment; filename="100001000000023049_CCDA.xml"

Content-Type: application/xml;charset=UTF-8

Date

Date attribute used in all API requests and responses are in YYYY-MM-DD format.

Example: 2016-06-25

Date Filter

Example

$ curl -X GET https://ehr.charmtracker.com/api/ehr/v1/fhir/patients/{patient_id}/ccda?from_date=2018-01-01&to_date=2018-06-30 -H "Authorization: Bearer 6e80ed905055deb9fd2d12d71f518a80" -H "api_key: 9f72e9eed37ad04d68590b221d47e63c"

In addition to querying all the records of a patient, ChARM EHR API allows filtering patient data for a specific date and a date range. Refer the table below for resources that support date filter and the data by which records are filtered.

Date Filters by Resource

Resource Date Filter Data Filtered By
Demographics Not Available Patient Demographics cannot be filtered by date.
Smoking Status Not Available Patient Smoking Status cannot be filtered by date.
Procedures Available Data can be filtered by the date of the procedure.
Problems Available Data can be filtered by start date of the problem.
Medications Available Data can be filtered by start date of the medication.
Allergies Available Data can be filtered by start date of the allergy.
Lab Results Available Data can be filtered by the date of the lab result.
Vitals Available Data can be filtered by the date of the vital measurement.
Vaccines Available Data can be filtered by the vaccine administered date.
Implants Available Data can be filtered by the date of implant.
Assessments Available Data can be filtered by the date of encounter.
Treatment Plan Available Data can be filtered by the date of encounter.
Goals Available Data can be filtered by the date of encounter.
Health Concerns Available Data can be filtered by the date of encounter.
Care Team Not Available Care Team members cannot be filtered by date.

Errors

Request Example

$ curl -X GET https://ehr.charmtracker.com/api/ehr/v1/fhir/patients/{patient_id} -H "Authorization: Bearer 6e80ed905055deb9fd2d12d71f518a80" -H "api_key: 9f72e9eed37ad04d68590b221d47e63c"

Response Example

HTTP/1.1 404 Not Found Content-Type: application/json;charset=UTF-8 { "code": 5557, "message": "Invalid input entries" }

ChARM EHR uses HTTP status codes to indicate success or failure of an API call. In general, status codes in the 2xx range means success, 4xx range means there was an error in the provided information, and those in the 5xx range indicate server side errors. Commonly used HTTP status codes are listed below.

HTTP Status Codes

Status Code Description
200 OK
201 Created
400 Bad request
401 Unauthorized (Invalid AuthToken)
404 URL Not Found
405 Method Not Allowed (Method you have called is not supported for the invoked API)
429 Rate Limit Exceeded (API usage limit exceeded)
500 Internal Error

Patient Selection

Request Example

$ curl -X GET https://ehr.charmtracker.com/api/ehr/v1/fhir/patients/id?first_name=Alice&last_name=Newman&gender=female&dob=1970-05-01 -H "Authorization: Bearer ba4604e8e433g9c892e360d53463oec5" -H "api_key: 9f72e9eed37ad04d68590b221d47e63c"

Response Example

HTTP/1.1 200 OK Content-Type:application/json;charset=UTF-8 {     "code": "0",     "message": "success",     "data": {         "identifier": [             {                 "use": "usual",                 "value": 100076000000012061             }         ],         "gender": "female",         "name": [             {                 "given": [                     "Alice",                     "Jones"                 ],                 "use": "usual",                 "text": "Alice Jones Newman",                 "family": "Newman"             }         ],         "birthDate": "1970-05-01",         "resourceType": "Patient"     } }

Get the unique identifier of a patient record stored in users' ChARM EHR account matching the given query parameters. The querying application can use the returned identifier to fetch patient's other medical records (medications, allergies etc).

This API is accessbile only for EHR users. Patients (PHR users) do not have privilege to use this API.

API URL:

GET /patients/id

QUERY PARAMETERS:

Name Type Required Description
first_name string required First Name of the Patient
last_name string required Last Name of the Patient
gender string required Gender of the Patient
dob string required Date of Birth of the Patient
middle_name string optional Middle Name of the Patient
email string optional Email ID of the Patient
mobile string optional Mobile number of the Patient
mother_first_name string optional Mother's First Name
mother_last_name string optional Mother's Last Name
city string optional City of residence
state string optional State of residence
zip integer optional Zip Code

Demographics

Request Example

$ curl -X GET https://ehr.charmtracker.com/api/ehr/v1/fhir/patients/100001000000023049 -H "Authorization: Bearer ba4604e8e433g9c892e360d53463oec5" -H "api_key: 9f72e9eed37ad04d68590b221d47e63c"

Response Example

HTTP/1.1 200 OK Content-Type:application/json;charset=UTF-8 {     "code": "0",     "message": "success",     "data": {         "identifier": [             {                 "use": "usual",                 "value": 100076000000012061             }         ],         "deceasedBoolean": false,         "extension": [             {                 "valueCodeableConcept": {                     "coding": [                         {                             "system": "Race and Ethnicity - CDC",                             "code": "2106-3",                             "display": "White"                         },                         {                             "system": "Race and Ethnicity - CDC",                             "code": "2108-9",                             "display": "European"                         }                     ]                 },                 "url": "http://hl7.org/fhir/StructureDefinition/us-core-race"             },             {                 "valueCodeableConcept": {                     "coding": [                         {                             "system": "Race and Ethnicity - CDC",                             "code": "2186-5",                             "display": "Not Hispanic Or Latino"                         }                     ]                 },                 "url": "http://hl7.org/fhir/StructureDefinition/us-core-ethnicity"             }         ],         "address": [             {                 "country": "us",                 "city": "BEAVERTON",                 "use": "home",                 "line": [                     "1357, Amber Dr"                 ],                 "postalCode": "97006",                 "state": "Oregon",                 "text": "1357, Amber Dr, BEAVERTON, Oregon 97006, us"             }         ],         "gender": "female",         "name": [             {                 "given": [                     "Alice",                     "Jones"                 ],                 "use": "usual",                 "text": "Alice Jones Newman",                 "family": "Newman"             }         ],         "active": true,         "telecom": [             {                 "system": "phone",                 "use": "home",                 "value": "5557231544"             },             {                 "system": "phone",                 "use": "mobile",                 "value": "5557771234"             }         ],         "communication": [             {                 "language": {                     "coding": [                         {                             "system": "ISO-639-1",                             "code": "en",                             "display": "English"                         }                     ]                 }             }         ],         "birthDate": "1970-05-01",         "maritalStatus": {             "text": "Married"         },         "resourceType": "Patient"     } }

Get demographics data of a patient, which includes name, sex, dob, race, ethnicity, language etc.Use the patient's unique identifier retrieved using the patient selection API as part of the URL.

API URL:

GET /patients/{patient_id}

QUERY PARAMETERS:

No query parameters available for this API.

Smoking Status

Request Example

$ curl -X GET https://ehr.charmtracker.com/api/ehr/v1/fhir/patients/100001000000023049/smokingstatus -H "Authorization: Bearer ba4604e8e433g9c892e360d53463oec5" -H "api_key: 9f72e9eed37ad04d68590b221d47e63c"

Response Example

HTTP/1.1 200 OK Content-Type:application/json;charset=UTF-8 {     "code": "0",     "message": "success",     "data": {         "valueCodeableConcept": {             "coding": [                 {                     "system": "http://snomed.info/sct",                     "code": "449868002",                     "display": "Current every day smoker"                 }             ],             "text": "Current every day smoker"         },         "code": {             "coding": [                 {                     "system": "http://loinc.org",                     "code": "72166-2",                     "display": "Tobacco smoking status"                 }             ],             "text": "Tobacco smoking status"         },         "subject": {             "reference": "/fhir/patients/100076000000012061",             "display": "Alice Jones Newman"         },         "category": [             {                 "coding": [                     {                         "system": "http://hl7.org/fhir/observation-category",                         "code": "social-history",                         "display": "Social History"                     }                 ],                 "text": "Social History"             }         ],         "resourceType": "Observation"     } }

Get the smoking status of a patient.Use the patient's unique identifier retrieved using the patient selection API as part of the URL.

API URL:

GET /patients/{patient_id}/smokingstatus

QUERY PARAMETERS:

No query parameters available for this API.

Procedures

Request Example

$ curl -X GET https://ehr.charmtracker.com/api/ehr/v1/fhir/patients/100001000000023049/procedures -H "Authorization: Bearer ba4604e8e433g9c892e360d53463oec5" -H "api_key: 9f72e9eed37ad04d68590b221d47e63c"

Response Example

HTTP/1.1 200 OK Content-Type:application/json;charset=UTF-8 {     "code": "0",     "message": "success",     "data": {         "entry": [             {                 "resource": {                     "identifier": [                         {                             "use": "usual",                             "value": 100076000000012271                         }                     ],                     "code": {                         "coding": [                             {                                 "system": "http://snomed.info/sct",                                 "code": "56251003",                                 "display": "Nebulizer therapy"                             }                         ],                         "text": "Nebulizer therapy"                     },                     "subject": {                         "reference": "/fhir/patients/100076000000012061",                         "display": "Alice Jones Newman"                     },                     "performedDateTime": "2015-06-22",                     "resourceType": "Procedure",                     "status": "completed",                     "notDone": false                 }             },             {                 "resource": {                     "identifier": [                         {                             "use": "usual",                             "value": 100076000000012275                         }                     ],                     "code": {                         "coding": [                             {                                 "system": "http://snomed.info/sct",                                 "code": "175135009",                                 "display": "Introduction of cardiac pacemaker system via vein"                             }                         ],                         "text": "Introduction of cardiac pacemaker system via vein"                     },                     "subject": {                         "reference": "/fhir/patients/100076000000012061",                         "display": "Alice Jones Newman"                     },                     "performedDateTime": "2011-10-05",                     "resourceType": "Procedure",                     "status": "completed",                     "notDone": false                 }             }         ],         "total": 2,         "type": "searchset",         "resourceType": "Bundle"     } }

Get the procedures recorded for a patient.

By default, the API returns all data across dates.You can use the optional query parameters listed below to filter the records by procedure date. To get the procedures performed on a specific date, give the same date in 'from_date' and 'to_date' parameters.

API URL:

GET /patients/{patient_id}/procedures

QUERY PARAMETERS:

Name Type Required Description
from_date string optional Date of procedure
to_date string optional Date of procedure

Problems

Request Example

$ curl -X GET https://ehr.charmtracker.com/api/ehr/v1/fhir/patients/100001000000023049/problems -H "Authorization: Bearer ba4604e8e433g9c892e360d53463oec5" -H "api_key: 9f72e9eed37ad04d68590b221d47e63c"

Response Example

HTTP/1.1 200 OK Content-Type:application/json;charset=UTF-8 { "code": "0", "message": "success", "data": { "entry": [ { "resource": { "identifier": [ { "use": "usual", "value": 100076000000012113 } ], "code": { "coding": [ { "system": "http://snomed.info/sct", "code": "386661006", "display": "Fever" } ], "text": "Fever" }, "subject": { "reference": "/fhir/patients/100076000000012061", "display": "Alice Jones Newman" }, "clinicalStatus": "active", "category": [ { "coding": [ { "system": "http://hl7.org/fhir/condition-category", "code": "encounter-diagnosis", "display": "Encounter Diagnosis" } ] } ], "onsetDateTime": "2015-06-22", "resourceType": "Condition" } }, { "resource": { "identifier": [ { "use": "usual", "value": 100076000000012863 } ], "code": { "coding": [ { "system": "http://snomed.info/sct", "code": "236578006", "display": "Chronic rejection of renal transplant" } ], "text": "Chronic rejection of renal transplant" }, "subject": { "reference": "/fhir/patients/100076000000012061", "display": "Alice Jones Newman" }, "clinicalStatus": "active", "category": [ { "coding": [ { "system": "http://hl7.org/fhir/condition-category", "code": "problem-list-item", "display": "Problem List Item" } ] } ], "onsetDateTime": "2011-12-31", "resourceType": "Condition" } }, { "resource": { "identifier": [ { "use": "usual", "value": 100076000000012847 } ], "code": { "coding": [ { "system": "http://snomed.info/sct", "code": "59621000", "display": "Essential hypertension" } ], "text": "Essential hypertension" }, "subject": { "reference": "/fhir/patients/100076000000012061", "display": "Alice Jones Newman" }, "clinicalStatus": "active", "category": [ { "coding": [ { "system": "http://hl7.org/fhir/condition-category", "code": "problem-list-item", "display": "Problem List Item" } ] } ], "onsetDateTime": "2011-10-05", "resourceType": "Condition" } }, { "resource": { "identifier": [ { "use": "usual", "value": 100076000000012853 } ], "code": { "coding": [ { "system": "http://snomed.info/sct", "code": "83986005", "display": "Severe hypothyroidism" } ], "text": "Severe hypothyroidism" }, "subject": { "reference": "/fhir/patients/100076000000012061", "display": "Alice Jones Newman" }, "clinicalStatus": "active", "category": [ { "coding": [ { "system": "http://hl7.org/fhir/condition-category", "code": "problem-list-item", "display": "Problem List Item" } ] } ], "onsetDateTime": "2006-12-31", "resourceType": "Condition" } }, { "resource": { "identifier": [ { "use": "usual", "value": 100076000000012869 } ], "code": { "coding": [ { "system": "http://snomed.info/sct", "code": "238131007", "display": "Overweight" } ], "text": "Overweight" }, "abatementDateTime": "2007-06-01", "subject": { "reference": "/fhir/patients/100076000000012061", "display": "Alice Jones Newman" }, "clinicalStatus": "resolved", "category": [ { "coding": [ { "system": "http://hl7.org/fhir/condition-category", "code": "problem-list-item", "display": "Problem List Item" } ] } ], "onsetDateTime": "2006-12-31", "resourceType": "Condition" } } ], "total": 5, "type": "searchset", "resourceType": "Bundle" } }

Get the problems recorded for a patient.

By default, the API returns problems with all statuses (Active, Inactive and Resolved) across dates.You can use the optional query parameters listed below to filter the records by status and start date of the problem. To get the problem records on a specific date, give the same date in 'from_date' and 'to_date' parameters.

API URL:

GET /patients/{patient_id}/problems

QUERY PARAMETERS:

Name Type Required Description
from_date string optional Start date of the problem
to_date string optional Start date of the problem
status string optional Status of the problem. Allowed Values: 'Active','Inactive' or 'Resolved'

Medications

Request Example

$ curl -X GET https://ehr.charmtracker.com/api/ehr/v1/fhir/patients/100001000000023049/medications -H "Authorization: Bearer ba4604e8e433g9c892e360d53463oec5" -H "api_key: 9f72e9eed37ad04d68590b221d47e63c"

Response Example

HTTP/1.1 200 OK Content-Type:application/json;charset=UTF-8 {     "code": "0",     "message": "success",     "data": {         "entry": [             {                 "resource": {                     "identifier": [                         {                             "use": "usual",                             "value": 100076000000012543                         }                     ],                     "dosage": [                         {                             "text": "1 unit , Two times daily"                         }                     ],                     "effectivePeriod": {                         "start": "2015-06-22",                         "end": "2015-06-30"                     },                     "informationSource": {                         "reference": "/fhir/patients/100076000000012061",                         "display": "Alice Jones Newman"                     },                     "subject": {                         "reference": "/fhir/patients/100076000000012061",                         "display": "Alice Jones Newman"                     },                     "medicationCodeableConcept": {                         "coding": [                             {                                 "system": "http://www.nlm.nih.gov/research/umls/rxnorm",                                 "code": "309090",                                 "display": "Ceftriaxone 100 mg/mL injectable"                             }                         ],                         "text": "Ceftriaxone 100 mg/mL injectable"                     },                     "resourceType": "MedicationStatement",                     "status": "active"                 }             },             {                 "resource": {                     "identifier": [                         {                             "use": "usual",                             "value": 100076000000012563                         }                     ],                     "dosage": [                         {                             "text": "1 unit ,Once a week"                         }                     ],                     "effectiveDateTime": "2015-06-22",                     "informationSource": {                         "reference": "/fhir/patients/100076000000012061",                         "display": "Alice Jones Newman"                     },                     "subject": {                         "reference": "/fhir/patients/100076000000012061",                         "display": "Alice Jones Newman"                     },                     "medicationCodeableConcept": {                         "coding": [                             {                                 "system": "http://www.nlm.nih.gov/research/umls/rxnorm",                                 "code": "731241",                                 "display": "Aranesp 0.5 mg/mL injectable"                             }                         ],                         "text": "Aranesp 0.5 mg/mL injectable"                     },                     "resourceType": "MedicationStatement",                     "status": "active"                 }             },             {                 "resource": {                     "identifier": [                         {                             "use": "usual",                             "value": 100076000000012983                         }                     ],                     "dosage": [                         {                             "text": "1 unit, As needed"                         }                     ],                     "effectivePeriod": {                         "start": "2015-06-22",                         "end": "2015-07-02"                     },                     "informationSource": {                         "reference": "/fhir/patients/100076000000012061",                         "display": "Alice Jones Newman"                     },                     "subject": {                         "reference": "/fhir/patients/100076000000012061",                         "display": "Alice Jones Newman"                     },                     "medicationCodeableConcept": {                         "coding": [                             {                                 "system": "http://www.nlm.nih.gov/research/umls/rxnorm",                                 "code": "209459",                                 "display": "Tylenol 500 milligram(s) oral"                             }                         ],                         "text": "Tylenol 500 milligram(s) oral"                     },                     "resourceType": "MedicationStatement",                     "status": "active"                 }             }         ],         "total": 3,         "type": "searchset",         "resourceType": "Bundle"     } }

Get the medication records of a patient.

By default, the API returns both active and inactive medications across dates.You can use the optional query parameters listed below to filter the records by status and start date of the medication. To get the medication records on a specific date, give the same date in 'from_date' and 'to_date' parameters.

API URL:

GET /patients/{patient_id}/medications

QUERY PARAMETERS:

Name Type Required Description
from_date string optional Start date of the medication
to_date string optional Start date of the medication
status string optional Status of the medication. Allowed Values: 'Active' or 'Inactive'

Allergies

Request Example

$ curl -X GET https://ehr.charmtracker.com/api/ehr/v1/fhir/patients/100001000000023049/allergies -H "Authorization: Bearer ba4604e8e433g9c892e360d53463oec5" -H "api-key: 9f72e9eed37ad04d68590b221d47e63c"

Response Example

HTTP/1.1 200 OK Content-Type:application/json;charset=UTF-8 {     "code": "0",     "message": "success",     "data": {         "entry": [             {                 "resource": {                     "identifier": [                         {                             "use": "usual",                             "value": 100076000000012359                         }                     ],                     "onSetDateTime": "1980-05-10",                     "code": {                         "coding": [                             {                                 "system": "http://www.nlm.nih.gov/research/umls/rxnorm",                                 "code": "7980",                                 "display": "penicillin g"                             }                         ],                         "text": "penicillin g"                     },                     "reaction": [                         {                             "severity": "moderate",                             "manifestation": [                                 {                                     "text": "Hives"                                 }                             ]                         }                     ],                     "verificationStatus": "confirmed",                     "patient": {                         "reference": "/fhir/patients/100076000000012061",                         "display": "Alice Jones Newman"                     },                     "criticality": "low",                     "clinicalStatus": "active",                     "type": "allergy",                     "category": [                         "medication"                     ],                     "resourceType": "AllergyIntolerance"                 }             },             {                 "resource": {                     "identifier": [                         {                             "use": "usual",                             "value": 100076000000012363                         }                     ],                     "onSetDateTime": "1980-05-10",                     "code": {                         "coding": [                             {                                 "system": "http://www.nlm.nih.gov/research/umls/rxnorm",                                 "code": "733",                                 "display": "ampicillin"                             }                         ],                         "text": "ampicillin"                     },                     "reaction": [                         {                             "severity": "moderate",                             "manifestation": [                                 {                                     "text": "Hives"                                 }                             ]                         }                     ],                     "verificationStatus": "confirmed",                     "patient": {                         "reference": "/fhir/patients/100076000000012061",                         "display": "Alice Jones Newman"                     },                     "criticality": "low",                     "clinicalStatus": "active",                     "type": "allergy",                     "category": [                         "medication"                     ],                     "resourceType": "AllergyIntolerance"                 }             }         ],         "total": 2,         "type": "searchset",         "resourceType": "Bundle"     } }

Get the allergies recorded of a patient.

By default, the API returns both active and inactive allergies across dates.You can use the optional query parameters listed below to filter the records by status and obeserved date. To get the allergies observed on a specific date, give the same date in 'from_date' and 'to_date' parameters.

API URL:

GET /patients/{patient_id}/allergies

QUERY PARAMETERS:

Name Type Required Description
from_date string optional Observed date of allergy
to_date string optional Observed date of allergy
status string optional Status of the allergy. Allowed Values: 'Active' or 'Inactive'

Lab Results

Request Example

$ curl -X GET https://ehr.charmtracker.com/api/ehr/v1/fhir/patients/100001000000023049/labresults -H "Authorization: Bearer ba4604e8e433g9c892e360d53463oec5" -H "api_key: 9f72e9eed37ad04d68590b221d47e63c"

Response Example

HTTP/1.1 200 OK Content-Type:application/json;charset=UTF-8 {     "code": "0",     "message": "success",     "data": {         "entry": [             {                 "resource": {                     "identifier": [                         {                             "use": "usual",                             "value": 100076000000015083                         }                     ],                     "component": [                         {                             "referenceRange": {                                 "text": "YELLOW"                             },                             "code": {                                 "coding": [                                     {                                         "system": "http://loinc.org",                                         "code": "5778-6",                                         "display": "Color of Urine"                                     }                                 ],                                 "text": "Color of Urine"                             },                             "valueQuantity": {                                 "unit": "",                                 "value": "YELLOW"                             }                         },                         {                             "referenceRange": {                                 "text": "CLEAR"                             },                             "code": {                                 "coding": [                                     {                                         "system": "http://loinc.org",                                         "code": "5767-9",                                         "display": "Appearance of Urine"                                     }                                 ],                                 "text": "Appearance of Urine"                             },                             "valueQuantity": {                                 "unit": "",                                 "value": "CLEAR"                             }                         },                         {                             "referenceRange": {                                 "high": {                                     "unit": "",                                     "value": "1.03"                                 },                                 "low": {                                     "unit": "",                                     "value": "1.005"                                 }                             },                             "code": {                                 "coding": [                                     {                                         "system": "http://loinc.org",                                         "code": "5811-5",                                         "display": "Specific gravity of Urine by Test strip"                                     }                                 ],                                 "text": "Specific gravity of Urine by Test strip"                             },                             "interpretation": {                                 "text": "Normal"                             },                             "valueQuantity": {                                 "unit": "",                                 "value": "1.015"                             }                         },                         {                             "referenceRange": {                                 "high": {                                     "unit": "[pH]",                                     "value": "8.0"                                 },                                 "low": {                                     "unit": "[pH]",                                     "value": "5.0"                                 }                             },                             "code": {                                 "coding": [                                     {                                         "system": "http://loinc.org",                                         "code": "5803-2",                                         "display": "pH of Urine by Test strip"                                     }                                 ],                                 "text": "pH of Urine by Test strip"                             },                             "interpretation": {                                 "text": "Normal"                             },                             "valueQuantity": {                                 "unit": "[pH]",                                 "value": "5.0"                             }                         },                         {                             "referenceRange": {                                 "text": "Neg"                             },                             "code": {                                 "coding": [                                     {                                         "system": "http://loinc.org",                                         "code": "5792-7",                                         "display": "Glucose [Mass/volume] in urine by test strip"                                     }                                 ],                                 "text": "Glucose [Mass/volume] in urine by test strip"                             },                             "valueQuantity": {                                 "unit": "mg/dL",                                 "value": "50"                             }                         },                         {                             "referenceRange": {                                 "text": "Negative"                             },                             "code": {                                 "coding": [                                     {                                         "system": "http://loinc.org",                                         "code": "5797-6",                                         "display": "Ketones [Mass/Volume] in urine by test strip"                                     }                                 ],                                 "text": "Ketones [Mass/Volume] in urine by test strip"                             },                             "valueQuantity": {                                 "unit": "",                                 "value": "Negative"                             }                         },                         {                             "referenceRange": {                                 "text": "negative"                             },                             "code": {                                 "coding": [                                     {                                         "system": "http://loinc.org",                                         "code": "5804-0",                                         "display": "Protein[Mass/Volume] in urine by test strip"                                     }                                 ],                                 "text": "Protein[Mass/Volume] in urine by test strip"                             },                             "valueQuantity": {                                 "unit": "mg/dL",                                 "value": "100"                             }                         }                     ],                     "code": {                         "coding": [                             {                                 "system": "http://loinc.org",                                 "code": "24357-6",                                 "display": "Urinanalysis macro (dipstick) panel"                             }                         ],                         "text": "Urinanalysis macro (dipstick) panel"                     },                     "effectiveDateTime": "2015-06-22",                     "subject": {                         "reference": "/fhir/patients/100076000000012061",                         "display": "Alice Jones Newman"                     },                     "category": {                         "coding": [                             {                                 "system": "http://hl7.org/fhir/observation-category",                                 "code": "laboratory",                                 "display": "Laboratory"                             }                         ],                         "text": "Laboratory"                     },                     "resourceType": "Observation",                     "status": "Final"                 }             }         ],         "total": 1,         "type": "searchset",         "resourceType": "Bundle"     } }

Get the lab results of a patient.

By default, the API returns all data across dates.You can use the optional query parameters listed below to filter the results by date. To get the lab results on a specific date, give the same date in 'from_date' and 'to_date' parameters.

API URL:

GET /patients/{patient_id}/labresults

QUERY PARAMETERS:

Name Type Required Description
from_date string optional Date of lab result
to_date string optional Date of lab result

Vitals

Request Example

$ curl -X GET https://ehr.charmtracker.com/api/ehr/v1/fhir/patients/100001000000023049/vitals -H "Authorization: Bearer ba4604e8e433g9c892e360d53463oec5" -H "api_key: 9f72e9eed37ad04d68590b221d47e63c"

Response Example

HTTP/1.1 200 OK Content-Type:application/json;charset=UTF-8 {     "code": "0",     "message": "success",     "data": {         "entry": [             {                 "resource": {                     "code": {                         "coding": [                             {                                 "system": "http://loinc.org",                                 "code": "29463-7",                                 "display": "weight"                             }                         ],                         "text": "weight"                     },                     "effectiveDateTime": "2015-06-22",                     "category": [                         {                             "coding": [                                 {                                     "system": "http://hl7.org/fhir/observation-category",                                     "code": "vital-signs",                                     "display": "Vital Signs"                                 }                             ],                             "text": "Vital Signs"                         }                     ],                     "resourceType": "Observation",                     "valueQuantity": {                         "unit": "lbs",                         "value": "194.007"                     }                 }             },             {                 "resource": {                     "code": {                         "coding": [                             {                                 "system": "http://loinc.org",                                 "code": "8302-2",                                 "display": "height"                             }                         ],                         "text": "height"                     },                     "effectiveDateTime": "2015-06-22",                     "category": [                         {                             "coding": [                                 {                                     "system": "http://hl7.org/fhir/observation-category",                                     "code": "vital-signs",                                     "display": "Vital Signs"                                 }                             ],                             "text": "Vital Signs"                         }                     ],                     "resourceType": "Observation",                     "valueQuantity": {                         "unit": "ins",                         "value": "69.685"                     }                 }             },             {                 "resource": {                     "code": {                         "coding": [                             {                                 "system": "http://loinc.org",                                 "code": "39156-5",                                 "display": "body mass index"                             }                         ],                         "text": "body mass index"                     },                     "effectiveDateTime": "2015-06-22",                     "category": [                         {                             "coding": [                                 {                                     "system": "http://hl7.org/fhir/observation-category",                                     "code": "vital-signs",                                     "display": "Vital Signs"                                 }                             ],                             "text": "Vital Signs"                         }                     ],                     "resourceType": "Observation",                     "valueQuantity": {                         "value": "28.09"                     }                 }             },             {                 "resource": {                     "code": {                         "coding": [                             {                                 "system": "http://loinc.org",                                 "code": "8310-5",                                 "display": "body temperature"                             }                         ],                         "text": "body temperature"                     },                     "effectiveDateTime": "2015-06-22",                     "category": [                         {                             "coding": [                                 {                                     "system": "http://hl7.org/fhir/observation-category",                                     "code": "vital-signs",                                     "display": "Vital Signs"                                 }                             ],                             "text": "Vital Signs"                         }                     ],                     "resourceType": "Observation",                     "valueQuantity": {                         "unit": "C",                         "value": 38                     }                 }             },             {                 "resource": {                     "code": {                         "coding": [                             {                                 "system": "http://loinc.org",                                 "code": "8480-6",                                 "display": "Systolic blood pressure"                             }                         ],                         "text": "Systolic blood pressure"                     },                     "effectiveDateTime": "2015-06-22",                     "category": [                         {                             "coding": [                                 {                                     "system": "http://hl7.org/fhir/observation-category",                                     "code": "vital-signs",                                     "display": "Vital Signs"                                 }                             ],                             "text": "Vital Signs"                         }                     ],                     "resourceType": "Observation",                     "valueQuantity": {                         "unit": "mmHg",                         "value": 145                     }                 }             },             {                 "resource": {                     "code": {                         "coding": [                             {                                 "system": "http://loinc.org",                                 "code": "8462-4",                                 "display": "Diastolic blood pressure"                             }                         ],                         "text": "Diastolic blood pressure"                     },                     "effectiveDateTime": "2015-06-22",                     "category": [                         {                             "coding": [                                 {                                     "system": "http://hl7.org/fhir/observation-category",                                     "code": "vital-signs",                                     "display": "Vital Signs"                                 }                             ],                             "text": "Vital Signs"                         }                     ],                     "resourceType": "Observation",                     "valueQuantity": {                         "unit": "mmHg",                         "value": 88                     }                 }             },             {                 "resource": {                     "code": {                         "coding": [                             {                                 "system": "http://loinc.org",                                 "code": "8867-4",                                 "display": "pulse rate"                             }                         ],                         "text": "pulse rate"                     },                     "effectiveDateTime": "2015-06-22",                     "category": [                         {                             "coding": [                                 {                                     "system": "http://hl7.org/fhir/observation-category",                                     "code": "vital-signs",                                     "display": "Vital Signs"                                 }                             ],                             "text": "Vital Signs"                         }                     ],                     "resourceType": "Observation",                     "valueQuantity": {                         "unit": "bpm",                         "value": 80                     }                 }             },             {                 "resource": {                     "code": {                         "coding": [                             {                                 "system": "http://loinc.org",                                 "code": "9279-1",                                 "display": "respiratory rate"                             }                         ],                         "text": "respiratory rate"                     },                     "effectiveDateTime": "2015-06-22",                     "category": [                         {                             "coding": [                                 {                                     "system": "http://hl7.org/fhir/observation-category",                                     "code": "vital-signs",                                     "display": "Vital Signs"                                 }                             ],                             "text": "Vital Signs"                         }                     ],                     "resourceType": "Observation",                     "valueQuantity": {                         "unit": "bpm",                         "value": 18                     }                 }             },             {                 "resource": {                     "code": {                         "coding": [                             {                                 "system": "http://loinc.org",                                 "code": "59408-5",                                 "display": "SPO2"                             }                         ],                         "text": "SPO2"                     },                     "effectiveDateTime": "2015-06-22",                     "category": [                         {                             "coding": [                                 {                                     "system": "http://hl7.org/fhir/observation-category",                                     "code": "vital-signs",                                     "display": "Vital Signs"                                 }                             ],                             "text": "Vital Signs"                         }                     ],                     "resourceType": "Observation",                     "valueQuantity": {                         "unit": "%",                         "value": 95                     }                 }             },             {                 "resource": {                     "code": {                         "text": "Inhaled Oxygen Concentration"                     },                     "effectiveDateTime": "2015-06-22",                     "category": [                         {                             "coding": [                                 {                                     "system": "http://hl7.org/fhir/observation-category",                                     "code": "vital-signs",                                     "display": "Vital Signs"                                 }                             ],                             "text": "Vital Signs"                         }                     ],                     "resourceType": "Observation",                     "valueQuantity": {                         "unit": "%",                         "value": "36"                     }                 }             }         ],         "total": 10,         "type": "searchset",         "resourceType": "Bundle"     } }

Get the vital records of a patient.

By default, the API returns all data across dates.You can use the optional query parameters listed below to filter the records by vital recorded date. To get the vitals recorded on a specific date, give the same date in 'from_date' and 'to_date' parameters.

API URL:

GET /patients/{patient_id}/vitals

QUERY PARAMETERS:

Name Type Required Description
from_date string optional Vital recorded date
to_date string optional Vital recorded date

Vaccines

Request Example

$ curl -X GET https://ehr.charmtracker.com/api/ehr/v1/fhir/patients/100001000000023049/vaccines -H "Authorization: Bearer ba4604e8e433g9c892e360d53463oec5" -H "api_key: 9f72e9eed37ad04d68590b221d47e63c"

Response Example

HTTP/1.1 200 OK Content-Type:application/json;charset=UTF-8 { "code": "0", "message": "success", "data": { "entry": [ { "resource": { "date": "2015-06-22", "identifier": [ { "use": "usual" } ], "patient": { "reference": "/fhir/patients/100076000000012061", "display": "Alice Jones Newman" }, "notGiven": "true", "explanation": { "reasonNotGiven": [ { "coding": [ { "system": "http://hl7.org/fhir/v3/ActReason", "code": "PATOBJ", "display": "patient objection" } ], "text": "Refusal Reason: Immunization was not given - Patient rejected immunization" } ] }, "vaccineCode": { "coding": [ { "system": "http://hl7.org/fhir/sid/cvx", "code": "166", "display": "influenza, intradermal, quadrivalent, preservative free" } ], "text": "influenza, intradermal, quadrivalent, preservative free" }, "resourceType": "Immunization", "status": "completed" } }, { "resource": { "date": "2014-05-10", "identifier": [ { "use": "usual" } ], "primarySource": true, "practitioner": [ { "actor": { "display": "Albert Davis" }, "role": { "coding": [ { "system": "http://hl7.org/fhir/v2/0443", "code": "OP", "display": "Ordering Provider" } ], "text": "Ordering Provider" } } ], "notGiven": "false", "lotNumber": "1", "manufacturer": { "display": "Immuno-U.S., Inc." }, "route": { "coding": [ { "system": "NCIT", "code": "C28161", "display": "Intramuscular" } ], "text": "Intramuscular" }, "patient": { "reference": "/fhir/patients/100076000000012061", "display": "Alice Jones Newman" }, "vaccineCode": { "coding": [ { "system": "http://hl7.org/fhir/sid/cvx", "code": "88", "display": "Influenza Virus Vaccine" } ], "text": "Influenza Virus Vaccine" }, "resourceType": "Immunization", "status": "completed", "expirationDate": "2018-08-08" } }, { "resource": { "date": "2012-01-04", "identifier": [ { "use": "usual" } ], "primarySource": true, "practitioner": [ { "actor": { "display": "Albert Davis" }, "role": { "coding": [ { "system": "http://hl7.org/fhir/v2/0443", "code": "OP", "display": "Ordering Provider" } ], "text": "Ordering Provider" } } ], "notGiven": "false", "lotNumber": "2", "manufacturer": { "display": "Immuno-U.S., Inc." }, "route": { "coding": [ { "system": "NCIT", "code": "C38276", "display": "Intravenous" } ], "text": "Intravenous" }, "patient": { "reference": "/fhir/patients/100076000000012061", "display": "Alice Jones Newman" }, "vaccineCode": { "coding": [ { "system": "http://hl7.org/fhir/sid/cvx", "code": "106", "display": "Tetanus and diphtheria toxoids" } ], "text": "Tetanus and diphtheria toxoids" }, "resourceType": "Immunization", "status": "completed", "expirationDate": "2018-01-04" } } ], "total": 3, "type": "searchset", "resourceType": "Bundle" } }

Get the vaccine records of a patient.

By default, the API returns all data across dates.You can use the optional query parameters listed below to filter the records by vaccination date. To get the vaccines administered on a specific date, give the same date in 'from_date' and 'to_date' parameters.

API URL:

GET /patients/{patient_id}/vaccines

QUERY PARAMETERS:

Name Type Required Description
from_date string optional Vaccine data recorded date
to_date string optional Vaccine data recorded date

Implants

Request Example

$ curl -X GET https://ehr.charmtracker.com/api/ehr/v1/fhir/patients/100001000000023049/implants -H "Authorization: Bearer ba4604e8e433g9c892e360d53463oec5" -H "api_key: 9f72e9eed37ad04d68590b221d47e63c"

Response Example

HTTP/1.1 200 OK Content-Type:application/json;charset=UTF-8 {     "code": "0",     "message": "success",     "data": {         "entry": [             {                 "resource": {                     "identifier": [                         {                             "use": "usual",                             "value": 100076000000012335                         }                     ],                     "patient": {                         "reference": "/fhir/patients/100076000000012061",                         "display": "Alice Jones Newman"                     },                     "udi": {                         "deviceIdentifier": "(01)00643169007222(17)160128(21)BLC200461H",                         "name": "Cardiac resynchronization therapy implantable defibrillator"                     },                     "version": "DTBA1QQ",                     "resourceType": "Device",                     "status": "active",                     "manufacturer": "MEDTRONIC, INC.",                     "expirationDate": "2016-01-28"                 }             }         ],         "total": 1,         "type": "searchset",         "resourceType": "Bundle"     } }

Get the devices implanted for a patient.

By default, the API returns both active and inactive devices across dates.You can use the optional query parameters listed below to filter the records by status and implant date. To get the devices implanted on a specific date, give the same date in 'from_date' and 'to_date' parameters.

API URL:

GET /patients/{patient_id}/implants

QUERY PARAMETERS:

Name Type Required Description
from_date string optional Date of Implant
to_date string optional Date of Implant
status string optional Status of the implanted device. Allowed Values : Active or Inactive

Assessments

Request Example

$ curl -X GET https://ehr.charmtracker.com/api/ehr/v1/fhir/patients/100001000000023049/assessments -H "Authorization: Bearer ba4604e8e433g9c892e360d53463oec5" -H "api_key: 9f72e9eed37ad04d68590b221d47e63c"

Response Example

HTTP/1.1 200 OK Content-Type:application/json;charset=UTF-8 {     "code": "0",     "message": "success",     "data": {         "entry": [             {                 "resource": {                     "period": {                         "start": "2015-06-22"                     },                     "subject": {                         "reference": "/fhir/patients/100076000000012061",                         "display": "Alice Jones Newman"                     },                     "description": "The patient was found to have fever and Dr Davis is suspecting Anemia\nbased on the patient history. So Dr Davis asked the patient to closely\nmonitor the temperature and blood pressure and get admitted to\nCommunity Health Hospitals if the fever does not subside within a day.",                     "title": "Assessment",                     "resourceType": "CarePlan"                 }             }                     ],         "total": 1,         "type": "searchset",         "resourceType": "Bundle"     } }

Get the assessment notes documented for a patient.

By default, the API returns assessment documented across encounters.You can use the optional query parameters listed below to filter the records by encounter date. To get the assessments on a specific date, give the same date in 'from_date' and 'to_date' parameters.

API URL:

GET /patients/{patient_id}/assessments

QUERY PARAMETERS:

Name Type Required Description
from_date string optional Encounter Date
to_date string optional Encounter Date

Treatment Plan

Request Example

$ curl -X GET https://ehr.charmtracker.com/api/ehr/v1/fhir/patients/100001000000023049/treatmentplan -H "Authorization: Bearer ba4604e8e433g9c892e360d53463oec5" -H "api_key: 9f72e9eed37ad04d68590b221d47e63c"

Response Example

HTTP/1.1 200 OK Content-Type:application/json;charset=UTF-8 {     "code": "0",     "message": "success",     "data": {         "entry": [             {                 "resource": {                     "period": {                         "start": "2015-06-22"                     },                     "subject": {                         "reference": "/fhir/patients/100076000000012061",                         "display": "Alice Jones Newman"                     },                     "description": "i. Get an EKG done on 6/23/2015.\nii. Get a Chest X-ray done on 6/23/2015 showing the Lower Respiratory Tract\nStructure.\niii. Take Clindamycin 300mg three times a day as needed if pain does not subside/\niv. Schedule follow on visit with Neighborhood Physicians Practice on7/1/2015.",                     "title": "Treatment Plan",                     "resourceType": "CarePlan"                 }             },             {                 "resource": {                     "activity": [                         {                             "detail": {                                 "scheduledString": "2015-06-29",                                 "code": {                                     "coding": [                                         {                                             "system": "http://loinc.org",                                             "code": "24357-6",                                             "display": "Urinanalysis macro (dipstick) panel"                                         }                                     ],                                     "text": "Urinanalysis macro (dipstick) panel"                                 },                                 "category": {                                     "coding": [                                         {                                             "system": "http://hl7.org/fhir/care-plan-activity-category",                                             "code": "procedure",                                             "display": "Procedure"                                         }                                     ],                                     "text": "Procedure"                                 }                             }                         }                     ],                     "subject": {                         "reference": "/fhir/patients/100076000000012061",                         "display": "Alice Jones Newman"                     },                     "title": "Lab Tests",                     "resourceType": "CarePlan"                 }             }         ],         "total": 2,         "type": "searchset",         "resourceType": "Bundle"     } }

Get the treatment plan documented for a patient.

By default, the API returns the treatment plan documented across encounters.You can use the optional query parameters listed below to filter the records by encounter date. To get the plan documented on a specific date, give the same date in 'from_date' and 'to_date' parameters.

API URL:

GET /patients/{patient_id}/treatmentplan

QUERY PARAMETERS:

Name Type Required Description
from_date string optional Encounter Date
to_date string optional Encounter Date

Goals

Request Example

$ curl -X GET https://ehr.charmtracker.com/api/ehr/v1/fhir/patients/100001000000023049/goals -H "Authorization: Bearer ba4604e8e433g9c892e360d53463oec5" -H "api_key: 9f72e9eed37ad04d68590b221d47e63c"

Response Example

HTTP/1.1 200 OK Content-Type:application/json;charset=UTF-8 {     "code": "0",     "message": "success",     "data": {         "entry": [             {                 "resource": {                     "subject": {                         "reference": "/fhir/patients/100076000000012061",                         "display": "Alice Jones Newman"                     },                     "description": {                         "text": "a. Get rid of intermittent fever that is occurring every few weeks.\nb. Need to gain more energy to do regular activities"                     },                     "startDate": "2015-06-22",                     "resourceType": "Goal",                     "status": "proposed"                 }             }         ],         "total": 1,         "type": "searchset",         "resourceType": "Bundle"     } }

Get the goals and instructions recommended for a patient.

By default, the API returns goals and instructions given across encounters.You can use the optional query parameters listed below to filter the records by encounter date. To get the goals recommended on a specific date, give the same date in 'from_date' and 'to_date' parameters.

API URL:

GET /patients/{patient_id}/goals

QUERY PARAMETERS:

Name Type Required Description
from_date string optional Encounter Date
to_date string optional Encounter Date

Health Concerns

Request Example

$ curl -X GET https://ehr.charmtracker.com/api/ehr/v1/fhir/patients/100001000000023049/healthconcerns -H "Authorization: Bearer ba4604e8e433g9c892e360d53463oec5" -H "api_key: 9f72e9eed37ad04d68590b221d47e63c"

Response Example

HTTP/1.1 200 OK Content-Type:application/json;charset=UTF-8 {     "code": "0",     "message": "success",     "data": {         "entry": [             {                 "resource": {                     "code": {                         "text": "a. Chronic Sickness exhibited by patient b. HealthCare Concerns refer to underlying clinical facts i. Documented HyperTension problem ii. Documented HypoThyroidism problem iii. Watch Weight of patient"                     },                     "subject": {                         "reference": "/fhir/patients/100076000000012061",                         "display": "Alice Jones Newman"                     },                     "clinicalStatus": "active",                     "category": [                         {                             "coding": [                                 {                                     "system": "http://loinc.org",                                     "code": "75310-3",                                     "display": "Health concerns"                                 }                             ],                             "text": "Health concerns"                         }                     ],                     "onsetDateTime": "2015-06-22",                     "resourceType": "Condition"                 }             }         ],         "total": 1,         "type": "searchset",         "resourceType": "Bundle"     } }

Get the health concerns recorded for a patient.

By default, the API returns all data across encounters.You can use the optional query parameters listed below to filter the records by encounter date. To get the health concerns recorded on a specific date, give the same date in 'from_date' and 'to_date' parameters.

API URL:

GET /patients/{patient_id}/healthconcerns

QUERY PARAMETERS:

Name Type Required Description
from_date string optional Encounter Date
to_date string optional Encounter Date

Care Team

Request Example

$ curl -X GET https://ehr.charmtracker.com/api/ehr/v1/fhir/patients/100001000000023049/careteam -H "Authorization: Bearer ba4604e8e433g9c892e360d53463oec5" -H "api_key: 9f72e9eed37ad04d68590b221d47e63c"

Response Example

HTTP/1.1 200 OK Content-Type:application/json;charset=UTF-8 {     "code": "0",     "message": "success",     "data": {         "identifier": [             {                 "use": "usual",                 "value": 100076000000012373             },             {                 "use": "usual",                 "value": 100076000000012495             }         ],         "managingOrganization": {             "display": "NISTEHRFacility"         },         "subject": {             "reference": "/fhir/patients/100076000000012061",             "display": "Alice Jones Newman"         },         "name": "NISTEHRFacility In-house Care Team",         "category": {             "coding": [                 {                     "system": "http://hl7.org/fhir/care-team-category",                     "code": "longitudinal",                     "display": "Longitudinal Care Coordination"                 }             ],             "text": "Longitudinal Care Coordination"         },         "participant": [             {                 "role": {                     "text": "Physician"                 },                 "member": {                     "display": "Albert Davis"                 }             },             {                 "role": {                     "text": "Nurse"                 },                 "member": {                     "display": "Tracy Davis"                 }             }         ],         "resourceType": "CareTeam",         "status": "active"     } }

Get the care team members of a patient.

API URL:

GET /patients/{patient_id}/careteam

QUERY PARAMETERS:

No query parameters available for this API.

CCDA

Request Example

$ curl -X GET https://ehr.charmtracker.com/api/ehr/v1/fhir/patients/100001000000023049/ccda -H "Authorization: Bearer ba4604e8e433g9c892e360d53463oec5" -H "api_key: 9f72e9eed37ad04d68590b221d47e63c"

Response Example

HTTP/1.1 200 OK Content-Disposition: attachment; filename="100001000000023049_CCDA.xml" Content-Type: application/xml;charset=UTF-8

Export medical records of a patient in HL7 CCDA format.

By default, the API exports all records of the patient across dates.You can use the optional query parameters listed below to filter the records by date. To get the records on a specific date, give the same date in 'from_date' and 'to_date' parameters.

API URL:

GET /patients/{patient_id}/ccda

QUERY PARAMETERS:

Name Type Required Description
from_date string optional Date of Record
to_date string optional Date of Record