---
name: iblai-connect-oracle-health-cerner
description: "Read and write Oracle Health (Cerner) data through the FHIR R4 APIs for Oracle Health Millennium Platform and expose it to an ibl.ai agent as an MCP tool. Use when the user asks an agent to work with Oracle Health (Cerner) data, or to set up an Oracle Health (Cerner) MCP connection on ibl.ai."
metadata:
  kind: guide
---

# Oracle Health (Cerner) connector for AI agents

> A starting point maintained on ibl.ai at https://ibl.ai/developer/connectors/oracle-health-cerner — not part of the iblai/vibe repository. Checked against Oracle Health's documentation on October 20, 2026; test it against your own Oracle Health (Cerner) setup before you rely on it.

Oracle Health Millennium (formerly Cerner Millennium) is a hospital and health-system electronic health record. It holds patients, encounters, conditions, orders, medications, results, documents, appointments, coverage and charges.

## Auth & conventions

- **API:** FHIR R4 APIs for Oracle Health Millennium Platform (FHIR R4). FHIR R4 (4.0.1) REST APIs over about 35 resource types, including Patient, Encounter, Observation, MedicationRequest, DocumentReference, Appointment, Coverage and ChargeItem, with read, search and selected create, update and patch.
- **Base URL:** https://fhir-ehr-code.cerner.com/r4/{tenant-id} (secure) and https://fhir-open.cerner.com/r4/{tenant-id} (open, no auth), as shown in the R4 overview
- **Access:** Issued by your administrator. Developers register applications in Oracle Health's code Console. A System or Confidential app receives a system account (client ID and secret) managed in Cerner Central System Account Management.
- **Auth:** SMART EHR launch (OAuth 2.0 authorization code); SMART standalone launch (OAuth 2.0 authorization code); SMART Backend Services (client credentials). System accounts authenticate with Basic client_id:secret or a signed JWT (RS384 or ES384, JWKS registered in Cerner Central). Scopes use SMART v1 or v2 syntax, e.g. system/Patient.read. Wildcard scopes are not supported.
- **Limits:** Results page through Bundle links (self, next, previous); follow the given URLs and do not build your own. De-duplicate by resource ID across pages. Access tokens last 570 seconds by default.
- Keep Oracle Health (Cerner) credentials in environment variables or the ibl.ai credential store. Never print a token in chat and never commit one to a file.
- Destructive or outward-facing calls are marked **Confirm with the user first** — do.

## Reads

- **Patients** — Patient read and search on the R4 endpoint.
- **Encounters** — Encounter read and search.
- **Results and vitals** — Observation and DiagnosticReport read and search.
- **Medications** — MedicationRequest, MedicationAdministration and MedicationDispense read and search.
- **Documents** — DocumentReference and Binary read.
- **Schedule** — Appointment and Slot read and search.

## Writes

- **Appointments** — Appointment create and patch (book or change a visit). **Confirm with the user first.**
- **Clinical documents** — DocumentReference create and update files a document into the chart. **Confirm with the user first.**
- **Observations** — Observation create and update.
- **Problems and allergies** — Condition and AllergyIntolerance create and update.
- **Charges** — ChargeItem create posts a charge for billing. **Confirm with the user first.**

## Expose it to an ibl.ai agent (MCP)

Oracle Health did not publish an MCP server of its own when this skill was checked. Host a small MCP server that wraps the calls above, then register it below.

First install the ibl.ai platform skills and connect your organization (writes `IBLAI_ORG`, `IBLAI_USERNAME` and `IBLAI_API_KEY` to `.env`):

```bash
npx skills add iblai/vibe --all
# then, in your coding agent:
/iblai-api-login
```

Every call below sends `Authorization: Api-Token $IBLAI_API_KEY`.

1. **Register the server** — `POST https://api.iblai.app/dm/api/ai-mentor/orgs/$IBLAI_ORG/users/$IBLAI_USERNAME/mcp-servers/` with `name`, `url`, `transport` (`sse` | `websocket` | `streamable_http`) and `auth_type` (`none` | `token` | `oauth2`). Capture the returned `id`.
   - Oracle Health (Cerner) supports per-user OAuth: `auth_type=oauth2` with `auth_scope=user` and a linked `oauth_service` makes each person connect their own account in the chat. It needs an `auth_{provider}` credential in the organization's credential store first.
2. **Create the connection** — `POST https://api.iblai.app/dm/api/ai-mentor/orgs/$IBLAI_ORG/users/$IBLAI_USERNAME/mcp-server-connections/` with `server`, `scope` (`platform` | `mentor` | `user`), `auth_type`, and either `credentials` + `authorization_scheme` or a `connected_service` id for OAuth. Credentials are masked on read; never send a masked value back.
3. **Enable it on the agent** — `GET https://api.iblai.app/dm/api/ai-mentor/orgs/$IBLAI_ORG/users/$IBLAI_USERNAME/mentors/{agent_id}/settings/`, add `mcp-tool` to `tool_slugs` and the server id to `mcp_servers`, then `PATCH` the full lists back. They are replaced, not merged.

Full reference: https://ibl.ai/developer/platform/mcp/mcp-connections and the `/iblai-api-agent-mcp` skill.

## Example prompts

- "Find today's inpatient encounters for patient 12724066 and list active conditions."
- "Show the most recent vital signs recorded for this patient."
- "List open appointment slots in cardiology next week."
- "Summarize the discharge documents filed for this encounter."

## Guardrails

- Records are HIPAA protected health information (PHI). Scopes must be requested one by one; system accounts read data without a user present, so limit them to what the task needs.
- Request the narrowest Oracle Health (Cerner) scopes or role the task needs, and prefer a read-only credential for agents that only answer questions.
- Return the fields the user asked for, not whole records; do not paste personal data into chat that the user did not request.
- Before any write, show the user exactly what will change and wait for a yes.
- Respect the documented limits above: page through results and back off on rate-limit responses instead of retrying in a loop.

## References

- FHIR R4 APIs for Oracle Health Millennium: https://docs.oracle.com/en/industries/health/millennium-platform-apis/mfrap/r4_overview.html
- Millennium Platform Authorization Framework: https://docs.oracle.com/en/industries/health/millennium-platform-apis/millennium-authorization-framework/
- FHIR R4 REST endpoints: https://docs.oracle.com/en/industries/health/millennium-platform-apis/mfrap/rest-endpoints.html
- This connector on ibl.ai: https://ibl.ai/developer/connectors/oracle-health-cerner
- ibl.ai MCP server connections: https://ibl.ai/developer/platform/mcp/mcp-connections
