Skip to end of metadata
Go to start of metadata

The check digit algorithm used by AMRS is a derivative of the Luhn Algorithm.  It is critically important that this algorithm is implemented properly wherever identifier check digits are being created or validated.  If an attempt to implement the check digit algorithm is added to a program or application and a subtle mistake is made, then patients can be given invalid identifiers and tremendous burden and cost must be expended to correct the problem.

Therefore, we have created a set of scripts that should always travel together.  Please do not pick and choose from among the scripts.  If your code is going to validate or generate check digits, then you should import all of the attached scripts and you should run the validation macro to ensure that the scripts are working properly before using them in a production environment.

AMRS Check Digit Routines 1.0 

 (warning) Implementing a check digit algorithm in any application that will be used within AMPATH must use this code.  We implemented a system in Mosoriot that had a small error in its check digit computation and thousands of patients were given invalid identifiers.  The cost and effort required to fix this problem was tremendous.  To avoid repeating that painful history, it is critical that any code that generates or validates patient identifiers with check digits undergoes extreme scrutiny and testing to ensure that the algorithm is absolutely correct.  Please contact Burke Mamlin when contemplating any code that will create or validate check digits and he will be happy to guide you through the process of implementing check digit code properly.

  • No labels