[med-svn] [Git][med-team/gnumed-server][upstream] New upstream version 22.9

Andreas Tille gitlab at salsa.debian.org
Thu Feb 27 10:59:14 GMT 2020



Andreas Tille pushed to branch upstream at Debian Med / gnumed-server


Commits:
4078e714 by Andreas Tille at 2020-02-27T11:44:17+01:00
New upstream version 22.9
- - - - -


10 changed files:

- server/bootstrap/fixup_db-v22.conf
- server/bootstrap/update_db-v21_v22.conf
- server/doc/schema/gnumed-entire_schema.html
- server/sql/v21-v22/data/v22-Begleitbrief.tex
- server/sql/v21-v22/data/v22-Begleitbrief_mit_Diagnosen.tex
- server/sql/v21-v22/dynamic/v22-clin-v_candidate_diagnoses.sql
- + server/sql/v21-v22/fixups/v22-clin-v_candidate_diagnoses-fixup.sql
- server/sql/v21-v22/fixups/v22-release_notes-fixup.sql
- server/sql/v21-v22/python/v22-2-fixup-form-templates.py
- server/sql/v21-v22/python/v22-import-form-templates.py


Changes:

=====================================
server/bootstrap/fixup_db-v22.conf
=====================================
@@ -30,6 +30,7 @@ schema = $schema$
 v22-ref-paperwork_templates-fixups.sql
 v22-invoice_id_grants-fixup.sql
 v22-i18n-lang_funcs-fixup.sql
+v22-clin-v_candidate_diagnoses-fixup.sql
 v22-release_notes-fixup.sql
 $schema$
 


=====================================
server/bootstrap/update_db-v21_v22.conf
=====================================
@@ -162,6 +162,7 @@ schema = $schema$
 v22-ref-paperwork_templates-fixups.sql
 v22-invoice_id_grants-fixup.sql
 v22-i18n-lang_funcs-fixup.sql
+v22-clin-v_candidate_diagnoses-fixup.sql
 v22-release_notes-fixup.sql
 $schema$
 


=====================================
server/doc/schema/gnumed-entire_schema.html
=====================================
@@ -112,7 +112,7 @@
   <body>
 
     <!-- Primary Index -->
-	<p><br><br>Dumped on 2019-11-10</p>
+	<p><br><br>Dumped on 2019-12-05</p>
 <h1><a name="index">Index of database - gnumed_v22</a></h1>
 <ul>
     


=====================================
server/sql/v21-v22/data/v22-Begleitbrief.tex
=====================================
@@ -118,7 +118,7 @@ $<if_debugging:://%::>$\renewcommand*\ShowFrameColor{\color{red}}		% configure s
 	$3<ph_cfg::argumentsdivider//#3#//%% <%(name)s> set to [%(value)s]::>3$
 	$2<ph_cfg::argumentsdivider//#2#//%% <%(name)s> set to [%(value)s]::>2$
 	$1<ph_cfg::argumentsdivider//#1#//%% <%(name)s> set to [%(value)s]::>1$
-	$3<if_not_empty::$<data_snippet::praxis-logo#1#%s#1#image/png#1#.png::>$#3#$2<if_not_empty::$<praxis_comm::web::>$#2#\href{http://%s}{$1<data_snippet::praxis-logo#1#\includegraphics[width=20mm]{%s}#1#image/png#1#.png::250>1$}#2#$1<data_snippet::praxis-logo#1#\includegraphics[width=20mm]{%s}#1#image/png#1#.png::250>1$::>2$#3#\href{https://www.scan2pay.info}{\includegraphics[width=15mm]{$<praxis_scan2pay::fmt=qr::>$}} %% no praxis logo available::>3$
+	$3<if_not_empty::$1<data_snippet::praxis-logo#1#%s#1#image/png#1#.png::>1$#3#$2<if_not_empty::$1<praxis_comm::web::>1$#2#\href{http://%s}{$1<data_snippet::praxis-logo#1#\includegraphics[width=20mm]{%s}#1#image/png#1#.png::250>1$}#2#$1<data_snippet::praxis-logo#1#\includegraphics[width=20mm]{%s}#1#image/png#1#.png::250>1$::>2$#3#$2<if_not_empty::$1<praxis_scan2pay::fmt=txt::>1$#2#\href{https://www.scan2pay.info}{\includegraphics[width=15mm]{$1<praxis_scan2pay::fmt=qr::>1$}} %% no praxis logo available#2#% no praxis logo available::>2$::>3$
 	$1<ph_cfg::argumentsdivider//DEFAULT//%% <%(name)s> set to [%(value)s]::>1$
 	$2<ph_cfg::argumentsdivider//DEFAULT//%% <%(name)s> set to [%(value)s]::>2$
 	$3<ph_cfg::argumentsdivider//DEFAULT//%% <%(name)s> set to [%(value)s]::>3$


