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

Health card number validation for QC #8

Closed
marta- opened this issue Oct 16, 2020 · 0 comments
Closed

Health card number validation for QC #8

marta- opened this issue Oct 16, 2020 · 0 comments
Assignees

Comments

@marta-
Copy link
Contributor

marta- commented Oct 16, 2020

https://en.wikipedia.org/wiki/R%C3%A9gie_de_l%27assurance_maladie_du_Qu%C3%A9bec

The health insurance number has the format XXXX #### #### and is composed of:

  • The first 3 letters of the last name + the first letter of the first name
  • The 2 last digits of the year of birth
  • The month of birth (to which 50 is added to indicate female sex) - 2 digits
  • The day of birth - 2 digits
  • The administrative code for use by RAMQ -2 digits: 1 for differentiating people for whom the first 10 characters are identical, and 1 that is a checksum. The checksum validation algorithm is implemented here: https://github.com/petalmd/health_card/blob/master/lib/health_card/validators/canada/quebec_validator.rb .
marta- added a commit that referenced this issue Oct 16, 2020
Also updated the helper text with QC example
@marta- marta- self-assigned this Oct 16, 2020
@marta- marta- closed this as completed Oct 21, 2020
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