Configure and query the Epic on FHIR R4 sandbox for advanced clinical data including SDOH (Social Determinants of Health) Observations and US Core-compliant CarePlan resources
Register a non-production app in the Epic on FHIR developer portal and configure the required scopes including patient/Observation.read and patient/CarePlan.read in the app's OAuth2 configuration
Authenticate using the SMART standalone launch flow with PKCE in the Epic sandbox, using the test patient credentials provided in the Epic FHIR sandbox documentation
Query Observation resources with category=social-history and category=sdoh to retrieve social determinants data such as housing instability, food insecurity, and transportation barriers encoded as LOINC-coded Observations
Retrieve CarePlan resources using the US Core CarePlan profile requirements, examining CarePlan.category to distinguish between assess-plan (longitudinal care plans) and specific clinical care plans, and navigating CarePlan.activity elements for care plan goals and interventions
Review Epic-specific extensions and non-standard fields documented in the Epic FHIR API reference that augment the base US Core profiles, and handle Epic's pagination behavior using the Bundle next link
Known gotchas
Epic's FHIR sandbox uses specific synthetic test patients with pre-loaded data; not all resource types or clinical scenarios are available for every test patient, so explore the patient roster documentation to find appropriate test cases
Epic implements Epic-specific extensions on many resources that carry clinically important data not present in standard US Core profiles; ignoring these extensions may cause loss of information when integrating Epic data
Epic enforces strict app access controls and some resource types require additional MyChart patient-facing app registration steps separate from the standard EHR backend app registration
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp