# Label Analysis Report

Input: `008_label_data_sample_seed_1997.json`


## Overview

- Total records: 1232
- Total labels (flattened): 1263
- is_bill distribution: {True: 1124, False: 139}
- bill_paid distribution: {False: 68, True: 1015, None: 180}
- Invoice dates span: 2012-04-17 .. 2025-06-12
- Unique year-month pairs: 63

## Professions (top)

- Ostéopathe: 371
- Ostéopathie: 295
- Optique: 228
- (missing): 119
- Psychologue: 67
- Chiropractie: 57
- Unknown: 20
- Kinésithérapie: 16
- Sophrologie: 8
- Podologue: 8
- Hypnothérapie: 7
- Pharmacie: 7
- Sophrologue: 6
- Ophtalmologie: 6
- Réflexologie: 5
- Radiologie: 5
- Étiopathie: 4
- Sage-femme: 3
- Psychologie: 3
- Soins hospitalier: 3
- Naturopathie: 2
- Addictologie: 2
- Etiopathie: 2
- Kinésiologie: 2
- Diététicienne: 2
- Étiopathe: 2
- Etiopathe: 2
- Psychomotricité: 1
- Homéopathie: 1
- Kinésiologue: 1
- Optique hay Ophtalmologue???: 1
- Médecine du sport: 1
- Otique: 1
- Biologie: 1
- Chiropratie: 1
- Chirurgie dentaire: 1
- Diététique: 1
- Audiopathe: 1

## Currency distribution

- EUR: 1135
- F: 2

## Identifier and key field presence

- adeli_number: 898 present
- rpps_number: 182 present
- finess_number: 139 present
- prescripteur_finess_number: 41 present
- doctor_name: 1040 present
- invoice_issuer: 1120 present
- insured_name: 208 present
- beneficiary_name: 1093 present
- security_number: 492 present
- currency: 1137 present

## Flags

- is_handwriting: {False: 327, None: 880, True: 56}
- is_rotated: {False: 358, None: 879, True: 26}

## Numeric summaries

- total_billed: {'count': 1130, 'min': 9.9, 'p25': 55.0, 'median': 60.0, 'p75': 70.0, 'max': 8000.0, 'mean': 105.40392920353982, 'sum': 119106.44, 'missing': 133}
- amount_paid: {'count': 1011, 'min': 0.0, 'p25': 50.0, 'median': 60.0, 'p75': 66.5, 'max': 8000.0, 'mean': 98.68897131552917, 'sum': 99774.55, 'missing': 252}
- remaining_payment: {'count': 247, 'min': 0.0, 'p25': 0.0, 'median': 0.0, 'p75': 0.0, 'max': 204.06, 'mean': 2.793765182186235, 'sum': 690.06, 'missing': 1016}
- client_part: {'count': 145, 'min': 0.0, 'p25': 26.44, 'median': 48.77, 'p75': 90.0, 'max': 1420.0, 'mean': 99.44468965517241, 'sum': 14419.480000000003, 'missing': 1118}
- mandatory_coverage: {'count': 137, 'min': 0.0, 'p25': 0.09, 'median': 27.63, 'p75': 48.55, 'max': 1232.47, 'mean': 43.21014598540146, 'sum': 5919.790000000002, 'missing': 1126}
- complementary_coverage: {'count': 93, 'min': 0.0, 'p25': 0.0, 'median': 0.0, 'p75': 90.0, 'max': 499.91, 'mean': 63.8452688172043, 'sum': 5937.61, 'missing': 1170}

## Items analysis

- Items per label: count=1263, min=0, max=10, mean=1.25
- total_billed vs sum(items.amount) mismatches: 53

## Data quality issues (sample)

- Facture médecine douce-27776417: item[0].quantity missing
- 551dd33d-0011-4887-b115-4ddf28ee0e2f_fact_barret_l_2024: item[0].quantity missing
- 551dd33d-0011-4887-b115-4ddf28ee0e2f_fact_barret_l_2024: item[1].quantity missing
- 551dd33d-0011-4887-b115-4ddf28ee0e2f_fact_barret_l_2024: item[2].quantity missing
- 551dd33d-0011-4887-b115-4ddf28ee0e2f_fact_barret_l_2024: item[3].quantity missing
- 551dd33d-0011-4887-b115-4ddf28ee0e2f_fact_barret_l_2024: item[4].quantity missing
- 551dd33d-0011-4887-b115-4ddf28ee0e2f_fact_barret_l_2024: item[5].quantity missing
- Facture médecine douce-27640153: item[0].quantity missing
- Facture médecine douce-27640153: item[1].quantity missing
- 1724397366229Facture_RIVALLANDChrystelle_20240413ICQO: bill_paid True but amount_paid missing
- Facture ostéopathe-25417095: bill_paid True but remaining_payment > 0
- Facture ostéopathe-GED N-R-2323015: item[0].quantity missing
- 74441931-f8d0-4cb0-8eb5-df4147a72bbe_mgp: item[0].quantity missing
- 74441931-f8d0-4cb0-8eb5-df4147a72bbe_mgp: currency missing for bill
- 74441931-f8d0-4cb0-8eb5-df4147a72bbe_mgp: currency missing for bill
- 1724658126141JACOB_Francois_2024-111: item[0].quantity missing
- Facture des lentilles de contact-27559701: item[5].amount negative: -6.67
- 91c41171-ac88-4ce4-8f15-48c4ad2c5aa2_Devis_lunette: item[0].quantity missing
- 0252b5fb-bc84-4fca-bfa7-483ac611885a_Scan_0115: item[0].quantity missing
- 0252b5fb-bc84-4fca-bfa7-483ac611885a_Scan_0115: item[1].quantity missing
- 7f084bf4-357d-452d-bb4c-76bff332ea0c_IMG_7791: item[0].quantity missing
- 7f084bf4-357d-452d-bb4c-76bff332ea0c_IMG_7791: item[1].quantity missing
- 70c3e7f5-405b-49d8-a73c-dae83beafb59_Facture_ophtalmo: item[0].quantity missing
- 70c3e7f5-405b-49d8-a73c-dae83beafb59_Facture_ophtalmo: item[1].quantity missing
- 70c3e7f5-405b-49d8-a73c-dae83beafb59_Facture_ophtalmo: item[2].quantity missing
- Facture médecine douce-27776613: item[0].quantity missing
- 6eeacb70-27be-40dd-9511-522025b459a3_20241226_080214: item[0].quantity missing
- 6eeacb70-27be-40dd-9511-522025b459a3_20241226_080214: item[1].quantity missing
- 1724399050339FACTURE_132120424_MME_RONDIN_MAHEVA: item[0].quantity missing
- ec117b21-9348-4a76-9a22-2bae87639392_facture_du_14.02_Tony: item[0].quantity missing
- ec117b21-9348-4a76-9a22-2bae87639392_facture_du_14.02_Tony: item[1].quantity missing
- Facture ostéopathe-25979892: item[0].quantity missing
- bf09a877-0705-4c79-b908-6e8da44e44c7_17490641879424403676372514736136: item[0].quantity missing
- bf09a877-0705-4c79-b908-6e8da44e44c7_17490641879424403676372514736136: item[1].quantity missing
- d4f310c8-3bcf-4bb5-bf53-27ad74d66c1e_FACTURE_OPTICIEN_OPHTALMO: item[0].quantity missing
- DDE prestation Facture des lentilles de contact-26740934: item[0].quantity missing
- 45ccffcd-5fe8-418b-80c2-894086de9087_facture_ophtalmo_Fred_: item[0].quantity missing
- 45ccffcd-5fe8-418b-80c2-894086de9087_facture_ophtalmo_Fred_: item[1].quantity missing
- Facture ostéopathe-26626551: item[0].quantity missing
- 27ddc814-9239-4944-951a-fdd8a48c5926_IMG_20240922_0001: item[0].quantity missing
- 27ddc814-9239-4944-951a-fdd8a48c5926_IMG_20240922_0001: item[1].quantity missing
- 27ddc814-9239-4944-951a-fdd8a48c5926_IMG_20240922_0001: item[2].quantity missing
- 27ddc814-9239-4944-951a-fdd8a48c5926_IMG_20240922_0001: item[3].quantity missing
- 8eceb56a-b571-4ab6-a64e-668db6bf4ad5_chiropracteur_fevrier_25: item[0].quantity missing
- Facture des lentilles de contact-27576495: item[2].quantity missing
- 32ffb8dc-fbd0-4edf-94b2-7b784cc72ff2_17479876010256548167621008372337: item[0].quantity missing
- 32ffb8dc-fbd0-4edf-94b2-7b784cc72ff2_17479876010256548167621008372337: item[1].quantity missing
- 32ffb8dc-fbd0-4edf-94b2-7b784cc72ff2_17479876010256548167621008372337: item[2].quantity missing
- a5bd8b97-a2a8-49ae-900d-0673d2f96637_quittance_optique_: item[0].quantity missing
- e997eddb-05a4-49f9-a7fd-82b48c2694b3_IMG_OPHTALMOLOGIE_20250117_0001: item[0].quantity missing

## Plots

- is_bill
![](plots/is_bill.png)

- bill_paid
![](plots/bill_paid.png)

- is_handwriting
![](plots/is_handwriting.png)

- is_rotated
![](plots/is_rotated.png)

- professions_top20
![](plots/professions_top20.png)

- currency
![](plots/currency.png)

- invoice_year_month
![](plots/invoice_year_month.png)

- items_per_label
![](plots/items_per_label.png)

- hist_total_billed
![](plots/hist_total_billed.png)

- hist_amount_paid
![](plots/hist_amount_paid.png)

- hist_remaining_payment
![](plots/hist_remaining_payment.png)

- hist_client_part
![](plots/hist_client_part.png)

- hist_mandatory_coverage
![](plots/hist_mandatory_coverage.png)

- hist_complementary_coverage
![](plots/hist_complementary_coverage.png)
