Skip to contents

A small synthetic dispensed-prescription table shaped like the Swedish prescribed drug register (LMED) extract that [add_lmed_v20250909()] consumes. It carries no real person data.

Usage

fake_lmed_2026

Format

A [data.table::data.table] with 128 rows and 4 columns:

lopnr

integer. Person identifier, matched against the skeleton's `id` column. 18 distinct persons, numbered 1 to 18.

produkt

character. Dispensed product name, as printed in the register, e.g. `"Divigel"`, `"Vagifem"`, `"Nexplanon"`.

edatum

`Date`. Date the prescription was dispensed.

fddd

numeric. Dispensed duration in days. One row is deliberately negative, so that [add_lmed_v20250909()] drops it with a warning.

Source

Synthetic. Generated by `dev/generate_fake_lmed.R` with `set.seed(42)`. Together with [fake_skeleton_mht] it deliberately spans 312 ISO weeks (2015-W02 to 2020-W52, six ISO years), so that the 156-week minimum-duration rule is reachable: one person's treatment episode runs longer than 156 weeks and another's runs shorter. The fixture also contains prescription gaps both at or below four weeks (bridged) and above four weeks (not bridged), one person with clashing concurrent prescriptions, at least one product per reachable product category, and one product name absent from the category ladder.

See also

[fake_lmed_2023], [fake_skeleton_mht]