Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

British Columbia license issues #3

Open
deweydb opened this issue Sep 16, 2020 · 0 comments
Open

British Columbia license issues #3

deweydb opened this issue Sep 16, 2020 · 0 comments

Comments

@deweydb
Copy link

deweydb commented Sep 16, 2020

British Columbia uses a very slightly different version of the AAMVA barcode format. Instead of the constant % they use a 2 character constant _%
Described in their documentation here: https://www2.gov.bc.ca/assets/gov/health/practitioner-pro/medical-services-plan/teleplan-v4-4.pdf (in case this link dies, i am also attaching the PDF here.
teleplan-v4-4.pdf

At the bottom of the rear of the card, all of the cards are personalized with an unencrypted 2D barcode in the PDF417 encoding format. The data format and data fields for all of the cards, including the BC Services cards, match the Driver’s Licence AAMVA specification magnetic stripe format defined in the “CARD SPECIFICATIONS – COMBINED CARD” section, except for Track 3, Field #1 which includes an underscore in the barcode, for example, Constant “_%”..

This shifts the characters over by 1 character for the fields:
height, weight, hair & eyes.

My suggested fix is:

		if state == "BC":
			offset = 1
		else:
			offset = 0
		
		height = track3[31+offset:34+offset].strip()
		weight = track3[34+offset:37+offset].strip() #lbs for US, kg for CA/MX
		hair = track3[37+offset:40+offset]
		eyes = track3[40+offset:43+offset]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant