I am hoping someone out there has done this and will be able to help me out.
In excel there is a ceiling function and I did find a ceil in tcl but unable to make it work.
Below are the steps:
CHECK DIGIT FORMULA FOR PATIENT ACCOUNT NUMBER
The patient account number is 8 digits long. The formula uses the first 7 digits to validate the 8 position.
The following patient account number will be used as an example: 61562419
1. Take the first 7 positions of the patient account number: 6156241
2. Replace digits in positions 2, 4 and 6 with zeros: 6050201
3. Multiply result from step2 by 2: 6050201 * 2 = 12100402
4. Add the digits from the results of step 3 together: 1+2+1+0+0+4+0+2 = 10
5. Add positions 2, 4 and 6 from step 1 together: 1 + 6 + 4 = 11
6. Add results from steps 4 and 5 together: 10 + 11 = 21
7. Round the result from step 6 to the next highest multiple of 10:
30