-
Notifications
You must be signed in to change notification settings - Fork 5
/
CreateTables.sql
108 lines (95 loc) · 2.7 KB
/
CreateTables.sql
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
USE [Radiopaedia]
GO
CREATE TABLE [dbo].[ApiClient](
[Id] [int] IDENTITY(1,1) NOT NULL,
[site_id] [varchar](max) NULL,
[site_secret] [varchar](max) NULL,
[redirect_url] [varchar](max) NULL,
[oauth_url] [varchar](max) NULL,
[cases_url] [varchar](max) NULL,
[users_url] [varchar](max) NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE TABLE [dbo].[Cases](
[Id] [int] IDENTITY(1,1) NOT NULL,
[case_id] [varchar](max) NULL,
[username] [varchar](max) NULL,
[date] [datetime] NULL,
[status] [varchar](max) NULL,
[status_message] [varchar](max) NULL,
[title] [varchar](max) NULL,
[system_id] [int] NULL,
[diagnostic_certainty_id] [int] NULL,
[suitable_for_quiz] [bit] NULL,
[presentation] [varchar](max) NULL,
[age] [int] NULL,
[body] [varchar](max) NULL,
[r_case_id] [varchar](max) NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE TABLE [dbo].[Events](
[Id] [int] IDENTITY(1,1) NOT NULL,
[TimeStamp] [datetime] NULL,
[Type] [varchar](max) NULL,
[InternalId] [varchar](max) NULL,
[StudyUid] [varchar](max) NULL,
[SeriesUid] [varchar](max) NULL,
[Message] [varchar](max) NULL,
[Data] [varchar](max) NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE TABLE [dbo].[PACS](
[Id] [int] IDENTITY(1,1) NOT NULL,
[LocalAe] [varchar](max) NULL,
[IP] [varchar](max) NULL,
[Port] [int] NULL,
[AET] [varchar](max) NULL,
[Description] [varchar](max) NULL,
[Selected] [bit] NULL,
[Notes] [varchar](max) NULL,
[LocalStorage] [varchar](max) NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE TABLE [dbo].[Series](
[Id] [int] IDENTITY(1,1) NOT NULL,
[case_id] [varchar](max) NULL,
[study_uid] [varchar](max) NULL,
[description] [varchar](max) NULL,
[images] [int] NULL,
[series_uid] [varchar](max) NULL,
[crop_x] [int] NULL,
[crop_y] [int] NULL,
[crop_h] [int] NULL,
[crop_w] [int] NULL,
[window_wc] [int] NULL,
[window_ww] [nchar](10) NULL,
[every_image] [int] NULL,
[start_image] [int] NULL,
[end_image] [int] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE TABLE [dbo].[Studies](
[Id] [int] IDENTITY(1,1) NOT NULL,
[case_id] [varchar](max) NULL,
[study_uid] [varchar](max) NULL,
[description] [varchar](max) NULL,
[date] [datetime] NULL,
[modality] [varchar](max) NULL,
[findings] [varchar](max) NULL,
[caption] [varchar](max) NULL,
[images] [int] NULL,
[position] [int] NULL,
[r_study_id] [varchar](max) NULL,
[patient_id] [varchar](max) NULL,
[patient_name] [varchar](max) NULL,
[patient_dob] [date] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE TABLE [dbo].[Users](
[Id] [int] IDENTITY(1,1) NOT NULL,
[username] [varchar](max) NULL,
[access_token] [varchar](max) NULL,
[refresh_token] [varchar](max) NULL,
[expiry_date] [datetime] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO