Skip to contents

This function creates the text and summary table for the report.

Usage

asr_safety_summary(data, period_data, trial_type, n_pat_e, n_per_arm)

Arguments

data

SAE data

period_data

SAE data restricted to a specific period

trial_type

trial type (imp, medical device or other)

n_pat_e

Number of enrolled participants

n_per_arm

Number of participants enrolled per arm

Value

txt

The sentences required for the report

tab

The summary table required for the report

tab_map

Mapping between the variable name in tab and a nicer label

Examples

data(asr_sae)
# IMP
prepped <- asr_dataprep(asr_sae,
                        period_from = as.Date("2020-10-10"),
                        period_to = as.Date("2021-10-10")
                        )
asr_safety_summary(data = prepped$data, period_data = prepped$period_data,
                   "imp", 60, n_per_arm = list(grp1 = 150, grp2 = 150))
#> $txt
#> [1] "During the reporting period, 20 of 60 participants (33.3 %) reported a total of 20 serious adverse events (SAEs)."                                           
#> [2] "5 of 20 SAEs (25.0 %) were classified 'related' to the IMP."                                                                                                 
#> [3] "Most frequent related SAEs (i.e., SADR.) documented were poor sleep (2), spontaneous unconsciousness (2), headache (1)."                                     
#> [4] "6 Suspected Unexpected Serious Adverse Reactions (SUSARs) occurred during the reporting period, which have been notified to the Swiss competent authorities."
#> 
#> $txt_all
#> [1] "Since the beginning of the study, 20 of 60 participants (33.3 %) reported a total of 20 serious adverse events (SAEs)."                                      
#> [2] "5 of 20 SAEs (25.0 %) were classified 'related' to the IMP."                                                                                                 
#> [3] "Most frequent related SAEs (i.e., SADR.) documented were poor sleep (2), spontaneous unconsciousness (2), headache (1)."                                     
#> [4] "6 Suspected Unexpected Serious Adverse Reactions (SUSARs) occurred during the reporting period, which have been notified to the Swiss competent authorities."
#> 
#> $tab
#> # A tibble: 2 × 5
#>   desc                                                   fatal sae   sadr  susar
#>   <chr>                                                  <chr> <chr> <chr> <chr>
#> 1 Number of cases (during reporting period)              N = … N = … N = … N = …
#> 2 Number of cases (cumulative) since the start of the c… N = … N = … N = … N = …
#> 
#> $tab_map
#>   col_key
#> 1    desc
#> 2   fatal
#> 3     sae
#> 4    sadr
#> 5   susar
#>                                                                     name
#> 1                                                                    IMP
#> 2                       Serious Adverse Events, SAEs, with fatal outcome
#> 3                           Other Serious Adverse Events, non-fatal SAEs
#> 4                  Serious Adverse Drug Reactions, SADRs (only for IMPs)
#> 5 Suspected Unexpected Serious Adverse Reactions, SUSARs (only for IMPs)
#> 

# medical devices
prepped <- asr_dataprep(asr_sae, period_from = as.Date("2020-10-10"),
                        period_to = as.Date("2021-10-10"), trial_type = "m")
asr_safety_summary(data = prepped$data,
                           period_data = prepped$period_data, "m", 60,
                            n_per_arm = list(grp1 = NA, grp2 = NA))
