[med-svn] [gnumed-server] 01/05: Imported Upstream version 21.2

Andreas Tille tille at debian.org
Mon Mar 28 14:46:59 UTC 2016


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository gnumed-server.

commit 428af1a48d6e8bfd8f38268422380c76b0b445c4
Author: Andreas Tille <tille at debian.org>
Date:   Mon Mar 28 08:15:57 2016 +0200

    Imported Upstream version 21.2
---
 server/bootstrap/bootstrap_gm_db_system.py         |  37 ++++++--
 server/bootstrap/update_db-v20_v21.conf            |  72 ++++++++-------
 server/doc/schema/gnumed-entire_schema.html        |   2 +-
 .../v20-v21/dynamic/v21-release_notes-dynamic.sql  | 102 ++++-----------------
 4 files changed, 88 insertions(+), 125 deletions(-)

diff --git a/server/bootstrap/bootstrap_gm_db_system.py b/server/bootstrap/bootstrap_gm_db_system.py
index 339e4ed..ac3beed 100755
--- a/server/bootstrap/bootstrap_gm_db_system.py
+++ b/server/bootstrap/bootstrap_gm_db_system.py
@@ -892,9 +892,26 @@ class database:
 		)
 		target_conn.cookie = 'check_data_plausibility: target'
 
+		all_tests_successful = True
+
 		for idx in range(no_of_queries):
-			tag, old_query = plausibility_queries[idx*2].split('::::')
+			check_def = plausibility_queries[idx*2]
+			if check_def.startswith('--'):
+				_log.debug('skipped: %s', check_def)
+				continue
+
+			tag = u'?'
+			old_query = u'?'
+			try:
+				tag, old_query = check_def.split('::::')
+			except:
+				_log.exception('error in plausibility check, aborting')
+				_log.error('check definition: %s', check_def)
+				print_msg("    ... failed (check definition error)")
+				all_tests_successful = False
+				continue
 			new_query = plausibility_queries[(idx*2) + 1]
