Skip to content

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

ts
function allergen(): string;

Examples

ts
faker.medical.allergen() // 'Penicillin'

bloodType

Returns a random blood type.

Available since v11.0.0

Returns: string

ts
function bloodType(): string;

Examples

ts
faker.medical.bloodType() // 'O+'

condition

Returns a random, plausible medical condition name (without any diagnosis code).

Available since v11.0.0

Returns: string

ts
function condition(): string;

Examples

ts
faker.medical.condition() // 'Type 2 Diabetes'

department

Returns a random hospital department.

Available since v11.0.0

Returns: string

ts
function department(): string;

Examples

ts
faker.medical.department() // 'Emergency Department'

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

ts
function drugName(): string;

Examples

ts
faker.medical.drugName() // 'Zolpraxen'

procedure

Returns a random medical procedure.

Available since v11.0.0

Returns: string

ts
function procedure(): string;

Examples

ts
faker.medical.procedure() // 'Appendectomy'

specialty

Returns a random medical specialty.

Available since v11.0.0

Returns: string

ts
function specialty(): string;

Examples

ts
faker.medical.specialty() // 'Cardiology'

symptom

Returns a random symptom.

Available since v11.0.0

Returns: string

ts
function symptom(): string;

Examples

ts
faker.medical.symptom() // 'Shortness of Breath'

Released under the MIT License.