> ## Documentation Index
> Fetch the complete documentation index at: https://docs.telepatia.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Medical Record Documents

> Retrieve the filled medical record produced by a scribe session

A scribe session can produce one or more medical record documents — one per `purpose` (e.g. `primary` for the clinician-facing record, `rpa` for EMR injection). Each document is the filled output of the session templates.

## Listing the documents

Use the same `consultationInternalId` you used with the scribe session endpoint:

```bash theme={null}
curl https://scribe-api.telepatia.ai/v1/scribe-sessions/CONSULT-12345/medical-record-documents \
  -H "Authorization: Bearer YOUR_API_KEY"
```

**Response:**

```json theme={null}
{
  "items": [
    {
      "id": "mrd-abc-123",
      "purpose": "primary",
      "specialty": "Cardiology",
      "language": "en",
      "medicalRecordSummary": "Patient presents with chest pain.",
      "createdAt": "2026-02-20T10:30:00Z",
      "updatedAt": "2026-02-20T10:35:00Z",
      "medicalRecord": {
        "sections": []
      },
      "medicalRecordSummaryStructured": {
        "pastMedicalConditions": ["Hypertension"],
        "pastMedicalConditionsCoded": [
          {
            "content": "Hypertension",
            "code": {
              "code": "I10",
              "options": [{ "code": "I10", "score": 0.98 }]
            }
          }
        ],
        "vitalSigns": {
          "bloodPressure": "120/80"
        }
      },
      "diagnosisCodes": [
        {
          "code": "I10",
          "description": "Essential (primary) hypertension",
          "type": "primary"
        }
      ],
      "cdssAlerts": [
        {
          "id": "cfa_9cba9fa0…SKULL_XRAY",
          "elementId": "SKULL_XRAY",
          "reason": "Loss of consciousness after a suspected concussion; a skull X-ray does not adequately assess intracranial injury.",
          "action": "Replace the skull X-ray with a non-contrast head CT.",
          "actionCategory": "replace",
          "type": "diagnostic_test",
          "issue": "not_pertinent",
          "element": "Skull X-ray",
          "severity": "red",
          "source": ["NICE Head Injury: Assessment and Early Management Guideline NG232, 2023"],
          "newPlanElement": {
            "type": "diagnostic_test",
            "element": "Non-contrast head CT",
            "id": "HEAD_CT",
            "content": "Non-contrast head CT",
            "laboratory": null
          },
          "previousTestDate": null,
          "guidelineIntervalDays": null,
          "status": "accepted"
        }
      ]
    }
  ],
  "total": 1
}
```

## Diagnosis codes

Each document carries its `diagnosisCodes` — the diagnosis ICD-10 (CIE-10 / CID-10) codes, as the doctor-curated set (the model's suggestions plus any codes the doctor added, minus the ones they removed). Each entry has a `type` of `primary` or `secondary`. The list is empty when the session has no diagnosis codes.

Past medical conditions carry their own resolved codes in `medicalRecordSummaryStructured.pastMedicalConditionsCoded`: each entry pairs the condition `content` with a `code` object holding the best-match `code` and scored `options`. It is `null` until code resolution has run for the record.

<Tip>
  Wait until the session's `status` is `completed` or `completedWithErrors` (see [Session lifecycle](/scribe-api/scribe-sessions#session-lifecycle)) before fetching its documents — they are only produced after the AI pipeline finishes.
</Tip>

## CDSS alerts

When clinical decision support is enabled for the session, each document carries its `cdssAlerts` — corrective alerts that flag omissions, incorrect dosages, or non-pertinent orders against the record. Each alert has a stable opaque `id` (use it as-is; don't parse it), the clinical `elementId` it refers to, an `actionCategory` (`add` | `remove` | `replace` | `modify`), a `severity` (`red` | `orange` | `yellow`), and a `status` reflecting the doctor's decision (`pending` | `accepted` | `rejected`). It is `null` when CDSS is disabled for the session or no alerts were generated, and `[]` when it ran and produced none.

See [Clinical decision support](/scribe-api/cdss-alerts) for the full alert model.

## Filtering by purpose

Pass `?purpose=primary` to get only the clinician-facing document. Other valid values include `rpa` (for EMR injection) and `emr`.

```bash theme={null}
curl "https://scribe-api.telepatia.ai/v1/scribe-sessions/CONSULT-12345/medical-record-documents?purpose=primary" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

## Field reference

| Field                                                       | Type              | Description                                                                                                                                                        |
| ----------------------------------------------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `id`                                                        | string            | Document identifier                                                                                                                                                |
| `purpose`                                                   | string            | `primary`, `rpa`, `emr`, … — identifies the record when a session produced several                                                                                 |
| `specialty`                                                 | string \| null    | Medical specialty associated with the record                                                                                                                       |
| `language`                                                  | string \| null    | Language of the record content                                                                                                                                     |
| `medicalRecordSummary`                                      | string \| null    | Plain-text summary of the record                                                                                                                                   |
| `medicalRecord`                                             | object \| null    | Opaque `{ sections: [...] }` payload — the filled templates' output                                                                                                |
| `medicalRecordSummaryStructured`                            | object \| null    | Structured summary: `pastMedicalConditions`, `pastMedicalConditionsCoded`, `medication`, `recentLabsAndImaging`, `lastConsultation`, `vitalSigns`, `age`, `gender` |
| `medicalRecordSummaryStructured.pastMedicalConditionsCoded` | array \| null     | Past conditions with resolved ICD-10 codes — `content` plus a `code` object (`code`, scored `options`). `null` until code resolution has run                       |
| `createdAt`                                                 | string (ISO 8601) | When the document was created                                                                                                                                      |
| `updatedAt`                                                 | string (ISO 8601) | Last update timestamp                                                                                                                                              |
| `diagnosisCodes`                                            | array             | Diagnosis ICD-10 codes for the record: `{ code, description, type }` with `type` = `primary` \| `secondary`. Empty when the session has none                       |
| `cdssAlerts`                                                | array \| null     | Corrective CDSS alerts for the record — see [Clinical decision support](/scribe-api/cdss-alerts). `null` when CDSS is disabled or not generated                    |
