Description Usage Arguments Details Value Author(s) References See Also Examples
Selects ICD10, OPCS or Read codes matching a particular pattern together with mapped terms in other dictionaries.
Returns a selection object. This can be combined with the output from functions such as termhas
to generate a complex query for selecting terms of interest.
1 2 | codematch(regexpr, dictionary = ifelse(length(getdictionary()) == 1,
getdictionary(), ""), mapStatus = NULL, exact = FALSE)
|
regexpr |
Read, ICD-9, ICD-10 or OPCS code(s) to match.
This can be a regular expression if EXACT = FALSE, otherwise it should be the exact code.
If |
dictionary |
One of 'icd10', 'icd9', 'opcs' or 'read'. If not given, and if only one dictionary is in use, this dictionary is taken as the set of codes to match. |
mapStatus |
This applies to maps to/from Read only. Character vector stating which terms are acceptable to include according to the match characteristics. |
exact |
Whether the |
The maps to/from Read are provided in the NHS Read Clinical Terms Version 3, and are in the CALIBER_DICTMAPS
table. The mapping between ICD-9 and ICD-10 is provided by the U.S. national Center for health Statistics and is in the CALIBER_GEM
table.
A selection
object.
Anoop Shah
UK Terminology Centre, National Center for Health Statistics (NCHS/CDC)
medcodeis
, assigncat
, dictis
, explode
, decode
, getdictionary
, setdictionary
, termhas
To convert codelists from one dictionary to another: convert
1 2 3 4 5 6 7 8 9 10 11 | # Selecting Read terms linked to ICD-10 terms for myocardial infarction
setdictionary('read')
print(codematch('I2[123]', 'icd10'))
# Look for `exact' matches and identical terms only.
print(codematch('I2[123]', 'icd10', mapStatus=c('E', 'T')))
# Selecting ICD-9 terms and linked ICD-10 terms
setdictionary('icd9', 'icd10')
print(codematch('^41', 'icd9'))
print(codematch('I20', 'icd10'))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.