Skip to content

SunCharts EHR API

Practice fees

EHR API as of 26.11.11.41 2 operations openapi.json ↓

# Derive safe charge context

GET /api/v1/patients/{patient_id}/fee-context

Staff only with native billing view permission and billing.read OAuth scope when applicable. Tenant and patient-bound encounter lookup. Returns provider_id, active facilities, exact unique appointment-facility match and explicitly approved setting default, otherwise null choices.

Access OAuth 2.0 access tokenbilling.read

Parameters

Name In Type Details
patient_id required path string (uuid)
visit_id required query string (uuid)
service_date required query string (date)

Responses

200 Success
400 Invalid scope, source, amount or missing approval acknowledgement
401 Authentication required
403 Staff role, owner privilege or billing scope denied
404 Resource not found in tenant/patient scope
409 Version, immutable scope or approved-schedule conflict
428 Current quoted If-Match version required

Example call

curl "$EHR_URL/api/v1/patients/{patient_id}/fee-context" -H "Authorization: Bearer $ACCESS_TOKEN"

# Read an exact approved fee quote

GET /api/v1/patients/{patient_id}/fee-quote

Staff only with native billing view permission and billing.read OAuth scope when applicable. Tenant and patient-bound encounter lookup. Returns {quote,reason}. quote is null without an approved exact code/modifier/date/context match or after provider/facility version change. Amounts are one unit fee and complete unit-times-units line total. No price is fabricated and no financial state changes.

Access OAuth 2.0 access tokenbilling.read

Parameters

Name In Type Details
patient_id required path string (uuid)
visit_id required query string (uuid)
service_date required query string (date)
facility_id required query string (uuid)
setting required query string
code_system required query string
code required query string
modifiers required query string
units required query integer

Responses

200 Success
400 Invalid scope, source, amount or missing approval acknowledgement
401 Authentication required
403 Staff role, owner privilege or billing scope denied
404 Resource not found in tenant/patient scope
409 Version, immutable scope or approved-schedule conflict
428 Current quoted If-Match version required

Example call

curl "$EHR_URL/api/v1/patients/{patient_id}/fee-quote" -H "Authorization: Bearer $ACCESS_TOKEN"