Logo GenPRES

Patient Module

Creates a patient from an identity and patient data, sets the ages at a date and writes the patient data as text without the identity.

Nested modules

Modules Description

BSA

Calculates the body surface area of a patient from the calculation weight and height with the Mosteller or the Du Bois formula. Returns None when the calculation weight or the calculation height is missing.

Dto

Holds the Dto of a patient, with the identity fields and the patient data, and converts a patient to and from the Dto. Returns the validation errors of an invalid Dto.

Validation

Holds the validator that checks that the id, the name and the birth date of a patient are all given or all absent.

Functions and values

Function or value Description

atDate dt pat

Full Usage: atDate dt pat

Parameters:
Returns: Patient

Sets the ages of a patient at a date. An identified patient gets the age from the birth date; an anonymous patient keeps the entered age. Then the values that follow from the age and the body surface area are set.

dt : DateTime
pat : Patient
Returns: Patient

create idn dat

Full Usage: create idn dat

Parameters:
Returns: Patient

Creates a patient from an identity, None for an anonymous patient, and the patient data.

idn : PatientIdentity option
dat : PatientData
Returns: Patient

createAt dt idn dat

Full Usage: createAt dt idn dat

Parameters:
Returns: Patient

Creates a patient from an identity and patient data, with the ages set at a date.

dt : DateTime
idn : PatientIdentity option
dat : PatientData
Returns: Patient

fromAgeType gend at

Full Usage: fromAgeType gend at

Parameters:
Returns: Patient

Creates an anonymous patient at the start of an age type; see PatientData.fromAgeType.

gend : Gender
at : AgeType
Returns: Patient

toString dt pat

Full Usage: toString dt pat

Parameters:
Returns: string list

Returns the patient data as strings, with the ages set at a date. The identity is never printed.

dt : DateTime
pat : Patient
Returns: string list

unknown

Full Usage: unknown

Returns: Patient

The anonymous patient with nothing known.

Returns: Patient

Type something to start searching.