Commit 2b035b29 authored by Andreas Tille's avatar Andreas Tille
Browse files

New upstream version 22.8

parent 0cad4588
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ schema base directory = ../sql/v21-v22/fixups/
schema = $schema$
v22-ref-paperwork_templates-fixups.sql
v22-invoice_id_grants-fixup.sql
v22-i18n-lang_funcs-fixup.sql
v22-release_notes-fixup.sql
$schema$

+1 −0
Original line number Diff line number Diff line
@@ -161,6 +161,7 @@ schema base directory = ../sql/v21-v22/fixups/
schema = $schema$
v22-ref-paperwork_templates-fixups.sql
v22-invoice_id_grants-fixup.sql
v22-i18n-lang_funcs-fixup.sql
v22-release_notes-fixup.sql
$schema$

+1 −1
Original line number Diff line number Diff line
@@ -112,7 +112,7 @@
  <body>
    <!-- Primary Index -->
	<p><br><br>Dumped on 2019-09-13</p>
	<p><br><br>Dumped on 2019-11-10</p>
<h1><a name="index">Index of database - gnumed_v22</a></h1>
<ul>
    
+56 −0
Original line number Diff line number Diff line
-- ======================================================
-- GNUmed fixed string internationalisation (SQL gettext)
-- ======================================================
-- force terminate + exit(3) on errors if non-interactive
\set ON_ERROR_STOP 1

-- =============================================
drop function if exists i18n.set_curr_lang(text) cascade;

create function i18n.set_curr_lang(text)
	returns boolean
	language 'plpgsql'
	security definer
	as '
DECLARE
	_lang ALIAS FOR $1;
BEGIN
	if exists(select pk from i18n.translations where lang = _lang) then
		delete from i18n.curr_lang where user = SESSION_USER;
		insert into i18n.curr_lang (lang, db_user) values (_lang, SESSION_USER);
		return true;
	end if;
	raise notice ''Cannot set current language to [%]. No translations available.'', _lang;
	return false;
END;
';

comment on function i18n.set_curr_lang(text) is
	'set preferred language:
	 - for "current user"
	 - only if translations for this language are available';

-- =============================================
drop function if exists i18n.force_curr_lang(text) cascade;

create function i18n.force_curr_lang(text)
	returns boolean
	language 'plpgsql'
	security definer
	as '
DECLARE
    _lang ALIAS FOR $1;
BEGIN
    raise notice ''Forcing current language to [%] without checking for translations..'', _lang;
    delete from i18n.curr_lang where user = SESSION_USER;
	insert into i18n.curr_lang (lang, db_user) values (_lang, SESSION_USER);
    return true;
END;
';

comment on function i18n.force_curr_lang(text) is
	'force preferred language to some language:
	 - for "current user"';

-- --------------------------------------------------------------
select gm.log_script_insertion('v22-i18n-lang_funcs-fixup.sql', '22.8');
+9 −18
Original line number Diff line number Diff line
@@ -17,28 +17,19 @@ 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.7 (database v22.7)',
	'GNUmed 1.7.7 Release Notes:
	'Release Notes for GNUmed 1.7.8 (database v22.8)',
	'GNUmed 1.7.8 Release Notes:

	1.7.7
	1.7.8

FIX: EMR/tree: exception on showing visual progress note
FIX: lab/result EA: exception when no previous result available
FIX: meds/substance EA: exception when no LOINC selected
FIX: data/ATC: fix reference data import
FIX: meds/dose EA: exception on saving
FIX: meds/product EA: exception on creating new product
FIX: dist: fix appdata.xml [thanks Andreas]
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]

NEW: configurable invoice ID template [thanks Marc]
	22.8

	22.7

IMPROVED: lab results plotting scripts for gnuplot
IMPROVED: bills tables grants for invoice ID generation

NEW: multi-results plotting script for gnuplot
FIX: i18n.set_curr/force_curr_lang()
');

-- --------------------------------------------------------------
select gm.log_script_insertion('v22-release_notes-fixup.sql', '22.7');
select gm.log_script_insertion('v22-release_notes-fixup.sql', '22.8');