# repz97/medical-bill-information-extraction architecture

> Architecture diagram of the GitHub repository repz97/medical-bill-information-extraction, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/repz97/medical-bill-information-extraction
- Repository: https://github.com/repz97/medical-bill-information-extraction

## Overview

This repository documents a medical-bill extraction workflow: a user supplies bill images, image preprocessing supports OCR, recognized text is parsed with regular expressions, and extracted fields are stored in a structured format. Tesseract is the documented OCR engine. The tree contains a notebook as the implementation artifact, but its contents were not sampled; the relationships shown here therefore reflect README statements, not inspected calls. The README does not specify storage technology or further processing stages.

Main entry points: [`medical_bill_extract.ipynb`](https://github.com/repz97/medical-bill-information-extraction/blob/master/medical_bill_extract.ipynb) (OCR recognition)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_image_processing["Image Processing"]
  node_bill_image["Bill image"]
  node_preprocessing["Image preprocessing"]
end

subgraph group_text_extraction["Text Extraction"]
  node_ocr["OCR recognition"]
  node_tesseract["Tesseract OCR"]
  node_regex_extraction["Field extraction"]
end

subgraph group_structured_output["Structured Output"]
  node_structured_data["Structured data"]
end

node_user(("Bill submitter"))

node_user -->|"supplies"| node_bill_image
node_bill_image -->|"preprocesses"| node_preprocessing
node_preprocessing -->|"prepares for OCR"| node_ocr
node_ocr -->|"uses"| node_tesseract
node_ocr -->|"recognizes text for"| node_regex_extraction
node_regex_extraction -->|"extracts into"| node_structured_data

click node_preprocessing "https://github.com/repz97/medical-bill-information-extraction/blob/master/medical_bill_extract.ipynb"
click node_ocr "https://github.com/repz97/medical-bill-information-extraction/blob/master/medical_bill_extract.ipynb"
click node_regex_extraction "https://github.com/repz97/medical-bill-information-extraction/blob/master/medical_bill_extract.ipynb"
click node_structured_data "https://github.com/repz97/medical-bill-information-extraction/blob/master/medical_bill_extract.ipynb"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_bill_image,node_preprocessing toneBlue
class node_ocr,node_tesseract,node_regex_extraction toneAmber
class node_structured_data toneMint
class node_user toneIndigo
```

## Components

### Image Processing

- **Bill image**
- [Image preprocessing](https://github.com/repz97/medical-bill-information-extraction/blob/master/medical_bill_extract.ipynb): `medical_bill_extract.ipynb`

### Text Extraction

- [OCR recognition](https://github.com/repz97/medical-bill-information-extraction/blob/master/medical_bill_extract.ipynb): `medical_bill_extract.ipynb`
- **Tesseract OCR**
- [Field extraction](https://github.com/repz97/medical-bill-information-extraction/blob/master/medical_bill_extract.ipynb): `medical_bill_extract.ipynb`

### Structured Output

- [Structured data](https://github.com/repz97/medical-bill-information-extraction/blob/master/medical_bill_extract.ipynb): `medical_bill_extract.ipynb`

### Other components

- **Bill submitter**

## Connections

- Bill submitter → Bill image: supplies (evidence: `README.md`)
- Bill image → Image preprocessing: preprocesses (evidence: `README.md`)
- Image preprocessing → OCR recognition: prepares for OCR (evidence: `README.md`)
- OCR recognition → Tesseract OCR: uses (evidence: `README.md`)
- OCR recognition → Field extraction: recognizes text for (evidence: `README.md`)
- Field extraction → Structured data: extracts into (evidence: `README.md`)
