EPS & Home visits - loops until search target found

Quicksearch - HRT and HTN guidelines
Textexpansions - Gabapentin dosing
Referral letter - first draft, not working
This commit is contained in:
2022-08-11 17:45:53 +01:00
parent e62940c2af
commit f9c02613b8
5 changed files with 127 additions and 33 deletions

View File

@@ -16,38 +16,54 @@ SetBatchLines -1
LoadEPS: LoadEPS:
CoordMode, Pixel, Screen Loop, 20
ImageSearch, FoundX, FoundY, 0, 0, 2560, 1440, assets\eps\prescription_icon.png {
CenterImgSrchCoords("assets\eps\prescription_icon.png", FoundX, FoundY) CoordMode, Pixel, Screen
If ErrorLevel ImageSearch, FoundX, FoundY, 0, 0, 2560, 1440, assets\eps\prescription_icon.png
Return CenterImgSrchCoords("assets\eps\prescription_icon.png", FoundX, FoundY)
Sleep, 100
}
Until ErrorLevel = 0
FoundX := FoundX+45 FoundX := FoundX+45
CoordMode, Mouse, Screen CoordMode, Mouse, Screen
Click, %FoundX%, %FoundY% Left, 2 Click, %FoundX%, %FoundY% Left, 2
Sleep, 10 ;Sleep, 1500
Sleep, 200 Loop, 20
CoordMode, Pixel, Screen {
ImageSearch, FoundX, FoundY, 0, 0, 2560, 1440, assets\eps\prescription_select_all.png CoordMode, Pixel, Screen
CenterImgSrchCoords("assets\eps\prescription_select_all.png", FoundX, FoundY) ImageSearch, FoundX, FoundY, 0, 0, 2560, 1440, assets\eps\prescription_select_all.png
CenterImgSrchCoords("assets\eps\prescription_select_all.png", FoundX, FoundY)
Sleep, 100
}
Until ErrorLevel = 0
If ErrorLevel If ErrorLevel
{ {
MsgBox, 49, Continue?, Image / Pixel Not Found.`nPress OK to continue. MsgBox, 49, Continue?, Image / Pixel Not Found.`nPress OK to continue.
IfMsgBox, Cancel IfMsgBox, Cancel
Return Return
} }
CoordMode, Mouse, Screen CoordMode, Mouse, Screen
Click, %FoundX%, %FoundY% Left, 1 Click, %FoundX%, %FoundY% Left, 1
Sleep, 10 Sleep, 10
Sleep, 200 ;Sleep, 200
CoordMode, Pixel, Screen Loop, 20
ImageSearch, FoundX, FoundY, 0, 0, 2560, 1440, assets\eps\prescription_selected.png {
CenterImgSrchCoords("assets\eps\prescription_selected.png", FoundX, FoundY) CoordMode, Pixel, Screen
ImageSearch, FoundX, FoundY, 0, 0, 2560, 1440, assets\eps\prescription_selected.png
CenterImgSrchCoords("assets\eps\prescription_selected.png", FoundX, FoundY)
Sleep, 100
}
Until ErrorLevel = 0
If ErrorLevel If ErrorLevel
{ {
MsgBox, 49, Continue?, Image / Pixel Not Found.`nPress OK to continue. MsgBox, 49, Continue?, Image / Pixel Not Found.`nPress OK to continue.
IfMsgBox, Cancel IfMsgBox, Cancel
Return Return
} }
CoordMode, Mouse, Screen CoordMode, Mouse, Screen
Click, %FoundX%, %FoundY% Right, 1 Click, %FoundX%, %FoundY% Right, 1
Sleep, 10 Sleep, 10

View File

