Application of Software Testing to R package development
For the PCCC R package there are a large set of ICD codes that and code set patterns that are used to determine if an input record meets a complex chronic condition criteria. To validate the correct functioning of the software, the first priority was to validate the ICD code groupings were correct and were mutually exclusive (as appropriate). As PCCC is a re-implementation of SAS and Stata code, we needed to validate that the codes from the previously developed and published software applications were identical and were performing as expected. Through a combination of manual review and automated comparison codes were checked to see if duplicates and overlaps existed. Here is a brief snippet of some of the code used to automatically find duplicates and codes that were already included as part of another code: