Skip to contents

Generate a data frame of all values from `StmtFlag` and `StmtText` nodes within the `OriginalDiagnosis` and `Diagnosis` sections of an XML file.

Usage

muse_diagnoses(file)

Arguments

file

Path to the input XML file

Examples

file <- muse_example("muse/muse_ecg1.xml")
diagnoses <- muse_diagnoses(file)
dplyr::count(diagnoses, value, sort = TRUE)
#> # A tibble: 15 × 2
#>    value                                                        n
#>    <chr>                                                    <int>
#>  1 ENDSLINE                                                    11
#>  2 USERINSERT                                                   2
#>  3 When compared with ECG of                                    2
#>  4 , age undetermined                                           1
#>  5 10-MAY-2021 14:14,                                           1
#>  6 10-MAY-2021 18:34,                                           1
#>  7 Abnormal ECG                                                 1
#>  8 Confirmed by Doe, John (123456) on 05/10/2021 1:15:09 PM     1
#>  9 Lateral infarct                                              1
#> 10 Left axis deviation                                          1
#> 11 No significant change.                                       1
#> 12 Non-specific intra-ventricular conduction block              1
#> 13 Previous ECG has undetermined rhythm, needs review           1
#> 14 Ventricular-paced rhythm                                     1
#> 15 Wide QRS rhythm                                              1