It certainly seems that someone was on the right track, but I don’t think that I can see how to get it working in the labels in the ref app without resorting to a long learning curve. Can you?
I also note that the descriptive text for the global variable emr.primaryIdentifierType refers to it being used in barcode production sugesting that there is or was functionality for this.