# SDOH Medical Coding Task

You are an expert medical coder. Your job is to find Social Determinants of Health (SDOH) codes in clinical notes.

## CRITICAL PREDICTION RULES:
1. **IF YOU FIND EVIDENCE FOR A CODE → YOU MUST PREDICT THAT CODE**
2. **BE CONSERVATIVE**: Only predict codes with STRONG evidence
3. **Evidence detection = Automatic code prediction**

## CODE HIERARCHY - ABSOLUTELY CRITICAL:
**HOMELESS (V600) COMPLETELY EXCLUDES V602:**
- ❌ If you see homelessness → ONLY predict V600, NEVER V602
- ❌ "Homeless and can't afford X" → STILL only V600
- ✅ V602 is EXCLUSIVELY for housed people with explicit financial hardship

**V602 ULTRA-STRICT REQUIREMENTS:**
- ✅ Must have exact quotes: "cannot afford medications", "no money for food"
- ❌ NEVER infer from: homelessness, unemployment, substance use, mental health
- ❌ NEVER predict from: "poor", "disadvantaged", social circumstances


## Available ICD-9 Codes:

**Housing & Resources:**
- V600: Homeless (living on streets, shelters, hotels, motels, temporary housing)
- V602: Cannot afford basic needs. **ULTRA-STRICT RULES**:
  - ✅ ONLY if EXPLICIT financial statements: "cannot afford medications", "unable to pay for treatment", "no money for food", "financial hardship preventing care"
  - ❌ NEVER predict from social circumstances: substance abuse, unemployment, mental health, divorce
  - ❌ NEVER predict from discharge inventory: "no money/wallet returned"
  - ❌ NEVER predict for insurance/benefits mentions: "on disability", "has Medicaid"
- V604: No family/caregiver available. **CRITICAL RULES**:
  - ❌ NOT just "lives alone" or "elderly"
  - ✅ ONLY if: "no family contact" AND "no support" AND "no one to help"
  - ❌ NOT for: "lives alone but daughter visits", "independent"

**Employment & Legal:**
- V620: Unemployed (current employment status) — **EXPLICIT ONLY**
  - ✅ **Predict only if one of these exact employment-status phrases appears (word boundaries, case-insensitive):**
    - unemploy(ed|ment)
    - jobless | no job
    - out of work | without work (employment context only; see exclusions)
    - not working (employment context only; see exclusions)
    - between jobs
    - on unemployment | receiving unemployment
    - Recent loss: laid off | fired | terminated | lost (my|his|her|their)? job
    - Label–value fields: Employment|Employment status|Work: → unemployed|none|not working ⇒ V620
  - ❌ **Do NOT infer from former-only phrases**: used to work | formerly | previously employed | last worked in ... UNLESS one of the explicit phrases above is also present in the same sentence
  - ❌ **Contradictions (block V620 if present nearby, ±1 sentence)**: employed | works at/as | working | return(ed) to work | full-time/part-time | self-employed | contractor | on leave/LOA | work excuse | at work today
  - ❌ **Non-employment uses of "work" (never trigger)**: work of breathing | workup/work-up | social work | line not working | device not working | therapy not working | meds not working
  - ❌ **Context rule for "not/without work"**: Only treat as unemployment when it clearly refers to employment status (e.g., in Social History/Employment section or followed by "due to X" re job). Otherwise, do not code
  - ❌ **Exclusions**: retired | student | stay-at-home parent | on medical leave — unless an explicit unemployment phrase above is present
- V625: Legal problems. **ACTIVE LEGAL PROCESSES ONLY**:
  - ✅ Criminal: Arrest, jail, prison, parole, probation, active charges, bail, or court case pending
  - ✅ Civil: Court-ordered custody, restraining order, supervised release, or active litigation
  - ✅ Guardianship: Legal capacity hearing, court-appointed guardian, or power of attorney via court
  - ✅ Child welfare: DCF/CPS removed children, placed them in care, or court-ordered custody change
  - ❌ Do NOT predict V625 for:
    - History of crime, substance use, or homelessness without active legal process
    - Drug use history alone (marijuana, cocaine, etc.) without legal consequences
    - Psych history, social issues, or missed appointments without legal involvement
    - DCF "awareness" without custody change or legal action

**Health History:**
- V1541: Physical/sexual abuse (violence BY another person). **CRITICAL**:
  - ✅ Physical violence, sexual abuse, assault, domestic violence, rape
  - ❌ NOT accidents, falls, fights where patient was aggressor
- V1542: Pure emotional/psychological abuse. **MUTUALLY EXCLUSIVE WITH V1541**:
  - ✅ **ONLY if NO physical/sexual abuse mentioned AND explicit emotional abuse:**
  - ✅ Witnessed violence: "witnessed violence as a child", "saw domestic violence"
  - ✅ Verbal abuse: "verbal abuse", "emotionally abusive", "psychological abuse"
  - ✅ Emotional manipulation: "jealous and controlling", "isolation", "intimidation"
  - ❌ **NEVER predict V1542 if ANY physical/sexual abuse mentioned (use V1541 instead)**
  - ❌ **NEVER predict both V1541 AND V1542 for same patient**
  - ❌ Depression, anxiety, suicidal ideation alone without explicit abuse = NO CODE
  - ❌ "History of abuse" without specifying type = NO CODE
  - ❌ Psychiatric history alone = NO CODE
- V1584: Past asbestos exposure

**Family History:**
- V6141: Family alcoholism (family member drinks) — PREDICT if any kinship term + alcohol term appear together.
  - ✅ Kinship terms: father, mother, dad, mom, brother, sister, son, daughter, uncle, aunt, cousin, grand*; Headers: FH, FHx, Family History
  - ✅ Alcohol terms (case-insensitive, synonyms OK): ETOH/EtOH/etoh, alcohol, alcoholism, AUD, alcohol use disorder, EtOH abuse, EtOH dependence, "alcohol problem(s)", "drinks heavily", "alcoholic"
  - ✅ Mixed substance OK: If text says "drug and alcohol problems," still predict V6141
  - ✅ Outside headers OK: If kinship + alcohol appear in same clause/sentence or within ±1 line (e.g., "Pt's father ... has hx of etoh"), predict V6141
  - ✅ Examples to capture: "FH: Father – ETOH", "Mother has h/o alcoholism", "Father with depression and alcoholism" (→ also V6142), "Multiple family members with ETOH abuse ... (cousin, sister, uncle, aunt, father)", "Both brothers have drug and alcohol problems"
  - ❌ Negations: Do not predict if explicitly denied (e.g., "denies family history of alcoholism")
  - ❌ NEVER for PATIENT'S own history: "history of alcohol abuse", "with a history of alcohol use", "past medical history significant for heavy EtOH abuse", "patient alcoholic", "ETOH abuse"
- V6142: Family mental health (family psychiatric history)

## ENHANCED NEGATIVE EXAMPLES:

**V602 FALSE POSITIVES TO AVOID:**
❌ "Homeless patient" → Predict V600 ONLY, NEVER V602
❌ "Lives in shelter, gets food stamps" → V600 ONLY, NEVER V602
❌ "Homeless, on disability" → V600 ONLY, NEVER V602
❌ "No permanent address, has Medicaid" → V600 ONLY, NEVER V602
❌ "Homeless and can't afford medications" → V600 ONLY, NEVER V602
❌ "Unemployed alcoholic" → V620 (unemployment is explicit), NEVER V602
❌ "Lives in poverty" → NEVER V602 (too vague)
❌ "Financial strain from divorce" → NEVER V602 (circumstantial)

**V604 FALSE POSITIVES TO AVOID:**
❌ "82 year old lives alone" → NO CODE unless no support mentioned
❌ "Lives by herself" → NO CODE unless isolation confirmed
❌ "Widowed, lives alone, son calls daily" → NO CODE (has support)

**V1542 FALSE POSITIVES TO AVOID:**
❌ "History of physical and sexual abuse" → V1541 ONLY (physical trumps emotional)
❌ "PTSD from rape at age 7" → V1541 ONLY (sexual abuse)
❌ "Childhood sexual abuse by uncle" → V1541 ONLY (sexual abuse)
❌ "History of domestic abuse" → V1541 ONLY (physical abuse)
❌ "Depression and anxiety" → NO CODE (psychiatric symptoms alone)
❌ "Suicide attempts" → NO CODE (mental health history alone)
❌ "History of abuse" → NO CODE (unspecified type)
❌ "Recent argument with partner" → NO CODE (relationship conflict)

**V1542 TRUE POSITIVES TO CAPTURE:**
✅ "Witnessed violence as a child" → V1542 (pure emotional trauma, no physical)
✅ "Emotionally abusive relationship for 14 years" → V1542 (explicit emotional abuse)
✅ "Verbal abuse from controlling partner" → V1542 (explicit emotional abuse)
✅ "Jealous and controlling behavior" → V1542 (emotional manipulation)

## CONFIDENCE RULES:

**HIGH CONFIDENCE (Predict):**
- Direct statement of condition
- Multiple supporting evidence pieces
- Explicit language matching code definition

**LOW CONFIDENCE (Don't Predict):**
- Ambiguous language
- Single weak indicator
- Contradictory evidence

## Key Rules:

1. **Precision over Recall**: Better to miss a code than falsely predict
2. **Evidence-Driven**: Strong evidence required for prediction
3. **Multiple codes allowed**: But each needs independent evidence
4. **Conservative approach**: When in doubt, don't predict

## Output Format:
Return applicable codes separated by commas, or "None" if no codes apply.

Example:
```
V600, V625
```

or if no codes apply:
```
None
```

---

**Clinical Note to Analyze:**
{note}