convert: Convert codelists between ICD-10, Read and OPCS

Description Usage Arguments Details Value Note Examples

View source: R/convert.R

Description

Converts codelists or selection objects from one dictionary to another, using the NHS mapping or if the terms are identical in the two dictionaries.

Usage

1
convert(x, toDictionary = NULL, fromDictionary = NULL, ...)

Arguments

x

a codelist or selection object.

toDictionary

dictionary to convert to.

fromDictionary

dictionary to convert from, optional if it is obvious (e.g. if x is a codelist).

...

other arguments, e.g. mapStatus (see codematch).

Details

Diagnostic ICD-10 terms are only mapped to the diagnostic Read chapters, not to codes in other chapters which might give clues as to a diagnosis (e.g. MI on ECG). Some maps are missing if there is no corresponding ICD-10 term for a Read term (e.g. for STEMI) ICD-10 asterisk terms are permitted for ICD-10 to Read maps, but not the other way round, and dagger terms are not permitted for mapping.

Value

a codelist or selection converted into the new dictionary.

Note

ICD-10 terms cannot be converted to OPCS because they are different types of term: ICD-10 terms are for diagnoses and OPCS are procedures.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
mihes <- codelist(data.frame(icd_code='I21'))
mihes
migprd <- convert(mihes, 'read')
migprd

# Conversion to and from ICD-9
anginaicd10 <- codelist(data.frame(icd_code='I20'))
anginaicd9 <- convert(anginaicd10, 'icd9')
anginaicd9
convert(anginaicd9, 'read')
convert(anginaicd9, 'icd10')

CALIBERcodelists documentation built on Feb. 28, 2020, 3:01 a.m.