On Tue, 19 May 2020 at 12:14, Vijay Akula
<vijayakulaopensou...@gmail.com> wrote:
>
> Hi,
>
> I am working on an implementation for check digit validation for the
> Australian Medicare card algorithm[1] and want to contribute the same to
> the commons validator open-source project. Before submitting a PR, I wanted
> to reach out to the developers and gather their thoughts around having just
> a check digit validation piece of an algorithm implemented but not the
> check digit generation piece.
> I ask this because, in the case of the Australian Medicare algorithm, the
> generation of the check digit is done by only one entity(i.e the government
> when generating the medicare number). All the other users of this algorithm
> just use the validation logic to verify that the check digit appended to a
> string is correct. To represent that only the validation is supported but
> not the generation, I was thinking of overriding the generate method
> extended from ModulusCheckDigit abstract class and throw an
> UnsupportedOperationException.
>
> Please let me know any thoughts or suggestions around this.

Generation of the check digit is always done by the issuer.
Validator allows one to calculate check digits for all existing algorithms.

I see no reason to treat the Medicare algorithm differently from any
other algorithm.

> [1] https://www.clearwater.com.au/code/medicare
>
> Thanks
> Vijay

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to