Packs / healthcare-admin-public
intake-form-normalize
Turn a filled patient intake form (text export) into clean JSON with required fields checked and values normalised
Install
logicpacks pack use healthcare-admin-public/intake-form-normalizeget_pack healthcare-admin-public/intake-form-normalizeThe second line is the MCP tool call for the LogicPacks connector (Claude Code, Codex, Claude.ai and others). The first run of a pack someone else wrote asks for your yes.
Keys it needs (names only)
None.
Playbooks included
- Spec:
spec/SPEC.md(goal, steps, edge cases, don’ts) - Routes:
local-python - Checks: 1 in
outcome/checks.yaml - Code:
intake.py - Tools: python3
Usage, last 8 weeks
New: no recorded use yet.
Purpose (from spec/SPEC.md)
Goal
A JSON record from a key: value intake form export with normalised DOB (ISO), phone (E.164-ish digits), allergies/medications lists, and a list of missing required fields.
Verified by: Synthetic form: DOB 03/04/1980 -> 1980-03-04, 'NKDA' -> [], missing insurance_id reported.
Steps
- Export the form to text (
pdftotext -layout form.pdf form.txt). - Run
python3 code/intake.py form.txt > record.json. - Fix missing fields with the patient; import the JSON into the PM/EHR by its own import route.
Edge cases
- US date order (MM/DD/YYYY) is assumed; pass --dmy for DD/MM/YYYY forms.
- Unknown keys are kept under 'other'.
Don'ts
- Never put real patient data in fixtures, prompts, logs or git; fixtures are synthetic.
- Don't guess missing values; report them.