prescription.
1. Patient tab: It contains the demographical data of the patient, diagnosis
-and a few extra parameters of the prescription.
+and a few extra parameters of the prescription. The diagnosis can be entered
+here. To enter multiple diagnosis semicolon (;) may be used to separate them.
2. Clinical tab: It contains the clinical note regarding the patient. The
presets can be selected from the preset box at the top and inserted into the
</tr>
<tr>
<td class="rbordered">
- {% if diagnosis %}<p class="formatted"><strong>{{diagnosis}}</strong></p>{% endif %}
+ {% if diagnosis %}
+ {% if diagnosis_list|length > 1 %}
+ <ul>
+ {% for diag in diagnosis_list %}<li><strong>{{diag}}</strong></li>{% endfor %}
+ </ul>
+ {% else %}
+ <p><strong>{{diagnosis}}</strong></p>
+ {% endif %}
+ {% endif %}
{% if note %}<p class="formatted">{{note}}</p>{% endif %}
{% if report %}<p class="formatted">{{report}}</p>{% endif %}
</td>
with open(source, "r") as source_file, open(target, "w") as target_file:
with open(template) as template_file:
template_data = Template(template_file.read())
- data=self.process_medication(json.loads(source_file.read()))
+ data=self.process_medication(self.process_diagnosis(json.loads(source_file.read())))
try:
data["date"]=datetime.datetime.strptime(data["date"], "%Y-%m-%d %H:%M:%S")
except Exception as e:
target_file.write(output)
return(target)
+ def process_diagnosis(self, data):
+ diagnosis_list=[]
+ for d in data["diagnosis"].split(";"):
+ diagnosis_list.append(d.strip())
+ data["diagnosis_list"]=diagnosis_list
+ return data
+
def process_medication(self, data):
medication_list=[]
pattern=re.compile(r".*?\[(.*)\].*")
<p>A new prescription can be created right from the starting window. Alternatively the "New" menu option can be used to create a new prescription.</p>
<p>There are eight tabs in the tab bar containing important parts of a prescription.</p>
<ol>
- <li><strong>Patient tab:</strong> It contains the demographical data of the patient, diagnosis and a few extra parameters of the prescription.</li>
+ <li><strong>Patient tab:</strong> It contains the demographical data of the patient, diagnosis and a few extra parameters of the prescription. The diagnosis can be entered here. To enter multiple diagnosis semicolon (;) may be used to separate them.</li>
<li><strong>Clinical tab:</strong> It contains the clinical note regarding the patient. The presets can be selected from the preset box at the top and inserted into the note by clicking the insert button.</li>
<li><strong>Report tab:</strong> It contains the reports shown by the patient. It also has the preset option.</li>
<li><strong>Advice tab:</strong> It contains the primary advices given to the patient. It is usually printed at the top of the advice section of the prescription.It also has the preset option.</li>