#> $txt
#>  [1] "During the reporting period, a total of 20 serious adverse events (SAEs) have been reported."                                                                                                                                                   
#>  [2] "5 out of 20 SAEs (25.0 %) were classified ''related'' to the MD or to an intervention (procedure) undertaken in the clinical trial."                                                                                                            
#>  [3] "In 11 of 20 SAEs (55.0 %) it cannot be excluded that the events are attributable to the medical device under investigation."                                                                                                                    
#>  [4] "In 7 of 20 SAEs (35.0 %) it cannot be excluded that the events are attributable to an intervention undertaken in the clinical trial."                                                                                                           
#>  [5] "The most frequent SAEs documented were spontaneous unconsciousness (7), headache (5), poor sleep (4)."                                                                                                                                          
#>  [6] "Occurrence of SAE in the trial arm versus control arm (if applicable)."                                                                                                                                                                         
#>  [7] "With respect to the expectedness of the event, 7 (35.0 %) of the SADEs were expected/anticipated and 13 (65.0 %) were classified as unexpected/unanticipated."                                                                                  
#>  [8] "11 device deficiencies were observed (includes malfunctions, use errors, inadequacies in the information supplied by the manufacturer including labelling)."                                                                                    
#>  [9] "11 out of 11 device deficiencies (100.0 %) could have led to serious adverse events if suitable action had not been taken, intervention had not been made, or circumstances had been less fortunate (device deficiencies with a SAE potential)."
#> [10] "12 health hazards that required safety-related measures occurred."                                                                                                                                                                              
#> [11] "Safety and protective measures taken by the investigator/sponsor (including those requested by the ethics committee and Swissmedic and authorities abroad) taken in Switzerland and abroad: [free text]"                                        
#> 
#> $txt_all
#>  [1] "During the reporting period, a total of 20 serious adverse events (SAEs) have been reported."                                                                                                                                                   
#>  [2] "5 out of 20 SAEs (25.0 %) were classified ''related'' to the MD or to an intervention (procedure) undertaken in the clinical trial."                                                                                                            
#>  [3] "In 11 of 20 SAEs (55.0 %) it cannot be excluded that the events are attributable to the medical device under investigation."                                                                                                                    
#>  [4] "In 7 of 20 SAEs (35.0 %) it cannot be excluded that the events are attributable to an intervention undertaken in the clinical trial."                                                                                                           
#>  [5] "The most frequent SAEs documented were spontaneous unconsciousness (7), headache (5), poor sleep (4)."                                                                                                                                          
#>  [6] "Occurrence of SAE in the trial arm versus control arm (if applicable)."                                                                                                                                                                         
#>  [7] "With respect to the expectedness of the event, 7 (35.0 %) of the SADEs were expected/anticipated and 13 (65.0 %) were classified as unexpected/unanticipated."                                                                                  
#>  [8] "11 device deficiencies were observed (includes malfunctions, use errors, inadequacies in the information supplied by the manufacturer including labelling)."                                                                                    
#>  [9] "11 out of 11 device deficiencies (100.0 %) could have led to serious adverse events if suitable action had not been taken, intervention had not been made, or circumstances had been less fortunate (device deficiencies with a SAE potential)."
#> [10] "12 health hazards that required safety-related measures occurred."                                                                                                                                                                              
#> [11] "Safety and protective measures taken by the investigator/sponsor (including those requested by the ethics committee and Swissmedic and authorities abroad) taken in Switzerland and abroad: [free text]"                                        
#> 
#> $tab
#> # A tibble: 2 × 4
#>   desc                                                       sade  attr measures
#>   <chr>                                                     <int> <int>    <int>
#> 1 Number of cases (during reporting period)                     0    11       12
#> 2 Number of cases (cumulative) since the start of the clin…     0    11       12
#> 
#> $tab_map
#>   col_key
#> 1    desc
#> 2    sade
#> 3   fatal
#> 4     sae
#>                                                                       name
#> 1                                                            MD/IVD Device
#> 2                                      Serious Adverse Device Effects SADE
#> 3 Device Deficiencies that could have led to an SAE (serious deficiencies)
#> 4          Safety and protective measures taken in Switzerland and abroad.
#> 

# other trial
asr_safety_summary(data = prepped$data, period_data = prepped$period_data, "o", 60,
 n_per_arm = list(grp1 = 150, grp2 = 150))
