-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.qmd
129 lines (98 loc) · 2.44 KB
/
template.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
---
title: NEUROCOGNITIVE EXAMINATION
name: Biggie Smalls
doe: {{< var doe >}}
patient: Biggie
---
```{r}
#| label: setup
#| include: false
#| cache: false
packages <- c(
"dplyr",
"collapse",
"glue",
"gt",
"here",
"janitor",
"knitr",
"quarto",
"readr",
"readxl",
"rmarkdown",
"snakecase",
"tidytable",
"vroom",
"xfun",
"bwu"
)
# Function to load packages one by one
load_packages <- function(packages) {
for (pkg in packages) {
if (!require(pkg, character.only = TRUE)) {
install.packages(pkg)
library(pkg, character.only = TRUE)
}
message(paste("Loaded package:", pkg))
}
}
# Call the function to load packages
load_packages(packages)
# Set knitr options
knitr::opts_knit$set(
width = 80,
digits = 2,
warnPartialMatchArgs = FALSE,
crop = knitr::hook_pdfcrop,
optipng = knitr::hook_optipng
)
# Set environment variables with default values
Sys.setenv(PATIENT = "{{< var patient >}}", RETURN_PLOT = TRUE)
patient <- Sys.getenv("PATIENT")
return_plot <- Sys.getenv("RETURN_PLOT")
```
```{r}
#| label: data-load
#| include: false
file_path <- here::here("data", "csv")
bwu::load_data(here::here(file_path))
neurocog <- vroom::vroom("neurocog.csv")
neurobehav <- vroom::vroom("neurobehav.csv")
neuropsych <- vroom::vroom("neuropsych.csv")
validity <- vroom::vroom("validity.csv")
```
```{=typst}
#let name = [{{< var first_name >}} {{< var last_name >}}]
#let doe = [{{< var doe >}}]
#let patient = [{{< var patient >}}]
#v(2em, weak: true)
#show block: set par(leading: 0.65em)
#block[
*CASE NUMBER*: {{< var case_number >}} \
*PATIENT NAME:* #name, Age {{< var age >}} \
*DATE OF EXAM:* {{< var doe >}} \
*DATE OF REPORT*: {{< var date_of_report >}} \
]
```
{{< include _00-00_tests.qmd >}}
{{< pagebreak >}}
{{< include _01-00_nse_forensic.qmd >}}
<!-- {{< pagebreak >}} -->
# NEUROCOGNITIVE FINDINGS {#sec-nt}
{{< include _02-00_behav-obs.qmd >}}
{{< include _02-01_iq.qmd >}}
{{< include _02-02_academics.qmd >}}
{{< include _02-03_verbal.qmd >}}
{{< include _02-04_spatial.qmd >}}
{{< include _02-05_executive.qmd >}}
{{< include _02-06_memory.qmd >}}
{{< include _02-07_motor.qmd >}}
<!-- {{< include _02-08_social.qmd >}} -->
<!-- {{< include _02-11_adaptive.qmd >}} -->
<!-- {{< pagebreak >}} -->
{{< include _03-00_sirf.qmd >}}
{{< include _03-00_sirf_text.qmd >}}
{{< include _03-01_recs.qmd >}}
{{< include _03-02_signature.qmd >}}
{{< pagebreak >}}
{{< include _03-03_appendix.qmd >}}