Closed thomas-rasmussen closed 2 years ago
This is actually a real problem when using standard DNPR diagnosis data, since the registry uses an augmented version of the ICD-10 codes with possible letter suffixes on the codes, which can't be handled correctly by the current regular expressions. This can easily be fixed by dropping removing the "$" part of the regular expressions?
There should also be some option to toggle on that basically says "ignore erroneous codes", so that data does not have to be pre-cleaned because of a few errors in the data?
https://github.com/thomas-rasmussen/sas_macros/blob/33000784a6990ba8f1756efc66d9926f12dc06ac/calculate_cci.sas#L695-L708
The regular expression works fine for the standard CCI definitions, but if a definition uses ICD-8 codes with letters, eg Yxxx codes, or ICD-10 (Danish extension of ICD-10) codes the regular expressions will fail. The regular expressions should be modified so that this edge case would not cause problems