Logo Lanfrica

virtualsensing/hospital-sticker-extraction

Domain:

healthcare

Record type:

software
Creator:
vir
Host:
Extract patient data from South African hospital admission stickers using AI vision. Trained on Shelly Beach Hospital & Hibiscus Private Hospital Port Shepstone. # Hospital Sticker Data Extraction A Python CLI tool that extracts structured patient data from South African hospital admission sticker photos using AI vision. Trained on sticker formats from: - **Shelly Beach Private Hospital** (KwaZulu-Natal) - **Hibiscus Private Hospital Port Shepstone** (KwaZulu-Natal) ## How It Works 1. You photograph a patient admission sticker 2. The tool sends the image to Claude's vision API 3. Claude reads the sticker and returns structured data in 16 standardised fields 4. Results are output as JSON and optionally CSV ## Extracted Fields | # | Field | Example | |---|-------|---------| | 1 | Hospital Name | Shelly Beach Hospital | | 2 | Patient Number | A34585:2 | | 3 | Patient Name | John Smith | | 4 | Ward | SURG | | 5 | Admitted | 13/03/2025 16:02 | | 6 | Date of Birth | 06 Dec 1946 | | 7 | Age | 79Y 3M | | 8 | Sex | Male | | 9 | Patient ID | 4612065142182 | | 10 | Medical Aid & Plan | Discovery Coastal Saver | | 11 | Med Aid Number | 004713000 | | 12 | Member Name | Mrs J Smith | | 13 | Member ID | 4612065142182 | | 14 | Doctor | Dr D Jones | | 15 | Phone | 0845167402 | | 16 | Email | example@email.com | ## Formatting Rules - **Date of Birth**: Always formatted as `dd Mon yyyy` (e.g. `06 Dec 1946`) - **Patient Name**: Titles stripped (Mr/Mrs/Ms), reordered to `FirstName Surname` - **Doctor**: Formatted as `Dr [Initials] [Surname]` - **Ward**: Just the type — `SURG`, `MED`, `DAY`, `ICU`, etc. - **Medical Aid & Plan**: Medical aid and scheme combined (e.g. `Gems Non Dental Ruby`) - **Phone**: Cell number preferred; telephone as fallback ## Setup ```bash # Clone the repo git clone github.com cd hospital-sticker-extraction # Create virtual environment python3 -m venv venv source venv/bin/activate # Install dependencies pip install -r requirements.txt # For HEIC support (optional — macOS photos) pip install pillow-heif # Set up your API key cp .env.example .env # Edit .env …