Confirm the user objective, required inputs, and non-negotiable constraints before doing detailed work.
Validate that the request matches the documented scope and stop early if the task would require unsupported assumptions.
Use the packaged script path or the documented reasoning path with only the inputs that are actually available.
Return a structured result that separates assumptions, deliverables, risks, and unresolved items.
If execution fails or inputs are incomplete, switch to the fallback path and state exactly what blocked full completion.
Overview
Mine "text data" that has been long overlooked in MIMIC-IV, extracting unstructured diagnostic logic, order details, and progress notes.
Purpose
The MIMIC-IV database contains large amounts of structured data (vital signs, laboratory results, etc.), but its true clinical value is often hidden in unstructured text:
Diagnostic reasoning chains in discharge summaries
Subtle finding descriptions in imaging reports
Treatment decision logic in progress notes
Personalized medication considerations in orders
This Skill provides a complete text mining toolchain to transform raw medical text into analyzable structured insights.
Features
1. Text Extraction
NOTEEVENTS: Extract clinical notes from MIMIC-IV NOTE module
Radiology Reports: Extract imaging diagnostic text
ECG Reports: Parse ECG interpretation text
Discharge Summaries: Extract complete diagnostic and treatment course
Treatment Decision Tree: Clinical basis for medication selection and dosage adjustment
Disease Progression: Disease progression and outcome descriptions
4. Structured Output
FHIR-compatible clinical document format
Knowledge graph-friendly triple format
Temporal event sequences
Usage
from skills.unstructured_medical_text_miner.scripts.main import MedicalTextMiner
# Initialize miner
miner = MedicalTextMiner()
# Load MIMIC-IV note data
miner.load_notes(notes_path="path/to/noteevents.csv")
# Extract all text records for a specific patient
patient_texts = miner.get_patient_texts(subject_id=10000032)
# Execute complete information extraction
insights = miner.extract_insights(
text=patient_texts,
extract_entities=True,
extract_relations=True,
extract_timeline=True
)