Clinical NLP Pipeline Explorer
Description
Most of what is known about a patient is written in prose, and prose is not traversable. This MicroSim runs one clinical note through three narrowing stages and shows exactly what each contributes. Named entity recognition types spans without judging the note; classification consumes the whole note and returns one label; sentiment analysis returns a tone label that is informative for patient-authored text and beside the point for a clinician's. The final panel shows the assembled facts as they would enter a graph -- a Medication node joined by a PRESCRIBED edge, symptoms joined by REPORTED edges carrying the note's date. The dropdown swaps in a patient portal message so the same five stages can be compared across a clinician's register and a patient's.
Lesson Plan
Audience: undergraduate students and healthcare data practitioners. Allow 10-15 minutes. Prerequisites: nodes, edges, and properties, and the difference between structured and unstructured data.
Learning objective: Given a raw clinical note, the learner can demonstrate how a clinical NLP pipeline applies named entity recognition, text classification, and sentiment analysis in sequence, and can apply the same sequence to a new note.
- Explore: Run the clinician note through all five stages. Note which entity types the recognizer found and which it did not -- there is no
DIAGNOSISspan, even though a reader infers one. - Explain: Switch to the patient portal message and compare stage 3 with stage 4. Explain why the anxious tone is useful for routing and dangerous as a proxy for clinical severity.
- Transfer: Write two sentences of a plausible clinical note of your own and mark the spans you would expect each entity type to catch. Name one span you are unsure about and say what would settle it.
Assessment: use the Explain prompt as an exit ticket. A complete response distinguishes what the classifier consumed from what it returned, and separates a claim about routing priority from a claim about clinical acuity.
Embed This MicroSim
Copy this iframe to your website:
1 | |
Quality Checks
Validated September 8, 2026. Completeness rubric: 100/100, scored with the project's calculate-quality-score.py against the standardization checklist. Checked automatically in a browser at 400, 800, and 1200 px: the page loads with no JavaScript errors, no interactive control is clipped outside the viewport, and the document does not scroll horizontally. Controls, selections, and the reset path were exercised by hand during development at desktop width. The page reports its own height to the parent document, so the declared iframe height above serves only as a fallback.
Specification
The full specification below is extracted from Chapter 21: Responsible AI and Agentic Systems.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | |
Related Resources
References
- Source chapter — supplied the learning objective and the worked example.
- Mermaid flowchart documentation — subgraphs, click directives, and class styling (accessed September 8, 2026).
- Wikipedia: Named-entity recognition — the extraction task shown in stage 1.
- Wikipedia: Natural language processing — background on the pipeline pattern of successive narrowing stages.