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 113 114 115 116 117 118 119 120 121 122 123 124 125
|
-- ==============================================================
-- 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;
-- --------------------------------------------------------------
\unset ON_ERROR_STOP
alter table ref.paperwork_templates drop constraint engine_range cascade;
\set ON_ERROR_STOP 1
alter table ref.paperwork_templates
add constraint engine_range
check (engine in ('T', 'L', 'H', 'O', 'I', 'G', 'P', 'A'));
comment on column ref.paperwork_templates.engine is
'the business layer forms engine used to process this form, currently:
- T: plain text
- L: LaTeX
- H: Health Layer 7
- O: OpenOffice
- I: image editor (visual progress notes)
- G: gnuplot scripts (test results graphing)
- P: PDF form (FDF based)
- A: AbiWord'
;
-- --------------------------------------------------------------
delete from ref.paperwork_templates where name_long = 'Vaccination history (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 = 'Medical statement'),
'Vacc Hx (GMd)',
'Vaccination history (GNUmed default)',
'17.0',
'L',
'vaccination-hx.tex',
'real template missing'::bytea
);
-- --------------------------------------------------------------
delete from ref.paperwork_templates where name_long = 'Vorsorgevollmacht (Bundesministerium für Justiz, Deutschland)';
insert into ref.paperwork_templates (
fk_template_type,
instance_type,
name_short,
name_long,
external_version,
engine,
filename,
data
) values (
(select pk from ref.form_types where name = 'pdf form'),
'other form',
'Vorsorgevollmacht (D:BMJ)',
'Vorsorgevollmacht (Bundesministerium für Justiz, Deutschland)',
'11/2009',
'P',
'vorsorgevollmacht-bmj.pdf',
'real template missing'::bytea
);
-- --------------------------------------------------------------
delete from ref.paperwork_templates where name_long = 'Privatrechnung mit USt. (GNUmed-Vorgabe Deutschland)';
insert into ref.paperwork_templates (
fk_template_type,
instance_type,
name_short,
name_long,
external_version,
engine,
filename,
data
) values (
(select pk from ref.form_types where name = 'invoice'),
'invoice',
'PKV-Rg (D, mit USt.)',
'Privatrechnung mit USt. (GNUmed-Vorgabe Deutschland)',
'17.0',
'L',
'privatrechnung.tex',
'real template missing'::bytea
);
-- --------------------------------------------------------------
delete from ref.paperwork_templates where name_long = 'Privatrechnung ohne USt. (GNUmed-Vorgabe Deutschland)';
insert into ref.paperwork_templates (
fk_template_type,
instance_type,
name_short,
name_long,
external_version,
engine,
filename,
data
) values (
(select pk from ref.form_types where name = 'invoice'),
'invoice',
'PKV-Rg (D, ohne USt.)',
'Privatrechnung ohne USt. (GNUmed-Vorgabe Deutschland)',
'17.0',
'L',
'privatrechnung.tex',
'real template missing'::bytea
);
-- --------------------------------------------------------------
select gm.log_script_insertion('v17-ref-paperwork_templates.sql', '17.0');
|