import_icd: Import the International Classification of Diseases from an...

View source: R/metadata.R

import_icdR Documentation

Import the International Classification of Diseases from an archive

Description

The World Health Organisation's (WHO) International Statistical Classification of Diseases and Related Health Problems Tenth Revision is available under restrictive licence terms.

The UK edition of ICD-10 is available from the NHS TRUD website https://isd.digital.nhs.uk/trud3/user/guest/group/0/pack/28 at no cost to UK users subject to a licence agreement.

The US edition of ICD-10-CM is available from https://www.cdc.gov/nchs/icd/icd10cm.htm

Usage

import_icd(archive, version)

Arguments

archive

path to the ZIP archive containing an ICD-10 release (5th Edition is recommended)

version

a character string labelling the edition (e.g. "GB 5th Edition")

Value

A data frame ready for importing into the database with the following variables:

icd_code

character vector of ICD-10 codes without punctuation. May include "X" placeholder characters depending on the edition.

icd_display

character vector of ICD-10 codes with a dot after the first character, for display in user interfaces.

icd_description

charactor vector of ICD-10 code descriptions

category_code

character vector of three-character ICD-10 codes

category_description

charactor vector three-character ICD-10 code descriptions

edition

edition label provided in parameter version

...

any other variables present in the archive source

Examples

## Not run: 
import_icd("icd_df_10.5.0_20151102000001.zip", "GB 5th Edition")

## End(Not run)

ramses-antibiotics/ramses-package documentation built on Feb. 13, 2024, 1:01 p.m.