Medical & Healthcare Functions
Generate healthcare-specific data including patient IDs, diagnoses, and clinical information
Medical & Healthcare Functions
Generate realistic healthcare and medical data for testing healthcare applications.
Patient Identification
generate_patient_mrn
Generate Medical Record Numbers with checksums.
Category: Person
Type: Generator
Data Types: string
| Parameter | Type | Default | Description |
|---|---|---|---|
prefix | string | MRN | Prefix for MRN |
length | integer | 8 | Length of numeric part |
include_checksum | boolean | true | Include checksum digit |
columns:
- name: mrn
function: generate_patient_mrn
parameters:
prefix: "PT"
length: 10
Output: MRN123456789
generate_npi_number
Generate National Provider Identifier numbers (10-digit format).
Category: Person
Type: Generator
Data Types: string
columns:
- name: npi
function: generate_npi_number
Output: 1234567893
generate_dea_number
Generate DEA registration numbers.
Category: Medical
Type: Generator
Data Types: string
| Parameter | Type | Default | Description |
|---|---|---|---|
registrant_type | string | B | Registrant type code |
columns:
- name: dea_number
function: generate_dea_number
Output: AB1234563
Clinical Data
generate_blood_type
Generate blood types (A+, B-, etc.).
Category: Person
Type: Generator
Data Types: string
columns:
- name: blood_type
function: generate_blood_type
Output: A+, O-, AB+
generate_allergy
Generate common allergies.
Category: Person
Type: Generator
Data Types: string
columns:
- name: known_allergies
function: generate_allergy
Output: Penicillin, Peanuts, Latex
generate_icd10_code
Generate ICD-10 diagnostic codes.
Category: Medical
Type: Generator
Data Types: string
columns:
- name: diagnosis_code
function: generate_icd10_code
Output: J45.20, E11.9, I10
generate_medication_name
Generate medication names.
Category: Medical
Type: Generator
Data Types: string
| Parameter | Type | Default | Description |
|---|---|---|---|
include_strength | boolean | true | Include dosage strength |
columns:
- name: medication
function: generate_medication_name
parameters:
include_strength: true
Output: Metformin 500mg, Lisinopril 10mg
generate_medical_specialty
Generate medical specialties.
Category: Person
Type: Generator
Data Types: string
columns:
- name: specialty
function: generate_medical_specialty
Output: Cardiology, Pediatrics, Orthopedic Surgery
Vital Signs
generate_body_temperature
Generate realistic body temperatures.
Category: Medical
Type: Generator
Data Types: string
| Parameter | Type | Default | Description |
|---|---|---|---|
unit | string | F | Temperature unit (F or C) |
fever_chance | float | 0.1 | Probability of fever |
columns:
- name: temperature
function: generate_body_temperature
parameters:
unit: F
fever_chance: 0.2
Output: 98.6°F, 101.2°F
generate_blood_pressure
Generate realistic blood pressure readings.
Category: Medical
Type: Generator
Data Types: string
| Parameter | Type | Default | Description |
|---|---|---|---|
hypertension_chance | float | 0.3 | Probability of high BP |
columns:
- name: blood_pressure
function: generate_blood_pressure
parameters:
hypertension_chance: 0.2
Output: 120/80, 145/92
Administrative
generate_prescription_number
Generate prescription reference numbers.
Category: Person
Type: Generator
Data Types: string
columns:
- name: rx_number
function: generate_prescription_number
Output: RX1234567
generate_hospital_name
Generate realistic hospital names.
Category: Business
Type: Generator
Data Types: string, text
columns:
- name: hospital
function: generate_hospital_name
Output: St. Mary's Hospital, City General Hospital
generate_insurance_plan
Generate insurance plan names.
Category: Finance
Type: Generator
Data Types: string
columns:
- name: insurance_plan
function: generate_insurance_plan
Output: Blue Cross Blue Shield Gold PPO
generate_vaccine_lot
Generate vaccine lot numbers.
Category: Medical
Type: Generator
Data Types: string
columns:
- name: vaccine_lot
function: generate_vaccine_lot
Output: AB12CD34
generate_medical_device_udi
Generate Unique Device Identifiers for medical devices.
Category: Medical
Type: Generator
Data Types: string
columns:
- name: device_udi
function: generate_medical_device_udi
Output: (01)12345678901234(11)240315(17)260315(10)ABC123(21)1234567890
Complete Patient Record
Example of a complete patient record:
tables:
- name: patients
columns:
- name: mrn
function: generate_patient_mrn
- name: first_name
function: generate_first_name
- name: last_name
function: generate_last_name
- name: date_of_birth
function: generate_birthdate
parameters:
minimum_age: 0
maximum_age: 100
- name: blood_type
function: generate_blood_type
- name: primary_allergy
function: generate_allergy
- name: insurance_plan
function: generate_insurance_plan
Related Functions
- Insurance Functions - Insurance-specific data
- Person Functions - General personal data