elation.js
Elation Health API Client - Node.js
A Node.js client for the Elation Health API. Work In Progress, pull requests accepted.
Usage
// elation-client.js const credentials = // your Elation API credentials clientID: string clientSecret: string username: string password: stringconst sandbox: boolean = false // Use sandbox API URL. default: true const apiClient = credentials sandboxapiClient
Patient endpoints
Create:
type PatientData = id: ID first_name: string last_name: string dob: string sex: string primary_physician: ID caregiver_practice: ID address: Address phones: Phone email: Email metadata: PatientMetadata elationClient: Promise<Patient>
Get One:
elationClient: Promise<Patient>
Search:
type FindPatientsData = first_name?: string last_name?: string dob?: string sex?: string elationClient: Promise<Patient>
Update:
type PatientUpdateData = first_name?: string last_name?: string dob?: string sex?: string primary_physician?: ID caregiver_practice?: ID address?: Address phones?: Phone email?: Email metadata?: PatientMetadata elationClient: Promise<Patient>
Note Endpoints
Build/Save:
const Note = elationClientconst data = type: 'Visit Note' template: 'Simple' patient: 12345678 physician: 12345678 chart_date: document_date: const note = datanotenotenote // remove bullets by index (bullets can't have an ID field)note
Create:
type NoteInput = // see Flowtypes in src/Note.js for complete Note input type elationClient: Promise<Note>
Get One:
elationClient: Promise<Note>
Search:
type NoteSearchInput = +patient: ID +physician: ID +practice: ID elationClient: Promise<Note>
Delete:
elationClient: Promise< id: NoteID deleted: true >
Contributions
Pull requests welcome, need help with adding endpoint coverage and starting the test library.