1) Either finalize the input checks and tests of the implementation of the codes_ds paramter, or rethink the approach to overwirting the default codes used in the macro.
2) Taking a more strict approach and checking that the date variables have a recognized date-format (as in the risk_time macro), might be better to ensure that macro works as intended. Using unformatted integer variables together with the intnx function used in the macro will produce confusing results?
3) It is very easy to accidentally specify SKS codes instead of ICD-10 codes when using the codes_ds parameter. Can this be avoided by using a \w\w kind of regular expression? Two consecutive letters in an ICD-10 codes is not possible so this would have to mean that a SKS code has been specified?
4) Read up on the litterature. Is the current implementation actually some modified version of the original CCI score? (I think it is)
5) Add more documentation and references
6) "lookback_period" is not the greatest name in the world, since it is not a period, but rather the amount of lookback [units] we use to define the start of the lookback period, where the index_date defines the end of the lookback period. Consider renaming this to something more appropriate.
1) Either finalize the input checks and tests of the implementation of the codes_ds paramter, or rethink the approach to overwirting the default codes used in the macro. 2) Taking a more strict approach and checking that the date variables have a recognized date-format (as in the risk_time macro), might be better to ensure that macro works as intended. Using unformatted integer variables together with the intnx function used in the macro will produce confusing results? 3) It is very easy to accidentally specify SKS codes instead of ICD-10 codes when using the codes_ds parameter. Can this be avoided by using a \w\w kind of regular expression? Two consecutive letters in an ICD-10 codes is not possible so this would have to mean that a SKS code has been specified? 4) Read up on the litterature. Is the current implementation actually some modified version of the original CCI score? (I think it is) 5) Add more documentation and references 6) "lookback_period" is not the greatest name in the world, since it is not a period, but rather the amount of lookback [units] we use to define the start of the lookback period, where the index_date defines the end of the lookback period. Consider renaming this to something more appropriate.