Unified.to
All articles

How to Read Patient Demographics, Emergency Contacts and Medication Dosing with Unified.to's Healthcare API

·

Your product can read a patient's race, ethnicity, marital status and emergency contacts, and the route and dose of each medication they're prescribed, from integrations including AdvancedMD, athenahealth, Canvas Medical, CharmHealth, Epic, Google Cloud Healthcare API, Greenway Health, MEDITECH, Medtech ALEX, Netsmart, NextGen Healthcare, Oracle Health, Orion Health, PointClickCare, SMART on FHIR, TruBridge and Veradigm, on the Patient and Medication objects you may already use (as of 24 October 2026). Cambio also returns medication route and dose; ModMed returns the patient fields but not medication route or dose.

These fields arrive on the same sdk.healthcare.listHealthcarePatients and sdk.healthcare.listHealthcareMedications calls, so existing integrations get them with no code change beyond reading these fields.

What are race, ethnicity, emergency contacts and medication dose used for?

Race and ethnicity are used in health-equity reporting, quality measures stratified by population, and clinical trial recruitment. US EHRs record them in a standard form (CDC race and ethnicity codes, as required by the US Core standard), so they can be reported on consistently.

Emergency contacts matter to any product that reaches a patient's family or caregiver: discharge follow-up, remote monitoring alerts, home health scheduling.

Medication route and dose turn "Metformin 500 MG" into something a product can act on: 1 tablet, by mouth. Adherence apps, medication reconciliation and dosing checks need the structured values as well as the free-text instructions.

Read race, ethnicity, marital status and contacts

import { UnifiedTo } from '@unified-api/typescript-sdk';

const sdk = new UnifiedTo({
  security: { jwt: process.env.UNIFIED_API_KEY },
});

const patient = await sdk.healthcare.getHealthcarePatient({ connectionId, id: patientId });

races and ethnicities are lists of codings. Each has system, code and display, for example { system: 'urn:oid:2.16.840.1.113883.6.238', code: '2106-3', display: 'White' }. A patient can have more than one race. Report on code, display display.

These come from US Core extensions, so non-US EHRs such as Medtech ALEX and Orion Health may not record them. An empty list means not recorded; don't infer anything from it.

marital_status is MARRIED, SINGLE, DOMESTIC_PARTNER, SEPARATED, DIVORCED, WIDOWED, ANNULLED, UNKNOWN or OTHER.

contacts lists the patient's contact persons. Each has a name, a relationship as the EHR words it ("Emergency Contact", "Spouse", "Guardian"), telephones, emails and an address.

const emergency = patient.contacts?.find((c) => /emergency/i.test(c.relationship ?? '')) ?? patient.contacts?.[0];

relationship is the EHR's own text, so match it loosely and let the user confirm before you contact anyone.

Read medication route and dose

const medications = await sdk.healthcare.listHealthcareMedications({ connectionId, patientId });

for (const med of medications) {
  // e.g. "Metformin 500 MG Oral Tablet": 1 tablet, Oral route, "1 tablet by mouth twice daily"
  console.log(med.name, med.dose_number, med.dose_unit, med.route, med.dosage);
}

dose_number and dose_unit are the amount per dose (1 tablet, 10 mg). route is how it's taken (Oral route, Intravenous). dosage keeps the full free-text instructions, including frequency, and is what the prescriber wrote. To show these values in a patient's medication list, see How to Build a Patient Chart Summary.

Tapering or split doses can't be reduced to a single number; show dosage in that case.

What if an EHR doesn't return these fields?

Render what returns. Every field here is optional and depends on what the practice recorded. Build interfaces that work when they're missing.

Check support before you scope on the Supported Integrations page; the Healthcare API overview describes the Patient and Medication objects.

Writes vary. Medications are read-only. Race, ethnicity, marital status and contacts are read-only on most EHRs; Google Cloud Healthcare API and SMART on FHIR also accept them on patient create and update (see How to Find and Register Patients).

→ Start your 30-day free trial → Book a demo

Frequently asked questions

Is race and ethnicity data handled differently?

It's sensitive, and many products only need it in aggregate. Request only the fields your feature needs with the fields parameter, and drop the rest before storing anything. Unified.to keeps no customer records at rest; connection credentials and operational metadata are encrypted at rest. A HIPAA BAA is available on Scale.

Why is dose_number empty when dosage says "1 tablet"?

The EHR recorded the instructions only as text. Show dosage; don't parse it into a number.

All articles