Can i use formula for patient number like this?

## ## ## ## ,

All ## stand for number 1 - 99,
If some ## reach 100, will be back to 01, and another ## will be +1,

So if, 99 52 51 50
Next patient is 01 53 51 50,

If this reach 99 99 99 01
Next patient will be 01 01 01 02

How to achieve this?

Thanks for response

For ideas and pointers you may want to investigate naming_series