Skip to contents

Create a visual table from a summariseClinicalRecord() output.

Usage

tableClinicalRecords(result, type = "gt")

Arguments

result

Output from summariseClinicalRecords().

type

Type of formatting output table, either "gt" or "flextable".

Value

A gt or flextable object with the summarised data.

Examples

# \donttest{
cdm <- mockOmopSketch()

summarisedResult <- summariseClinicalRecords(
  cdm = cdm,
  omopTableName = c("condition_occurrence", "drug_exposure"),
  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-26 11:49:24.588711
#>  Summary finished, at 2024-09-26 11:49:24.716322
#>  Summarising records per person
#>  The following estimates will be computed:
#>  records_per_person: mean, sd
#> → Start summary of data, at 2024-09-26 11:49:25.464836
#>  Summary finished, at 2024-09-26 11:49:25.654862
#>  Summarising in_observation, standard, domain_id, source, and type information
#>  Summarising table counts
#>  The following estimates will be computed:
#> → Start summary of data, at 2024-09-26 11:49:29.178223
#>  Summary finished, at 2024-09-26 11:49:29.312913
#>  Summarising records per person
#>  The following estimates will be computed:
#>  records_per_person: mean, sd
#> → Start summary of data, at 2024-09-26 11:49:30.051484
#>  Summary finished, at 2024-09-26 11:49:30.240484
#>  Summarising in_observation, standard, domain_id, source, and type information

summarisedResult |>
  suppress(minCellCount = 5) |>
  tableClinicalRecords()
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.71)
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%)
drug_exposure
Number records - N 5,600
Number subjects - N (%) 100 (100.00%)
Records per person - Mean (SD) 56.00 (6.20)
In observation Yes N (%) 5,600 (100.00%)
Standard concept Source N (%) 5,600 (100.00%)
Source vocabulary No matching concept N (%) 5,600 (100.00%)
Domain Drug N (%) 5,600 (100.00%)
Type concept id 1 N (%) 5,600 (100.00%)
PatientProfiles::mockDisconnect(cdm) # }