---
title: Validation Report for drugdevelopR
author: Johannes Cepicka
date: "`r Sys.Date()`"
output:
  pdf_document:
    toc: true
    fig_crop: false
    toc_depth: 2
    number_sections: true
vignette: >
  %\VignetteIndexEntry{Validation Report}
  \usepackage[utf8]{inputenc}
  %\VignetteEngine{knitr::rmarkdown_notangle}
header-includes:
  - \usepackage{array}
  - \usepackage{float}
  - \usepackage{multirow}
  - \usepackage{longtable}
  - \usepackage{booktabs}
---


```{r, setup, echo=FALSE,warning=FALSE}
suppressPackageStartupMessages({
  library(valtools)
  library(knitr)
  library(kableExtra)
  library(magrittr)
  library(devtools)
  library(drugdevelopR)
})

opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  eval = TRUE,
  echo = FALSE,
  results = "asis",
  message = FALSE,
  tidy = FALSE
)

options(
  knitr.kable.NA = '',
  knitr.duplicate.label = "allow"
)

```

```{r shared-obj}
all_sig <- vt_scrape_sig_table() 
```

\newpage

# Certifications

## Signatures

**AUTHOR** My signature designates authorship of this document.

```{r validation-lead-sig-block}
all_sig[grepl("validation lead",all_sig$role, ignore.case = TRUE),] %>%
  set_rownames(seq_len(nrow(.))) %>%
  vt_kable_sig_table()
```

**APPROVAL** I have reviewed this document and approve its content.

```{r sig-block,eval=FALSE}

all_sig[!grepl("validation lead",all_sig$role, ignore.case = TRUE),] %>%
  set_rownames(seq_len(nrow(.))) %>% 
  vt_kable_sig_table()

```

The effective date of this document is the last date of signature.

\newpage

# Release details

## Package Information

### Change Log

```{r change-log-table}
vt_scrape_change_log() %>% 
  vt_kable_change_log()
```

### Validation Environment

```{r env-table}
vt_scrape_val_env() %>% 
  vt_kable_val_env()
```


## Authors

### Requirements 


```{r req-authors}
vt_scrape_requirement_editors() %>% 
  vt_kable_requirement_editors()
```

### Functions

```{r func-authors, eval=FALSE}
vt_scrape_function_editors(tags = c("editor", "editDate")) %>%
 vt_kable_function_editors()

```

### Test Case Authors

```{r test-case-authors}
vt_scrape_test_case_editors() %>%
 vt_kable_test_case_editors()
```

### Test Code Authors

```{r test-code-authors,eval=FALSE}
vt_scrape_test_code_editors() %>%
 vt_kable_test_code_editors()
```

## Traceability

```{r traceability}
vt_scrape_coverage_matrix() %>% 
 vt_kable_coverage_matrix()
```

\clearpage

# Risk Assessment

```{r risk}
vt_scrape_risk_assessment() %>% 
  vt_kable_risk_assessment()
```

\newpage

# Validation



```{r child-files-evaluation,eval=FALSE}
child_files <- vt_get_child_files()
vt_file(vt_path(child_files),dynamic_referencing = FALSE)
```
