{# # This file is part of MedShakeEHR. # # Copyright (c) 2019 # Bertrand Boutillier # http://www.medshake.net # # MedShakeEHR is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # any later version. # # MedShakeEHR is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with MedShakeEHR. If not, see . #/ /## # Template > Outils > export data # # @author Bertrand Boutillier #} {% extends "page.html.twig" %} {% import "macroForm.html.twig" as f %} {% block title %}{{ config.designAppName }} : export Data{% endblock %} {% block head %} {{ parent() }} {% endblock %} {% block jsEmbed %} {{ parent() }} $(document).ready(function() { $(".switchCheckAll").on("click", function() { $(this).parents('div.card').find('input').prop('checked', true); $(this).parents('div.card').find('input').val(true); }); $(".switchUncheckAll").on("click", function() { $(this).parents('div.card').find('input').prop('checked', false); $(this).parents('div.card').find('input').val(false); if($(this).parents('div.card').hasClass('selectMinOne')) { $(this).parents('div.card').find('input').first().prop('checked', true); $(this).parents('div.card').find('input').first().val(true); } }); $("#exportDataChoisirFormButton").on("click", function(e) { e.preventDefault(); window.location.href = urlBase + '/outils/export-data/' + $("#formID").val() + '/'; }); }); {% endblock %} {% block body %}

Export de données

{% if page.listeForms %}

Choisir le formulaire concerné par l'export

{% elseif page.formInfos.id > 0 %}
{{ page.dataTypeinfos.label }}
Formulaire source : {{ page.formInfos.name }} (#{{ page.formInfos.id }})
Exploité sous : {{ page.dataTypeinfos.catLabel }} > {{ page.dataTypeinfos.label }} {% if config.optionGeExportPratListSelection != 'true' %} {% if page.isRegistryAdmin %}
Données exportées : toutes (administrateur registre) {% elseif config.droitExportPeutExporterToutesDataGroupes == 'true' %}
Données exportées : données de votre groupe {% elseif config.droitExportPeutExporterPropresData == 'true' %}
Données exportées : données propres uniquement {% endif %} {% endif %}
Options
{{ f.select ({ 'select' : { 'name' : 'option_file_format', 'class' : 'custom-select-sm', 'autocomplete' : 'off', 'values' : {'ods':'LibreOffice (.ods)', 'xlsx':'Excel (.xlsx)'}, }, 'label' : { 'position' : 'before', 'label' : 'Format du fichier', } }) }}
{{ f.select ({ 'select' : { 'name' : 'option_select_type', 'class' : 'custom-select-sm', 'autocomplete' : 'off', 'values' : {'selectCode':'Exporter le code', 'selectValue':'Exporter le texte'}, }, 'label' : { 'position' : 'before', 'label' : 'Champs avec sélecteur et réponses prédéterminées', } }) }}
Plage calendaire
{{ f.select ({ 'select' : { 'name' : 'date_type', 'class' : 'custom-select-sm', 'autocomplete' : 'off', 'values' : {'registerDate':'Date de saisie', 'creationDate':'Date effective'}, 'valueDefaut': page.form.cat }, 'label' : { 'position' : 'before', 'label' : 'Date concernée', } }) }}
{{ f.input ({ 'input' : { 'type' : 'text', 'name' : 'date_start', 'id' : 'id_date_start_id', 'autocomplete' : 'off', 'class' : 'form-control-sm datepic ', 'before' : '
', 'after' : '
', }, 'label' : { 'label' : 'Début de période', } }) }}
{{ f.input ({ 'input' : { 'type' : 'text', 'name' : 'date_end', 'id' : 'id_date_end_id', 'autocomplete' : 'off', 'class' : 'form-control-sm datepic ', 'before' : '
', 'after' : '
', }, 'label' : { 'label' : 'Fin de période', } }) }}
{% if config.optionGeExportPratListSelection == 'true' %}
Dossiers des praticiens à inclure
{% if config.droitExportPeutExporterToutesDataGroupes == 'true' and page.prat|length > 1 %}

Sélectionner au moins 1 praticien.

{% endif %} {% for prat in page.prat %}
{% if config.droitExportPeutExporterToutesDataGroupes == 'false' and prat.id != user.id %} {% set disabled='disabled' %} {% else %} {% set disabled = false %} {% endif %} {{ f.input ({ 'input' : { 'type' : 'switch', 'name' : 'pratliste_' ~ prat.id , 'id' : 'pratliste_' ~ prat.id ~ '_id', 'autocomplete' : 'off', 'value' : 'true', 'disabled' : disabled }, 'label' : { 'position' : 'before', 'label' : prat.prenom ~ ' ' ~ prat.nom , } }) }}
{% endfor %}
{% endif %}
Données administratives patient à inclure
{% for type, label in page.dataFieldsAdmin %}
{{ f.input ({ 'input' : { 'type' : 'switch', 'name' : 'patient_' ~ type, 'id' : type ~ '_id', 'autocomplete' : 'off', 'value' : 'false' }, 'label' : { 'position' : 'before', 'label' : label, } }) }}
{% endfor %}
{% if page.dataFieldsAdminPro is not empty %}
Données administratives praticien à inclure
{% for type, label in page.dataFieldsAdminPro %}
{{ f.input ({ 'input' : { 'type' : 'switch', 'name' : 'praticien_' ~ type, 'id' : 'prat_' ~ type ~ '_id', 'autocomplete' : 'off', 'value' : 'false' }, 'label' : { 'position' : 'before', 'label' : label, } }) }}
{% endfor %}
{% endif %}
Champs du formulaire à inclure
{% for type, label in page.dataFields %}
{{ f.input ({ 'input' : { 'type' : 'switch', 'id' : type ~ '_id', 'name' : 'dataField_' ~ type, 'autocomplete' : 'off', 'value' : 'true' }, 'label' : { 'position' : 'before', 'label' : label, } }) }}
{% endfor %}
{% else %}
Aucun formulaire n'est configuré pour autoriser l'export de données.
{% endif %} {% endblock %}