File: gmClinical.de.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 (123 lines) | stat: -rw-r--r-- 4,284 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
-- lab related tables specific to Germany (billing)

-- author: Karsten Hilbert <Karsten.Hilbert@gmx.net>
-- license: GPL v2 or later
-- $Source: /home/ncq/Projekte/cvs2git/vcs-mirror/gnumed/gnumed/server/sql/country.specific/de/gmClinical.de.sql,v $
-- $Revision: 1.17 $
-- =============================================
-- force terminate + exit(3) on errors if non-interactive
\set ON_ERROR_STOP 1

reset client_encoding;
-- =============================================
CREATE TABLE de_de.lab_test_GNR (
	id serial primary key,
	id_test integer
		not null
		references clin.test_type(pk)
) inherits (audit.audit_fields);

--	EBM character(6) references ebm(gnr),
--	GOA_88 character(6) references goae_88.gnr,
--	GOA_96 character(6) references goae_96.gnr
--	UVT_GOA character(6) references bg_goae(gnr)

select audit.add_table_for_audit('de_de', 'lab_test_gnr');

COMMENT ON TABLE de_de.lab_test_GNR is
	'specific for Germany, GNR = GebuehrenordnungsNummeR = billing
	 item, build index before lab import and drop afterwards, check
	 against this table when importing, build table during import';
COMMENT ON COLUMN de_de.lab_test_GNR.id_test IS
	'link to test in our practice';
--COMMENT ON COLUMN de_de.lab_test_GNR.EBM is
--	'GNR according to EBM (Einheitlicher BewertungsMassstab)
--	 for Kassenpatienten (gov''t insured patients)';
--COMMENT ON COLUMN de_de.lab_test_GNR.GOA_88 is
--	'GNR according to GOAe 88 (GebuehrenOrdnung fuer Aerzte)
--	 for Privatpatienten (privately insured patients)';
--COMMENT ON COLUMN de_de.lab_test_GNR.GOA_96 is
--	'GNR according to GOAe 96 (GebuehrenOrdnung fuer Aerzte)
--	 for Privatpatienten (privately insured patients)';
--COMMENT ON COLUMN de_de.lab_test_GNR.BG_GOA is
--	'GNR according to GOAe (GebuehrenOrdnung fuer Aerzte) for
--	 Berufsgenossenschaften (sector specific job related
--	 health insurance)';

-- =============================================
-- do simple revision tracking
delete from gm_schema_revision where filename='$RCSfile: gmClinical.de.sql,v $';
INSERT INTO gm_schema_revision (filename, version) VALUES('$RCSfile: gmClinical.de.sql,v $', '$Revision: 1.17 $');

-- =============================================
-- $Log: gmClinical.de.sql,v $
-- Revision 1.17  2006-01-06 10:12:02  ncq
-- - add missing grants
-- - add_table_for_audit() now in "audit" schema
-- - demographics now in "dem" schema
-- - add view v_inds4vaccine
-- - move staff_role from clinical into demographics
-- - put add_coded_term() into "clin" schema
-- - put German things into "de_de" schema
--
-- Revision 1.16  2006/01/05 16:04:37  ncq
-- - move auditing to its own schema "audit"
--
-- Revision 1.15  2005/11/25 15:07:28  ncq
-- - create schema "clin" and move all things clinical into it
--
-- Revision 1.14  2005/09/19 16:38:52  ncq
-- - adjust to removed is_core from gm_schema_revision
--
-- Revision 1.13  2005/07/14 21:31:43  ncq
-- - partially use improved schema revision tracking
--
-- Revision 1.12  2004/09/29 19:15:45  ncq
-- - id -> pk
--
-- Revision 1.11  2004/01/09 02:59:28  ncq
-- - reset client encoding
--
-- Revision 1.10  2003/12/29 16:01:54  uid66147
-- - umlauts breakage
--
-- Revision 1.9  2003/11/05 23:02:38  hinnef
-- rollback
--
-- Revision 1.8  2003/11/05 23:00:37  hinnef
-- moved AMIS installation scripts to bootstrap dir
--
-- Revision 1.7  2003/11/02 12:49:41  ncq
-- - fix psql.py lossage
--
-- Revision 1.6  2003/10/26 16:10:59  hinnef
-- rollback
--
-- Revision 1.5  2003/10/26 16:07:07  hinnef
-- initial AMIS-schema and data import
--
-- Revision 1.4  2003/10/19 13:52:20  ncq
-- - add missing ;
--
-- Revision 1.3  2003/10/01 15:45:20  ncq
-- - use add_table_for_audit() instead of inheriting from audit_mark
--
-- Revision 1.2  2003/08/17 00:28:25  ncq
-- - removed log_ table since now autocreated
--
-- Revision 1.1  2003/08/05 08:16:00  ncq
-- - cleanup/renaming
--
-- Revision 1.5  2003/07/27 22:02:18  ncq
-- - test_id -> id_test
--
-- Revision 1.4  2003/05/12 12:43:40  ncq
-- - gmI18N, gmServices and gmSchemaRevision are imported globally at the
--   database level now, don't include them in individual schema file anymore
--
-- Revision 1.3  2003/01/05 13:05:53  ncq
-- - schema_revision -> gm_schema_revision
--
-- Revision 1.2  2002/11/16 01:09:57  ncq
-- - revision tracking
--