File: v12-ref-paperwork_templates.sql

package info (click to toggle)
gnumed-server 22.19-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 45,148 kB
  • sloc: sql: 1,217,279; python: 15,659; sh: 1,582; makefile: 20
file content (106 lines) | stat: -rw-r--r-- 3,391 bytes parent folder | download | duplicates (7)
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
-- ==============================================================
-- GNUmed database schema change script
--
-- License: GPL v2 or later
-- Author: karsten.hilbert@gmx.net
-- 
-- ==============================================================
-- $Id: v12-ref-paperwork_templates.sql,v 1.3 2010-01-21 08:49:11 ncq Exp $
-- $Revision: 1.3 $

-- --------------------------------------------------------------
\set ON_ERROR_STOP 1

-- --------------------------------------------------------------
-- example form template
\unset ON_ERROR_STOP
insert into ref.form_types (name) values (i18n.i18n('current medication list'));
\set ON_ERROR_STOP 1

select i18n.upd_tx('de_DE', 'current medication list', 'Medikamentenliste');

delete from ref.paperwork_templates where name_long = 'Current medication list (GNUmed default)';

insert into ref.paperwork_templates (
	fk_template_type,
	name_short,
	name_long,
	external_version,
	engine,
	filename,
	data
) values (
	(select pk from ref.form_types where name = 'current medication list'),
	'Medication list (GNUmed)',
	'Current medication list (GNUmed default)',
	'1.0',
	'L',
	'medslist.tex',
	'real template missing'::bytea
);

-- --------------------------------------------------------------
-- example referral template
\unset ON_ERROR_STOP
insert into ref.form_types (name) values (i18n.i18n('referral letter'));
\set ON_ERROR_STOP 1

select i18n.upd_tx('de_DE', 'referral letter', 'Überweisungsbrief');

delete from ref.paperwork_templates where name_long = 'Referral letter (GNUmed default) [Dr.Rogerio Luz]';

insert into ref.paperwork_templates (
	fk_template_type,
	name_short,
	name_long,
	external_version,
	engine,
	filename,
	data
) values (
	(select pk from ref.form_types where name = 'referral letter'),
	'Referral letter (GNUmed)',
	'Referral letter (GNUmed default) [Dr.Rogerio Luz]',
	'1.0',
	'L',
	'referral-letter.tex',
	'real template missing'::bytea
);

-- --------------------------------------------------------------
-- some cleanup as not to confuse users

delete from public.form_fields where
	fk_form = (select pk from ref.paperwork_templates where name_long = 'Standard specialist referral letter for AU');

delete from ref.paperwork_templates where name_long = 'Standard specialist referral letter for AU';



delete from public.form_fields where
	fk_form = (select pk from ref.paperwork_templates where name_long = 'Prescription using the standard form of the Pharmaceutical Benefits Scheme');

delete from ref.paperwork_templates where name_long = 'Prescription using the standard form of the Pharmaceutical Benefits Scheme';



delete from public.form_fields where
	fk_form = (select pk from ref.paperwork_templates where name_long = 'A proof-of-concept basic request form');

delete from ref.paperwork_templates where name_long = 'A proof-of-concept basic request form';

-- --------------------------------------------------------------
select gm.log_script_insertion('$RCSfile: v12-ref-paperwork_templates.sql,v $', '$Revision: 1.3 $');

-- ==============================================================
-- $Log: v12-ref-paperwork_templates.sql,v $
-- Revision 1.3  2010-01-21 08:49:11  ncq
-- - add referral letter template
--
-- Revision 1.2  2009/12/30 18:48:36  ncq
-- - remove the confusing previous LaTeX templates
--
-- Revision 1.1  2009/12/22 11:52:46  ncq
-- - medication list template skeleton
--
--