@@ -18,10 +18,15 @@ SetBatchLines -1
F18:: F18::
PrintHomeVisits: PrintHomeVisits:
CoordMode, Pixel, Screen Loop, 10
CoordMode, Mouse, Screen {
ImageSearch, FoundX, FoundY, 893, 661, 2455, 1439, assets\homevisits\home_visit_icon.png CoordMode, Pixel, Screen
CenterImgSrchCoords("assets\homevisits\home_visit_icon.png", FoundX, FoundY) CoordMode, Mouse, Screen
ImageSearch, FoundX, FoundY, 893, 661, 2455, 1439, assets\homevisits\home_visit_icon.png
CenterImgSrchCoords("assets\homevisits\home_visit_icon.png", FoundX, FoundY)
Sleep, 100
}
Until ErrorLevel = 0
If (ErrorLevel) If (ErrorLevel)
{ {
MsgBox, 0, , Couldn't find the home visit icon MsgBox, 0, , Couldn't find the home visit icon
@@ -30,16 +35,22 @@ If (ErrorLevel)
FoundX := FoundX + 43 FoundX := FoundX + 43
Click, %FoundX%, %FoundY% Left, 2 Click, %FoundX%, %FoundY% Left, 2
Sleep, 10 Sleep, 10
Sleep, 300 ;Sleep, 300
CoordMode, Pixel, Screen Loop, 20
CoordMode, Mouse, Screen {
ImageSearch, FoundX, FoundY, 0, 0, 2560, 1440, assets\homevisits\home_visit_wrench.png CoordMode, Pixel, Screen
CenterImgSrchCoords("assets\homevisits\home_visit_wrench.png", FoundX, FoundY) CoordMode, Mouse, Screen
ImageSearch, FoundX, FoundY, 0, 0, 2560, 1440, assets\homevisits\home_visit_wrench.png
CenterImgSrchCoords("assets\homevisits\home_visit_wrench.png", FoundX, FoundY
Sleep, 100
}
Until ErrorLevel = 0
If (ErrorLevel) If (ErrorLevel)
{ {
MsgBox, 0, , Couldn't find Spanner Icon MsgBox, 0, , Couldn't find Spanner Icon
Return Return
} }
VisitsY := FoundY+50 VisitsY := FoundY+50
Click, %FoundX%, %VisitsY% Left, 1 Click, %FoundX%, %VisitsY% Left, 1
Sleep, 10 Sleep, 10
@@ -55,7 +66,7 @@ Loop, 18
Send, {Down} Send, {Down}
} }
Send, {Enter} Send, {Enter}
Sleep, 300 Sleep, 500
CoordMode, Pixel, Screen CoordMode, Pixel, Screen
CoordMode, Mouse, Screen CoordMode, Mouse, Screen
ImageSearch, FoundX, FoundY, 0, 0, 2560, 1440, assets\homevisits\home_visit_summary.png ImageSearch, FoundX, FoundY, 0, 0, 2560, 1440, assets\homevisits\home_visit_summary.png
@@ -64,10 +75,10 @@ If (ErrorLevel = 0)
FoundY := FoundY-100 FoundY := FoundY-100
Click, %FoundX%, %FoundY% Left, 1 Click, %FoundX%, %FoundY% Left, 1
Sleep, 10 Sleep, 10
Loop, 50 Loop, 30
{ {
Send, {PgDn} Send, {PgDn}
Sleep, 100 Sleep, 150
CoordMode, Pixel, Screen CoordMode, Pixel, Screen
CoordMode, Mouse, Screen CoordMode, Mouse, Screen
ImageSearch, FoundX, FoundY, 0, 0, 2560, 1440, assets\homevisits\home_visit_summary_entry.png ImageSearch, FoundX, FoundY, 0, 0, 2560, 1440, assets\homevisits\home_visit_summary_entry.png

View File

@@ -13,6 +13,10 @@ InputBox, vQuery, BNF Search, , , 200, 100
;; Need some sort of select statemnt here, probably better to check wordcount first, if just 1 then a shortcut ;; Need some sort of select statemnt here, probably better to check wordcount first, if just 1 then a shortcut
if (vQuery == "can") { if (vQuery == "can") {
Run, chrome.exe "https://www.nice.org.uk/guidance/ng12/chapter/Recommendations-organised-by-site-of-cancer" Run, chrome.exe "https://www.nice.org.uk/guidance/ng12/chapter/Recommendations-organised-by-site-of-cancer"
} else if (vQuery == "hrt") {
Run, chrome.exe "https://d2931px9t312xa.cloudfront.net/menopausedoctor/files/information/229/Easy`%20HRT`%20prescribing`%20guide.pdf"
} else if (vQuery == "htn") {
Run, chrome.exe "https://www.england.nhs.uk/london/wp-content/uploads/sites/8/2019/11/NICE-NG136-Visual-Summary.pdf"
;; Sarches ;; Sarches
} else { } else {

View File

@@ -33,7 +33,7 @@
;; examshoulder. -> L/R shoulder - normal appearance, no swelling, erythema or bruising. Normal range of abduction, flexion and extension. Passive = active rom. Empty can test and hawkins test normal. Rotator cuff exam NAD. ;; examshoulder. -> L/R shoulder - normal appearance, no swelling, erythema or bruising. Normal range of abduction, flexion and extension. Passive = active rom. Empty can test and hawkins test normal. Rotator cuff exam NAD.
;; examknee. -> L/R knee - normal appearance, no swelling, erythema or bruising. No effusion or joint line tenderness. Normal range of flexion. Collateral and cruciates ligaments intact. McMurrays negative. ;; examknee. -> L/R knee - normal appearance, no swelling, erythema or bruising. No effusion or joint line tenderness. Normal range of flexion. Collateral and cruciates ligaments intact. McMurrays negative.
;; gaba3d -> Take 1 capsule daily, increase to twice daily after 3 days and again to 3 times daily after another 3 days
;; Replaces the letters 'cnr' with: Called, no reply <current time> ;; Replaces the letters 'cnr' with: Called, no reply <current time>
::cnr.:: ::cnr.::
@@ -134,4 +134,12 @@ return
::examknee.:: ::examknee.::
SendInput L/R knee - normal appearance, no swelling, erythema or bruising. No effusion or joint line tenderness. Normal range of flexion. Collateral and cruciates ligaments intact. McMurrays negative. SendInput L/R knee - normal appearance, no swelling, erythema or bruising. No effusion or joint line tenderness. Normal range of flexion. Collateral and cruciates ligaments intact. McMurrays negative.
return
::gaba3d.::
SendInput Take 1 capsule daily, increase to twice daily after 3 days and again to 3 times daily after another 3 days
return
::gabaweek.::
SendInput Take 1 capsule daily, increase to twice daily after 1 week and three times daily after another week
return return

View File

@@ -0,0 +1,55 @@
; This script was created using Pulover's Macro Creator
; www.macrocreator.com
#NoEnv
SetWorkingDir %A_ScriptDir%
CoordMode, Mouse, Screen
SendMode Input
#SingleInstance Force
SetTitleMatchMode 2
#WinActivateForce
SetControlDelay 1
SetWinDelay 0
SetKeyDelay -1
SetMouseDelay -1
SetBatchLines -1
^F3::
Macro1:
WinActivate, SystmOne
Sleep, 333
Send, ^6
Sleep, 100
CoordMode, Pixel, Screen
ImageSearch, FoundX, FoundY, 0, 0, 2560, 1440, C:\Sean\AHK\PuloversMacroCreator-Portable (1)\MacroCreatorPortable\x64\MacroCreator\Screenshots\Screen_20220531094245.png
CenterImgSrchCoords("C:\Sean\AHK\PuloversMacroCreator-Portable (1)\MacroCreatorPortable\x64\MacroCreator\Screenshots\Screen_20220531094245.png", FoundX, FoundY)
If ErrorLevel
{
MsgBox, 49, Continue?, Image / Pixel Not Found.`nPress OK to continue.
IfMsgBox, Cancel
Return
}
Click, %FoundX%, %FoundY% Left, 1
Sleep, 10
Send, !o
Sleep, 300
Loop, 14
{
Send, {Tab}
}
Return
CenterImgSrchCoords(File, ByRef CoordX, ByRef CoordY)
{
static LoadedPic
LastEL := ErrorLevel
Gui, Pict:Add, Pic, vLoadedPic, % RegExReplace(File, "^(\*\w+\s)+")
GuiControlGet, LoadedPic, Pict:Pos
Gui, Pict:Destroy
CoordX += LoadedPicW // 2
CoordY += LoadedPicH // 2
ErrorLevel := LastEL
}