Template directive not working

Situation
I am creating a document template using the variable directives shown in https://www.open-emr.org/wiki/index.php/Templates_for_Patient_Documents
After I upload the template (.odt) and use it to create a patient document, some are the variables are not substituted - the final document only has the variable placeholder names.
Not substituted:

  • {PatientName}

  • {DOS}

  • {Address}

  • {City}

  • {State}
    The following are correctly substituted:

  • {PatientID}

  • {PatientDOB}

  • {PatientPhone}

  • {Medications}

  • {DEM:guardiansname}

  • {DEM:guardianaddress}

I have no idea what to look at next.

OpenEMR Version
I’m using OpenEMR version 7.0.3 (4) (docker version)

Browser:
I’m using: Brave

Operating System
I’m using: ubuntu 22.04
OpenEMR docker image 7.0.3
mariadb docker image 11.4

Search
I have been unable to find a similar problem

Logs
Did you check the logs? Yes
Was there anything pertinent in them? Yes, but not that I could understand
Please paste them here (surround with three backticks (```) for readability.

[Wed Jul 02 04:22:52.438697 2025] [php:warn] [pid 1422:tid 1422] [client 172.21.0.1:33324] PHP Warning:  Undefined array key "category_id" in /var/www/localhost/htdocs/openemr/sites/default/documents/smarty/main/f3194bd23194668468d50f41d0c036f6a41520b0_0.file.general_list.html.php on line 70, referer: http://localhost/interface/patient_file/summary/demographics.php?set_pid=241
[Wed Jul 02 04:22:52.438709 2025] [php:warn] [pid 1422:tid 1422] [client 172.21.0.1:33324] PHP Warning:  Attempt to read property "value" on null in /var/www/localhost/htdocs/openemr/sites/default/documents/smarty/main/f3194bd23194668468d50f41d0c036f6a41520b0_0.file.general_list.html.php on line 70, referer: http://localhost/interface/patient_file/summary/demographics.php?set_pid=241
[Wed Jul 02 04:22:58.743500 2025] [php:warn] [pid 1422:tid 1422] [client 172.21.0.1:33324] PHP Warning:  Undefined variable $filename in /var/www/localhost/htdocs/openemr/interface/patient_file/download_template.php on line 361, referer: http://localhost/controller.php?document&upload&patient_id=241&parent_id=4&
[Wed Jul 02 04:22:58.745068 2025] [php:warn] [pid 1422:tid 1422] [client 172.21.0.1:33324] PHP Warning:  Undefined array key "date" in /var/www/localhost/htdocs/openemr/interface/patient_file/download_template.php on line 175, referer: http://localhost/controller.php?document&upload&patient_id=241&parent_id=4&
[Wed Jul 02 04:22:58.746879 2025] [php:warn] [pid 1422:tid 1422] [client 172.21.0.1:33324] PHP Warning:  Undefined array key "reason" in /var/www/localhost/htdocs/openemr/interface/patient_file/download_template.php on line 177, referer: http://localhost/controller.php?document&upload&patient_id=241&parent_id=4&
[Wed Jul 02 04:22:58.746886 2025] [php:warn] [pid 1422:tid 1422] [client 172.21.0.1:33324] PHP Warning:  Undefined array key "date" in /var/www/localhost/htdocs/openemr/interface/patient_file/download_template.php on line 179, referer: http://localhost/controller.php?document&upload&patient_id=241&parent_id=4&