
Diagnostics of a codelist of measurement codes in the database
summariseMeasurementUse.Rd
Diagnostics of a codelist of measurement codes in the database
Arguments
- cdm
A reference to the cdm object.
- codes
A codelist of measurement/observation codes for which to perform diagnostics.
- byConcept
TRUE or FALSE. If TRUE code use will be summarised by concept.
- byYear
TRUE or FALSE. If TRUE code use will be summarised by year.
- bySex
TRUE or FALSE. If TRUE code use will be summarised by sex.
- ageGroup
If not NULL, a list of ageGroup vectors of length two.
- dateRange
Two dates. The first indicating the earliest measurement date and the second indicating the latest possible measurement date.
- checks
Diagnostics to run. Options are: "measurement_timing", "measurement_value_as_numeric", and "measurement_value_as_concept".
Examples
# \donttest{
library(MeasurementDiagnostics)
cdm <- mockMeasurementDiagnostics()
result <- summariseMeasurementUse(
cdm = cdm, codes = list("test_codelist" = c(3001467L, 45875977L))
)
#> → Getting measurement records based on 2 concepts.
#> → Subsetting records to the subjects and timing of interest.
#> → Getting time between records per person.
#> → Summarising results - value as number.
#> → Summarising results - value as concept.
#> → Binding all diagnostic results.
CDMConnector::cdmDisconnect(cdm = cdm)
# }