puttergirl
Programmer
HELP me; I'm really stuck. I need to create license numbers for Xray machines based on the county and type of machine. The number will have 3 parts- a county code followed by a dash, then a 4 digit number within a range depending on machine type, and then a distinguishing letter at the end to prevent repeats within the type part.
Users will be prompted for data and then will be given the license number. So first they'll enter the county and the county code assigned to it will make up the first part of the license number. Example- FULTON is 001, DEKALB is 002, and COBB is 003.
Then they will select a machine type from these ranges:
0000-0999- Medical
1000-1999- Hospital
2000-2999- Dental .... etc
This will make up the second part of the license number.
So the first FULTON county MEDICAL record will be 001-0000 and the second 001-0001 and so forth.
BUT, since we have thousands of Xray machines, we need to be able to begin the sequence over again once we get to the end of the range. So, we want to add a letter to the end of the license number. The first 1000 FULTON county MEDICAL machines will have an A on the end... 001-0000A through 001-0999A. Then we'll begin renumbering but with a B on the end... 001-0000B through 001-0999B.
This seems like it would be easy with code, but I'm not sure how to begin writing it. We're stuck with this method due to a filing system that would take months to change!!
Users will be prompted for data and then will be given the license number. So first they'll enter the county and the county code assigned to it will make up the first part of the license number. Example- FULTON is 001, DEKALB is 002, and COBB is 003.
Then they will select a machine type from these ranges:
0000-0999- Medical
1000-1999- Hospital
2000-2999- Dental .... etc
This will make up the second part of the license number.
So the first FULTON county MEDICAL record will be 001-0000 and the second 001-0001 and so forth.
BUT, since we have thousands of Xray machines, we need to be able to begin the sequence over again once we get to the end of the range. So, we want to add a letter to the end of the license number. The first 1000 FULTON county MEDICAL machines will have an A on the end... 001-0000A through 001-0999A. Then we'll begin renumbering but with a B on the end... 001-0000B through 001-0999B.
This seems like it would be easy with code, but I'm not sure how to begin writing it. We're stuck with this method due to a filing system that would take months to change!!