=====================================
server/sql/v21-v22/data/v22-Begleitbrief_mit_Diagnosen.tex
=====================================
@@ -118,7 +118,7 @@ $<if_debugging:://%::>$\renewcommand*\ShowFrameColor{\color{red}}		% configure s
 	$3<ph_cfg::argumentsdivider//#3#//%% <%(name)s> set to [%(value)s]::>3$
 	$2<ph_cfg::argumentsdivider//#2#//%% <%(name)s> set to [%(value)s]::>2$
 	$1<ph_cfg::argumentsdivider//#1#//%% <%(name)s> set to [%(value)s]::>1$
-	$3<if_not_empty::$<data_snippet::praxis-logo#1#%s#1#image/png#1#.png::>$#3#$2<if_not_empty::$<praxis_comm::web::>$#2#\href{http://%s}{$1<data_snippet::praxis-logo#1#\includegraphics[width=20mm]{%s}#1#image/png#1#.png::250>1$}#2#$1<data_snippet::praxis-logo#1#\includegraphics[width=20mm]{%s}#1#image/png#1#.png::250>1$::>2$#3#\href{https://www.scan2pay.info}{\includegraphics[width=15mm]{$<praxis_scan2pay::fmt=qr::>$}} %% no praxis logo available::>3$
+	$3<if_not_empty::$1<data_snippet::praxis-logo#1#%s#1#image/png#1#.png::>1$#3#$2<if_not_empty::$1<praxis_comm::web::>1$#2#\href{http://%s}{$1<data_snippet::praxis-logo#1#\includegraphics[width=20mm]{%s}#1#image/png#1#.png::250>1$}#2#$1<data_snippet::praxis-logo#1#\includegraphics[width=20mm]{%s}#1#image/png#1#.png::250>1$::>2$#3#$2<if_not_empty::$1<praxis_scan2pay::fmt=txt::>1$#2#\href{https://www.scan2pay.info}{\includegraphics[width=15mm]{$1<praxis_scan2pay::fmt=qr::>1$}} %% no praxis logo available#2#% no praxis logo available::>2$::>3$
 	$1<ph_cfg::argumentsdivider//DEFAULT//%% <%(name)s> set to [%(value)s]::>1$
 	$2<ph_cfg::argumentsdivider//DEFAULT//%% <%(name)s> set to [%(value)s]::>2$
 	$3<ph_cfg::argumentsdivider//DEFAULT//%% <%(name)s> set to [%(value)s]::>3$


=====================================
server/sql/v21-v22/dynamic/v22-clin-v_candidate_diagnoses.sql
=====================================
@@ -17,7 +17,7 @@ create view clin.v_candidate_diagnoses as
 	-- health issues
 	select
 		(select c_enc.fk_patient from clin.encounter c_enc where c_enc.pk = c_hi.fk_encounter) as pk_patient,
-		c_hi.description || ' (' || c_hi.laterality || ')' as diagnosis,
+		c_hi.description || coalesce(' (' || c_hi.laterality || ')' ,'') as diagnosis,
 		c_hi.is_confidential AS explicitely_confidential,
 		c_hi.diagnostic_certainty_classification,
 		'clin.health_issue' AS source
@@ -86,4 +86,4 @@ comment on view clin.v_candidate_diagnoses is
 grant select on clin.v_candidate_diagnoses to group "gm-doctors";
 
 -- --------------------------------------------------------------
-select gm.log_script_insertion('v22-clin-v_candidate_diagnoses.sql', '22.0');
+select gm.log_script_insertion('v22-clin-v_candidate_diagnoses.sql', '22.9');


=====================================
server/sql/v21-v22/fixups/v22-clin-v_candidate_diagnoses-fixup.sql
=====================================
@@ -0,0 +1,89 @@
+-- ==============================================================
+-- GNUmed database schema change script
+--
+-- License: GPL v2 or later
+-- Author: Karsten.Hilbert at gmx.net
+--
+-- ==============================================================
+\set ON_ERROR_STOP 1
+--set default_transaction_read_only to off;
+
+-- --------------------------------------------------------------
+drop view if exists clin.v_candidate_diagnoses cascade ;
+
+
+create view clin.v_candidate_diagnoses as
+
+	-- health issues
+	select
+		(select c_enc.fk_patient from clin.encounter c_enc where c_enc.pk = c_hi.fk_encounter) as pk_patient,
+		c_hi.description || coalesce(' (' || c_hi.laterality || ')' ,'') as diagnosis,
+		c_hi.is_confidential AS explicitely_confidential,
+		c_hi.diagnostic_certainty_classification,
+		'clin.health_issue' AS source
+	from clin.health_issue c_hi
+
+union all
+
+	-- open episodes
+	select
+		(select c_enc.fk_patient from clin.encounter c_enc where c_enc.pk = c_epi.fk_encounter) as pk_patient,
+		c_epi.description as diagnosis,
+		coalesce (
+			(select c_hi.is_confidential from clin.health_issue c_hi where c_hi.pk = c_epi.fk_health_issue),
+			FALSE
+		) AS explicitely_confidential,
+		c_epi.diagnostic_certainty_classification,
+		'clin.episode' AS source
+	from clin.episode c_epi
+	where c_epi.is_open IS TRUE
+
+union all
+
+	-- AOE from encounters of open episodes
+	select
+		c_enc.fk_patient as pk_patient,
+		c_enc.assessment_of_encounter as diagnosis,
+		-- coalesce into issue
+		FALSE::bool AS explicitely_confidential,
+		NULL::text AS diagnostic_certainty_classification,
+		'clin.encounter' AS source
+	from clin.encounter c_enc
+	where
+		c_enc.assessment_of_encounter IS NOT NULL
+			and
+		c_enc.pk IN (
+			select c_cri.fk_encounter from clin.clin_root_item c_cri where c_cri.fk_episode in (
+				select c_epi.pk from clin.episode c_epi where c_epi.is_open IS TRUE
+			)
+		)
+
+union all
+
+	-- soAp from narrative in open episodes
+	select
+		(select c_enc.fk_patient from clin.encounter c_enc where c_enc.pk = c_cn.fk_encounter) as pk_patient,
+		c_cn.narrative as diagnosis,
+		-- coalesce into issue
+		FALSE::bool AS explicitely_confidential,
+		NULL::text as diagnostic_certainty_classification,
+		'clin.clin_narrative' as source
+	from clin.clin_narrative c_cn
+	where
+		c_cn.soap_cat = 'a'
+			and
+		c_cn.fk_episode in (
+			select c_epi.pk from clin.episode c_epi where c_epi.is_open IS TRUE
+		)
+
+;
+
+
+comment on view clin.v_candidate_diagnoses is
+	'Candidates for diagnoses.';
+
+
+grant select on clin.v_candidate_diagnoses to group "gm-doctors";
+
+-- --------------------------------------------------------------
+select gm.log_script_insertion('v22-clin-v_candidate_diagnoses-fixup.sql', '22.9');


