> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.emtelligent.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.emtelligent.com/_mcp/server.

# Medications

## Goal of Extraction

The Core Clinical Medication Library is a medication-focused clinical data extraction tool designed to identify, extract, and ontologically map medications and pharmaceutical treatments from unstructured clinical narratives and patient health record documentation. It extracts medication names and dosing information documented across clinical notes, medication lists, and medication history sections, standardizing representation through RxNorm concept mapping.

## Extraction Methodology

The extraction process operates at the sentence level, capturing each medication with precise character-level locations (start and end positions) that enable direct traceability back to the "document". Each extracted medication record includes the medication name, dosing characteristics (dose, frequency, quantity, route, mode, duration), clinical indication, action, and temporal context (action date, date from note). A medication record will only be extracted if at least one of the following dosing attributes is present alongside the name of the drug: \[dose, frequency, quantity, route, mode, duration]. When a patient's medication appears multiple times within a single document—whether from repeated orders, serial administration, or documentation across different note sections—each instance is extracted and recorded separately to preserve the complete medication history. The library performs extraction on a document-by-document basis; there is no automatic cross-document reconciliation or cross-patient data merging.

Note: A document is determined by our intelligent document splitting feature. Medical PDFs can contain a single document or multiple documents. A document's type can provide clinical context important for the data extraction. This feature separates and categorizes an input PDF into individual documents by document type to prepare them for data extraction. An input PDF can remain one document or can be split into multiple documents through this process. A "document" in the context of this data extraction refers to the documents identified after the intelligent document splitting process.

## Interpretation & Validation

Every extracted medication record captures medication names and dosing characteristics. This extracted data guides appropriate reliance on medication history and supports informed clinical interpretation.

## Clinical Considerations

Temporal context is critical for clinical decision-making; understanding when medications were administered or prescribed, along with duration information, directly impacts assessment of treatment regimen and medication adherence. Serial medication documentation provides essential context for understanding the medication history, treatment changes, and clinical response over time. Dosing characteristics (dose, frequency, route, mode) should be considered in conjunction with extracted indication to ensure appropriate clinical interpretation.

## Target Concepts

### Coding System: RxNorm

