Patient ID too long for lab orders
# support
b
Hi Medplum team, we have encountered an issue that we want to seek your advice on. Our patient ID's are in UUID format, 32 hexadecimal digits with 4 hyphens. We had no problem with the ID's until we tried to place lab orders on LabCorp and Quest where the maximum number of characters allowed in their fields for patient ID is somewhere around 12-16 characters. I want to ask if there is a way we can control patient ID formatting/length through Medplum or if we should come up with a truncation tool to safely truncate the ID's without mapping two patients to the same ID. Thank you!
r
Thank you for reaching out about the patient ID formatting challenges with LabCorp and Quest lab orders. This is a common issue when integrating with legacy lab systems that have shorter field length restrictions. Regarding Medplum Patient ID Control: Currently, Medplum uses standard UUID format for patient IDs by default, which provides excellent uniqueness guarantees but, as you've discovered, can exceed the character limits of some external systems. While you cannot directly control the primary patient ID format in Medplum, there are a few approaches to consider: Recommended Solutions: 1. **Use Patient Identifiers with Custom Systems**: You can add custom identifier types to your Patient resources specifically for lab orders. This allows you to maintain separate, shorter identifiers for LabCorp and Quest while keeping your primary UUID intact. 2. **Create a Deterministic Mapping System**: Rather than simple truncation (which risks collisions), consider implementing a hash-based approach that generates shorter, unique identifiers from your UUIDs. This ensures consistency across lab orders while maintaining uniqueness.
b
Thank you so much for your response, Rahul. Very helpful.
147 Views