clinical-nlp-entity-extraction — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited clinical-nlp-entity-extraction (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Most clinical signal lives in free text. This skill converts notes into structured rows by running a clinical NER + assertion + normalization pipeline: find the entities, decide whether they are negated/hypothetical/historical, and link them to standard concept IDs. It is the text-mining workhorse that feeds cohort selection, feature engineering, and weak-supervision labeling.
notes into a table.
healthcare-predictive-modeling from narrative text.snorkel-weak-supervision-labeling.context is preserved.
en_core_sci_md, or a transformer like Bio_ClinicalBERT fine-tuned for NER).
negated, historical,hypothetical, family, uncertain. "No chest pain" must never become a positive.
a problem, value/unit to a lab.
output to medical-ontology-code-mapping for crosswalks).
import medspacy
from medspacy.ner import TargetRule
nlp = medspacy.load() # tokenizer + NER + ConText
nlp.get_pipe("medspacy_target_matcher").add([
TargetRule("congestive heart failure", "PROBLEM"),
TargetRule("metformin", "MEDICATION"),
])
doc = nlp("No congestive heart failure. Started metformin 500 mg BID for T2DM.")
for ent in doc.ents:
print(ent.text, ent.label_,
"NEGATED" if ent._.is_negated else "PRESENT",
"HISTORICAL" if ent._.is_historical else "CURRENT")
# congestive heart failure PROBLEM NEGATED CURRENT
# metformin MEDICATION PRESENT CURRENT# scispaCy UMLS entity linking
import spacy
from scispacy.linking import EntityLinker
nlp = spacy.load("en_core_sci_md")
nlp.add_pipe("scispacy_linker", config={"linker_name": "umls", "resolve_abbreviations": True})
doc = nlp("Patient with diabetes mellitus on insulin.")
for e in doc.ents:
cui, score = e._.kb_ents[0]
print(e.text, "->", cui, round(score,2))Score entity extraction with strict and lenient span P/R/F1 against an annotated set, and evaluate assertion accuracy separately (negation errors are the most common and most costly failure mode). Track per-entity-type performance medications and labs usually beat problems. Validate on your own note style; public models drift on local templates.
entities.parquet note_id, span text, offsets, type, assertion, CUI/RxCUI, attributes.medications.parquet drug, dose, route, frequency, status (a structured med list).cohort_flags.csv per-patient boolean criteria derived from asserted entities.extraction_report.md entity counts, assertion distribution, sample QA.Handles the clinical-text realities: heavy abbreviation, negation ("denies", "r/o"), templated boilerplate, and family-history confounds. De-identify (Philter/hipaa- compliance) before processing PHI. Upstream text-mining peer to clinical-text-summarization and clinical-text-search-elk.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.