- Version 3.6.4
additional functionality for COVID-19 and epidemiology tracing new epidemiology evaluations lab1.diff and lab2.diff removed, included in new version OBS-URL: https://build.opensuse.org/package/show/Application:ERP:GNUHealth:Factory/gnuhealth?expand=0&rev=57
This commit is contained in:
parent
3b66a4a938
commit
d72833bd97
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:ac96d19802dbe16f854a6a55a52afda18e42e4dd6da86da9e724a0b0a8f9330f
|
|
||||||
size 10492316
|
|
3
gnuhealth-3.6.4.tar.gz
Normal file
3
gnuhealth-3.6.4.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:398a181d0f8d60ba00d60e8a2424c06a1d073ed55adde42f35cf45e45b46de8e
|
||||||
|
size 10733801
|
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat May 16 16:16:58 UTC 2020 - Axel Braun <axel.braun@gmx.de>
|
||||||
|
|
||||||
|
- Version 3.6.4
|
||||||
|
additional functionality for COVID-19 and epidemiology tracing
|
||||||
|
new epidemiology evaluations
|
||||||
|
lab1.diff and lab2.diff removed, included in new version
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Apr 22 09:42:49 UTC 2020 - Axel Braun <axel.braun@gmx.de>
|
Wed Apr 22 09:42:49 UTC 2020 - Axel Braun <axel.braun@gmx.de>
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
%define majorver 3.6
|
%define majorver 3.6
|
||||||
Name: gnuhealth
|
Name: gnuhealth
|
||||||
|
|
||||||
Version: %{majorver}.3
|
Version: %{majorver}.4
|
||||||
Release: 0
|
Release: 0
|
||||||
|
|
||||||
# List of additional build dependencies
|
# List of additional build dependencies
|
||||||
@ -43,8 +43,6 @@ Source5: openSUSE-gnuhealth-setup
|
|||||||
Source6: gnuhealth
|
Source6: gnuhealth
|
||||||
Source7: gnuhealth-rpmlintrc
|
Source7: gnuhealth-rpmlintrc
|
||||||
Patch0: shebang.diff
|
Patch0: shebang.diff
|
||||||
Patch1: lab1.diff
|
|
||||||
Patch2: lab2.diff
|
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
@ -108,8 +106,6 @@ This package provides the interface to Orthanc
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{version}
|
%setup -q -n %{name}-%{version}
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%patch1 -p1
|
|
||||||
%patch2 -p1
|
|
||||||
cp %{S:1} .
|
cp %{S:1} .
|
||||||
cp %{S:2} .
|
cp %{S:2} .
|
||||||
|
|
||||||
|
154
lab1.diff
154
lab1.diff
@ -1,154 +0,0 @@
|
|||||||
# HG changeset patch
|
|
||||||
# User Luis Falcon <falcon@gnuhealth.org>
|
|
||||||
# Date 1585952786 -3600
|
|
||||||
# Node ID 79084d43ec44b89679016a699060bdd8a0033e88
|
|
||||||
# Parent bf15b71efbd4b1ff7230520165f264c23586e576
|
|
||||||
health_lab: task #15563: Assign health condition from a confirmed lab
|
|
||||||
|
|
||||||
* Include the lab_confirmed and lab test ID reference on the patient health condition model
|
|
||||||
* Include in the tree view lab confirmed conditions
|
|
||||||
* Search/ filter by lab confirmed pathologies
|
|
||||||
* Include the pathology in the patient lab test form
|
|
||||||
|
|
||||||
diff --git a/health_lab/__init__.py b/health_lab/__init__.py
|
|
||||||
--- a/health_lab/__init__.py
|
|
||||||
+++ b/health_lab/__init__.py
|
|
||||||
@@ -40,6 +40,7 @@
|
|
||||||
CreateLabTestOrderInit,
|
|
||||||
RequestTest,
|
|
||||||
RequestPatientLabTestStart,
|
|
||||||
+ PatientHealthCondition,
|
|
||||||
module='health_lab', type_='model')
|
|
||||||
Pool.register(
|
|
||||||
CreateLabTestOrder,
|
|
||||||
diff --git a/health_lab/health_lab.py b/health_lab/health_lab.py
|
|
||||||
--- a/health_lab/health_lab.py
|
|
||||||
+++ b/health_lab/health_lab.py
|
|
||||||
@@ -27,12 +27,12 @@
|
|
||||||
from trytond.pool import Pool
|
|
||||||
from trytond import backend
|
|
||||||
from trytond.tools.multivalue import migrate_property
|
|
||||||
-
|
|
||||||
+from trytond.pyson import Eval, Not, Bool, PYSONEncoder, Equal, And, Or, If
|
|
||||||
|
|
||||||
__all__ = ['GnuHealthSequences', 'GnuHealthSequenceSetup',
|
|
||||||
'PatientData', 'TestType', 'Lab',
|
|
||||||
'GnuHealthLabTestUnits', 'GnuHealthTestCritearea',
|
|
||||||
- 'GnuHealthPatientLabTest']
|
|
||||||
+ 'GnuHealthPatientLabTest','PatientHealthCondition']
|
|
||||||
|
|
||||||
sequences = ['lab_sequence', 'lab_request_sequence']
|
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@
|
|
||||||
lab_sequence = fields.Many2One('ir.sequence',
|
|
||||||
'Lab Result Sequence', required=True,
|
|
||||||
domain=[('code', '=', 'gnuhealth.lab')])
|
|
||||||
-
|
|
||||||
+
|
|
||||||
@classmethod
|
|
||||||
def __register__(cls, module_name):
|
|
||||||
TableHandler = backend.get('TableHandler')
|
|
||||||
@@ -112,7 +112,7 @@
|
|
||||||
ModelData = pool.get('ir.model.data')
|
|
||||||
return ModelData.get_id(
|
|
||||||
'health_lab', 'seq_gnuhealth_lab_test')
|
|
||||||
-
|
|
||||||
+
|
|
||||||
# END SEQUENCE SETUP , MIGRATION FROM FIELDS.MultiValue
|
|
||||||
|
|
||||||
|
|
||||||
@@ -194,6 +194,11 @@
|
|
||||||
date_analysis = fields.DateTime('Date of the Analysis', select=True)
|
|
||||||
request_order = fields.Integer('Request', readonly=True)
|
|
||||||
|
|
||||||
+ pathology = fields.Many2One(
|
|
||||||
+ 'gnuhealth.pathology', 'Pathology',
|
|
||||||
+ help='Pathology confirmed / associated to this lab test. '
|
|
||||||
+ 'If set, a new health condition will be generated for the person')
|
|
||||||
+
|
|
||||||
analytes_summary = \
|
|
||||||
fields.Function(fields.Text('Summary'),
|
|
||||||
'get_analytes_summary')
|
|
||||||
@@ -415,3 +420,18 @@
|
|
||||||
default['date'] = cls.default_date()
|
|
||||||
return super(GnuHealthPatientLabTest, cls).copy(tests,
|
|
||||||
default=default)
|
|
||||||
+
|
|
||||||
+class PatientHealthCondition(ModelSQL, ModelView):
|
|
||||||
+ 'Patient Conditions History'
|
|
||||||
+ __name__ = 'gnuhealth.patient.disease'
|
|
||||||
+
|
|
||||||
+ # Adds lab confirmed and the link to the test to the
|
|
||||||
+ # Patient health Condition
|
|
||||||
+
|
|
||||||
+ lab_confirmed = fields.Boolean('Lab Confirmed', help='Confirmed by'
|
|
||||||
+ ' laboratory test')
|
|
||||||
+
|
|
||||||
+ lab_test = fields.Many2One('gnuhealth.lab','Lab Test',
|
|
||||||
+ domain=[('patient', '=', Eval('name'))], depends=['name'],
|
|
||||||
+ states={'invisible': Not(Bool(Eval('lab_confirmed')))},
|
|
||||||
+ help='Lab test that confirmed the condition')
|
|
||||||
diff --git a/health_lab/health_lab_view.xml b/health_lab/health_lab_view.xml
|
|
||||||
--- a/health_lab/health_lab_view.xml
|
|
||||||
+++ b/health_lab/health_lab_view.xml
|
|
||||||
@@ -194,5 +194,19 @@
|
|
||||||
<field name="action" ref="act_patient_lab_history_form1"/>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
+<!-- PATIENT HEALTH CONDITION -->
|
|
||||||
+
|
|
||||||
+ <record model="ir.ui.view" id="view_gnuhealth_patient_diseases_view_form">
|
|
||||||
+ <field name="model">gnuhealth.patient.disease</field>
|
|
||||||
+ <field name="inherit" ref="health.gnuhealth_patient_diseases_view_form"/>
|
|
||||||
+ <field name="name">gnuhealth_patient_health_condition_form</field>
|
|
||||||
+ </record>
|
|
||||||
+
|
|
||||||
+ <record model="ir.ui.view" id="tree_gnuhealth_patient_diseases">
|
|
||||||
+ <field name="model">gnuhealth.patient.disease</field>
|
|
||||||
+ <field name="inherit" ref="health.gnuhealth_patient_diseases_tree"/>
|
|
||||||
+ <field name="name">gnuhealth_patient_health_condition_tree</field>
|
|
||||||
+ </record>
|
|
||||||
+
|
|
||||||
</data>
|
|
||||||
</tryton>
|
|
||||||
diff --git a/health_lab/view/gnuhealth_lab.xml b/health_lab/view/gnuhealth_lab.xml
|
|
||||||
--- a/health_lab/view/gnuhealth_lab.xml
|
|
||||||
+++ b/health_lab/view/gnuhealth_lab.xml
|
|
||||||
@@ -20,6 +20,9 @@
|
|
||||||
<field name="requestor"/>
|
|
||||||
<label name="request_order"/>
|
|
||||||
<field name="request_order"/>
|
|
||||||
+ <label name="pathology"/>
|
|
||||||
+ <field name="pathology"/>
|
|
||||||
+ <newline/>
|
|
||||||
<field name="critearea" colspan="4" view_ids="health_lab.test_critearea_view_tree_lab,health_lab.test_critearea_view_form_lab"/>
|
|
||||||
</page>
|
|
||||||
<page string="Extra Info" id="lab_extra_info">
|
|
||||||
diff --git a/health_lab/view/gnuhealth_patient_health_condition_form.xml b/health_lab/view/gnuhealth_patient_health_condition_form.xml
|
|
||||||
new file mode 100644
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/health_lab/view/gnuhealth_patient_health_condition_form.xml
|
|
||||||
@@ -0,0 +1,11 @@
|
|
||||||
+<?xml version="1.0"?>
|
|
||||||
+<data>
|
|
||||||
+ <xpath expr="/form/group[@id="group_related_evaluations"]" position="before">
|
|
||||||
+ <group string="Laboratory" colspan="4" id="group_lab_info">
|
|
||||||
+ <label name="lab_confirmed"/>
|
|
||||||
+ <field name="lab_confirmed"/>
|
|
||||||
+ <label name="lab_test"/>
|
|
||||||
+ <field name="lab_test"/>
|
|
||||||
+ </group>
|
|
||||||
+ </xpath>
|
|
||||||
+</data>
|
|
||||||
diff --git a/health_lab/view/gnuhealth_patient_health_condition_tree.xml b/health_lab/view/gnuhealth_patient_health_condition_tree.xml
|
|
||||||
new file mode 100644
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/health_lab/view/gnuhealth_patient_health_condition_tree.xml
|
|
||||||
@@ -0,0 +1,6 @@
|
|
||||||
+<?xml version="1.0"?>
|
|
||||||
+<data>
|
|
||||||
+ <xpath expr="/tree/field[@name="disease_severity"]" position="after">
|
|
||||||
+ <field name="lab_confirmed" expand="1"/>
|
|
||||||
+ </xpath>
|
|
||||||
+</data>
|
|
||||||
|
|
75
lab2.diff
75
lab2.diff
@ -1,75 +0,0 @@
|
|||||||
# HG changeset patch
|
|
||||||
# User Luis Falcon <falcon@gnuhealth.org>
|
|
||||||
# Date 1586114129 -3600
|
|
||||||
# Node ID 18af72df5cbef5adb45559c3c469f53bf40013a5
|
|
||||||
# Parent e8a18c4ad9b29a7f6af3a3ff3bd5d127c590e135
|
|
||||||
task #15563: Assign health condition from a confirmed lab. Health_crypto_lab
|
|
||||||
|
|
||||||
#health_crypto_lab:
|
|
||||||
#
|
|
||||||
#Once the lab test is VALIDATED, and the confirmed pathology is enter in the lab test, the following events will be automatically #triggered:
|
|
||||||
#
|
|
||||||
#-> A new health condition will be created in the patient history, with the condition confirmed, and the link to the the lab test.
|
|
||||||
#
|
|
||||||
#-> Two pages of life (PoL) will be created:
|
|
||||||
#
|
|
||||||
# One for the Lab test
|
|
||||||
# One for the Health condition
|
|
||||||
#
|
|
||||||
#Remember that the validation functionality of the lab test requires the health_crypto_lab.
|
|
||||||
|
|
||||||
diff --git a/health_crypto_lab/health_crypto_lab.py b/health_crypto_lab/health_crypto_lab.py
|
|
||||||
--- a/health_crypto_lab/health_crypto_lab.py
|
|
||||||
+++ b/health_crypto_lab/health_crypto_lab.py
|
|
||||||
@@ -176,6 +176,12 @@
|
|
||||||
if (document.patient.name.federation_account):
|
|
||||||
cls.create_lab_pol (document)
|
|
||||||
|
|
||||||
+ # Create Health condition to the patient
|
|
||||||
+ # if there is a confirmed pathology associated and
|
|
||||||
+ # validated to the lab test result
|
|
||||||
+ if (document.pathology):
|
|
||||||
+ cls.create_health_condition (document)
|
|
||||||
+
|
|
||||||
@classmethod
|
|
||||||
def get_serial(cls,document):
|
|
||||||
|
|
||||||
@@ -241,6 +247,27 @@
|
|
||||||
'invisible': Not(Eval('state') == 'validated'),
|
|
||||||
})]
|
|
||||||
|
|
||||||
+ @classmethod
|
|
||||||
+ def create_health_condition(cls, lab_info):
|
|
||||||
+ """ Create the health condition when specified and
|
|
||||||
+ validated in the lab test
|
|
||||||
+ """
|
|
||||||
+ HealthCondition = Pool().get('gnuhealth.patient.disease')
|
|
||||||
+ health_condition = []
|
|
||||||
+
|
|
||||||
+ vals = {
|
|
||||||
+ 'name': lab_info.patient.id,
|
|
||||||
+ 'pathology': lab_info.pathology,
|
|
||||||
+ 'diagnosed_date': lab_info.date_analysis.date(),
|
|
||||||
+ 'lab_confirmed': True,
|
|
||||||
+ 'lab_test': lab_info.id,
|
|
||||||
+ 'extra_info': lab_info.diagnosis,
|
|
||||||
+ 'healthprof': lab_info.requestor
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ health_condition.append(vals)
|
|
||||||
+ HealthCondition.create(health_condition)
|
|
||||||
+
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def create_lab_pol(cls,lab_info):
|
|
||||||
diff --git a/health/health.py b/health/health.py
|
|
||||||
--- a/health/health.py
|
|
||||||
+++ b/health/health.py
|
|
||||||
@@ -3476,6 +3476,7 @@
|
|
||||||
'node': condition_info.institution and condition_info.institution.name.rec_name
|
|
||||||
}
|
|
||||||
if (condition_info.pathology):
|
|
||||||
+ vals['health_condition'] = condition_info.pathology
|
|
||||||
vals['health_condition_text'] = condition_info.pathology.rec_name
|
|
||||||
vals['health_condition_code'] = condition_info.pathology.code
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user