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
)
#>  Adding variables of interest to condition_occurrence.
#>  Summarising records per person in condition_occurrence.
#>  Summarising condition_occurrence: `in_observation`, `standard_concept`,
#>   `source_vocabulary`, `domain_id`, and `type_concept`.
#>  Adding variables of interest to drug_exposure.
#>  Summarising records per person in drug_exposure.
#>  Summarising drug_exposure: `in_observation`, `standard_concept`,
#>   `source_vocabulary`, `domain_id`, and `type_concept`.

summarisedResult |>
  suppress(minCellCount = 5) |>
  tableClinicalRecords()
Variable name Variable level Estimate name
Database name
mockOmopSketch
condition_occurrence
Number subjects - N (%) 100 (100.00%)
Number records - N 1,900
Records per person - Mean (SD) 19.00 (4.30)
In observation Yes N (%) 1,900 (100.00%)
Standard concept S N (%) 600 (31.58%)
- N (%) 1,300 (68.42%)
Source vocabulary No matching concept N (%) 1,900 (100.00%)
Type concept id Unknown type concept: 1 N (%) 1,900 (100.00%)
drug_exposure
Number subjects - N (%) 100 (100.00%)
Number records - N 5,600
Records per person - Mean (SD) 56.00 (6.94)
In observation Yes N (%) 5,600 (100.00%)
Standard concept C N (%) 1,500 (26.79%)
S N (%) 3,100 (55.36%)
- N (%) 1,000 (17.86%)
Source vocabulary No matching concept N (%) 5,600 (100.00%)
Type concept id Unknown type concept: 1 N (%) 5,600 (100.00%)
PatientProfiles::mockDisconnect(cdm) # }