Description Usage Arguments Details Value See Also Examples
View source: R/contractCodelist.R
contractCodelist
returns a codelist with ICD-10 codes grouped into category headings if possible. expandCodelist
expands a contracted codelist to include lower level ICD-10 codes.
1 2 |
codelist |
The ICD-10 codelist to expand or contract. It must be a codelist object. |
... |
Currently the only optional argument is |
ICD-10 codelists are in the expanded form when displayed in HTML, for comparing codelists and when the codelist is selected using the master dictionary. The codelist is contracted for export, to create a shorter codelist which is easier to understand and describe. This happens automatically; these functions do not usually need to be called by the user.
Object of type 'codelist' with an attribute Expanded
which is TRUE or FALSE. Codelists which have been expanded contain an extra character column 'hierarchy', which is 'parent' for and ICD-10 heading, 'child' for a child code and 'normal' for a code without a parent or child with the same category. The codelist can be 'contracted' by removing all the children, because they are all included in another code.
Functions which automatically expand ICD-10 codelists: as.codelist
, compare
, showhtml
Functions which automatically contract ICD-10 codelists: export
1 2 3 4 5 6 7 8 | setdictionary('icd10')
assigncat(1, 'MI|Myocardial infarction', codematch('I210'))
assigncat(2, 'MI NOS', explode(codematch('I210')))
assigncat(3, 'Recent MI', codematch('I2[23]'))
print(as.codelist())
print(contractCodelist(as.codelist()))
print(expandCodelist(as.codelist()))
print(expandCodelist(contractCodelist(as.codelist())))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.