Tuesday, April 19, 2011

Meditech DR (Data Repository)



We are now using the Data Repository so I thought this would be a good time to start back to posting here.


This is an interesting query to find all patients whose birthday is today.


The WITH TempTable is necessary to only get one record for each patient (UnitNumber).
WITH TempTable AS
(
 SELECT 
  *,
  ROW_NUMBER() OVER(PARTITION BY UnitNumber ORDER BY UnitNumber) AS RowNumber
 FROM 
  AdmVisits
)
 
SELECT
 UnitNumber,
 Age,
 FLOOR(DATEDIFF(day, BirthDateTime, GETDATE()) / 365.25) as MyAge,
 BirthDateTime,
 Name,
 Sex
 
FROM 
 TempTable
 
WHERE 
 RowNumber = 1
 AND
 DAY(BirthDateTime) = DATEPART(DAY,GETDATE())
 AND 
 MONTH(BirthDateTime) = DATEPART(MONTH,GETDATE())

ORDER BY
 MyAge


One of the interesting things about it is that "Age" and "MyAge" are not always the same. It looks to me like "Age" stores the patient's age at the time of the visit.

Labels: ,

Wednesday, August 25, 2010

MEDITECH Knowledge Exchange A place to ask questions about MEDITECH.

* Meditech Knowledge Exchange

I hope everyone has heard of the Meditech Knowledge Exchange, this is a great site to ask questions and find answers regarding Meditech software and report writing. The site was created and is maintained by John Sharpe of comstock-software.


* How it works
   1. A user asks a question.
   2. Other user answer the question.
   3. All users can vote on the answers given.
   4. More votes equals higher ranking in the list.                                  



* What this means
   1. Questions are easier to find answers for than they are in the Meditech-L mailing list.
   2. Content is created by many users, as apposed to blogs and web sites which can be limited
   3. The best answers are at the top with other answers below, meaning you don't have to dig for them.

Be sure to read the Frequently Asked Questions and use the site.  You can be anonymous or login with a Open-ID Account.

Hope to see you over there soon, you will see me as Dave Albert.


Labels: ,

Saturday, April 18, 2009

Projects I'm working on.

I just wanted to mention some of the more interesting projects I am currently working on, in case anyone had any questions or suggestions.

  • Finishing up CWS (Community Wide Scheduling)
  • Our Resident medical officers RMOs (Hospitalists) are going to begin electronically entering Radiological procedures in OE (Order Entry)
  • Setting up HL7 interfaces for remote radiology reading
  • Investigating ADT (Admission/Discharge/Transfer) interface into Meditech from doctor's suites in the hospital
  • Creating a scheduled download report for Lab results that will be imported in to Irish Health Care's software system
  • Creating a report in our HR Absence Management System (AMS)
  • Recently created an Excel Spreadsheet to track nurse rostering that calculates nurse/patient ratios
  • Helping with some reports for our Pharmacy (PHA) go live
  • Recently implemented scanning (SCA) of histopathology reports in Lab, still having problem printing them out of PCI (we have Magic 5.5)


-Dave


Labels:

Thursday, April 16, 2009

Remotely Installing Meditech Magic Workstation 4.x

This is an AutoIt script
that can be used to remotely Install Meditech Magic Workstation 4.x

After installing AutoIt this script can be compiled in to an executable,
and since you have to be a superuser to install the Workstation there is a
RunAs function.

Now the superuser's password is stored in the script, so this could be a security issue.
After it's compiled to an executable, I haven't been able to pull the password out, but 
use at your own risk.


Here are some features of AutoIt from their website.

Features:

  • Easy to learn BASIC-like syntax
  • Simulate keystrokes and mouse movements
  • Manipulate windows and processes
  • Interact with all standard windows controls
  • Scripts can be compiled into standalone executables
  • Create Graphical User Interfaces (GUIs)
  • COM support
  • Regular expressions
  • Directly call external DLL and Windows API functions
  • Scriptable RunAs functions
  • Detailed helpfile and large community-based support forums
  • Compatible with Windows 95 / 98 / ME / NT4 / 2000 / XP / 2003 / Vista / 2008
  • Unicode and x64 support
  • Digitally signed for peace of mind
  • Works with Windows Vista's User Account Control (UAC)


#include
#Include


_Main()


Func _Main()
ToolTip('Script is installing the newest version of Meditech',0,0)
BlockInput(1)
Sleep(500)


; Fill in the username, password, domain, directory and program appropriate for your system.
Local $sUserName = "superuser"
Local $sPassword = "XXXXXXXXX" ; Your superuser password goes here 'use at your own risk'
Local $sDomain = "yourwindowsdomain"
Local $sDir = "\\fileprintserver\share\test"
Local $sProg = "\\fileprintserver\share\test\MT4-22.exe"


; Run a command prompt as the other user.
Local $pid = RunAsWait($sUserName, $sDomain, $sPassword, 2, $sProg, $sDir)

; Wait for the process to close.
ProcessWaitClose($pid)


BlockInput(0)
ToolTip("")
EndFunc




-Dave

Labels: ,

Wednesday, April 15, 2009

CDS Attribute for mouse click.

I came across this CDS attribute on the MEDITECH-L.

