From 070785e89a4858083f968e0eb5b955ea951458f2 Mon Sep 17 00:00:00 2001 From: Sean Cusack Date: Thu, 22 Dec 2022 18:18:22 +0000 Subject: [PATCH] Added referral safeguards, second background colour for home visit searches, more text shortcuts (both inline and via quicksearch) --- Launcher.ahk | 1 + .../home_visit_summary_entry_white.png | Bin 0 -> 853 bytes includes/PrintHomeVisitsImageSearch.ahk | 9 +++- includes/QuickSearch.ahk | 9 ++++ includes/ReferralSafeguard.ahk | 39 ++++++++++++++++++ includes/TextExpansions.ahk | 20 ++++++--- 6 files changed, 72 insertions(+), 6 deletions(-) create mode 100644 assets/homevisits/home_visit_summary_entry_white.png create mode 100644 includes/ReferralSafeguard.ahk diff --git a/Launcher.ahk b/Launcher.ahk index 441dd84..5323f31 100644 --- a/Launcher.ahk +++ b/Launcher.ahk @@ -26,6 +26,7 @@ IniRead, EPSPin, config\secure\main_secure.ini, EPS, Pin #Include includes\PrintHomeVisitsImageSearch.ahk #Include includes\EPS.ahk #Include includes\SignAcuteIssue.ahk +#Include includes\ReferralSafeguard.ahk ; Reload Script after changes (Ctrl + F1) ^F1:: diff --git a/assets/homevisits/home_visit_summary_entry_white.png b/assets/homevisits/home_visit_summary_entry_white.png new file mode 100644 index 0000000000000000000000000000000000000000..d519e46bdb19433f79360f7a0bfb1c8162b95111 GIT binary patch literal 853 zcmV-b1FHOqP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0_sUbK~z{r?N~c* z8!-^o%~ogd85VFUz=d78B;Z0P2;goDr*@IfjfEV;i0yD%5P zc^YY)&QS`m`c|WwOCXCRC;SYam>=}?S7JwRZ#FSn4Rb84CQROmdKcnE7-^c^yi0ju zPlY_AW=8w(C8l>Ie!8pmv2sx zoyTmV@95^nCPk}Z&ii{bAy5`2q3A#P;O3-!qInmFD`ZHK$7Ho^+u_|TxAzP|5Eex- zlsznNwyo?*y&{H;7<=tRDd#D}JR-NL@#*;z}$EZTn$}oj%kS3s7=T-aWb{M2!}C__0X# zldH`KVf%= z?U=rj+>>{YZU9c=T%%eZ$xbGY1%C7%k4F~Pps8Ccrs_vRQs<+^DDAWWJ6;!Y$YRvu z1>{vJ^=fmVKcDXzSS;=?=P9`-@7@{}Z<9tIIDMU~Uq^r@%*#vo55~G~B0f);P(*oO z>Nm{VVzlfmVHQKiRnG4v49BLwl0u(cyc|2fk!CwRd3WfRv9eql1LSxGnlQL#@IGn$ zarYI3NySx1B%`NrfV9(2)GS63mw9vpN)IvlN2ZE9A;)9I1d^n&ahklYv?+C4dH2;w z`W)g{k$K`VV9UxY<7)}C;ok;GWL&Ef8(}su!WAh`DjQ6gga7gY5x#q(;4A3I?Jdhz fgYJg^6-2)QdIELSIe+It00000NkvXXu0mjfeJy~n literal 0 HcmV?d00001 diff --git a/includes/PrintHomeVisitsImageSearch.ahk b/includes/PrintHomeVisitsImageSearch.ahk index a52d771..3fd5c20 100644 --- a/includes/PrintHomeVisitsImageSearch.ahk +++ b/includes/PrintHomeVisitsImageSearch.ahk @@ -79,7 +79,7 @@ If (ErrorLevel = 0) Loop, 30 { Send, {PgDn} - Sleep, 150 + Sleep, 20 CoordMode, Pixel, Screen CoordMode, Mouse, Screen ImageSearch, FoundX, FoundY, 0, 0, 2560, 1440, assets\homevisits\home_visit_summary_entry.png @@ -89,6 +89,13 @@ If (ErrorLevel = 0) Sleep, 10 Break } + ImageSearch, FoundX, FoundY, 0, 0, 2560, 1440, assets\homevisits\home_visit_summary_entry_white.png + If (ErrorLevel = 0) + { + Click, %FoundX%, %FoundY% Left, 2 + Sleep, 10 + Break + } } } Else diff --git a/includes/QuickSearch.ahk b/includes/QuickSearch.ahk index b0c3409..3463104 100644 --- a/includes/QuickSearch.ahk +++ b/includes/QuickSearch.ahk @@ -19,6 +19,15 @@ url_shortcuts["can"] := "https://www.nice.org.uk/guidance/ng12/chapter/Recommend url_shortcuts["hrt"] := "https://d2931px9t312xa.cloudfront.net/menopausedoctor/files/information/229/Easy`%20HRT`%20prescribing`%20guide.pdf" url_shortcuts["htn"] := "https://www.england.nhs.uk/london/wp-content/uploads/sites/8/2019/11/NICE-NG136-Visual-Summary.pdf" url_shortcuts["abx"] := "https://gmmmg.nhs.uk/wp-content/uploads/2022/06/GM-Antimicrobial-guidelines-Apr-2022-v11.0-FINAL.pdf" +url_shortcuts["bsc"] := "https://upload.wikimedia.org/wikipedia/commons/a/a7/BristolStoolChart_%28cropped%29.png" +url_shortcuts["rag"] := "https://gmmmg.nhs.uk/rag-category/adult/" +url_shortcuts["amgp"] := "https://nhs.askmygp.uk/" +url_shortcuts["copd"] := "https://gmmmg.nhs.uk/wp-content/uploads/2021/11/COPD-Treatment-Guideline-Sept-2021-V7.pdf" +url_shortcuts["asthma"] := "https://gmmmg.nhs.uk/wp-content/uploads/2022/04/GM-asthma-guideline-2022-V8-for-web.pdf" +url_shortcuts["diab"] := "https://www.nice.org.uk/guidance/ng28/resources/visual-summary-full-version-choosing-medicines-for-firstline-and-further-treatment-pdf-10956472093" +url_shortcuts["tmj"] := "https://www.ouh.nhs.uk/patient-guide/leaflets/files/12128Ptmj.pdf" +; url_shortcuts[""] := "" + if (url_shortcuts.hasKey(vQuery)) { path := url_shortcuts[vQuery] diff --git a/includes/ReferralSafeguard.ahk b/includes/ReferralSafeguard.ahk new file mode 100644 index 0000000..2c5f138 --- /dev/null +++ b/includes/ReferralSafeguard.ahk @@ -0,0 +1,39 @@ +; This script was created using Pulover's Macro Creator +; www.macrocreator.com + + + +F22:: +referral_file := "C:\Sean\AHK\referrals\referrals.txt" +referral_historical := "C:\Sean\AHK\referrals\historical.txt" +WinActivate, SystmOne GP ahk_class SunAwtFrame +Sleep, 333 +MouseGetPos, cur_mouse_x, cur_mouse_y +CoordMode, Pixel, Screen +Click, 2199, 70 Left, Down +Sleep, 10 +CoordMode, Pixel, Screen +Click, 2493, 70 Left, Up +Sleep, 10 +Send, ^c +Click, Left, 1 +Sleep, 10 +/* +Click, %cur_mouse_x%, %cur_mouse_y%, 0 +Sleep, 10 +*/ +FormatTime, cur_timestamp, , yy-MM-dd HH:mm +/* +MsgBox, 0, , %cur_timestamp% - %clipboard% +*/ +Sleep, 500 +CurrentKeyDelay := A_KeyDelay +SetKeyDelay, 200 +SendEvent, ^5 ^6 {APPSKEY} !o +SetKeyDelay, %CurrentKeyDelay% +FileAppend, %cur_timestamp% - %clipboard%`n, %referral_file% +FileAppend, %cur_timestamp% - %clipboard%`n, %referral_historical% +Return + +F21:: +Run, notepad.exe %referral_file% \ No newline at end of file diff --git a/includes/TextExpansions.ahk b/includes/TextExpansions.ahk index b386b47..697861b 100644 --- a/includes/TextExpansions.ahk +++ b/includes/TextExpansions.ahk @@ -104,12 +104,13 @@ I have booked the following face to face appointment for you: x AM with x at Pennygate Medical Centre TODAY. -Please wear a mask, and please do a covid lateral flow test before attending. If it is positive please do not attend and instead make contact again with the surgery. Please contact the surgery if you are unable to attend this appointment. ) SendInput %response% return +;; Please wear a mask, and please do a covid lateral flow test before attending. If it is positive please do not attend and instead make contact again with the surgery. + ::sn.:: SendInput safety netted to get back in touch if not improving or worsening return @@ -146,14 +147,23 @@ return SendInput Take 1 capsule daily, increase to twice daily after 1 week and three times daily after another week return + ::sig.:: SendInput !n SendInput !p Sendinput !p -sleep 200 -ClipboardSaved := Clipboard +sleep 2000 +;ClipboardSaved := Clipboard +sleep 50 Clipboard := "\\AGMH2RESCIFS01.resources.greatermanchestercsu.nhs.uk\CIFS_WBCCG_GPs\P92016\HOME\Sean.Cusack\My Documents\signature_small.jpg" -SendInput ^v +sleep 100 +SendInput {Ctrl down} +sleep 50 +SendInput v +sleep 50 +SendInput {Ctrl up} +sleep 50 SendInput {Enter} -Clipboard := ClipboardSaved +sleep 200 +;Clipboard := ClipboardSaved return \ No newline at end of file