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.