+
+
+ {{data.get("display_name")}}
+
+
+ {% for comps in data[data.get("observation")] %}
+ {% if comps.get("observation").get("preferred_display_name") %}
+ {% set observation_name = comps.get("observation").get("preferred_display_name") %}
+ {% else %}
+ {% set observation_name = comps.get("observation").get("observation_template") %}
+ {% endif %}
+ {% if comps.get("observation").get("status")=="Approved" and comps.get("observation") %}
+ {% if comps.get("observation").get("result_data") or comps.get("observation").get("result_text") or comps.get("observation").get("result_select") not in [None, "", "Null"] %}
+
+
+
+
+ {% if comps.get("observation").get("sample") %}
+
+ {{comps.get("observation").get("sample")}}
+
+ {% else %}
+
+ {{ frappe.db.get_value("Observation Template", comps.get("observation").get("observation_template"), "sample") or ""}}
+
+ {% endif %}
+ {% if comps.get("observation").get("received_time") %}
+
+ {{frappe.utils.format_datetime(comps.get("observation").get("received_time"))[:-3]}}
+
+ {% endif %}
+
+
+
+ {{observation_name}}
+
+ {% if comps.get("observation").get("method") %}
+
+ {{comps.get("observation").get("method")}}
+
+ {% endif %}
+
+
+
+ {% if comps.get("observation").get("result_data") or comps.get("observation").get("result_select") %}
+ {{comps.get("observation").get("result_data")
+ or comps.get("observation").get("result_select")}}
+ {% elif comps.get("observation").get("result_text") %}
+ {% if '
' in comps.get("observation").get("result_text") %}
+ {% if comps.get("observation").get("result_text")|length <= 60 %}
+ {{comps.get("observation").get("result_text")}}
+ {% endif %}
+ {% elif comps.get("observation").get("result_text")|length <= 24 %}
+ {{comps.get("observation").get("result_text")}}
+ {% endif %}
+ {% endif %}
+
+ {% if comps.get("observation").get("time_of_result") %}
+
+ {{frappe.utils.format_datetime(comps.get("observation").get("time_of_result"))[:-3]}}
+
+ {% endif %}
+
+
+ {% if comps.get("observation").get("permitted_unit") %}
+ {{comps.get("observation").get("permitted_unit")}}
+ {% endif %}
+
+
+ {% if comps.get("observation").get("reference") %}
+ {{comps.get("observation").get("reference")}}
+ {% endif %}
+
+
+ {% if comps.get("observation").get("result_text") %}
+ {% if '
' in comps.get("observation").get("result_text") %}
+ {% if comps.get("observation").get("result_text")|length > 60 %}
+
+ {{comps.get("observation").get("result_text")}}
+
+ {% endif %}
+ {% elif comps.get("observation").get("result_text")|length > 24 %}
+
+ {{comps.get("observation").get("result_text")}}
+
+ {% endif %}
+ {% endif %}
+ {% if comps.get("observation").get("result_interpretation") %}
+
+ {{comps.get("observation").get("result_interpretation")}}
+
+ {% endif %}
+ {% if comps.get("observation").get("note") %}
+
+ {{comps.get("observation").get("note")}}
+
+ {% endif %}
+ {% if comps.get("observation").get("description") and not data.get("description") %}
+
+ {{comps.get("observation").get("description")}}
+
+ {% endif %}
+