How does the scanner app verify the signature? Does it always have to be online, or does it have a set of trusted public keys included?
How are the codes generated to begin with? Is there some central database that hands them out, or can any clinic generate one (having access to a copy of the private key?)