Users


Contents

Description

Stores basic information about users of the system

Attributes

Column Name Type Default Description
Primary Key user_id int Internal id of this user
Required system_id varchar(50) Unique auto-assigned system identifier for each user. The API enforces a check digit on this id — e.g., 2-8 — therefore, only characters valid for the check digit algorithm are allowed (alphanumeric characters). The system identifier is guaranteed to be unique, can be used for identifying users during data entry, and may be printed next to user's names on reports to avoid ambiguity between users with the same name -- e.g., "Dr. John Doe (2-8)"
username varchar(50) NULL The username with which this user logs in. This may be constructed by the user or by an administrator, depending on the particular system policy. OpenMRS only requires that usernames be at least three characters and must be unique among all existing usernames and system ids (minus check digit). Ideally, system policies should prevent the possibility of usernames and system ids (prior to the check digit) matching -- e.g., use numbers only for users.system_id and enforce that users.username must begin with a letter.
first_name varchar(50) NULL Given name of the user
middle_name varchar(50) NULL Middle name of the user
last_name varchar(50) NULL Family name of the user
password varchar(50) NULL Encrypted password used for authenticating user
salt varchar(50) NULL Encryption salt pseudo-randomly generated for each user and in combination with the user's chosen password to create the encrypted value stored in the password attribute
secret_question varchar(255) NULL Defines a question that only the user should be able to answer (in order to recover a lost password)
secret_answer varchar(255) NULL Answer to the secret_question
Required creator users.user_id int Creator of the concept
Required date_created datetime 0000-00-00 00:00:00 Date the concept class was created
changed_by users.user_id int NULL Person who last changed the concept
date_changed datetime NULL Date the concept was last changed
Required voided bit true if this user has been deleted
voided_by users.user_id int NULL Person who voided the user
date_voided datetime NULL Date the user was voided
void_reason varchar(255) NULL Reason the user record was deleted
Primary Key primary key, Required required