practice_wise: practice_wise

Description Usage Arguments Value Examples

View source: R/practice_wise.R

Description

Import NHS dataset files and generate processed individual GP practice prescription dataset

Usage

1
practice_wise(presdata, gpvector, apimap, uom, dform, ing)

Arguments

presdata

combined prescription data data.frame generated using csv2dat() function

gpvector

character vector consisting GP practices

apimap

BNF code mapped data.frame generated using importdmd() function

uom

a data.frame generated using importdmd() function containing different unit of measurements and its corresponding codes

dform

a tibble generated using importdmd() function containing different medicinal form and its corresponding codes

ing

a tibble generated using importdmd() function containing different APIs and its corresponding codes

Value

multiple individual GP practice wise processed prescription dataset

Examples

 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
## Not run: 
 
## an example character vector containing different GP Practices
gp_practice <- c("L81069","L81070","L81071","L81072")

## Define the files output location
setwd("C:/Datasets/practice_wise/2018")

## data201812 - generated using the csv2dat() function

## modify objects generated using the impordmd() function 

## api mapping 
api_map <- dmdfile$api_map

## unit of measurement  
uom <- dmdfile$uomwdesc %>%
        dplyr::rename(UOM = CD)

## medicinal form 
dform <- dmdfile$dform

## ingredients
ing <- dmdfile$ing %>%
        dplyr::rename(API_CODE = 1)

## execute practice_wise function to generate multiple files
practice_wise(data201812, gp_practice, api_map, uom, dform, ing)


## End(Not run)

PrAnaViz/PrAna documentation built on Dec. 18, 2021, 7:48 a.m.