Given that we are well on the way towards interoperability with other EHR systems we need to consider how we interact with patient information coming (and going) from (and to) these systems.
Currently PID is essentially just an auto-incrementing number. This has many obvious pitfalls and we should likely begin to consider more globally unique IDs (Call it UUID, GUID, or "system-that-gives-you-a-relatively-safe-alphanumeric")
My suggestion is a standard V4 UUID
PID that allows patient data to travel freely around the ecosystem. @sunsetsystems has pointed out providers often write down this ID as a reference and a UUID obviously would not work. The solution is to break out the
pubpid to be more user friendly (while still being uinque). There's plenty of ways we can do this and we could even likely create an interface that allows the end user to create a solution to fit their specific needs.
@sunsetsystems also pointed out another concern. We need a way to handle external patient identifiers. There was a suggestion on a related PR to do something like this:
CREATE TABLE patient_alias (pid, external_system_id, external_patient_id),
PRIMARY KEY (pid, external_system_id, external_patient_id),
KEY (external_system_id, external_patient_id) );
I find this solution simple and elegant is initially seems to really solve a big interoperability issue but we definitely need to have a conversation about it.