Fix for the patient unit code problem when linking