extract-clinical-entities-to-fhir skillA
extract-clinical-entities-to-fhir is agent-read markdown (skill) from maziyarpanahi/openmed: Extract clinical entities from synthetic or already de-identified text with OpenMed and map them into deterministic FHIR R4 resources and a Bundle. Use when an agent must turn local clinical NER output into Conditions, MedicationStatements, Observations, or other FHIR resources without inventing terminology codes..
Indexed from public GitHub and served as immutable, content-addressed versions. Install it pinned to an exact SHA-256 with the mdr CLI, and every file is verified before it reaches your agent: the main file against the SHA-256 recorded here, the others against the git hashes of its source commit. The deterministic audit below grades the latest version, and the same checks always give the same file the same grade.
What the file says
# Extract clinical entities to FHIR
Separate extraction from clinical coding. OpenMed finds spans and supplies the
mechanical FHIR builders; the application decides which resource type and
status are clinically appropriate.
## Procedure
1. Keep the source synthetic, or de-identify it inside the trusted boundary
before extraction.
2. Run `openmed.analyze_text` with the task-appropriate clinical model.
3. Filter predictions by label and confidence; preserve offsets in a
PHI-safe audit record.
4. Map each accepted span to the correct FHIR resource type.
5. Add terminology codes only from a user-approved mapping or terminology
service. Never invent a code.
6. Assemble resources with `to_bundle` and validate against the target profile.
## Runnable synthetic example
Install the model runtime first with `python -m pip install "openmed[hf]"`.
```python
import json
from openmed import analyze_text
from openmed.clinical.exporters.fhir import to_bundle
note = "Assessment: type 2 diabetes mellitus is stable on metformin."
result = analyze_text(
note,
model_name="disease_detection_superclinical",
confidence_threshold=0.5,
)
…Read the whole file at its exact version.
How to install
mdr add maziyarpanahi/openmed/extract-clinical-entities-to-fhir@git:20260727.9d7b5a2mdr add maziyarpanahi/openmed/extract-clinical-entities-to-fhir@sha256:4fbaf956da64b6e9Pin to a label to follow the author's releases, or to a sha256 for exact bytes. Either way the resolved hash is written to mdr.lock, and mdr install fetches those bytes again and checks them, so it installs them exactly or fails.
[](https://markdownregistry.com/a/art_7ynci6uq4njbkgee)
1 badge views in 30 days
Versions
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (3758 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
maziyarpanahi/openmed · 5,401 stars · license Apache-2.0 · pushed 2026-09-25 · branch master
API
GET https://markdownregistry.com/api/v1/artifacts/art_7ynci6uq4njbkgee GET https://markdownregistry.com/api/v1/resolve?ref=maziyarpanahi/openmed/extract-clinical-entities-to-fhir GET https://markdownregistry.com/api/v1/blob/4fbaf956da64b6e9ee67339f2a6ea30afa1b36b98633867821cd4518fd7a0563
Your agent does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.