FormExamples
379 medical-form reference implementations
Medical forms monorepo for structured clinical assessments, patient intake, cardiovascular risk calculators, administrative healthcare documents, privacy notices, and staff training checklists. Each project collects data via a single-page, step-by-step questionnaire, applies a validated scoring or grading engine, and generates a clinical report with flagged issues.
What's in the repo
- 379 form projects, each in
forms/<slug>/ - PostgreSQL SQL migrations (Liquibase SQL format) — the source of truth
- Generated XML + DTD, FHIR HL7 R5, Protocol Buffers, and OpenAPI 3.1 representations per SQL entity
- Two front-ends per form (questionnaire + dashboard, each in HTML and SvelteKit — both on the Lily Design System)
- A Rust back-end JSON API per form (axum + axa + sqlx; no Tera/HTMX/Alpine/CSS)
Form categories
| Category | Examples |
|---|---|
| Risk scores & calculators | Framingham, QRISK3-based heart health check, PREVENT, SCORE2-Diabetes |
| Specialty assessments | Cardiology (NYHA/CCS), Oncology (ECOG), Pulmonology (GOLD), Renal (KDIGO) |
| Symptom scales | PHQ-9, GAD-7, PCL-5, DLQI, PSQI, ESAS-r, SNOT-22, DHI |
| Pre-op / peri-op | Pre-operative assessment (ASA), Anesthesiology, Post-operative report |
| Safety & safeguarding | Fall risk, Casualty card (NEWS2), Medical error report, Consent |
| Administrative | Patient intake, Medical records release, Hospital discharge, Transfer |
| Donation & eligibility | Blood donation (JPAC), Organ donation, Bone marrow, Semaglutide |
| Occupational & workplace | Workplace safety (HSE), Workplace stress, Workplace climate, Ergonomics |
| Training & certification | CPR training, First aid, EMT psychomotor, Medical language speaking |
| Privacy & legal | Care privacy notice, Code of conduct notice, Research privacy notice |
| WHO referral & emergency | Acute referral, Counter-referral, Prehospital, Emergency unit forms |
| UK statutory | DVLA B1/M1/V1, MAT B1 maternity certificate |
How a form is structured
Each form lives in forms/<slug>/ with a consistent layout:
forms/<slug>/
index.md # Form description and scoring details
README.md -> index.md # Symlink for GitHub rendering
AGENTS.md, CLAUDE.md # Agent instructions for this form
spec/ # Living domain spec (index.md)
sql/ # PostgreSQL Liquibase migrations (source of truth)
xml/, fhir/r5/, protobuf/, openapi/ # Generated representations per SQL entity
examples/ # Filled-form JSON fixtures + personas + FHIR R5 Bundle
front-end-with-html/ # Questionnaire + dashboard (HTML, Lily Design System)
front-end-with-svelte/ # Questionnaire + dashboard (SvelteKit, Lily Design System)
back-end-with-axum/ # Rust JSON API (axum + axa + sqlx)