From 6db3a9e490ebbaa9c255f720c628dcfb1acf29eb Mon Sep 17 00:00:00 2001 From: Agnibho Mondal Date: Mon, 6 Nov 2023 23:01:23 +0530 Subject: [PATCH] Upated template to include dob,cert --- data/template/default/index.html | 6 +++++- data/template/medcert/index.html | 8 ++++++-- window.py | 1 + 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/data/template/default/index.html b/data/template/default/index.html index 703a212..ce07fb5 100644 --- a/data/template/default/index.html +++ b/data/template/default/index.html @@ -34,8 +34,12 @@

Name: {{name}}

-

Age: {{age}}

Sex: {{sex}}

+ {%if age %} +

Age: {{age}}

+ {%else%} +

Date of Birth: {{dob}}

+ {%endif%} {% if address %}Address: {{address}}{% endif %} {% if contact %}Contact: {{contact}}{% endif %} diff --git a/data/template/medcert/index.html b/data/template/medcert/index.html index 347055b..951bb2a 100644 --- a/data/template/medcert/index.html +++ b/data/template/medcert/index.html @@ -34,8 +34,12 @@

Name: {{name}}

-

Age: {{age}}

Sex: {{sex}}

+ {% if age %} +

Age: {{age}}

+ {% else %} +

Date of Birth: {{dob}}

+ {% endif %} {% if address %}Address: {{address}}{% endif %} {% if contact %}Contact: {{contact}}{% endif %} @@ -46,7 +50,7 @@ {% if diagnosis %}Provisional Diagnosis: {{diagnosis}}{% endif %} -

{{extra}}

+

{{certificate}}

diff --git a/window.py b/window.py index c423ee7..ea0300c 100644 --- a/window.py +++ b/window.py @@ -388,6 +388,7 @@ class MainWindow(QMainWindow): date=self.prescription.date, id=self.prescription.id, name=self.prescription.name, + dob=self.prescription.dob, age=self.prescription.age, sex=self.prescription.sex, address=self.prescription.address, -- 2.39.5