Get patient charts data
GET
/patient-chartsRetrieves a patient's clinical chart — the structured clinical notes and record entries documented for the patient. Read-only and scoped to your organization.
Code samples
Node.js
const fetch = require('node-fetch');
async function callApi() {
const apiKey = 'YOUR_API_KEY';
const patientId = 'your-patientId';
const queryString = new URLSearchParams({
patientId: patientId
}).toString();
const url = `https://account.lunahealth.app/api/patient-charts` + (queryString ? `?${queryString}` : '');
try {
const response = await fetch(url, {
method: 'GET',
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json'
}
});
if (!response.ok) {
throw new Error(`API error: ${response.status}`);
}
const data = await response.json();
console.log(data);
return data;
} catch (error) {
console.error('Error calling API:', error);
throw error;
}
}
callApi();Python
import requests
def call_api():
api_key = 'YOUR_API_KEY'
url = 'https://account.lunahealth.app/api/patient-charts'
headers = {
'Authorization': f'Bearer {api_key}',
'Content-Type': 'application/json'
}
params = {
'patientId': 'your-patientId'
}
try:
response = requests.get(
url,
headers=headers,
params=params
)
response.raise_for_status()
data = response.json()
print(data)
return data
except requests.exceptions.RequestException as e:
print(f'Error calling API: {e}')
raise
call_api()Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
patientId | query | string | Yes | — |
Responses
| Status | Description |
|---|---|
200 | Successful response |
400 | Invalid input data |
401 | Authorization not provided |
403 | Insufficient access |
404 | Not found |
500 | Internal server error |
200 — Successful response
Response fields
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | — |
type | string | Yes | — |
status | string | Yes | — |
name | string | Yes | — |
description | string | null | Yes | — |
created_at | string | Yes | — |
updated_at | string | Yes | — |
service_datetime | string | Yes | — |
signed_at | string | null | Yes | — |
completed_date | string | null | Yes | — |
items | array<object> | Yes | — |
user | object | null | Yes | — |
signed_by | object | null | Yes | — |
created_by | object | Yes | — |
template | object | null | Yes | — |
Example response
[
{
"id": "string",
"type": "CHART",
"status": "CANCELED",
"name": "string",
"description": "string",
"created_at": "string",
"updated_at": "string",
"service_datetime": "string",
"signed_at": "string",
"completed_date": "string",
"items": [
{
"id": "string",
"type": "CHIEF_COMPLAINT",
"order": 0,
"Note": {
"id": "string",
"label": null,
"value": null
},
"NoteEditor": {
"id": "string",
"label": null,
"value": null
},
"ShortText": {
"id": "string",
"label": null,
"value": null
},
"TextBlock": {
"id": "string",
"label": null,
"content": null
},
"SignaturePad": {
"id": "string",
"label": null
},
"ChiefComplaint": {
"id": "string",
"value": null
},
"Range": {
"id": "string",
"label": null,
"value": null
},
"Dropdown": {
"id": "string",
"label": null,
"value": null
},
"Heading": {
"id": "string",
"value": null
},
"FileEntity": {
"id": "string"
},
"BodyChart": {
"id": "string",
"points": null,
"signedUrl": null,
"renderedSignedUrl": null
},
"FacialChart": {
"id": "string",
"points": null,
"signedUrl": null,
"renderedSignedUrl": null
},
"CheckBox": {
"id": "string",
"value": null
},
"Spine": {
"id": "string",
"value": null
},
"Sketch": {
"id": "string"
},
"Vital": {
"id": "string",
"CustomVitals": []
},
"Allergy": {
"id": "string",
"name": "string",
"status": "string",
"reaction": null
},
"History": {
"id": "string",
"type": "string",
"condition": "string"
},
"Problem": {
"id": "string",
"title": "string",
"status": "string"
},
"Procedure": {
"id": "string",
"procedure_code": "string",
"title": "string",
"description": null,
"date_performed": "string",
"status": "string"
},
"SpeechToText": {
"id": "string",
"label": null,
"value": null,
"transcript": null,
"summary": null,
"language": null,
"duration": null,
"transcription_status": null
},
"ReviewOfSystems": {
"id": "string",
"type": "CARDIOVASCULAR",
"findings": null,
"is_normal": true
},
"PhysicalExamination": {
"id": "string",
"type": "GENERAL_APPEARANCE",
"findings": null,
"is_normal": true
},
"TreatmentPlan": {
"id": "string",
"therapeutic_indications": null,
"indicated_procedures": null,
"followup_plan": null,
"status": "ACTIVE"
},
"Prognosis": {
"id": "string",
"expected_outcome": null,
"potential_complications": null
},
"InsuranceHeader": {
"id": "string",
"report_number": null,
"claim_number": null,
"policy_number": null,
"insured_name": null
},
"AccidentDetails": {
"id": "string",
"coverage_affected": null,
"is_passenger": true,
"is_driver": true,
"vehicle_type": null,
"trauma_type": null,
"trauma_location": null,
"trauma_mechanism": null
},
"HospitalizationInfo": {
"id": "string",
"hospital_name": null,
"admission_date": null,
"discharge_date": null,
"stay_type": null,
"stay_duration_days": null
},
"ReferralInfo": {
"id": "string",
"referred_by_physician": null,
"referred_to_type": null,
"referred_to_name": null,
"recommends_transfer": null,
"discharge_type": null,
"treatment_status": null
},
"PhysicianSignatureBlock": {
"id": "string",
"physician_name": null,
"specialty": null,
"professional_license": null,
"signed_at": null
}
}
],
"user": {
"id": "string",
"first_name": "string",
"last_name": "string",
"email": "string",
"type": "STAFF"
},
"signed_by": {
"id": "string",
"first_name": "string",
"last_name": "string",
"email": "string",
"type": "STAFF"
},
"created_by": {
"id": "string",
"first_name": "string",
"last_name": "string",
"email": "string",
"type": "STAFF"
},
"template": {
"id": "string",
"name": "string",
"description": "string",
"tags": [
"string"
],
"type": "CHART",
"created_at": "string",
"updated_at": "string"
}
}
]400 — Invalid input data
Response fields
| Name | Type | Required | Description |
|---|---|---|---|
message | string | Yes | The error message |
code | string | Yes | The error code |
issues | array<object> | No | An array of issues that were responsible for the error |
Example response
{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}401 — Authorization not provided
Response fields
| Name | Type | Required | Description |
|---|---|---|---|
message | string | Yes | The error message |
code | string | Yes | The error code |
issues | array<object> | No | An array of issues that were responsible for the error |
Example response
{
"code": "UNAUTHORIZED",
"message": "Authorization not provided",
"issues": []
}403 — Insufficient access
Response fields
| Name | Type | Required | Description |
|---|---|---|---|
message | string | Yes | The error message |
code | string | Yes | The error code |
issues | array<object> | No | An array of issues that were responsible for the error |
Example response
{
"code": "FORBIDDEN",
"message": "Insufficient access",
"issues": []
}404 — Not found
Response fields
| Name | Type | Required | Description |
|---|---|---|---|
message | string | Yes | The error message |
code | string | Yes | The error code |
issues | array<object> | No | An array of issues that were responsible for the error |
Example response
{
"code": "NOT_FOUND",
"message": "Not found",
"issues": []
}500 — Internal server error
Response fields
| Name | Type | Required | Description |
|---|---|---|---|
message | string | Yes | The error message |
code | string | Yes | The error code |
issues | array<object> | No | An array of issues that were responsible for the error |
Example response
{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}