Enterprise Master Patient Identification

Currently there are at least 4 fields in the patient_data table that exist for the purpose of unique identification:

  • id is the primary key, an auto_increment integer. It's used very little if at all.
  • pid is the universally referenced internal identifier, also an integer.
  • pubpid is a character field whose value defaults to pid, but may be assigned by the clinic to something else. It's commonly used to match chart numbers from a prior system, paper or electronic, but can be used for other purposes.
  • ss is optional and uniqueness is not enforced. It's for a "national ID", or SSN in the U.S.

As Robert noted above, I suggested a cross-reference table to address the problem of coordinating with other systems or databases. In that way a patient can have an arbitrary number of alias identifiers regardless of whether they come from OpenEMR.

There will always be a need for a short locally unique identifier, if for no other reason than people like to write things down. Since we already have that with pid and it’s used virtually everywhere, might as well leave it alone.

My suggestions are:

  1. Get rid of id and substitute pid as the primary key.
  2. Implement a cross reference table. We might or might not go ahead and put pubpid and ss in there. Each entry would also indicate the source of the identifier, and the sources can some from a list in the list_options table.
  3. If a UUID is deemed useful, put it in the cross reference table as well.
1 Like