#> $txt
#> [1] "During the reporting period, 20 of 60 participants (33.3 %) reported a total of 20 serious adverse events (SAEs) with possible relationship to the study intervention)."
#> [2] "The most frequent documented SAEs with possible relationship to the intervention were poor sleep (2), spontaneous unconsciousness (2), headache (1)."                   
#> 
#> $txt_all
#> [1] "Since the beginning of the study, 20 of 60 participants (33.3 %) reported a total of 20 serious adverse events (SAEs) with possible relationship to the study intervention)."
#> [2] "The most frequent documented SAEs with possible relationship to the intervention were poor sleep (2), spontaneous unconsciousness (2), headache (1)."                        
#> 
#> $tab
#> # A tibble: 2 × 3
#>   desc                                                              fatal nfatal
#>   <chr>                                                             <chr> <chr> 
#> 1 Number of cases (during reporting period)                         N = … N = 5…
#> 2 Number of cases (cumulative) since the start of the clinical tri… N = … N = 4…
#> 
#> $tab_map
#>   col_key
#> 1    desc
#> 2   fatal
#> 3     sae
#>                                                                               name
#> 1                                                             Other clinical trial
#> 2 SAEs with fatal outcome where a causality to the intervention cannot be excluded
#> 3              Other SAEs where a causality to the intervention cannot be excluded
#> 

# tpr trial
asr_safety_summary(data = prepped$data, period_data = prepped$period_data, "t", 60,
 n_per_arm = list(grp1 = 150, grp2 = 150))
#> $txt
#> [1] "During the reporting period, a total of 20 Serious Adverse Events (SAEs) occurred."                                                                                                                      
#> [2] "5 of 20 SAEs (25.0 %) were classified as Serious Adverse Drug Reaction (SADR) i.e., serious adverse events with possible relationship to the TrP/GT/GMO administered."                                   
#> [3] "The most frequent SADR documented were spontaneous unconsciousness (7), headache (5), poor sleep (4)."                                                                                                   
#> [4] "In 1 out of 5 SADRs (20.0 %) it cannot be excluded that the events are attributable to the TrP/GT/GMO itself."                                                                                           
#> [5] "In 4 out of 5 SADRs (80.0 %) it cannot be excluded that the events are attributable to other factors like quality defects, contaminations, administration and preparation procedures of TrP/GT/GMO, etc."
#> [6] "6 Suspected Unexpected Serious Adverse Reactions (SUSARs) occurred during the reporting period."                                                                                                         
#> [7] "Other new relevant safety aspects (including details regarding exposure): "                                                                                                                              
#> 
#> $txt_all
#> [1] "Since the beginning of the study, a total of 20 Serious Adverse Events (SAEs) occurred."                                                                                                                 
#> [2] "5 of 20 SAEs (25.0 %) were classified as Serious Adverse Drug Reaction (SADR) i.e., serious adverse events with possible relationship to the TrP/GT/GMO administered."                                   
#> [3] "The most frequent SADR documented were spontaneous unconsciousness (7), headache (5), poor sleep (4)."                                                                                                   
#> [4] "In 1 out of 5 SADRs (20.0 %) it cannot be excluded that the events are attributable to the TrP/GT/GMO itself."                                                                                           
#> [5] "In 4 out of 5 SADRs (80.0 %) it cannot be excluded that the events are attributable to other factors like quality defects, contaminations, administration and preparation procedures of TrP/GT/GMO, etc."
#> [6] "6 Suspected Unexpected Serious Adverse Reactions (SUSARs) occurred during the reporting period."                                                                                                         
#> [7] "Other new relevant safety aspects (including details regarding exposure): "                                                                                                                              
#> 
#> $tab
#> # A tibble: 2 × 6
#>   desc                                            fatal nfatal nsadr sadr  susar
#>   <chr>                                           <chr> <chr>  <chr> <chr> <chr>
#> 1 Number of cases (during reporting period)       N = … N = 5… N = … N = … N = …
#> 2 Number of cases (cumulative) since the start o… N = … N = 1… N = … N = … N = …
#> 
#> $tab_map
#>   col_key                                                   name
#> 1    desc                                                       
#> 2   fatal                                SAEs with fatal outcome
#> 3  nfatal          Other Serious Adverse Events (non-fatal SAEs)
#> 4   nsadr             Non-Serious Adverse Drug Reactions, NSADRs
#> 5    sadr                  Serious Adverse Drug Reactions, SADRs
#> 6   susar Suspected Unexpected Serious Adverse Reactions, SUSARs
#>