In the original algorithm, old-unit HbA1c values were filtered out/deduplicated if a new-unit HbA1c value was present on the same date for the same individual.
This can perhaps be simplied to simply deduplicate all HbA1c values taken on the same date regardless of unit. This would align the algorithm more strictly with the recommended diagnostic practice (diabetes diagnosis required two elevated HbA1c values sampled on DIFFERENT dates).
In the original algorithm, old-unit HbA1c values were filtered out/deduplicated if a new-unit HbA1c value was present on the same date for the same individual.
This can perhaps be simplied to simply deduplicate all HbA1c values taken on the same date regardless of unit. This would align the algorithm more strictly with the recommended diagnostic practice (diabetes diagnosis required two elevated HbA1c values sampled on DIFFERENT dates).
Also mentioned in comment in #101