-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
85 lines (59 loc) · 3 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# opencodes
<!-- badges: start -->
[](https://github.com/ebmdatalab/codeusage/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->
The goal of `opencodes` is to make yearly summaries of **SNOMED Code Usage in Primary Care** and **ICD-10 and OPCS-4 Code Usage in Secondary Care** in England, published by NHS Digital, available in R for research.
The interactive [OpenCodes Shiny App](https://bennettoxford.github.io/opencodes/articles/app.html) provides different options to explore these datasets.
The original data is available from NHS Digital at:
- [SNOMED Code Usage in Primary Care](https://digital.nhs.uk/data-and-information/publications/statistical/mi-snomed-code-usage-in-primary-care)
- [ICD-10 and OPCS-4 Code Usage in Secondary Care](https://digital.nhs.uk/data-and-information/publications/statistical/hospital-admitted-patient-care-activity)
## Installation
You can install the development version of `opencodes` like so:
``` r
remotes::install_github("bennettoxford/opencodes")
```
## Main functions of the `opencodes` R package
- **Datasets:**
- `snomedct_usage`: SNOMED CT code usage dataset
- `icd10_usage`: ICD-10 code usage dataset
- `opcs4_usage`: OPCS-4 code usage dataset
- **Functions:**
- `get_codelist()`: Imports a codelists from [www.opencodelists.org](https://www.opencodelists.org/)
- `run_app()`: Launches interactive OpenCodes Shiny App locally
## Example
```{r load-pkg}
# Load opencodes package
library(opencodes)
```
### Dataset: SNOMED Code Usage in Primary Care in England
This is only a selection of the full dataset published by NHS Digital, for the data pre-processing see `/data-raw/snomed_code_usage.R`.
```{r snomed-usage}
# Return SNOMED code usage data
snomed_usage
```
### Dataset: ICD-10 Code Usage in Secondary Care in England
This is the total annual count of the Finished Consultant Episodes (FCE) listing each 4-character ICD-10 code either in primary or secondary diagnosis position in the Hospital Episode Statistics in England.
This is only a selection of the full dataset published by NHS Digital, for the data pre-processing see `/data-raw/icd10_usage.R`.
```{r icd10-usage}
# Return ICD-10 code usage data
icd10_usage
```
### Dataset: OPCS-4 Code Usage in Secondary Care in England
This is the total annual count of each instance that each 4-character OPCS-4 code is listed across all primary and secondary procedure positions in the Finished Consultant Episodes (FCE) of the Hospital Episode Statistics in England.
This is only a selection of the full dataset published by NHS Digital, for the data pre-processing see `/data-raw/opcs4_usage.R`.
```{r opcs-4-usage}
# Return OPCS-4 code usage data
opcs4_usage
```