File: v15-ref-icpc2-static.sql

package info (click to toggle)
gnumed-server 16.17-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 42,064 kB
  • sloc: sql: 1,190,603; python: 11,850; sh: 1,082; makefile: 19
file content (55 lines) | stat: -rw-r--r-- 1,508 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
-- ==============================================================
-- GNUmed database schema change script
--
-- License: GPL v2 or later
-- Author: karsten.hilbert@gmx.net
-- 
-- ==============================================================
\set ON_ERROR_STOP 1

-- --------------------------------------------------------------
create table ref.icpc_chapter (
	pk serial primary key,
	chapter char(1),
	description text
);

-- --------------------------------------------------------------
create table ref.icpc_component (
	pk serial primary key,
	component smallint,
	description text,
	typical_soap_cat text[]
);

-- --------------------------------------------------------------
create table ref.icpc (
	pk serial primary key,
	--parent.code -> CODE
	--parent.term -> description
	code_extension text,
	short_description text,
	icd10 text[],
	criteria text,
	inclusions text,
	exclusions text[],
	see_also text[],
	--parent.comment -> NOTE
	fk_component smallint,
	fk_chapter char(1)
) inherits (ref.coding_system_root);

-- --------------------------------------------------------------
create table ref.code_thesaurus_root (
	pk_thesaurus serial primary key,
	fk_code integer,
	synonym text
);

-- --------------------------------------------------------------
create table ref.icpc_thesaurus (
	pk serial primary key
) inherits (ref.code_thesaurus_root);

-- --------------------------------------------------------------
select gm.log_script_insertion('v15-ref-icpc2-static.sql', 'Revision: 1.1');