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 condition_occurrence counts and records per person
#>  Summarising condition_occurrence: `in_observation`, `standard`, `domain_id`,
#>   `source`, and `type`.
#>  Summarising drug_exposure counts and records per person
#>  Summarising drug_exposure: `in_observation`, `standard`, `domain_id`,
#>   `source`, and `type`.

summarisedResult |>
  suppress(minCellCount = 5) |>
  tableClinicalRecords()
#> `min_cell_count` casted to character.
Variable name Variable level Estimate name
Database name
mockOmopSketch
condition_occurrence
Number subjects - N (%) 100 (100.00%)
Records per person - Mean (SD) 19.00 (4.94)
Number records - N 1,900
In observation Yes N (%) 1,900 (100.00%)
Standard concept Source N (%) 1,300 (68.42%)
Standard N (%) 600 (31.58%)
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 subjects - N (%) 100 (100.00%)
Records per person - Mean (SD) 56.00 (7.32)
Number records - N 5,600
In observation Yes N (%) 5,600 (100.00%)
Standard concept Classification N (%) 1,500 (26.79%)
Source N (%) 1,000 (17.86%)
Standard N (%) 3,100 (55.36%)
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) # }