- Clone this repository:
git clone https://github.com/mdvthu/report-templates && cd report-templates
- (optional) Create a virtual environment:
python3 -m venv venv && . ./venv/bin/activate
- Install Python dependencies
(Jinja2 templating and
PyYAML):
python3 -m pip install -r requirements.txt
- Run:
python3 build.py
: on first run this will create a config file that needs to be edited - Edit user config:
config.yaml
- Run:
python3 build.py
: generated templates will be inoutput/text/
Plain text templates will be in output/text/
.
PowerShell can quickly copy the relevant template to the clipboard for transfer to a report (RIS/PACS etc):
Get-Content output/text/template_ct_pulmonary_angiogram.txt | Set-Clipboard
# short form
gc output/text/template_ct_pulmonary_angiogram.txt | scb
Tab completion makes this process fast.
The scripts create a XML
file that can be imported into Dragon VR:
output/dragon/dragon_v12.xml
Report templates should require as few changes as possible when copying and
pasting into RIS/PACS. Whitespace can be adjusted in templates/
directory to
customise output of the generated reports.
- To keep report templates easy to navigate and remember, generated filenames
are hierarchical.
template_<modality>_<examination>_<exam_type>.txt
- for example,
template_mri_pelvis_contrast.txt
- Imaging guided procedures have sufficiently different structure that they
require a different template format. Setting
interventional: true
in the relevant YAML file marks the template as a procedure