Commit d7223ba1 authored by Ángel Ramírez Isea's avatar Ángel Ramírez Isea
Browse files

feat: Traer commed_nursing a mano.

parent 995cff12
# Copyright 2020 LabViv
# License GPL-3.0 or later (http://www.gnu.org/licenses/gpl.html).
# Copyright 2011-2020 GNU Solidario <health@gnusolidario.org>
# Copyright 2020 Ing. Yadier Abel de Quesada yadierq87@gmail.com
# Copyright 2020 LabViv
# License GPL-3.0 or later (http://www.gnu.org/licenses/gpl.html).
from . import models
......@@ -4,34 +4,36 @@
# License GPL-3.0 or later (http://www.gnu.org/licenses/gpl.html).
{
'name': 'Medical Nursing',
'description': 'GNU Health nursing functionality package.',
'version': '13.0.0.0.1',
'category': 'Medical',
'name': 'Community Medical Nursing',
'description': 'Nursing functionality package ported from GNU Health.',
'version': '13.0.0.9.0',
'category': 'Health',
'depends': [
'base',
'commed_base',
'commed_procedure',
'commed_lifestyle',
'commed_inpatient',
'commed_inpatient'
],
'Author': 'LabViv',
'website': "https://git.labviv.org.ve/",
'license': 'GPL-3',
'data': [
'data/health_nursing_sequences.xml',
'views/gnuhealth_ambulatory_care.xml',
'views/gnuhealth_ambulatory_procedure_tree.xml',
'views/gnuhealth_patient_ambulatory_care.xml',
'views/gnuhealth_patient_ambulatory_care_tree.xml',
'views/gnuhealth_patient_rounding.xml',
'views/gnuhealth_patient_rounding_tree.xml',
'views/gnuhealth_procedure_tree.xml',
'views/gnuhealth_rounding_procedure.xml',
'views/health_nursing_view.xml',
'data/commed_nursing_sequences.xml',
'views/commed_ambulatory_care.xml',
'views/commed_ambulatory_procedure_tree.xml',
'views/commed_patient_ambulatory_care.xml',
'views/commed_patient_ambulatory_care_tree.xml',
'views/commed_patient_rounding.xml',
'views/commed_patient_rounding_tree.xml',
'views/commed_procedure_tree.xml',
'views/commed_rounding_procedure.xml',
'views/commed_nursing_view.xml',
'report/round_report.xml',
'report/health_nursing_report.xml',
#'security/access_rights.xml',
'security/ir.model.access.csv',
'report/commed_nursing_report.xml',
# 'security/access_rights.xml',
# 'security/ir.model.access.csv',
],
'demo': [],
'installable': True,
'application': True,
'maintainer': 'Julio César Méndez <mendezjcx@thoriumcorp.website>'
}
......@@ -8,14 +8,14 @@
<!-- Sequences for ambulatory_care -->
<record id="seq_commed_ambulatory_care" model="ir.sequence">
<field name="name">Ambulatory Care</field>
<field name="code">commed.ambulatory.care</field>
<field name="code">commed.ambulatory_care</field>
<field name="prefix">AC %(range_year)s/</field>
<field name="padding">3</field>
</record>
<!-- Sequences for patient_rounding -->
<record id="seq_commed_patient_rounding" model="ir.sequence">
<field name="name">Patient Rounding</field>
<field name="code">commed.patient.rounding</field>
<field name="code">commed.patient_rounding</field>
<field name="prefix">ROUND %(range_year)s/</field>
<field name="padding">4</field>
</record>
......
......@@ -3,4 +3,4 @@
# Copyright 2020 LabViv
# License GPL-3.0 or later (http://www.gnu.org/licenses/gpl.html).
from . import health_nursing
from . import commed_nursing
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2020 LabViv -->
<!-- License GPL-3.0 or later (http://www.gnu.org/licenses/gpl.html). -->
<!--
Copyright 2011-2020 GNU Solidario <health@gnusolidario.org>
Copyright 2020 LabViv
License GPL-3.0 or later (http://www.gnu.org/licenses/gpl.html).
-->
<odoo>
<data>
<report string="Nursing rounds"
id="action_report_mod_instrumento_pago"
model="gnuhealth.patient.rounding"
report_type="qweb-pdf"
name="health_nursing.report_gnuhealth_patient_rounding"
file="health_nursing.round_report"
attachment_use="True"
print_report_name="'Nursing rounds - %s ' % object.code"
/>
</data>
<report
string="Nursing rounds"
id="action_report_mod_instrumento_pago"
model="commed.patient_rounding"
report_type="qweb-pdf"
name="commed_nursing.report_commed_patient_rounding"
file="commed_nursing.round_report"
attachment_use="True"
print_report_name="'Nursing rounds - %s ' % object.code"
/>
</odoo>
File mode changed from 100755 to 100644
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2020 LabViv -->
<!-- License GPL-3.0 or later (http://www.gnu.org/licenses/gpl.html). -->
<!--
Copyright 2011-2020 GNU Solidario <health@gnusolidario.org>
Copyright 2020 LabViv
License GPL-3.0 or later (http://www.gnu.org/licenses/gpl.html).
-->
<odoo>
<data>
<template id="report_gnuhealth_patient_rounding">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<t t-call="web.internal_layout">
<div class="page card" style="">
<table class="table table-bordered">
<tbody>
<tr>
<th colspan="3" >Round Code:
<span class="" t-field="o.code"/>
</th>
</tr>
<tr>
<th colspan="3" >Health Professional:
<span class="" t-field="o.health_professional.name"/>
</th>
</tr>
<tr>
<th> Patient: <span t-field="o.name"/> </th>
<td> PUID: <span class="fa fa-2x fa-check-square-o"/> </td>
<td> Sex: <span class="" t-field="o.name.patient.gender"/> </td>
<!-- TODO falta el sexo -->
</tr>
<tr>
<th colspan="1">
Start: <span t-field="o.evaluation_start"/>
</th>
<th colspan="2">
End: <span t-field="o.evaluation_end"/>
</th>
</tr>
</tbody>
</table>
<table class="table">
<template id="report_commed_patient_rounding">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<t t-call="web.internal_layout">
<div class="page card" style="">
<table class="table table-bordered">
<tbody>
<tr>
<th>BP</th>
<th>Temp. (C)</th>
<th>Heart rate</th>
<th>Resp. rate</th>
<th>O2 Sat (%)</th>
<th colspan="3" >Round Code:
<span class="" t-field="o.code"/>
</th>
</tr>
<tr>
<td><span t-field="o.systolic"/> / <span t-field="o.diastolic"/> </td>
<td><span t-field="o.temperature"/> </td>
<td><span t-field="o.bpm"/> </td>
<td><span t-field="o.respiratory_rate"/> </td>
<td><span t-field="o.osat"/> </td>
<th colspan="3" >Health Professional:
<span class="" t-field="o.health_professional.name"/>
</th>
</tr>
<tr>
<th>Weight (kg)</th>
<th>Glycemia</th>
<th>Diuresis</th>
<th>Pain</th>
<th>Evolution</th>
<th> Patient: <span t-field="o.name"/> </th>
<td> PUID: <span class="fa fa-2x fa-check-square-o"/> </td>
<td> Sex: <span class="" t-field="o.name.patient.gender"/> </td>
<!-- TODO falta el sexo -->
</tr>
<tr>
<td><span t-field="o.weight"/> </td>
<td><span t-field="o.glycemia"/> </td>
<td><span t-field="o.diuresis"/> </td>
<!-- TODO <if test="round.pain == True"> Yes<if test="round.pain_level">;
Level: <round.pain_level></if></if><if test="round.pain == False">No</if>
-->
<!-- TODO <if test="round.evolution == 'n'">Status quo</if><if test="round.evolution == 'w'">
Worsening</if><if test="round.evolution == 'i'">Improving</if>-->
<th colspan="1">
Start: <span t-field="o.evaluation_start"/>
</th>
<th colspan="2">
End: <span t-field="o.evaluation_end"/>
</th>
</tr>
</table>
</tbody>
</table>
<div>
<ul><h3>Procedures</h3></ul>
<t t-foreach="o.procedures" t-as="proc">
<li> <span t-esc="proc.description"/> </li>
</t>
</div>
<table class="table">
<tr>
<th>BP</th>
<th>Temp. (C)</th>
<th>Heart rate</th>
<th>Resp. rate</th>
<th>O2 Sat (%)</th>
</tr>
<tr>
<td><span t-field="o.systolic"/> / <span t-field="o.diastolic"/> </td>
<td><span t-field="o.temperature"/> </td>
<td><span t-field="o.bpm"/> </td>
<td><span t-field="o.respiratory_rate"/> </td>
<td><span t-field="o.osat"/> </td>
</tr>
<tr>
<th>Weight (kg)</th>
<th>Glycemia</th>
<th>Diuresis</th>
<th>Pain</th>
<th>Evolution</th>
</tr>
<tr>
<td><span t-field="o.weight"/> </td>
<td><span t-field="o.glycemia"/> </td>
<td><span t-field="o.diuresis"/> </td>
<!-- TODO <if test="round.pain == True"> Yes<if test="round.pain_level">;
Level: <round.pain_level></if></if><if test="round.pain == False">No</if>
-->
<!-- TODO <if test="round.evolution == 'n'">Status quo</if><if test="round.evolution == 'w'">
Worsening</if><if test="round.evolution == 'i'">Improving</if>-->
</tr>
</table>
<div>
<ul><h3>Procedures</h3></ul>
<t t-foreach="o.procedures" t-as="proc">
<li> <span t-esc="proc.description"/> </li>
</t>
</div>
<div>
<h3>Summary</h3>
<p><span class=" " t-field="o.round_summary"/></p>
</div>
<div>
<h3>Summary</h3>
<p><span class=" " t-field="o.round_summary"/></p>
</div>
</t>
</div>
</t>
</t>
</template>
</data>
</t>
</template>
</odoo>
<?xml version="1.0" encoding="utf-8"?>
<!--# Copyright 2020 LabViv-->
<!--# License GPL-3.0 or later (http://www.gnu.org/licenses/gpl.html).-->
<!--
Copyright 2011-2020 GNU Solidario <health@gnusolidario.org>
Copyright 2020 LabViv
License GPL-3.0 or later (http://www.gnu.org/licenses/gpl.html).
-->
<odoo>
<data>
<!-- BEGIN NURSING ADMINISTRATION GROUP ACCESS RIGHTS -->
<!-- Create the Health Nursing Administration group -->
<record model="res.group" id="group_health_nursing_admin">
<field name="name">Health Nursing Administration</field>
</record>
<!-- Assign the Group to the "admin" user -->
<record model="res.user" id="user_admin_group_health_nursing">
<field name="user" ref="res.user_admin"/>
<field name="group" ref="group_health_nursing_admin"/>
</record>
<!-- Access to Menus -->
<record model="ir.ui.menu" id="menu_health_group_health_nursing_admin">
<field name="menu" ref="gnuhealth_nursing_menu"/>
<field name="group" ref="group_health_nursing_admin"/>
</record>
<!-- Access rights to models for the health nursing admin group -->
<record model="ir.model.access" id="access_health_nursing_rounding_admin">
<field name="model" search="[('model', '=', 'gnuhealth.patient.rounding')]"/>
<field name="group" ref="group_health_nursing_admin"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
<field name="perm_create" eval="True"/>
<field name="perm_delete" eval="True"/>
</record>
<record model="ir.model.access" id="access_health_nursing_rounding_procedure_admin">
<field name="model" search="[('model', '=', 'gnuhealth.rounding_procedure')]"/>
<field name="group" ref="group_health_nursing_admin"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
<field name="perm_create" eval="True"/>
<field name="perm_delete" eval="True"/>
</record>
<!-- END OF NURSING ADMINISTRATION GROUP ACCESS RIGHTS -->
<!-- BEGIN DEFAULT ACCESS RIGHTS -->
<!-- Default access rights to models -->
<record model="ir.model.access" id="access_health_nursing_rounding">
<field name="model" search="[('model', '=', 'gnuhealth.patient.rounding')]"/>
<field name="perm_read" eval="False"/>
<field name="perm_write" eval="False"/>
<field name="perm_create" eval="False"/>
<field name="perm_delete" eval="False"/>
</record>
<record model="ir.model.access" id="access_health_nursing_rounding_procedure">
<field name="model" search="[('model', '=', 'gnuhealth.rounding_procedure')]"/>
<field name="perm_read" eval="False"/>
<field name="perm_write" eval="False"/>
<field name="perm_create" eval="False"/>
<field name="perm_delete" eval="False"/>
</record>
<!-- END OF DEFAULT ACCESS RIGHTS -->
<!-- BEGIN NURSING GROUP ACCESS RIGHTS -->
<!-- Create the demo_nurse user -->
<record model="res.user" id="user_demo_nurse">
<field name="name">Health Nurse</field>
<field name="login">demo_nurse</field>
<field name="password">gnusolidario</field>
</record>
<!-- Create the Health Nursing group -->
<record model="res.group" id="group_health_nursing">
<field name="name">Health Nursing</field>
</record>
<!-- Assign the Group to the "demo_nurse" user -->
<record model="res.user-res.group" id="user_nurse_group_health_nursing">
<field name="user" ref="user_demo_nurse"/>
<field name="group" ref="group_health_nursing"/>
</record>
<!-- Access to Menus -->
<record model="ir.ui.menu-res.group" id="menu_health_group_health_nursing">
<field name="menu" ref="health.gnuhealth_menu"/>
<field name="group" ref="group_health_nursing"/>
</record>
<record model="ir.ui.menu-res.group" id="menu_health_nursing_group_health_nursing">
<field name="menu" ref="gnuhealth_nursing_menu"/>
<field name="group" ref="group_health_nursing"/>
</record>
<record model="ir.ui.menu-res.group" id="menu_patients_group_health_nursing">
<field name="menu" ref="health.gnuhealth_patients_menu"/>
<field name="group" ref="group_health_nursing"/>
</record>
<!-- Access rights to models for the health nursing group -->
<record model="ir.model.access" id="access_health_nursing_rounding_nursing">
<field name="model" search="[('model', '=', 'gnuhealth.patient.rounding')]"/>
<field name="group" ref="group_health_nursing"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
<field name="perm_create" eval="True"/>
<field name="perm_delete" eval="True"/>
</record>
<record model="ir.model.access" id="access_health_nursing_rounding_procedure_nursing">
<field name="model" search="[('model', '=', 'gnuhealth.rounding_procedure')]"/>
<field name="group" ref="group_health_nursing"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
<field name="perm_create" eval="True"/>
<field name="perm_delete" eval="True"/>
</record>
<record model="ir.model.access" id="access_health_nursing_inpatient_registration_nursing">
<field name="model" search="[('model', '=', 'commed.inpatient_registration')]"/>
<field name="group" ref="group_health_nursing"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="False"/>
<field name="perm_create" eval="False"/>
<field name="perm_delete" eval="False"/>
</record>
<record model="ir.model.access" id="access_health_patient_evaluation_nursing">
<field name="model" search="[('model', '=', 'commed.patient_evaluation')]"/>
<field name="group" ref="group_health_nursing"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
<field name="perm_create" eval="True"/>
<field name="perm_delete" eval="False"/>
</record>
<record model="ir.model.access" id="access_commed_vaccination_nursing">
<field name="model" search="[('model', '=', 'gnuhealth.vaccination')]"/>
<field name="group" ref="group_health_nursing"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
<field name="perm_create" eval="True"/>
<field name="perm_delete" eval="False"/>
</record>
<record model="ir.model.access" id="access_health_procedure_nursing">
<field name="model" search="[('model', '=', 'commed.procedure')]"/>
<field name="group" ref="group_health_nursing"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="False"/>
<field name="perm_create" eval="False"/>
<field name="perm_delete" eval="False"/>
</record>
<!-- END OF NURSING GROUP ACCESS RIGHTS -->
</data>
<!-- Create the Health Nursing Administration group -->
<record model="res.group" id="group_commed_nursing_admin">
<field name="name">Health Nursing Administration</field>
</record>
<!-- Assign the Group to the "admin" user -->
<record model="res.user" id="user_admin_group_commed_nursing">
<field name="user" ref="res.user_admin"/>
<field name="group" ref="group_commed_nursing_admin"/>
</record>
<!-- Access to Menus -->
<record model="ir.ui.menu" id="menu_health_group_commed_nursing_admin">
<field name="menu" ref="gnucommed_nursing_menu"/>
<field name="group" ref="group_commed_nursing_admin"/>
</record>
<!-- <record model="ir.model.access" id="access_commed_nursing_rounding_admin">
<field name="model" search="[('model', '=', 'commed.patient_rounding')]"/>
<field name="group" ref="group_commed_nursing_admin"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
<field name="perm_create" eval="True"/>
<field name="perm_delete" eval="True"/>
</record> -->
<!-- <record model="ir.model.access" id="access_commed_nursing_rounding_procedure_admin">
<field name="model" search="[('model', '=', 'commed.rounding_procedure')]"/>
<field name="group" ref="group_commed_nursing_admin"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
<field name="perm_create" eval="True"/>
<field name="perm_delete" eval="True"/>
</record> -->
<!-- <record model="ir.model.access" id="access_commed_nursing_rounding">
<field name="model" search="[('model', '=', 'commed.patient_rounding')]"/>
<field name="perm_read" eval="False"/>
<field name="perm_write" eval="False"/>
<field name="perm_create" eval="False"/>
<field name="perm_delete" eval="False"/>
</record> -->
<!-- <record model="ir.model.access" id="access_commed_nursing_rounding_procedure">
<field name="model" search="[('model', '=', 'commed.rounding_procedure')]"/>
<field name="perm_read" eval="False"/>
<field name="perm_write" eval="False"/>
<field name="perm_create" eval="False"/>
<field name="perm_delete" eval="False"/>
</record> -->
<!-- <record model="res.user" id="user_demo_nurse">
<field name="name">Health Nurse</field>
<field name="login">demo_nurse</field>
<field name="password">gnusolidario</field>
</record> -->
<!-- <record model="res.group" id="group_commed_nursing">
<field name="name">Health Nursing</field>
</record> -->
<!-- <record model="res.user-res.group" id="user_nurse_group_commed_nursing">
<field name="user" ref="user_demo_nurse"/>
<field name="group" ref="group_commed_nursing"/>
</record> -->
<!-- <record model="ir.ui.menu-res.group" id="menu_health_group_commed_nursing">
<field name="menu" ref="health.commed_menu"/>
<field name="group" ref="group_commed_nursing"/>
</record> -->
<!-- <record model="ir.ui.menu-res.group" id="menu_commed_nursing_group_commed_nursing">
<field name="menu" ref="gnucommed_nursing_menu"/>
<field name="group" ref="group_commed_nursing"/>
</record> -->
<!-- <record model="ir.ui.menu-res.group" id="menu_patients_group_commed_nursing">
<field name="menu" ref="health.commed_patients_menu"/>
<field name="group" ref="group_commed_nursing"/>
</record> -->
<!-- <record model="ir.model.access" id="access_commed_nursing_rounding_nursing">
<field name="model" search="[('model', '=', 'commed.patient_rounding')]"/>
<field name="group" ref="group_commed_nursing"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
<field name="perm_create" eval="True"/>
<field name="perm_delete" eval="True"/>
</record>
<record model="ir.model.access" id="access_commed_nursing_rounding_procedure_nursing">
<field name="model" search="[('model', '=', 'commed.rounding_procedure')]"/>
<field name="group" ref="group_commed_nursing"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
<field name="perm_create" eval="True"/>
<field name="perm_delete" eval="True"/>
</record>
<record model="ir.model.access" id="access_commed_nursing_inpatient_registration_nursing">
<field name="model" search="[('model', '=', 'commed.inpatient_registration')]"/>
<field name="group" ref="group_commed_nursing"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="False"/>
<field name="perm_create" eval="False"/>
<field name="perm_delete" eval="False"/>
</record>
<record model="ir.model.access" id="access_health_patient_evaluation_nursing">
<field name="model" search="[('model', '=', 'commed.patient_evaluation')]"/>
<field name="group" ref="group_commed_nursing"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
<field name="perm_create" eval="True"/>
<field name="perm_delete" eval="False"/>
</record>
<record model="ir.model.access" id="access_commed_vaccination_nursing">
<field name="model" search="[('model', '=', 'commed.vaccination')]"/>
<field name="group" ref="group_commed_nursing"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="True"/>
<field name="perm_create" eval="True"/>
<field name="perm_delete" eval="False"/>
</record>
<record model="ir.model.access" id="access_health_procedure_nursing">
<field name="model" search="[('model', '=', 'commed.procedure')]"/>
<field name="group" ref="group_commed_nursing"/>
<field name="perm_read" eval="True"/>
<field name="perm_write" eval="False"/>
<field name="perm_create" eval="False"/>
<field name="perm_delete" eval="False"/>
</record> -->
</odoo>
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_gnuhealth_patient_rounding,gnuhealth.patient.rounding,model_gnuhealth_patient_rounding,,1,1,1,1
access_gnuhealth_rounding_procedure,gnuhealth.rounding.procedure,model_gnuhealth_rounding_procedure,,1,1,1,1
access_gnuhealth_patient_ambulatory_care,gnuhealth.patient.ambulatory.care,model_gnuhealth_patient_ambulatory_care,,1,1,1,1
access_gnuhealth_ambulatory_care_procedure,gnuhealth.ambulatory.care.procedure,model_gnuhealth_ambulatory_care_procedure,,1,1,1,1
access_gnuhealth_procedure,commed.procedure,model_gnuhealth_procedure,,1,1,1,1
access_commed_patient_rounding,commed.patient_rounding,model_commed_patient_rounding,,1,1,1,1