simPrescriptionData: Prescription data simulation function

Description Usage Arguments Details Author(s) Examples

Description

Simulate prescription data

Usage

1
2
3
4
simPrescriptionData(n, max.prescriptions = 37,
  packages = list(list(c(200, 30), c(400, 100), c(400, 300), c(500, 60)),
  list(c(750, 100), c(750, 250), c(75, 500))), max.packages = 3,
  startDate = "1995-01-01")

Arguments

n

Number of patients

max.prescriptions

Maximal number of prescription dates per patient

packages

Named list of association lists. The names of the list are ATC codes, the value associates strengths of one unit and package sizes.

max.packages

Integer. Upper bound for number of packages purchased on a single date

startDate

start date

Details

Simulate prescription data alike the Danish medical registry

http://medinfo.dk/sks/brows.php http://www.medicinpriser.dk/ http://pro.medicin.dk/ https://www.whocc.no/atc_ddd_index/

A07: strength 200, number of pills 30 strength 400, number of pills 100 etc

A12: strength 750, number of pills 100 strength 750, number of pills 250 etc

# The association list which is used as the default value # for the package argument:

list("A07"=list(c(200,30),c(400,100),c(400,300),c(500,60)), "A12B"=list(c(750,100),c(750,250),c(75,500)))

Author(s)

Helene Charlotte Rytgaard [email protected], Thomas Alexander Gerds [email protected]

Examples

1
2
3
4
5
6
7
8
9
## see https://www.dst.dk/da/TilSalg/Forskningsservice/Data/Andre_Styrelser
## for details of the contents of lmdb

## a single subject
set.seed(1)
simPrescriptionData(1)
## 7 subjects
set.seed(29)
simPrescriptionData(7)

tagteam/heaven documentation built on June 21, 2019, 6:37 p.m.