DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to extract drugs and conditions from clinical notes on your own machine with Openmed

Install OpenMed and run clinical NER on text without a cloud API.

Short answer: Run pip install --upgrade "openmed[hf]" (or openmed[mlx] on Apple Silicon); then call analyze_text with a model such as pharma_detection_superclinical or disease_detection_superclinical; Print each entity's label and text. All steps.

  • Top pick
  • Research
  • Intermediate
  • 30 minutes
  • From the README
  • Claude Code
  • Codex
  • Cursor

health-data. Test with synthetic notes; real patient data needs your organization's approval and compliance review.

Who it is forA health data engineer who needs structured medication and condition fields from free-text notes.

The problemClinical notes are unstructured, and sending them to a hosted API raises privacy and compliance questions.

The outcomeEntities such as DRUG and CONDITION extracted locally from clinical text.

What you need first

  • Python 3.10+ and pip
  • Optional: Apple Silicon for MLX, Android with ONNX Runtime Mobile, or a browser with WebGPU
  • Model downloads from the Hugging Face Hub, or local model folders for offline use

Steps

  1. Run pip install --upgrade "openmed[hf]" (or openmed[mlx] on Apple Silicon)
  2. Call analyze_text with a model such as pharma_detection_superclinical or disease_detection_superclinical
  3. Print each entity's label and text
  4. For many notes, use BatchProcessor with group_entities=True
  5. For air-gapped use, point model_id at a local model directory

Prompt for your agent

Install maziyarpanahi/openmed and write a script that runs pharma_detection_superclinical over the notes in <folder> with BatchProcessor and writes drug and condition entities to a CSV. Use synthetic notes only for testing.

Caveat. This card is written from the maziyarpanahi/openmed README, not from a test run by Deduped. Before you start, make sure you have Python 3.10+ and pip. Check the repo for newer instructions before you rely on these steps.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for maziyarpanahi/openmed and "Extract drugs and conditions from clinical notes on your own machine"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer