Skip to main content

faker-healthcare-provider

Generate realistic, medically accurate, and correlated healthcare/medical test data in 6 languages: English, Spanish, Portuguese, Chinese, French, and German.

This provider generates correlated clinical data based on the WHO ICD-10 and ICD-10-CM (CDC/NCHS) classifications, ensuring that symptoms, medications, specialties, and diagnostic codes match the generated disease.

Installation

pip install faker-healthcare-provider

Quick Start

from faker import Faker
from faker_healthcare import HealthcareProvider

# English (default)
fake = Faker()
fake.add_provider(HealthcareProvider)

# Generate a complete patient scenario
scenario = fake.patient_scenario()
print(scenario)
# {
#   'disease': 'Type 2 Diabetes',
#   'icd10': 'E11.9',
#   'symptoms': ['Fatigue', 'Blurred Vision', 'Frequent Urination'],
#   'medications': ['Metformin', 'Insulin Glargine'],
#   'specialty': 'Endocrinology'
# }

# Or generate individual data
fake.disease()            # 'Essential Hypertension'
fake.diagnosis()          # 'Type 2 Diabetes (E11.9)'
fake.medical_specialty()  # 'Cardiology'

# Use a different language (Spanish, Portuguese, Chinese, French, German)
fake_es = Faker('es_ES')
fake_es.add_provider(HealthcareProvider)
fake_es.disease()         # 'Diabetes Tipo 2'
fake_es.diagnosis()       # 'Diabetes Tipo 2 (E11.9)'

💡 Tip: Run python showcase.py to see all available features and examples!

Supported Locales

  • 🇺🇸 English (en_US) - Default
  • 🇪🇸 Spanish (es_ES)
  • 🇧🇷 Portuguese (pt_BR - Brazil)
  • 🇨🇳 Chinese (zh_CN - Simplified)
  • 🇫🇷 French (fr_FR)
  • 🇩🇪 German (de_DE)

Usage

Basic Usage (English)

from faker import Faker
from faker_healthcare import HealthcareProvider

fake = Faker()
fake.add_provider(HealthcareProvider)

fake.diagnosis()          # 'Type 2 Diabetes (E11.9)'
fake.disease()            # 'Essential Hypertension'
fake.icd10_code()         # 'I10'
fake.generic_drug()       # 'Metformin'
fake.medical_specialty()  # 'Cardiology'
fake.blood_type()         # 'O+'

Multi-Language Support

from faker import Faker
from faker_healthcare import HealthcareProvider

# Spanish
fake_es = Faker('es_ES')
fake_es.add_provider(HealthcareProvider)
fake_es.disease()  # 'Diabetes Tipo 2'

# Portuguese (Brazil)
fake_pt = Faker('pt_BR')
fake_pt.add_provider(HealthcareProvider)
fake_pt.disease()  # 'Diabetes Tipo 2'

# Chinese (Simplified)
fake_zh = Faker('zh_CN')
fake_zh.add_provider(HealthcareProvider)
fake_zh.disease()  # '2型糖尿病'

# French
fake_fr = Faker('fr_FR')
fake_fr.add_provider(HealthcareProvider)
fake_fr.disease()  # 'Diabète de Type 2'

# German
fake_de = Faker('de_DE')
fake_de.add_provider(HealthcareProvider)
fake_de.disease()  # 'Typ-2-Diabetes'

Available Methods

Method Example
diagnosis() Type 2 Diabetes (E11.9)
disease() Essential Hypertension, Asthma
icd10_code() E11.9, I10, J45.909
medical_specialty() Cardiology, Neurology
hospital_department() Emergency, ICU, Radiology
generic_drug() Metformin, Lisinopril
brand_drug() Zolpraxen, Vyracol, Trovamin (fictitious)
symptom() Fever, Headache, Fatigue
blood_type() A+, O-, AB+
allergy() Penicillin, Peanuts
medical_procedure() MRI Scan, Blood Test
insurance_plan() PPO, HMO, Medicare
vital_sign() Blood Pressure, Heart Rate

Locale-Specific Features

Each locale includes:

  • Translated medical terminology (diseases, symptoms, procedures)
  • Locale-specific insurance systems:
    • 🇺🇸 US: Medicare, Medicaid, PPO, HMO, TRICARE, ACA Marketplace
    • 🇪🇸 Spain: Seguridad Social, Seguro Privado (Cuadro Médico / Reembolso), Mutualidades (MUFACE/ISFAS/MUGEJU)
    • 🇧🇷 Brazil: Plano Individual, Familiar, Empresarial, com/sem Coparticipação
    • 🇨🇳 China: 商业保险, 雇主赞助保险, 牙科保险
    • 🇫🇷 France: Assurance Maladie, Mutuelle, Complémentaire santé
    • 🇩🇪 Germany: GKV (AOK, Barmer, TK, …), PKV, Zusatzversicherungen

Universal data (same across all languages):

  • ICD-10 codes (international standard)
  • Blood types (universal notation)

Disclaimer

All data generated by this provider is synthetic test data for development and testing only, and must not be used for medical diagnosis, treatment, or any clinical or healthcare decision. The combinations produced are random.

  • Diagnoses & ICD-10 codes are drawn from real classifications so records look realistic. Granular codes are ICD-10-CM (produced by CDC/NCHS and distributed free by the U.S. government); base codes are WHO ICD-10, © World Health Organization, used under CC BY-ND 3.0 IGO — reproduced verbatim, with attribution.
  • Generic drug names are real International Nonproprietary Names (INN), which WHO formally places in the public domain.
  • Brand drug names are entirely fictitious — generated from invented morphemes, deliberately avoiding INN stems. They are not real trademarks, and any resemblance to a real product is coincidental.

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

faker_healthcare_provider-2.3.0.tar.gz (96.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

faker_healthcare_provider-2.3.0-py3-none-any.whl (100.1 kB view details)

Uploaded Python 3

File details

Details for the file faker_healthcare_provider-2.3.0.tar.gz.

File metadata

File hashes

Hashes for faker_healthcare_provider-2.3.0.tar.gz
Algorithm Hash digest
SHA256 b735c7b929e9e632291c62175ec7a5a02e1cb4b2fa0f4aaf2e6ac8fe417c25f8
MD5 7fd6be72d5fa23faa0991ed0af7ede3c
BLAKE2b-256 16e70744c110674ea457ef4335560e1cc790730e67bb085076412aa62c40429b

See more details on using hashes here.

Provenance

The following attestation bundles were made for faker_healthcare_provider-2.3.0.tar.gz:

Publisher: release.yml on rodrigobnogueira/faker-healthcare-provider

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file faker_healthcare_provider-2.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for faker_healthcare_provider-2.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b0e7899f2139cbfa680656ce250416ca38d8b8a39f5070ebc5b9339891cf923b
MD5 4f824b28075713298886fb116ec214c7
BLAKE2b-256 05bc125649e7196c6db1d46dfc8b03b065bc1347393df13590c383cbc159f10a

See more details on using hashes here.

Provenance

The following attestation bundles were made for faker_healthcare_provider-2.3.0-py3-none-any.whl:

Publisher: release.yml on rodrigobnogueira/faker-healthcare-provider

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page