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 600
Records per person - Mean (SD) 6.00 (2.12)
In observation Yes N (%) 600 (100.00%)
Standard concept S N (%) 600 (100.00%)
Source vocabulary No matching concept N (%) 600 (100.00%)
Type concept id Unknown type concept: 1 N (%) 600 (100.00%)
drug_exposure
Number subjects - N (%) 100 (100.00%)
Number records - N 3,100
Records per person - Mean (SD) 31.00 (5.62)
In observation Yes N (%) 3,100 (100.00%)
Standard concept S N (%) 3,100 (100.00%)
Source vocabulary No matching concept N (%) 3,100 (100.00%)
Type concept id Unknown type concept: 1 N (%) 3,100 (100.00%)
PatientProfiles::mockDisconnect(cdm) # }