IFE=IF{@Z.lastkey=@Z.mouse.click 1,
IFE=P(R,S,"X"^/[ANS%0,"Z.C1"]|0)^#;1}

Where "Z.C1" is the name of the query on the CDS, and "X" being the input added to a field that is clicked with the mouse.




I can see this being used for a few different things.  

1. We are going live with electronic ordering by doctors, and to minimize on the amount of time they must spend entering data on a patient we could use this for check boxes. E.g. for MRI





2. We have a wound identification screen that clicking would be much faster than entering all the way through it.


-Dave

Labels: ,

Tuesday, April 14, 2009

It's been a while...

It's been a while since I have posted, but that is going to change. I have been working on some very interesting things lately and I am going to post them shortly.




"A knowledge of the path cannot be substituted for putting one foot in
front of the other." - M. C. Richards

Labels:

Saturday, June 07, 2008

Iatric System's Scriptlink+

I am in the implementation process for CWS (Community Wide Scheduling). We are to the point where we need to input the appointment types, there are over 1000 appointment types and I surely don't want to be the one to key them in. We have a scripting program Macro Express it is a very nice scripting program for the windows environment, but we all know Meditech Magic is not exactly the windows environment.

I had just received the granting of my request for Iatric System's Scriptlink+ standard. It is a very nice scripting program to use with Magic. Scriptlink communicates directly with the Meditech terminal, and not with windows so you can actually use other programs at the same time the script is running. This also helps, but not eliminates, timing issues. To download and activate Scriptlink+ standard which is free, you must fill out a request form on Iatric's website. It only took 2 business days to receive the download link.

I downloaded from NPR all of our OE procedures then in excel I manipulated the data to make some changes to the mnemonics to fit our CWS strategy. Then I saved the file as a comma delimited you can download my entire script here, but here is a break down of the script.

Actual script code will be in green.

€OPEN FILE "C:\cws.err" FOR REPLACE AS OutFile
This replaces a file for a specific error output I want to track.

€MERGE BLOCK "c:\cws.csv"
€MERGE READ TO Mnemonic AS TEXT

€MERGE READ TO Description AS TEXT
€MERGE READ TO Group AS TEXT
€MERGE READ TO Dur AS TEXT
€MERGE READ TO OECat AS TEXT
€MERGE READ TO OEProc AS TEXT
Merge block starts a loop on the file specified and reads the six filed and puts them in to named variables.
The comma delimited file is laid out like this:
Mnemonic,description,group,duration,OE Category,OE Procedure

€PAUSE 1
€REM * * * Mnemonic * * *
€SEND Mnemonic

€WAIT WINDOW "Yes/No Confirmation" 30 1
Y

Here we wait for 1 second then send the data stored in the variable Mnemonic to Meditech. Then we wait for the Yes/No window to pop up because this is a new appointment type. Notice the remark, this is both useful if someone else uses your script and also the separate sections of your script so it is easier to find a specific place while you are writing it and fixing any problems.

Then we do about the same with description, group and duration.

€REM * * * OE order * * *
€CHR 147
€WAIT WINDOW "SCH Appointment Type Enter/Edit Screens" 30 1
€CHR 8
5
€SEND OeCat

€SEND OeProc

The CHR 147 is F12, the help in the program has a list of all the useful key codes that you will send. We again wait for a window to pop up then we send CHR 8 which is backspace. 5 to go to page 5, and send the OeCategory
and OeProcedure.

€IF WINDOW "Error" 5 1
€REM * * * ERROR * * *

€PRINT TO OutFile Mnemonic
€CHR 10
€ELSE

€END IF
We wait for 5 seconds for an error window, some of the OE procedures downloaded are not order able from scheduling so we get an error.
If we do get that error, we print that mnemonic to our error file and send an F10 to clear out the procedure. If there is no error, we send an Enter.

€REM * * * File * * *
€CHR 147
€PAUSE 1
Now we are ready to file the appointment type. CHR 147 is F12, and we wait 1 second for the file procedure to complete.

€END MERGE
This is the end of the loop.

This script will take approximately 50 minutes for 100 Appointment types, but unlike MacroExpress, I don't have to sit and watch it waiting on some anomaly that I could not account for. I will submit that the problems I have with MacroExpress could very much be due to my inexperience with the product.

If you have any experience or question with regards to
Macro Express or Scriptlink+ let me know your thoughts.

Labels: , , , , ,

Friday, June 06, 2008

Welcome

Hi my name is Dave and I am a clinical application analyst at the Hermitage Medical Clinic in Dublin, Ireland. I have worked there since February of 2008. Before moving to Ireland, I was an applications analyst in West Virginia USA where I am originally from. This blog is not affiliated with the Hermitage Clinic, all ideas expressed here are my own.

Their are several good resources on the internet for health care related software, I want to collect these in one place. I hope this will help others who are starting out or trying to develop their skills. I also want to show my reports to others so that I might get feedback and develop my own skills.

I will write posts of thing I find of interest, or things I happen to work on.

Most of the subject matter will be:
* Meditech NPR reports
* Meditech Attributes
* Meditech rules
* HL7 interfaces
* Scripting of data into Meditech
* Other data analysis techniques

If you have anything to add to a post please leave comments, or dave.npr@gmail.com me if you would like me to write on a specific subject.

Thank you for coming and I hope this is of some help to you.
-Dave .

Labels: , , ,