Медицина/Отчеты: различия между версиями
Нет описания правки |
Admin (обсуждение | вклад) Нет описания правки |
||
| Строка 1: | Строка 1: | ||
=== jinja2 === | |||
<syntaxhighlight lang="Jinja"> | |||
[% set conditions_1 = build_conditions(["created::date", "device_id"], operator="AND", prefix="AND") %] | |||
[% set conditions_2 = build_conditions(["updated::date"], operator="AND", prefix="AND") %] | |||
[[ [conditions_1, conditions_2] | select | join(" OR ") ]] | |||
AND created::date='2025-12-05' OR AND created::date='2025-12-05' | |||
</syntaxhighlight> | |||
=== Отчет с XML === | === Отчет с XML === | ||
Версия от 00:13, 13 декабря 2025
jinja2
[% set conditions_1 = build_conditions(["created::date", "device_id"], operator="AND", prefix="AND") %]
[% set conditions_2 = build_conditions(["updated::date"], operator="AND", prefix="AND") %]
[[ [conditions_1, conditions_2] | select | join(" OR ") ]]
AND created::date='2025-12-05' OR AND created::date='2025-12-05'
Отчет с XML
Разделители строк CR LF / LF
Для разделения строк CR LF в поле Кодировка установить cp1251
Пример синтаксиса шаблона
{% set lines = results.result.lines %}<?xml version="1.0" encoding="windows-1251"?>
{% filter pretty_xml %}
<Файл ВерсФорм="5.01">
<Документ КНД="1184043" ДатаДок="11.02.2025" КодНО="2511" />
{% for line in lines %}
<НППлатМедУсл>
<ФИО>{{ line.last_name }}</ФИО>
</НППлатМедУсл>
{% endfor %}
</Файл>
{% endfilter %}