From 192a4edc97b9788d875346d51a00eb677944f6b1e2aa06ef09d9ea921851b06e Mon Sep 17 00:00:00 2001 From: Axel Braun Date: Wed, 22 Apr 2020 10:09:41 +0000 Subject: [PATCH 1/3] - pre-release of 3.6.4 covering improved diagnostics on COVID-19 lab1.diff and lab2.diff added - clean up of spec file to get rid of warnings added gnuhealth-rpmlintrc OBS-URL: https://build.opensuse.org/package/show/Application:ERP:GNUHealth:Factory/gnuhealth?expand=0&rev=53 --- gnuhealth.changes | 7 +++ gnuhealth.spec | 11 ++-- lab1.diff | 154 ++++++++++++++++++++++++++++++++++++++++++++++ lab2.diff | 75 ++++++++++++++++++++++ 4 files changed, 242 insertions(+), 5 deletions(-) create mode 100644 lab1.diff create mode 100644 lab2.diff diff --git a/gnuhealth.changes b/gnuhealth.changes index 6108c37..29e7845 100644 --- a/gnuhealth.changes +++ b/gnuhealth.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Apr 22 09:42:49 UTC 2020 - Axel Braun + +- pre-release of 3.6.4 covering improved diagnostics on COVID-19 + lab1.diff and lab2.diff added + ------------------------------------------------------------------- Sun Apr 5 08:10:02 UTC 2020 - Axel Braun @@ -15,6 +21,7 @@ Tue Mar 17 13:32:03 UTC 2020 - Axel Braun added gnuhealth-rpmlintrc ------------------------------------------------------------------- +>>>>>>> ./gnuhealth.changes.r63b2f631c45c3a5b2477b50ba818a8ce Sat Mar 14 15:24:49 UTC 2020 - Axel Braun - gnuhealth-control 3.6.3 - added chmod after getlang command diff --git a/gnuhealth.spec b/gnuhealth.spec index 2dfd9b8..e685c52 100644 --- a/gnuhealth.spec +++ b/gnuhealth.spec @@ -43,8 +43,8 @@ Source5: openSUSE-gnuhealth-setup Source6: gnuhealth Source7: gnuhealth-rpmlintrc Patch0: shebang.diff -##atch1: xmlfix.diff -##atch2: demo.diff +Patch1: lab1.diff +Patch2: lab2.diff BuildArch: noarch @@ -108,8 +108,8 @@ This package provides the interface to Orthanc %prep %setup -q -n %{name}-%{version} %patch0 -p1 -##atch1 -p1 -##atch2 -p1 +%patch1 -p1 +%patch2 -p1 cp %{S:1} . cp %{S:2} . @@ -145,7 +145,7 @@ mkdir -p %{buildroot}%{_sysconfdir}/tryton #remove double license file: rm backend/fhir/client/COPYING -#Move FHIR serer to examples directory +#Move FHIR server to examples directory mkdir -p -m 755 %{buildroot}%{_docdir}/%{name}/examples/ mv backend/fhir* %{buildroot}%{_docdir}/%{name}/examples/. rmdir backend @@ -189,6 +189,7 @@ EOF %{python3_sitelib}/trytond/modules/health_orthanc* %files +%defattr(-,root,root) %{_bindir}/gnuhealth-control %{_bindir}/openSUSE-gnuhealth-setup %{_bindir}/install_demo_database.sh diff --git a/lab1.diff b/lab1.diff new file mode 100644 index 0000000..9692986 --- /dev/null +++ b/lab1.diff @@ -0,0 +1,154 @@ +# HG changeset patch +# User Luis Falcon +# 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 @@ + + + ++ ++ ++ ++ gnuhealth.patient.disease ++ ++ gnuhealth_patient_health_condition_form ++ ++ ++ ++ gnuhealth.patient.disease ++ ++ gnuhealth_patient_health_condition_tree ++ ++ + + +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 @@ + +