CancerRegistryOfNorway / NORDCAN

NORDCAN is a database of cancer statistics for the Nordic countries: Denmark, Finland, Iceland, Norway, Sweden, the Faroe Islands, and Greenland.
Other
7 stars 0 forks source link

Documentation close to code #6

Open WetRobot opened 4 years ago

WetRobot commented 4 years ago

Our code contains all the choices that have been made to e.g. create the various columns during enrichment. Instead of writing separate documentation for the functionality of our system, one may embed the explanation for each choice close to the code as comments, and those comments are processed by an external programme to create one larger document from the pieces scattered in the code.

Such comments-to-document comments could look something like this (in R)

# @codedoc_comment_block column_icd10
# Column icd10 is created by using the IARC CRG Tools "ICD-O-3 -> ICD-10" conversion tool.
# @codedoc_comment_block column_icd10

and the external programme to collate all the documents simply identifies lines with the @codedoc_comment_block keys.