Pharmacode

Pharmacode, also known as Pharmaceutical Binary Code, is a barcode standard, used in the pharmaceutical industry as a packing control system. It is designed to be readable despite printing errors. It can be printed in multiple colors as a check to ensure that the remainder of the packaging (which the pharmaceutical company must print to protect itself from legal liability) is correctly printed.

Pharmacode sample

For best practice (better security), the code should always contain at least three bars and should always be a combination of both thick and thin bars, (all thick bars or all thin bars do not represent a secure code).

Encoding

Pharmacode can represent only a single integer from 3 to 131070. Unlike other commonly used one-dimensional barcode schemes, pharmacode does not store the data in a form corresponding to the human-readable digits; the number is encoded in binary, rather than decimal. Pharmacode is read from right to left, also in left to right (if omnidirectional scanner): with as the bar position starting at 0 on the right, each narrow bar adds to the value and each wide bar adds . The minimum barcode is 2 bars and the maximum 16, so the smallest number that could be encoded is 3 (2 narrow bars) and the biggest is 131070 (16 wide bars). It represents colors which are on the label.

gollark: I would be fine with C if people actually used it for small amounts of low-level stuff you can audit very well.
gollark: Well, you could argue it's with people using C for odd things.
gollark: OpenSSL had Heartbleed for ages. They have competent programmers, and yet this issue - which a more memory safe language could not easily have - persisted for ages.
gollark: A good language should be safe *automatically*, and actually *warn* you about things.
gollark: ...
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.