The scenario that needs to be avoided at all costs is accidentally assigning the same identifier to two or more patients, which can lead to confusion and patient harm.
This is why any pool of patient identifiers must always be generated & distributed from a single authority to ensure they can’t possibly be used twice.
Version 4 UUIDs use a gigantic space of randomness to allow id generation without a central authority; however, UUIDs aren’t viable for medical record numbers (MRNs) that need to be read & transcribed by humans.
For offline MRN assignment, you have to distribute sets of identifiers to each device with the contract that each device must ensure any identifier in the pool can only be used once and favors discarding identifiers unused if there is any doubt.
If you don’t want to “waste” identifiers (e.g., discarding large sets of identifiers), then you can use temporary identifiers: either do the same thing, but use a pool of temporary identifiers that you don’t care about wasting OR create device-specific identifiers that can never be repeated. The temporary identifier can be used until the device is online or the patient can be properly registered with a permanent MRN.
FWIW, I wouldn’t consider a patient officially registered until their offline or remote registration is received by the central master patient index (i.e., consider any registration incomplete until it has been received by the central authority).