=====================================
server/sql/v21-v22/fixups/v22-release_notes-fixup.sql
=====================================
@@ -17,19 +17,21 @@ INSERT INTO dem.message_inbox (
 ) VALUES (
 	(select pk from dem.staff where db_user = 'any-doc'),
 	(select pk_type from dem.v_inbox_item_type where type = 'memo' and category = 'administrative'),
-	'Release Notes for GNUmed 1.7.8 (database v22.8)',
-	'GNUmed 1.7.8 Release Notes:
+	'Release Notes for GNUmed 1.7.9 (database v22.9)',
+	'GNUmed 1.7.9 Release Notes:
 
-	1.7.8
+	1.7.9
 
-FIX: billing: invoice ID template configuration [thanks Marc]
-FIX: config: top pane lab panel setting [thanks Jelle Mous]
-FIX: searching across active EMR [thanks Eberhard]
+FIX: billing: invoice ID generation [thanks Marc]
+FIX: dist: GNUmed Manual d/l URL
+FIX: template: letter w/ & w/o Dx-s
+FIX: paperwork: letter receiver dlg address selection
+FIX: EMR/tree: exception on loading visual progress notes
 
-	22.8
+	22.9
 
-FIX: i18n.set_curr/force_curr_lang()
+FIX: clin.v_candidate_diagnoses: missing coalesce()
 ');
 
 -- --------------------------------------------------------------
-select gm.log_script_insertion('v22-release_notes-fixup.sql', '22.8');
+select gm.log_script_insertion('v22-release_notes-fixup.sql', '22.9');


=====================================
server/sql/v21-v22/python/v22-2-fixup-form-templates.py
=====================================
@@ -20,7 +20,7 @@ def run(conn=None):
 		query = u"""
 			UPDATE ref.paperwork_templates SET
 				data = %(data)s::bytea,
-				external_version = '22.6'
+				external_version = '22.9'
 			WHERE
 				name_long = 'Begleitbrief ohne medizinische Daten [K.Hilbert]'""",
 		filename = os.path.join('..', 'sql', 'v21-v22', 'data', 'v22-Begleitbrief.tex'),


=====================================
server/sql/v21-v22/python/v22-import-form-templates.py
=====================================
@@ -19,7 +19,7 @@ def run(conn=None):
 		query = u"""
 			UPDATE ref.paperwork_templates SET
 				data = %(data)s::bytea,
-				external_version = '22.6'
+				external_version = '22.9'
 			WHERE
 				name_long = 'Begleitbrief ohne medizinische Daten [K.Hilbert]'""",
 		filename = os.path.join('..', 'sql', 'v21-v22', 'data', 'v22-Begleitbrief.tex'),
@@ -66,7 +66,7 @@ def run(conn=None):
 		query = u"""
 			UPDATE ref.paperwork_templates SET
 				data = %(data)s::bytea,
-				external_version = '22.6'
+				external_version = '22.9'
 			WHERE
 				name_long = 'Begleitbrief mit Diagnosen [K.Hilbert]'""",
 		filename = os.path.join('..', 'sql', 'v21-v22', 'data', 'v22-Begleitbrief_mit_Diagnosen.tex'),



View it on GitLab: https://salsa.debian.org/med-team/gnumed-server/-/commit/4078e714741653a91184646fbea44a82c1759697

-- 
View it on GitLab: https://salsa.debian.org/med-team/gnumed-server/-/commit/4078e714741653a91184646fbea44a82c1759697
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20200227/8d2df347/attachment-0001.html>


More information about the debian-med-commit mailing list