|
| 1 | +\documentclass[a4paper,landscape]{article} |
| 2 | +\newcommand{\docTool}{\VAR{title}} |
| 3 | +\newcommand{\docType}{Risk assessment} |
| 4 | +\newcommand{\docVersion}{\VAR{version}} |
| 5 | +\input{assets/prelude} |
| 6 | + |
| 7 | +\setlength\parindent{0pt} |
| 8 | +\usepackage{xcolor} |
| 9 | +\newcommand*\rot{\rotatebox{90}} |
| 10 | + |
| 11 | +\begin{document} |
| 12 | + |
| 13 | +This table outlines the possible risks that users of this tool should bear in mind. The risk rating, likelihood, and severity are all calculated assuming that the listed control measures are followed. |
| 14 | +If you are uncomfortable with these risks, or are not confident in your ability to use this tool safely, please do not use it. |
| 15 | + |
| 16 | +\vspace{1em} |
| 17 | + |
| 18 | +\begin{tabularx}{\textwidth}{@{}r @{\hspace{3pt}} l|l|l|l|l|X} |
| 19 | +& \rot{Risk rating} & \rot{Likelihood} & \rot{Severity} & Hazard & Who may be harmed \& how & Control measures \\ |
| 20 | +\endhead |
| 21 | +\BLOCK{for item in items} |
| 22 | +\hline |
| 23 | + |
| 24 | + |
| 25 | +\BLOCK{set values = namespace(riskrating='?', likelihood='?', severity='?', who = '?', control='?')} |
| 26 | + |
| 27 | +\BLOCK{for subitem in item.items} |
| 28 | +\BLOCK{if subitem.name == 'Risk rating' } |
| 29 | +\BLOCK{set values.riskrating = subitem.text} |
| 30 | +\BLOCK{elif subitem.name == 'Likelihood' } |
| 31 | +\BLOCK{set values.likelihood = subitem.text} |
| 32 | +\BLOCK{elif subitem.name == 'Severity' } |
| 33 | +\BLOCK{set values.severity = subitem.text} |
| 34 | +\BLOCK{elif 'Who may be harmed' in subitem.name } |
| 35 | +\BLOCK{set values.who = subitem.text} |
| 36 | +\BLOCK{elif subitem.name == 'Control measures' } |
| 37 | +\BLOCK{set values.control = subitem.text} |
| 38 | +\BLOCK{endif} |
| 39 | +\BLOCK{endfor} |
| 40 | + |
| 41 | +\BLOCK{if values.riskrating == 'H'} |
| 42 | +\BLOCK{set barcolor = 'red'} |
| 43 | +\BLOCK{elif values.riskrating == 'M'} |
| 44 | +\BLOCK{set barcolor = 'orange'} |
| 45 | +\BLOCK{elif values.riskrating == 'L'} |
| 46 | +\BLOCK{set barcolor = 'yellow'} |
| 47 | +\BLOCK{else} |
| 48 | +\BLOCK{set barcolor = 'black'} |
| 49 | +\BLOCK{endif} |
| 50 | + |
| 51 | +{\color{\VAR{barcolor}}\vrule width 3pt} & \VAR{values.riskrating} &\VAR{values.likelihood} & \VAR{values.severity} & \VAR{item.name} & \VAR{values.who} & \VAR{values.control} \\ |
| 52 | +\BLOCK{endfor} |
| 53 | + |
| 54 | +\end{tabularx} |
| 55 | + |
| 56 | +\end{document} |
0 commit comments