PatientIdentifierType and objects through the API. A Patient is a Person and inherits all attributes/objects from that object. A PatientIdentifier is a medical record number. A patient can have any number of medical record numbers. Each number has a certain type: PatientIdentifierType. An example of a type would be a "hospital X id" or "Country X National ID"
Properties on a patient:
- patientId is a local database generated integer that is used internally (should not be used in external applications as it may change)
- 1 to n PatientIdentifiers (see below)
Inherited from Person:
- 1 to n PersonNames
- 0 to n PersonAddresses
- 0 to n PersonAttributes
- ...see others as described on Person API page
A Patient can be linked to a user via the Person. If User.getPerson() is the Person parent class, they are the same person. Note: A Patient can have multiple user accounts linked to it with this modeling.
The Patient class source code can be seen here.
Administrators define what types of identifiers they will collect. These range from National ID numbers, to driver's license numbers, to per-hospital medical record numbers.
Properties on PatientIdentifierType:
- format: a regular expression defining what the identifier text should contain.
- formatDescription: the text an admin can enter describing the regex format they just added
- required: a true/false whether every patient MUST have this type
- checkDigit: a true/false whether this identifier has a checkdigit at the end. See Check Digit Algorithm (this should ideally be done by the validators in 1.6+
- validator: full class name of the IdentifierValidators
- locationBehavior: REQUIRED=there must be patient_identifier.location_id defined by the user for this identifier or NOT_USED = patient_identifier.location_id is null
See LuhnIdentifierValidator class for the typical validator
A patient has any number of identifiers. The patient can be found using any of their identifiers. A number has to be unique across all PatientIdentifierTypes in the database.
Properties on PatientIdentifier:
- patient: the Patient object using this identifier
- identifier: the string for actual number. Must adhere to identifierType.format and validate according to identifierType.validator
- location: The location this was given to the patient. may or may not be required. see identifierType.locationBehavior
- preferred: if true, this is the identifier that should be displayed for the patient by default