All extracted medications are mapped to RxNorm (National Library of Medicine's normalized naming system for clinical drugs), with each medication assigned a valid RxNorm concept identifier, along with its associated full medication description and name. This structure provides both the standardized data needed for system integration and the contextual information needed for informed clinical interpretation.

### Clinical Concepts Extracted

Medications are clinically documented pharmaceutical treatments that have been prescribed, administered, or documented. This includes medication names, dosing information, clinical indications, and medication actions. Medication names, dosing characteristics (dose, frequency, route, mode, duration), modifiers, and clinical indications are captured as they appear in source documentation. Medication action is standardized to controlled vocabulary.

We define medications with RxNorm concepts.

## Extracted Fields

| Field Name      | Data Type    | Description                                                                                                                                                                                                     |
| --------------- | ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| filename        | string       | The source PDF name with a suffix appended. The suffix refers to the subdocument after document splitting                                                                                                       |
| subdoc_id       | string       | Unique subdocument identifier                                                                                                                                                                                   |
| manifest_index  | integer      | The row index of the file in the manifest submitted with the processing request. Used to retrieve the corresponding OCR output from the [document metadata JSONL](/extract/reference/output#document-metadata). |
| measure         | const string | Row-label indicating extraction type                                                                                                                                                                            |
| chartdate       | string       | Clinical note or chart date; standardized to YYYY-MM-DD format                                                                                                                                                  |
| subject_id      | string       | Patient identifier as assigned in the manifest.csv (required)                                                                                                                                                   |
| processing_date | string       | Date/time record was processed; system-generated                                                                                                                                                                |
| sentence        | string       | Excerpt of text containing the extracted entity                                                                                                                                                                 |
| section_name    | string       | Normalized section name corresponding to recognized section headings in document                                                                                                                                |
| entity_text     | string       | Extracted term as it appears in the document                                                                                                                                                                    |
| entity_start    | integer      | Extracted term's start character offset relative to start of the document                                                                                                                                       |
| entity_end      | integer      | Extracted term's end character offset relative to start of the document                                                                                                                                         |
| concept_id      | string       | RxNorm concept identifier                                                                                                                                                                                       |
| description     | string       | The RxNorm fully specified name (FSN) for the concept_id                                                                                                                                                        |
| drug_name       | string       | The name of the medication/drug                                                                                                                                                                                 |
| dose            | string       | The dosage amount (e.g. “500mg”, “2.5ml”)                                                                                                                                                                       |
| frequency       | string       | How often the medication should be taken (e.g. “twice daily”, “every 8 hours”)                                                                                                                                  |
| quantity        | string       | The number of units to be taken at each dose (e.g. “1”, “2 tablets”)                                                                                                                                            |
| route           | string       | The route of administration (e.g. “oral”, “topical”, “injection”)                                                                                                                                               |
| drug_mode       | string       | The physical form of the medication (e.g. “tablet”, “capsule”, “liquid”, “cream”)                                                                                                                               |
| duration        | string       | How long the medication should be taken (e.g. “7 days”, “2 weeks”, “ongoing”)                                                                                                                                   |
| modifiers       | string       | Additional instructions or modifiers (e.g. “as necessary”, “with food”, “before bedtime”)                                                                                                                       |
| indication      | string       | The medical condition or reason for prescribing this medication                                                                                                                                                 |
| action          | string       | The action related to the medication; controlled vocabulary: “administered”, “filled”, “is_on”, “prescribed”, “started”, “stopped”, “suspended”; if unclear, return “is_on”                                     |
| action_date     | string       | A temporal descriptor associated with the medication, or “unknown” if not mentioned                                                                                                                             |
| date_from_note  | boolean      | True if the date was explicitly mentioned in the note/sentence text; False if inferred or not present                                                                                                           |

Medications Extraction Fields

## Example of Extracted Output

* *Note: This example demonstrates the content of the output, not the structure*

| sentence                                                                      | drug_name   | dose   | frequency         | route        | indication         |
| ----------------------------------------------------------------------------- | ----------- | ------ | ----------------- | ------------ | ------------------ |
| Plan to start Enoxaparin 40 mg once daily SQ injection for DVT prophylaxis    | Enoxaprin   | 40 mg  | once daily        | SQ injection | DVT prophylaxis    |
| Amoxicillin 250 mg, 1 capsule three times daily orally for acute otitis media | Amoxicillin | 250 mg | three times daily | orally       | acute otitis media |

Medications Illustrative Output Example

* Example JSONL object showing a typical extraction result

```json
{
  "filename": "patient_3.pdf",
  "subdoc_id": "patient_3.pdf-0016",
  "manifest_index": 3
  "measure": "medications",
  "chartdate": "2022-03-13",
  "subject_id": "11110010",
  "processing_date": "2024-03-08T00:00:00",
  "data": [
    {
      "sentence": " COPD Exacerbation  | 3. Ex Smoker  | 4. Atrial Fibrillation  | 5. Hypertension  | 6. Dyslipidemia  | 7. Osteoarthritis  | 8. Recurrent Urinary Tract Infections  |  | Discharge Medications: |  | 1. Cefuroxime 750mg PO BID X 6 days  | 2. Prednisone 50mg PO OD X 5 days  | 3. <entity>Fluticasone</entity> 110 mcg two puffs inhaled BID  | 4. Salmeterol one inhalation BID  | 5. Ipratropium Bromide MDI two puffs inhaled q4h PRN  | 6. Lisinopril 10mg PO OD  | 7. Metoprolol 25mg PO BID  | 8. Atorvastatin 20mg PO OD  | 9. Extra strength tylenol 1-2 tabs PO ",
      "section_name": "MEDICATIONS",
      "entity_text": "Fluticasone",
      "entity_start": 4757,
      "entity_end": 4768,
      "concept_id": "41126",
      "description": "fluticasone (Pharmacologic Substance)",
      "drug_name": "Fluticasone",
      "dose": "110 mcg",
      "frequency": "BID",
      "quantity": "two puffs",
      "route": "inhaled",
      "drug_mode": "inhalation",
      "duration": "6 days",
      "modifiers": "",
      "indication": "COPD Exacerbation",
      "action": "is_on",
      "action_date": "unknown",
      "date_from_note": false
    }
  ]
}
```