Validating ID and MRN entry

Would it be possible to validate ID and MRN entry( just to protect double
entry)?

Thanks,