Copy Lab Data to Medical Note

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
DoctorQuacks
Posts: 4
Joined: 26 Oct 2018, 19:34

Copy Lab Data to Medical Note

26 Oct 2018, 19:50

Hey, If anyone can spare a minute to help me solve my problem I'd be grateful. I'm trying to copy lab data from one area and have it pasted to an area in my note to save time. What I've come up with is VERY inaccurate as it is 50-50 with actually placing the lab values in the coordinates I've given it and 50-50 with actually getting the data saved as a variable.

What I'm using is a razer orb weaver to activate the hotkeys and I"m trying to use the least amount of keys possible per lab value or group of labs (Diabetes: A1c, Glucose etc...)
I started with Cholesterol Values :

Code: Select all


!^g::
	
	if tctg > 1 ; Last is first in line - once all values have been given, when the hotkey is reactivated it will place the values at the given coordinates in theory... but its not working out as planned
	{
		Click, %xldl%, %yldl%
		Sleep 750
		Send {-}
		Send %ldl%
		Sleep 750
		Click, %xtctg%, %ytctg%
		Sleep 750
		Send {-}
		Send %tctg%
		Sleep 750
		LDL = 
		TCTG =
		xTCTG =
		yTCTG =
		xLDL =
		yLDL =
		return
	}
	if ldl > 1  ; Giving the Variable secondary cholesterol what the patient's lab value is
	{
		clipboard =  
		Send ^c
		ClipWait, 2
		tctg:=clipboard
		return
	}
	if xtctg > 1  ; Giving the Variable LDL what the patient's lab value is
	{
		clipboard =  
		Send ^c
		ClipWait, 2
		ldl:=clipboard
		return
	}
	if xldl > 1
	{
		MouseGetPos, xtctg, ytctg ; Where I want the secondary Cholesterol Value to go
		return
	}
	else if xldl =   ; Last is First - since each Variable is blank it starts here to get where I want LDL lab value to go
	{
		MouseGetPos, xldl, yldl
		return
	}

Gladly appreciate any help/advice I could get to help me get through my day at work :)
User avatar
Masonjar13
Posts: 1555
Joined: 20 Jul 2014, 10:16
Location: Не Россия
Contact:

Re: Copy Lab Data to Medical Note

26 Oct 2018, 20:12

Assuming this is actual medical data, automating it in this way may indict a HIPAA violation. Could get you fired, or worse, so make sure your supervisor/manager allows for you to do so. If you don't, well, you assume all liability.

Depending on the type of interface, you might be able to grab the info with ControlGetText and paste it with ControlSend. You can use WindowSpy.ahk (comes with the installer, find it in the installation folder of AHK, defaults to C:\Program Files\AutoHotkey\WindowSpy.ahk) to find the control names/classes/hwnds.
OS: Windows 10 Pro | Editor: Notepad++
My Personal Function Library | Old Build - New Build
User avatar
kczx3
Posts: 1648
Joined: 06 Oct 2015, 21:39

Re: Copy Lab Data to Medical Note

26 Oct 2018, 20:28

How would this be a HIPAA violation? We have notes that automatically pull in lab values from chart. Here, it’s just manual.
DoctorQuacks
Posts: 4
Joined: 26 Oct 2018, 19:34

Re: Copy Lab Data to Medical Note

26 Oct 2018, 21:13

I'm using cerner and to AHK its like trying to navigate a maze blind folded. I made a slight change to the order things are pasted in [see below] (who would have thought pasting something earlier in the note would change where things are located down stream ;) )

but I"m still running into ^c not acutally going to clipboard ... seems to get stuck and in addition tctg = xtctg = ytctg = aren't clearing their variable values... any thoughts?

Code: Select all

	if tctg > 0.1
	{
		Click, %xtctg%, %ytctg%
		Sleep 750
		Send {-}
		Send %tctg%
		Sleep 750
		Click, %xldl%, %yldl%
		Sleep 750
		Send {-}
		Send %ldl%
		Sleep 750
		ldl =  
		tctg =  
		xtctg =  
		ytctg = 
		xldl =  
		yldl =  
		return
aifritz
Posts: 301
Joined: 29 Jul 2018, 11:30
Location: Germany

Re: Copy Lab Data to Medical Note

27 Oct 2018, 00:41

Could it be possible, that your clicking vars are empty sometimes?

For example when xtctg=200 and ytctg is empty Click, %xtctg%, %ytctg% clicks the left mouse button 200 times at the cursor's current position. The same happens vice versa.

In case both values are empty the command clicks the left mouse button once at the mouse cursor's current position.

One way to check this by adding a msgbox and a sleep for each click command

Code: Select all

...
msgbox,4096,,xtctg|%xtctg%|`nytctg|%ytctg%|
Sleep 500
Click, %xtctg%, %ytctg%
...
As already mentioned, clicking is not very save. Another possibility would be to check if a COM interface exists for your software
User avatar
kczx3
Posts: 1648
Joined: 06 Oct 2015, 21:39

Re: Copy Lab Data to Medical Note

27 Oct 2018, 05:24

Yes, I worked at Cerner for two years and now support it for a hospital. Not sure what you are making your notes in but Dynamic Documentation allows you to tag labs and then have them brought into your note.
User avatar
Masonjar13
Posts: 1555
Joined: 20 Jul 2014, 10:16
Location: Не Россия
Contact:

Re: Copy Lab Data to Medical Note

27 Oct 2018, 10:29

kczx3 wrote:
26 Oct 2018, 20:28
How would this be a HIPAA violation?
By technically (as in technologically) moving or altering data without utilizing reasonable encryption. If said information is protected by HIPAA, you would have to use encryption when using this data. The way around that is if the data is never in plain-text in memory. If that's something you were doing, then you were in violation of HIPAA. As implied, I don't know if this particular information is HIPAA protected or not, which is why I posted warning.

Unless it only requires encrypting information that is stored on disk, rather than also memory.
OS: Windows 10 Pro | Editor: Notepad++
My Personal Function Library | Old Build - New Build
User avatar
kczx3
Posts: 1648
Joined: 06 Oct 2015, 21:39

Re: Copy Lab Data to Medical Note

28 Oct 2018, 13:34

Yeah I don’t see how it would need to be encrypted in memory. Cerner uses all kinds of hosted Internet Explorer controls inside their native apps. Lots of JavaScript.... raw text in memory.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Bing [Bot], Rohwedder and 112 guests