---
title: "How to Read a Patient's Procedure and Surgical History with"
img: https://unified.to/images/logo.svg
date: 2026-10-24T01:21:00.000Z
updated: 2026-10-24T11:40:40.101Z
readingTime: 3
tag: Product
description: "Your product can read the procedures a patient has had (surgeries, endoscopies, biopsies, in-office procedures) from AdvancedMD, athenahealth, CharmHealth,..."
url: "https://unified.to/blog/how_to_read_a_patient_procedure_and_surgical_history_with"
---

# How to Read a Patient's Procedure and Surgical History with

Your product can read the procedures a patient has had (surgeries, endoscopies, biopsies, in-office procedures) from AdvancedMD, athenahealth, CharmHealth, Epic, MEDITECH, NextGen Healthcare, Oracle Health, Orion Health, PointClickCare, SMART on FHIR, TruBridge and Veradigm through one connection and one method call (as of 24 October 2026).


`sdk.healthcare.listHealthcareProcedures` returns the same Procedure object on all twelve, linked to the visit, the clinicians who performed it and the conditions that justified it. Every request is executed directly against the customer's EHR.


## Why procedure history matters


Surgical history shapes almost every downstream decision: pre-operative risk scoring, quality measures (has this patient had a colonoscopy in the last ten years?), care gap outreach, prior authorization, and the patient summary an AI assistant reads before a visit. It's also one of the sections clinicians most often find incomplete when it has to be re-entered by hand.


The EHR holds it as procedure records, coded in CPT or SNOMED CT. [Unified.to](http://unified.to/)'s [Healthcare API](/healthcare) returns them as a single [Procedure object](https://docs.unified.to/healthcare/procedure/model).


## What you are building


A surgical and procedure history section, plus the queries that power care-gap logic.

1. Authorize the customer's EHR and store one connection ID
2. List a patient's procedures
3. Show them on a timeline with who performed them and why
4. Match codes for quality measures and care gaps

## List a patient's procedures


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

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

const procedures = await sdk.healthcare.listHealthcareProcedures({
  connectionId,
  patientId,
  limit: 100,
});
```


On a patient-launch connection, leave out `patientId` and [Unified.to](http://unified.to/) uses the patient who authorized it.


## What each field tells you


`name` is the procedure as the EHR displays it; `codes` carries the codings (CPT, SNOMED CT, ICD-10-PCS) with their `system`, so you can match a procedure without parsing its name.


`status` is `PREPARATION`, `IN_PROGRESS`, `NOT_DONE`, `ON_HOLD`, `STOPPED`, `COMPLETED`, `ENTERED_IN_ERROR` or `UNKNOWN`. For history, count `COMPLETED`; `NOT_DONE` is a procedure that was planned and didn't happen, which matters for care-gap logic too.


`start_at` and `end_at` are when it was performed. Many EHRs record only a start.


`practitioner_ids` are the clinicians who performed it, `location_id` where, and `encounter_id` the visit. All reference objects in the same API.


`condition_ids` and `reasons` explain why: `condition_ids` point at Condition records in the patient's problem list, and `reasons` hold codings when the reason wasn't recorded as a condition.


`body_sites` holds the anatomical location, for example which knee.


## Use codes for quality measures


```typescript
const CPT = 'http://www.ama-assn.org/go/cpt';
const COLONOSCOPY = ['45378', '45380', '45385'];

const lastColonoscopy = procedures
  .filter((p) => p.status === 'COMPLETED')
  .filter((p) => p.codes?.some((c) => c.system === CPT && COLONOSCOPY.includes(c.code ?? '')))
  .map((p) => p.start_at)
  .sort()
  .at(-1);
```


Match on `system` and `code` together; the same number can mean different things in different code systems.


## Handling coverage that varies by EHR


**Check support before you scope** on the [Supported Integrations page](https://docs.unified.to/healthcare/integrations). On Orion Health, procedures can be listed but not fetched one by one (as of 24 October 2026).


**Treat 501 as information, not failure.** An empty list means no procedures are recorded; a 501 means the EHR doesn't expose them.


**Procedures are read-only** through the unified object.


## Stay current


On Oracle Health, SMART on FHIR, TruBridge and Veradigm (as of 24 October 2026), `updatedGte` returns only procedures changed since a timestamp, and [virtual [webhooks](/blog/replacing_polling_with_event_driven_integrations_using_virtual_webhooks)](/blog/what_are_virtual_webhooks_how_they_differ_from_sync_based_webhooks) for `healthcare_procedure` deliver changes. On the others, read on a schedule or before each visit.


→ [Start your 30-day free trial](https://app.unified.to/login)
→ [Book a demo](https://calendly.com/d/cph9-g8n-jzg/connect-with-unified)


## Frequently asked questions


**Does this include procedures done at other organizations?**


It includes what the customer's EHR has recorded, which often includes outside procedures entered as history. Their `practitioner_ids` may be empty because the performer isn't in that EHR.


**Where are the operative notes?**


Operative and procedure notes are clinical documents. List them with `listHealthcareDocuments` and `type: 'PROCEDURE_NOTE'`, and join on `encounter_id`.