-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.qmd
134 lines (101 loc) · 2.62 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
130
131
132
133
134
---
title: NEUROCOGNITIVE EXAMINATION
patient: Biggie
name: Smalls, Biggie
doe: {{< var doe >}}
date_of_report: {{< var date_of_report >}}
---
```{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 last_name >}}, {{< var first_name >}}]
#let doe = [{{< var date_of_report >}}]
#let patient = [{{< var patient >}}]
#v(2em, weak: true)
#show block: set par(leading: 0.65em)
#block[
*PATIENT NAME:* #name \
*DATE OF BIRTH:* {{< var dob >}}, Age {{< var age >}} \
*DATES OF EXAM:* {{< var doe >}}, {{< var doe2 >}}, and {{< var doe3 >}} \
*DATE OF REPORT*: {{< var date_of_report >}} \
]
```
{{< include _00-00_tests.qmd >}}
<!-- {{< pagebreak >}} -->
{{< include _01-00_nse_pediatric.qmd >}}
<!-- {{< pagebreak >}} -->
{{< include _02-00_behav-obs.qmd >}}
# NEUROCOGNITIVE FINDINGS {#sec-nt}
{{< include _02-01_iq.qmd >}}
{{< include _02-02_academics.qmd >}}
{{< include _02-03_verbal.qmd >}}
{{< include _02-04_spatial.qmd >}}
{{< include _02-05_memory.qmd >}}
{{< include _02-06_executive.qmd >}}
<!-- {{< include _02-07_motor.qmd >}} -->
<!-- {{< include _02-08_social.qmd >}} -->
{{< include _02-09_adhd_child.qmd >}}
{{< include _02-10_emotion_child.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 >}}