+
 			try:
 				rows, idx = gmPG2.run_ro_queries (
 					link_obj = template_conn,
@@ -903,8 +920,11 @@ class database:
 				old_val = rows[0][0]
 			except:
 				_log.exception('error in plausibility check [%s] (old), aborting' % tag)
+				_log.error('SQL: %s', old_query)
 				print_msg("    ... failed (SQL error)")
-				return False
+				all_tests_successful = False
+				continue
+
 			try:
 				rows, idx = gmPG2.run_ro_queries (
 					link_obj = target_conn,
@@ -913,20 +933,25 @@ class database:
 				new_val = rows[0][0]
 			except:
 				_log.exception('error in plausibility check [%s] (new), aborting' % tag)
+				_log.error('SQL: %s', new_query)
 				print_msg("    ... failed (SQL error)")
-				return False
+				all_tests_successful = False
+				continue
 
 			if new_val != old_val:
 				_log.error('plausibility check [%s] failed, expected [%s], found [%s]' % (tag, old_val, new_val))
-				print_msg("    ... failed (check [%s])" % tag)
-				return False
+				_log.error('SQL (old DB): %s', old_query)
+				_log.error('SQL (new DB): %s', new_query)
+				print_msg("    ... failed (data error, check [%s])" % tag)
+				all_tests_successful = False
+				continue
 
 			_log.info('plausibility check [%s] succeeded' % tag)
 
 		template_conn.close()
 		target_conn.close()
 
-		return True
+		return all_tests_successful
 	#--------------------------------------------------------------
 	def check_holy_auth_line(self):
 
diff --git a/server/bootstrap/update_db-v20_v21.conf b/server/bootstrap/update_db-v20_v21.conf
index eabb6d6..566fda0 100644
--- a/server/bootstrap/update_db-v20_v21.conf
+++ b/server/bootstrap/update_db-v20_v21.conf
@@ -163,19 +163,19 @@ $data import scripts$
 # line 2: new database
 upgrade plausibility checks = $upgrade plausibility checks$
 identities::::select count(1) from dem.identity
-	select count(1) from dem.identity
+	select count(1) from dem.identity			-- new
 names::::select count(1) from dem.names
-	select count(1) from dem.names
+	select count(1) from dem.names	-- new
 v_all_persons::::select count(1) from dem.v_persons
-	select count(1) from dem.v_all_persons
+	select count(1) from dem.v_all_persons	-- new
 v_active_persons::::select count(1) from dem.v_basic_person
-	select count(1) from dem.v_active_persons
-staff::::select count(1) from dem.staff
-	select count(1) from dem.staff
+	select count(1) from dem.v_active_persons	-- new
+staff::::select count(1) from dem.staff								-- old
+	select count(1) from dem.v_staff where not person_is_deleted	-- new
 v_staff::::select count(1) from dem.v_staff
-	select count(1) from dem.v_staff
+	select count(1) from dem.v_staff	-- new
 addresses::::select count(1) from dem.address
-	select count(1) from dem.address
+	select count(1) from dem.address	-- new
 episodes::::select count(1) from clin.episode where not summary ilike '%[substance use]%'
 	select count(1) from clin.episode where not summary ilike '%[substance use]%'
 denormalized episodes::::select count(1) from clin.v_pat_episodes where not summary ilike '%[substance use]%'
@@ -266,34 +266,38 @@ export items view::::select count(1) from clin.v_export_items
 	select count(1) from clin.v_export_items
 export items integrity::::select ((select count(1) from clin.export_item) = (select count(1) from clin.v_export_items))
 	select ((select count(1) from clin.export_item) = (select count(1) from clin.v_export_items))
+-- ------------------
+-- commented out:
+--latest vaccinations - vaccine::::select count(1) from clin.v_pat_last_vacc4indication group by pk_vaccine
+--	select count(1) from clin.v_pat_last_vacc4indication group by pk_vaccine
+--v_pat_addresses::::select ((select count(1) from dem.v_pat_addresses) - (select count(1) from dem.lnk_person_org_address l join dem.identity i on (i.pk = l.id_identity) where i.deleted is true))
+--	select count(1) from dem.v_pat_addresses
+--unique URBs with ZIP::::select count(1) from dem.v_uniq_zipped_urbs
+--	select count(1) from dem.v_uniq_zipped_urbs
+--ATC codes::::select count(1) from (select distinct on (code, term, fk_data_source) 1 from ref.atc) as uniq_atc
+--	select count(1) from ref.atc
+--ATC vs generic codes - internal consistency::::select 0
+--	select code, term, fk_data_source from ref.atc except select code, term, fk_data_source from ref.generic_coding_system
+--LOINC codes::::select count(1) from ref.loinc
+--	select count(1) from ref.loinc
+--LOINC vs generic codes - internal consistency::::select 0
+--	select code, term, fk_data_source from ref.loinc except select code, term, fk_data_source from ref.generic_coding_system
+--generic codes (total) - internal consistency::::select True
+--	select ((select count(1) from ref.coding_system_root) = (select ((select count(1) from ref.atc) + (select count(1) from ref.loinc))))
+-- ------------------
+-- for debugging:
+--skipped check::::select 'skipped in old'		-- old
+--	select 'skipped in new'						-- new
+--check definition error::select 1				-- old
+--	select 1									-- new
+--syntax error (old)::::selec 1 				-- old
+--	select 1									-- new
+--syntax error (new)::::select 1 				-- old
+--	selec 1										-- new
+--data mismatch error::::select 1 				-- old
+--	select 2 -- new
 $upgrade plausibility checks$
 
-
-#latest vaccinations - vaccine::::select count(1) from clin.v_pat_last_vacc4indication group by pk_vaccine
-#	select count(1) from clin.v_pat_last_vacc4indication group by pk_vaccine
-
-#v_pat_addresses::::select ((select count(1) from dem.v_pat_addresses) - (select count(1) from dem.lnk_person_org_address l join dem.identity i on (i.pk = l.id_identity) where i.deleted is true))
-#	select count(1) from dem.v_pat_addresses
-
-#unique URBs with ZIP::::select count(1) from dem.v_uniq_zipped_urbs
-#	select count(1) from dem.v_uniq_zipped_urbs
-
-#ATC codes::::select count(1) from (select distinct on (code, term, fk_data_source) 1 from ref.atc) as uniq_atc
-#	select count(1) from ref.atc
-
-#ATC vs generic codes - internal consistency::::select 0
-#	select code, term, fk_data_source from ref.atc except select code, term, fk_data_source from ref.generic_coding_system
-
-#LOINC codes::::select count(1) from ref.loinc
-#	select count(1) from ref.loinc
-
-#LOINC vs generic codes - internal consistency::::select 0
-#	select code, term, fk_data_source from ref.loinc except select code, term, fk_data_source from ref.generic_coding_system
-
-#generic codes (total) - internal consistency::::select True
-#	select ((select count(1) from ref.coding_system_root) = (select ((select count(1) from ref.atc) + (select count(1) from ref.loinc))))
-
-
 #----------------------------------
 [server local host]
 name = 
diff --git a/server/doc/schema/gnumed-entire_schema.html b/server/doc/schema/gnumed-entire_schema.html
index ea91a99..b4a23fa 100644
--- a/server/doc/schema/gnumed-entire_schema.html
+++ b/server/doc/schema/gnumed-entire_schema.html
@@ -112,7 +112,7 @@
   <body>
 
     <!-- Primary Index -->
-	<p><br><br>Dumped on 2016-03-20</p>
+	<p><br><br>Dumped on 2016-03-25</p>
 <h1><a name="index">Index of database - gnumed_v21</a></h1>
 <ul>
     
diff --git a/server/sql/v20-v21/dynamic/v21-release_notes-dynamic.sql b/server/sql/v20-v21/dynamic/v21-release_notes-dynamic.sql
index 38940a6..bf1ca58 100644
--- a/server/sql/v20-v21/dynamic/v21-release_notes-dynamic.sql
+++ b/server/sql/v20-v21/dynamic/v21-release_notes-dynamic.sql
@@ -17,98 +17,32 @@ 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.6.0 (database v21.0)',
-	'GNUmed 1.6.0 Release Notes:
+	'Release Notes for GNUmed 1.6.2 (database v21.2)',
+	'GNUmed 1.6.2 Release Notes:
 
-	1.6.0
+	1.6.2
 
-NEW: plugin: list based EMR journal
-NEW: plugin: limited PACS access (Orthanc DICOM server)
-NEW: text editor like SOAP editor (STC based)
-NEW: first cut at German AMTS medication plan
-NEW: always display select measurements in top panel
-NEW: copy-to-clipboard list content via popup menu
-NEW: region support for placeholder output
-NEW: ellipsis support for placeholder output
-NEW: placeholder $range_of$
-NEW: placeholder $ph_cfg$
-NEW: placeholder $current_meds_AMTS$
-NEW: placeholder $praxis_vcf$
-NEW: placeholder <form_version_internal>
-NEW: placeholder <form_last_modified>
-NEW: placeholder $url_escape$
-NEW: add appdata.xml
-NEW: show patient address in openstreetmap
-NEW: support for substance abuse status (nicotine, ethanol, other)
-NEW: print EMR from EMR tree
-NEW: search in EMR journal view
-NEW: copy EMR journal to export area
-NEW: tooltip in procedures list
-NEW: browse tmp dir, ~/gnumed/, ~/.gnumed/ from client
-NEW: dynamic hint on outdated / questionable EDC
-NEW: HIT risk assessment algorithm
+FIX: exception create consumable substance by ATC
+FIX: exception on showing files of new document
+FIX: exception on saving new document
+FIX: exception on saving substance abuse entry
+FIX: exception on attempting to apply sorting outside list column
 
-IMPROVED: substance intake editing workflow
-IMPROVED: shutdown with dangling top level windows
-IMPROVED: list suppressed dynamic hints in patient overview [thanks Jim]
-IMPROVED: top panel active encounter area layout [thanks Jim]
-IMPROVED: measurements plots layout
-IMPROVED: injectable placeholders: support arbitrary names if desired
-IMPROVED: placeholder nesting regexen
-IMPROVED: enable nested placeholders in text engine, too
-IMPROVED: lab_panel.most_recent_results() can now respect meta types
-IMPROVED: ignore_dupes_on_picking seems a better item picker default
-IMPROVED: overall code towards Python 3 compatibility
-IMPROVED: CODE: cIdentity(Tag) -> cPerson(Tag)
-IMPROVED: security of tmp/sandbox dir setup
-IMPROVED: do not auto-plot results from edit area
-IMPROVED: much faster access to latest vaccinations
-IMPROVED: show all selected parts at once in new-document plugin
-IMPROVED: ask whether to create metadata when saving export area documents
-IMPROVED: EMR journal formatting
-IMPROVED: support deleting more than one list item at a time
-IMPROVED: put file from filename in clipboard into export area
-IMPROVED: startup shell script
-IMPROVED: procedure tooltip in patient overview Hx box
-IMPROVED: external care tooltip in patient overview problems box
-IMPROVED: tooltip in external care management list
-IMPROVED: substance intake timeframe formatting
-IMPROVED: layout of measurements plugin
-IMPROVED: properly show visual progress notes for empty issues in EMR tree
-IMPROVED: support for invoking file manager on a directory
-IMPROVED: show admin SOAP in EMR tree at encounter level
-IMPROVED: ACEI/pregnancy dynamic hint
-IMPROVED: data mining SQL now wants $<ID_ACTIVE_PATIENT>$ rather than $<ID_active_patient>$
-IMPROVED: can now delete EDC
-IMPROVED: support documenting which organization a document originated from
-IMPROVED: workflow for disabling an identity
-IMPROVED: EMR Journal formatting of hospital stays
-IMPROVED: new-document workflow
-IMPROVED: German referral letter
-IMPROVED: include clinical reminders with EMR Journal
+	1.6.1
 
-	21.0
+FIX: gm-describe_file missing in tarball
 
-NEW: require PG 9.2 because of pg_trigger_depth()
+IMPROVED: manpages for gm-create_dicomdir/gm-create_datamatrix
 
-NEW: dem.v_basic_person -> dem.v_active_persons
-NEW: prevent deletion of staff records that are in use
-NEW: smoking support in clin.patient
-NEW: constraints on audit trail to be in the past
-NEW: check for track_commit_timestamp on PG > 9.5
-NEW: chunked md5() for large objects
-NEW: backup/restore scripts based on directory format
+	21.2
 
-IMPROVED: database restore default configuration
-IMPROVED: more resilient backups
-IMPROVED: all input files now utf8 (io.open() Py3 preps)
-IMPROVED: dem.state -> dem.region
-IMPROVED: dem.region.id -> dem.region.pk
-IMPROVED: dem.urb.id_state -> dem.urb.fk_region
+NEW: implement commenting out of plausibility checks
 
-FIX: pg_trgm placement and use
-FIX: trigger on clin.procedure normalizing .is_ongoing
+IMPROVED: run all plausibility checks even if any fail
+IMPROVED: more resilience against malformed plausibility checks
+
+FIX: inaccurate dem.v_staff plausibility check [thanks Marc]
 ');
 
 -- --------------------------------------------------------------
-select gm.log_script_insertion('v21-release_notes-dynamic.sql', '21.0');
+select gm.log_script_insertion('v21-release_notes-dynamic.sql', '21.2');

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/gnumed-server.git



More information about the debian-med-commit mailing list