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 NameData TypeDescription
filenamestringThe source PDF name with a suffix appended. The suffix refers to the subdocument after document splitting
subdoc_idstringUnique subdocument identifier
manifest_indexintegerThe 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.
measureconst stringRow-label indicating extraction type
chartdatestringClinical note or chart date; standardized to YYYY-MM-DD format
subject_idstringPatient identifier as assigned in the manifest.csv (required)
processing_datestringDate/time record was processed; system-generated
sentencestringExcerpt of text containing the extracted entity
section_namestringNormalized section name corresponding to recognized section headings in document
entity_textstringExtracted term as it appears in the document
entity_startintegerExtracted term’s start character offset relative to start of the document
entity_endintegerExtracted term’s end character offset relative to start of the document
concept_idstringRxNorm concept identifier
descriptionstringThe RxNorm fully specified name (FSN) for the concept_id
drug_namestringThe name of the medication/drug
dosestringThe dosage amount (e.g. “500mg”, “2.5ml”)
frequencystringHow often the medication should be taken (e.g. “twice daily”, “every 8 hours”)
quantitystringThe number of units to be taken at each dose (e.g. “1”, “2 tablets”)
routestringThe route of administration (e.g. “oral”, “topical”, “injection”)
drug_modestringThe physical form of the medication (e.g. “tablet”, “capsule”, “liquid”, “cream”)
durationstringHow long the medication should be taken (e.g. “7 days”, “2 weeks”, “ongoing”)
modifiersstringAdditional instructions or modifiers (e.g. “as necessary”, “with food”, “before bedtime”)
indicationstringThe medical condition or reason for prescribing this medication
actionstringThe action related to the medication; controlled vocabulary: “administered”, “filled”, “is_on”, “prescribed”, “started”, “stopped”, “suspended”; if unclear, return “is_on”
action_datestringA temporal descriptor associated with the medication, or “unknown” if not mentioned
date_from_notebooleanTrue 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
sentencedrug_namedosefrequencyrouteindication
Plan to start Enoxaparin 40 mg once daily SQ injection for DVT prophylaxisEnoxaprin40 mgonce dailySQ injectionDVT prophylaxis
Amoxicillin 250 mg, 1 capsule three times daily orally for acute otitis mediaAmoxicillin250 mgthree times dailyorallyacute otitis media

Medications Illustrative Output Example

  • Example JSONL object showing a typical extraction result
1{
2 "filename": "patient_3.pdf",
3 "subdoc_id": "patient_3.pdf-0016",
4 "manifest_index": 3
5 "measure": "medications",
6 "chartdate": "2022-03-13",
7 "subject_id": "11110010",
8 "processing_date": "2024-03-08T00:00:00",
9 "data": [
10 {
11 "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 ",
12 "section_name": "MEDICATIONS",
13 "entity_text": "Fluticasone",
14 "entity_start": 4757,
15 "entity_end": 4768,
16 "concept_id": "41126",
17 "description": "fluticasone (Pharmacologic Substance)",
18 "drug_name": "Fluticasone",
19 "dose": "110 mcg",
20 "frequency": "BID",
21 "quantity": "two puffs",
22 "route": "inhaled",
23 "drug_mode": "inhalation",
24 "duration": "6 days",
25 "modifiers": "",
26 "indication": "COPD Exacerbation",
27 "action": "is_on",
28 "action_date": "unknown",
29 "date_from_note": false
30 }
31 ]
32}