Skip to contents

Create a gt table from a summarised omop_table.

Usage

tableClinicalRecords(result)

Arguments

result

Output from summariseClinicalRecords().

Value

A gt object with the summarised data.

Examples

# \donttest{
library(dplyr)
library(OmopSketch)

# Connect to a mock database
cdm <- mockOmopSketch()

# Run summarise clinical tables
summarisedResult <- summariseClinicalRecords(cdm = cdm,
                                            omopTableName = "condition_occurrence",
                                            recordsPerPerson = c("mean", "sd"),
                                            inObservation = TRUE,
                                            standardConcept = TRUE,
                                            sourceVocabulary = TRUE,
                                            domainId = TRUE,
                                            typeConcept = TRUE)
#>  Summarising table counts
#>  The following estimates will be computed:
#> → Start summary of data, at 2024-09-18 22:29:39.592732
#>  Summary finished, at 2024-09-18 22:29:39.719835
#>  Summarising records per person
#>  The following estimates will be computed:
#>  records_per_person: mean, sd
#> → Start summary of data, at 2024-09-18 22:29:40.459638
#>  Summary finished, at 2024-09-18 22:29:40.646498
#>  Summarising in_observation, standard, domain_id, source, and type information
tableClinicalRecords(summarisedResult)
#> ! Results have not been suppressed.
Variable name Variable level Estimate name Database name
mockOmopSketch
condition_occurrence
number records - N 1,900
number subjects - N% 100 (100.00)
records_per_person - Mean (SD) 19.00 (4.21)
In observation Yes N% 1,900 (100.00)
Standard concept Source N% 1,900 (100.00)
Source vocabulary No matching concept N% 1,900 (100.00)
Domain Condition N% 1,900 (100.00)
Type concept id 1 N% 1,900 (100.00)
PatientProfiles::mockDisconnect(cdm) # }