From: Agnibho Mondal Date: Fri, 15 Sep 2023 20:12:59 +0000 (+0530) Subject: Bugfix: template X-Git-Tag: v0.3~10 X-Git-Url: https://code.agnibho.com/repo?a=commitdiff_plain;h=5afad6ea98c997668c73f457e25c1b4275944474;p=medscript.git Bugfix: template --- diff --git a/data/template/cert/index.html b/data/template/cert/index.html deleted file mode 100644 index 347055b..0000000 --- a/data/template/cert/index.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - Prescription - - - -
-
- - - - - -
-

{{prescriber.name}}

-

{{prescriber.qualification}}

-

{{prescriber.registration}}

-
-

{{prescriber.address}}

-

{% if prescriber.contact %}Contact: {{prescriber.contact}}{% endif %}

-

{{prescriber.extra}}

-
-
-
- - - - - - - - -
- - - - - - - - - - - - -
{% if id %}ID: {{id}}{% endif %}

Name: {{name}}

Age: {{age}}

Sex: {{sex}}

{% if address %}Address: {{address}}{% endif %} {% if contact %}Contact: {{contact}}{% endif %}
- - - - - - - -
{% if diagnosis %}Provisional Diagnosis: {{diagnosis}}{% endif %}

{{extra}}

-
-
- -
- - diff --git a/data/template/cert/style.css b/data/template/cert/style.css deleted file mode 100644 index 03581b1..0000000 --- a/data/template/cert/style.css +++ /dev/null @@ -1,140 +0,0 @@ -table { - width: 100%; - border-collapse: collapse; -} - -td { - vertical-align: top; -} - -.container { - width: 95%; - margin-left: auto; - margin-right: auto; -} - -.header, .footer { - width: 95%; - position: fixed; - left: 50%; - transform: translateX(-50%); - background: white; -} -.header { - top: 0; - border-bottom: 2px solid black; -} - -.footer { - bottom: 0; - border-top: 2px solid black; -} - -.header, .header-space { - height: 200px; -} - -.footer, .footer-space { - height: 100px; -} - -.patient { - border-bottom: 2px solid black; -} - -.sign { - border-top: 2px solid black; -} - -.formatted { - white-space: pre-wrap; - padding: 2px; -} - -.ltxt { - text-align: left; -} - -.rtxt { - text-align: right; -} - -.ctxt { - text-align: center; -} - -.jtxt { - text-align: justify; -} - -.bordered { - border: 2px solid black; -} - -.lbordered { - border-left: 2px dotted black; -} - -.rbordered { - border-right: 2px dotted black; -} - -.tbordered { - border-top: 2px solid black; -} - -.bbordered { - border-bottom: 2px solid black; -} - -.w0 { - width: 0%; -} - -.w10 { - width: 10%; -} - -.w20 { - width: 20%; -} - -.w25 { - width: 25%; -} - -.w30 { - width: 30%; -} - -.w40 { - width: 40%; -} - -.w50 { - width: 50%; -} - -.w60 { - width: 60%; -} - -.w70 { - width: 70%; -} - -.w75 { - width: 75%; -} - -.w80 { - width: 80%; -} - -.w90 { - width: 90%; -} - -.w100 { - width: 100%; -} diff --git a/data/template/medcert/index.html b/data/template/medcert/index.html new file mode 100644 index 0000000..347055b --- /dev/null +++ b/data/template/medcert/index.html @@ -0,0 +1,66 @@ + + + + Prescription + + + +
+
+ + + + + +
+

{{prescriber.name}}

+

{{prescriber.qualification}}

+

{{prescriber.registration}}

+
+

{{prescriber.address}}

+

{% if prescriber.contact %}Contact: {{prescriber.contact}}{% endif %}

+

{{prescriber.extra}}

+
+
+
+ + + + + + + + +
+ + + + + + + + + + + + +
{% if id %}ID: {{id}}{% endif %}

Name: {{name}}

Age: {{age}}

Sex: {{sex}}

{% if address %}Address: {{address}}{% endif %} {% if contact %}Contact: {{contact}}{% endif %}
+ + + + + + + +
{% if diagnosis %}Provisional Diagnosis: {{diagnosis}}{% endif %}

{{extra}}

+
+
+ +
+ + diff --git a/data/template/medcert/style.css b/data/template/medcert/style.css new file mode 100644 index 0000000..03581b1 --- /dev/null +++ b/data/template/medcert/style.css @@ -0,0 +1,140 @@ +table { + width: 100%; + border-collapse: collapse; +} + +td { + vertical-align: top; +} + +.container { + width: 95%; + margin-left: auto; + margin-right: auto; +} + +.header, .footer { + width: 95%; + position: fixed; + left: 50%; + transform: translateX(-50%); + background: white; +} +.header { + top: 0; + border-bottom: 2px solid black; +} + +.footer { + bottom: 0; + border-top: 2px solid black; +} + +.header, .header-space { + height: 200px; +} + +.footer, .footer-space { + height: 100px; +} + +.patient { + border-bottom: 2px solid black; +} + +.sign { + border-top: 2px solid black; +} + +.formatted { + white-space: pre-wrap; + padding: 2px; +} + +.ltxt { + text-align: left; +} + +.rtxt { + text-align: right; +} + +.ctxt { + text-align: center; +} + +.jtxt { + text-align: justify; +} + +.bordered { + border: 2px solid black; +} + +.lbordered { + border-left: 2px dotted black; +} + +.rbordered { + border-right: 2px dotted black; +} + +.tbordered { + border-top: 2px solid black; +} + +.bbordered { + border-bottom: 2px solid black; +} + +.w0 { + width: 0%; +} + +.w10 { + width: 10%; +} + +.w20 { + width: 20%; +} + +.w25 { + width: 25%; +} + +.w30 { + width: 30%; +} + +.w40 { + width: 40%; +} + +.w50 { + width: 50%; +} + +.w60 { + width: 60%; +} + +.w70 { + width: 70%; +} + +.w75 { + width: 75%; +} + +.w80 { + width: 80%; +} + +.w90 { + width: 90%; +} + +.w100 { + width: 100%; +} diff --git a/renderer.py b/renderer.py index d046aaa..e9ca921 100644 --- a/renderer.py +++ b/renderer.py @@ -56,6 +56,7 @@ class Renderer: return data def render_markdown(self, data): + data["extra"]=markdown(data["extra"]) data["note"]=markdown(data["note"]) data["report"]=markdown(data["report"]) data["advice"]=markdown(data["advice"])