extracting-sdoh
하는 일
이 스킬은 주거 문제, 식량 불안, 교통 장벽처럼 건강에 영향을 주는 사회적 요인을 임상 노트에서 찾고, 맞는 ICD-10 Z 코드를 제안합니다. 이런 요인을 데이터로 필요로 하는 돌봄 팀과 건강 형평성 분석가를 위한 스킬입니다.
사용하는 경우
- ✓노트에 주거, 식량, 진료 예약 교통편이 없다는 사회적 위험이 나올 때.
- ✓건강 형평성 분석을 위해 사회적 요인을 구조화된 데이터로 기록해야 할 때.
- ✓코딩된 문제 목록에 사회적 필요가 빠져 있을 수 있을 때.
스킬 링크
https://github.com/maziyarpanahi/openmed/blob/master/skills/extracting-sdoh/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“이 비식별화된 노트에서 주거나 식량 문제를 찾고, 코더가 검토할 수 있도록 맞는 Z 코드를 제안해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 비식별화된 노트에서 개체 추출을 실행하고, 사회적 위험 구간을 Z55부터 Z65 코드군에 맞춘 뒤, 담당자가 배정할 수 있도록 제안을 보여 줍니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Extracting SDOH and Mapping to ICD-10-CM Z-Codes
Social determinants of health (SDOH) — the conditions in which people live, work, and age — drive an estimated 80% of health outcomes, yet they live almost entirely in free-text narrative. Multiple chart-review studies find SDOH documented in notes but coded with a Z-code under ~2% of the time. The information is there; the structured signal is not. This skill recovers it: run OpenMed NER over de-identified notes, then map the resulting spans to the ICD-10-CM Z55–Z65 family.
When to use
- A note clearly describes a social risk ("lives in her car", "skips meals to afford insulin", "no ride to dialysis") and you want a coded, queryable signal.
- You are building health-equity dashboards, risk stratification, or closed-loop referral feeds and need SDOH as discrete data.
- You want to reconcile what the chart says against what was coded, and flag Z-code gaps for a coder or care team to confirm.
This is a decision-support step. It proposes Z-codes; a human assigns them. SDOH coding is sensitive — never expose individual SDOH inferences outside the care/coding workflow, and never feed them to coverage or pricing decisions.
Quick start
De-identify first, run NER, then map spans to Z-codes:
import openmed
from sdoh_zcode_map import SDOH_ZCODES # see references/sdoh_zcode_map.md
note = (
"62F with CHF. Reports she lost her apartment last month and is "
"staying in a shelter. Often runs out of food before month-end. "
"No car; misses appointments because the bus does not run to clinic."
)
# 1) Strip PHI before any downstream processing or storage.
deid = openmed.deidentify(note, method="replace", policy="hipaa_safe_harbor")
# 2) Run clinical NER. Use an SDOH/clinical model from the registry; discover
# available keys with openmed.get_models_by_category(...).
result = openmed.analyze_text(deid.text, output_format="dict")
# 3) Map each entity span to a candidate Z-code.
for ent in result["entities"]:
code = SDOH_ZCODES.get(ent["label"].lower())
if code:
print(f"{ent['text']!r:40} {ent['label']:18} -> {code}")
analyze_text returns entities shaped as
{"text", "label", "confidence", "start", "end", "metadata"}. The start/end
offsets index into the text you passed in, so you can anchor every suggested
Z-code back to its exact source span for human review.
Workflow
- De-identify the note with
openmed.deidentify(HIPAA Safe Harbor or a stricter policy). SDOH text is dense with PHI (addresses, employer names). - Extract entities with
openmed.analyze_text. Pick a model whose label set covers social concepts; if your model only emits clinical findings, run a second pass with a zero-shot model (openmed zero) using SDOH labels such ashousing_instability,food_insecurity,unemployment,transportation_barrier,social_isolation,financial_strain. - Map spans to Z-codes using a curated lookup keyed by label
(
references/sdoh_zcode_map.md). Keep the span offsets and the modelconfidenceon every suggestion. - Stage for confirmation. Emit
(span, label, suggested_code, confidence)tuples for a coder or the Gravity Project pipeline to accept or reject. Do not auto-bill a Z-code from an inference alone. - Normalize to value sets. Align labels to the Gravity Project SDOH
domains so codes are interoperable with FHIR (
Condition,Observation,Goal) and USCDI v3 SDOH elements.
Z-code families you will hit most (ICD-10-CM Z55–Z65)
| Domain | Range | Example |
|---|---|---|
| Education / literacy | Z55 | Z55.0 illiteracy |
| Employment | Z56 | Z56.0 unemployment |
| Occupational exposure | Z57 | — |
| Housing / economic | Z59 | Z59.0 homelessness, Z59.41 food insecurity, Z59.82 transportation insecurity |
| Social environment | Z60 | Z60.2 living alone, Z60.4 social exclusion |
| Upbringing | Z62 | — |
| Family / support circumstances | Z63 | Z63.4 disappearance/death of family member |
| Psychosocial circumstances | Z64–Z65 | Z65.1 imprisonment |
The full curated label→code table lives in references/sdoh_zcode_map.md.
Hand-off to / from OpenMed
- From OpenMed: this skill consumes
openmed.analyze_text(...)output (PredictionResultdict). Eachentity["start"]/["end"]anchors a Z-code suggestion to source text. - To OpenMed: always run `openmed.de
자주 묻는 질문
Z 코드를 직접 배정하나요?
아니요. 코드를 제안하며, 배정은 사람이 합니다.
결과를 널리 공유해도 되나요?
아니요. 개별 사회적 위험 발견 내용은 돌봄 및 코딩 업무 흐름 안에서만 유지하도록 권장합니다.
보험 적용이나 가격 결정에 도움이 되나요?
아니요. 이런 추론을 보장이나 가격 책정 결정에 절대 사용하지 말라고 안내합니다.
상세 정보
작성자의 원본 설명
Extracts social determinants of health (SDOH) — housing instability, food insecurity, unemployment, transportation barriers, social isolation, financial strain — from clinical narrative and maps the spans to ICD-10-CM Z-codes (Z55–Z65). Use after running OpenMed NER when the user wants SDOH surfacing, Z-code suggestion, health-equity analytics, or to recover SDOH that is documented in free text but not coded. Pairs with OpenMed analyze_text output. Standards: ICD-10-CM Z55–Z65, Gravity Project value sets, n2c2 2022 SDOH track. Trigger keywords: SDOH, social determinants, Z-codes, housing, food
repo: maziyarpanahi/openmed
인기도
- GitHub 스타
- 5.8k
- 순위
- #14703
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
annotating-variants
5.8k에이전트가 유전 변이의 효과를 예측하고, HGVS 이름을 게놈 위치로 바꾸고, 무료 공개 주석 도구를 사용해 인구 빈도를 붙이도록 돕습니다.
ask-openmed
5.8k에이전트가 임상 텍스트 요청에 맞는 OpenMed 워크플로를 고르도록 돕되, 환자 데이터가 있을 수 있으면 먼저 개인 정보 확인을 거치게 합니다.
assembling-fhir-bundles
5.8k여러 FHIR 건강 기록을 EHR로 보낼 수 있도록 하나의 트랜잭션 Bundle로 묶고, 내부 참조를 올바르게 연결하도록 에이전트를 돕습니다.
auditing-deid-leakage
5.8k비식별화된 임상 텍스트에 남은 SSN, 카드 번호, 이메일, 날짜 같은 식별자를 검사하고, 남은 것이 있으면 공개를 막도록 돕습니다.
비슷한 스킬
gitcrawl
394k에이전트가 저장된 GitHub 이슈와 풀 리퀘스트 보관본을 검색하고, 중복 항목을 묶고, GitHub에서 현재 상태를 확인하도록 돕습니다.
slacrawl
394k에이전트가 로컬 Slack 보관본에서 메시지를 검색하고 개수를 세며, 보관본이 얼마나 최신인지 확인하고 필요할 때 새로 고치도록 돕습니다.
goplaces
394k에이전트가 Google Places로 장소를 검색하고, 세부 정보와 리뷰를 가져오고, 장소 이름을 확인하며, 스크립트용 JSON을 출력하도록 돕습니다.