File: v21-AMTS_Medikationsplan-fixup.sql

package info (click to toggle)
gnumed-server 22.31-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 46,268 kB
  • sloc: sql: 1,217,633; python: 15,878; sh: 1,590; makefile: 20
file content (112 lines) | stat: -rw-r--r-- 3,077 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
-- ==============================================================
-- GNUmed database schema change script
--
-- License: GPL v2 or later
-- Author: karsten.hilbert@gmx.net
--
-- ==============================================================
\set ON_ERROR_STOP 1
--set default_transaction_read_only to off;

-- --------------------------------------------------------------
update ref.paperwork_templates set
	name_long = 'Medikationsplan 2.0 (Deutschland, AMTS)',
	name_short = 'MedPlan AMTS (D,2.0)',
	gnumed_revision = '21.7',
	in_use = false
where
	name_long = 'Medikationsplan (Deutschland, AMTS)';

-- --------------------------------------------------------------
delete from ref.paperwork_templates where name_long = 'Medikationsplan 2.3 (AMTS, Deutschland)';

insert into ref.paperwork_templates (
	fk_template_type,
	instance_type,
	name_short,
	name_long,
	external_version,
	gnumed_revision,
	engine,
	filename,
	edit_after_substitution,
	data
) values (
	(select pk from ref.form_types where name = 'current medication list'),
	'current medication list',
	'MedPlan AMTS 2.3 (D)',
	'Medikationsplan 2.3 (AMTS, Deutschland)',
	'de-DE-2.3 AMTS',
	21.8,
	'L',
	'amts-med_plan-2_3.tex',
	false,
	'real template missing'::bytea
);

-- --------------------------------------------------------------
update ref.paperwork_templates set
	name_long = 'Medikationsplan (Deutschland, NICHT konform zu AMTS 2.0)',
	name_short = 'MedPlan AMTS (ähnlich 2.0, D)',
	gnumed_revision = '21.7',
	in_use = false
where
	name_long = 'Medikationsplan (Deutschland, NICHT konform zu AMTS)';


-- --------------------------------------------------------------
delete from ref.paperwork_templates where name_long = 'Medikationsplan AMTS (~2.3, NICHT konform, Deutschland)';

insert into ref.paperwork_templates (
	fk_template_type,
	instance_type,
	name_short,
	name_long,
	external_version,
	gnumed_revision,
	engine,
	filename,
	edit_after_substitution,
	data
) values (
	(select pk from ref.form_types where name = 'current medication list'),
	'current medication list',
	'MedPlan AMTS (~2.3, D)',
	'Medikationsplan AMTS (~2.3, NICHT konform, Deutschland)',
	'21.8',
	21.8,
	'L',
	'not-amts-med-plan-2_3.tex',
	false,
	'real template missing'::bytea
);

-- --------------------------------------------------------------
delete from ref.paperwork_templates where name_long = 'Medikationsplan AMTS (blanko, ~2.3, NICHT konform, Deutschland)';

insert into ref.paperwork_templates (
	fk_template_type,
	instance_type,
	name_short,
	name_long,
	external_version,
	gnumed_revision,
	engine,
	filename,
	edit_after_substitution,
	data
) values (
	(select pk from ref.form_types where name = 'current medication list'),
	'current medication list',
	'MedPlan AMTS (leer, ~2.3, D)',
	'Medikationsplan AMTS (blanko, ~2.3, NICHT konform, Deutschland)',
	'21.8',
	21.8,
	'L',
	'not-amts-med-plan-2_3-blanko.tex',
	false,
	'real template missing'::bytea
);

-- --------------------------------------------------------------
select gm.log_script_insertion('v21-AMTS_Medikationsplan-fixup.sql', '21.8');