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

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

if (FALSE) { ## an example character vector containing different GP Practices GP_practices <- 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_practices, api_map, uom, dform, ing) }