-
Notifications
You must be signed in to change notification settings - Fork 0
/
AutoHotkey.ahk
279 lines (223 loc) · 5.88 KB
/
AutoHotkey.ahk
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
; Settings
#NoEnv
#Hotstring EndChars `t
#Hotstring O
SetBatchLines -1 ; better performance: http://scsnake.blogspot.tw/2016/03/hotstring.html
SendMode, Input
; Group Control For SmartWonder
GroupAdd, SmartWonder, VGHKS-
GroupAdd, SmartWonder, vghks-
GroupAdd, SmartWonder, tedpc-
; External Libraries
#Include <WBGet>
#Include <Paste>
#Include <varExist>
#Include <JSON>
#Include <StdOutStream>
#Include <WinHttpRequest>
; Options
ENABLE_KEY_COUNTER := 0
PRESERVE_CLIPBOARD := 0
; Global Variables
#Include MyScripts\vars.ahk
; Key/Mouse Counter
;; Bug: shoule be before RegEx HotStrings
;#Include MyScripts\lib\keystroke-counter.ahk
; RegEx Hotstrings
;; Bug: need to be included first ???
#Include MyScripts\regex-hotstrings.ahk
;; My Own Lib
#Include MyScripts\lib\frame-wait.ahk
#Include MyScripts\lib\dicom-sr.ahk
#Include MyScripts\lib\dicom-sr-ocr.ahk
#Include MyScripts\lib\date.ahk
#Include MyScripts\lib\string.ahk
#Include MyScripts\lib\supported-exam-patterns.ahk
#Include MyScripts\lib\libera-bmd.ahk
#Include MyScripts\lib\smartwonder-common.ahk
;#Include MyScripts\lib\smart-card.ahk
#IfWinActive ahk_group SmartWonder
;;; HotStrings
#Include MyScripts\neuro.ahk
#Include MyScripts\ajcc.ahk
#Include MyScripts\sono.ahk
#Include MyScripts\chest-x-ray.ahk
#Include MyScripts\kub.ahk
#Include MyScripts\bone-x-ray.ahk
#Include MyScripts\other-x-ray.ahk
#Include MyScripts\comparisons.ahk
#Include MyScripts\sono-guide.ahk
#Include MyScripts\abdomen-ct.ahk
#Include MyScripts\abdomen-mr.ahk
#Include MyScripts\chest-ct.ahk
#Include MyScripts\ct-guide.ahk
#Include MyScripts\barium-enema.ahk
#Include MyScripts\esophagraphy.ahk
#Include MyScripts\ugi-small-intestine.ahk
#Include MyScripts\intravenous-pyelogram.ahk
#Include MyScripts\special.ahk
#Include MyScripts\ms-mri.ahk
#Include MyScripts\mri.ahk
#Include MyScripts\others.ahk
#Include MyScripts\abbreviations.ahk
#Include MyScripts\spg.ahk
#Include MyScripts\bone-density.ahk
;;; HotKeys
#Include MyScripts\hotkey\delete-current-line.ahk
;;; Gui
#Include MyScripts\gui-common.ahk
#IfWinActive
SetTitleMatchMode, 2
;#Include MyScripts\debug.ahk
; HotKeys Lib
#Include MyScripts\hotkey\selecting-tabs.ahk
#Include MyScripts\hotkey\get-previous-report.ahk
#Include MyScripts\hotkey\get-previous-report-with-images.ahk
#Include MyScripts\hotkey\get-previous-exam-date.ahk
#Include MyScripts\hotkey\change-font.ahk
#Include MyScripts\hotkey\copy-order.ahk
#Include MyScripts\hotkey\get-side-str.ahk
;#Include MyScripts\hotkey\toggle-position-sync.ahk ; use SmartIris hotkey
#Include MyScripts\hotkey\toggle-hanging-protocol.ahk
#Include MyScripts\hotkey\insert-patient-exam-info.ahk
#Include MyScripts\hotkey\convert-case.ahk
#Include MyScripts\hotkey\renumber-selected-text.ahk
#Include MyScripts\hotkey\remapping-original-hotkeys.ahk
#Include MyScripts\hotkey\click-none-tb-none-ot.ahk
#Include MyScripts\hotkey\click-confirm.ahk
#Include MyScripts\hotkey\click-emr.ahk
#Include MyScripts\hotkey\set-predefined-exam-flow.ahk
;#Include MyScripts\hotkey\cgst32-related-mouse-control.ahk ;no more use
#Include MyScripts\hotkey\go-to-image.ahk
#Include MyScripts\hotkey\detect-non-ascii-chars.ahk
#Include MyScripts\hotkey\get-mesa-scale.ahk
#Include MyScripts\hotkey\navigation-exam-list.ahk
#Include MyScripts\hotkey\status-of-us-rct-without-image.ahk
#Include MyScripts\hotkey\query-prev-images-for-sonographer.ahk
#Include MyScripts\hotkey\open-in-osirix.ahk
; Previously enabled but now disabled functions
;; The checking mechanism changed. No need to active current image before submitting since 2014-02.
;;#Include MyScripts\active-current-image-before-submit.ahk
; Define hotkeys
#IfWinActive ahk_group SmartWonder
; 複製最近相關報告並開啟影像
^0::
Capslock & 0::
;GetPreviousReport(true, true)
GetPreviousReportWithImages(true, true, 1, false, false, false)
Return
; 複製最近相關報告但不開啟影像
^!0::
GetPreviousReport(true, false)
Return
; 不複製最近相關報告但開啟影像
^!#0::
GetPreviousReport(false, true)
Return
; 吳主任版: 複製最近相關報告, 開啟最近兩次影像, 如皆在三個月內, 開另一更久遠的影像
^9::
GetPreviousReportWithImages(true, true, 2, true, false, false)
Return
; 更改報告編輯區字體
^!+f::
ChangeFont()
Return
; 將選取的文字改為字首大寫
^!t::
ConvertSelectedTextToSentenceCase()
Return
; CopyIndication
^i::
Capslock & i::
MyOrderDiag := CopyOrder()
Paste(MyOrderDiag)
Return
; Delete current line
^l::
Capslock & l::
DeleteCurrentLine()
Return
; Insert Previous Exam Date
^+d::
InsertPrevExamDate()
Return
; Renumber Seleted Text
^!n::
RenumberSeletedText()
Return
; Deorder Seleted Text
^!+n::
RenumberSeletedText(true)
Return
; Unorder Seleted Text
^!u::
RenumberSeletedText(false, true, "-")
Return
; Click TB(-)Ot(-)
^!o::
ClickNoneTBNoneOt()
Return
; Select tabs
; 報告編輯
^1::
ClickReportEditing()
Return
; 歷史報告
^3::
ClickPreviousReports()
Return
; 皆可確認報告
^s::
Capslock & s::
ClickConfirm()
Return
; Set predefined exam flow
^!f::
SetPredefinedExamFlow()
Return
; Get SPG or SEG report
^!s::
DoSPGorSEG()
Return
; Detect Non-Ascii Chars
^!a::
DetectNonAsciiChars()
Return
; Get Mesa Scale
^!m::
GetMesaScale()
Return
; Go Next Exam
^j::
GoNextExam()
Return
; Go Prev Exam
^k::
GoPrevExam()
Return
; Click Same Patient Exams
^!p::
ClickSamePatientExams()
Return
^+h::
ClickEMR()
Return
^+o::
OpenCurrentAccNoInOsiriX()
Return
; Status of US RCT Without Image
^!+u::
StatusOfUsRctWithoutImage()
Return
#IfWinActive
#IfWinActive, 高雄榮總-攝影室播放系統WEB管理介面
^p::
QueryPrevImagesForSonographer()
Return
#IfWinActive
; Insert Patient Exam Info
;; This hotkey cannot be included in SmartWonder window group
^!h::
InsertPatientExamInfo()
Return
^!r::Reload ; Assign Ctrl-Alt-R as a hotkey to restart the script.