Medical
Module to generate plausible medical and healthcare related entries.
Overview
Generate plausible, non-clinical healthcare data for tests, demos and fixtures. The usual building blocks of a patient record are condition(), symptom() and procedure(); the module also covers specialties, departments, blood types, allergens and drug names.
All values are intentionally generic or invented, and real diagnosis codes (e.g. ICD-10) and correlated patient records are deliberately out of scope — this data must never be used for clinical purposes.
The names returned by drugName() are invented and were screened so that they do not name a real product. That guarantee is specific to drugName(): an allergen is defined by the substance a person reacts to, so allergen() names real ones, medicines such as Penicillin among them.
allergen
Returns a random allergen.
These are real substances, unlike the invented values of drugName(): an allergy field records what a person reacts to, so real names are what belongs in it. Medicines such as Penicillin are included for that reason, as are contact allergens such as Nickel.
Membership follows what an allergy field in a real record carries rather than a strict immunological rule, so reactions that are pharmacological rather than immune — Aspirin, Codeine, Sulfites — sit alongside true IgE and contact allergies. What a record would file as an intolerance is left out: lactose, fructose and MSG, and gluten, whose IgE counterpart is listed here as Wheat.
Available since v11.0.0
Returns: string
function allergen(): string;
Examples
faker.medical.allergen() // 'Penicillin'
Source
bloodType
Returns a random blood type.
Available since v11.0.0
Returns: string
function bloodType(): string;
Examples
faker.medical.bloodType() // 'O+'
Source
condition
Returns a random, plausible medical condition name (without any diagnosis code).
Available since v11.0.0
Returns: string
function condition(): string;
Examples
faker.medical.condition() // 'Type 2 Diabetes'
Source
department
Returns a random hospital department.
Available since v11.0.0
Returns: string
function department(): string;
Examples
faker.medical.department() // 'Emergency Department'
Source
drugName
Returns a fictitious, brand-style drug name.
All values are invented: they were generated from neutral morphemes, then screened by hand against real medicinal products — human brands, including ones marketed only outside the US and EU, veterinary products, and WHO INN generic names and class stems (e.g. -statin, -pril).
That screen is a manual step rather than something the test suite re-runs. The tests lock in the collisions it has already caught and reject any name that ends in an INN stem, so a name added later has to be screened by hand.
Available since v11.0.0
Returns: string
function drugName(): string;
Examples
faker.medical.drugName() // 'Zolpraxen'
Source
procedure
Returns a random medical procedure.
Available since v11.0.0
Returns: string
function procedure(): string;
Examples
faker.medical.procedure() // 'Appendectomy'
Source
specialty
Returns a random medical specialty.
Available since v11.0.0
Returns: string
function specialty(): string;
Examples
faker.medical.specialty() // 'Cardiology'
Source
symptom
Returns a random symptom.
Available since v11.0.0
Returns: string
function symptom(): string;
Examples
faker.medical.symptom() // 'Shortness of Breath'