Category Archives: Allscripts

Allscripts Vision User Reporting

A quick Powershell script I hacked together that will enumerate all Active Directory users, and build an XML file for an application I wrote that generates user reports for a specific application.

The output file format is similar to:

<quickreports>
  <report name=Organizational Unit>
  <database name=v001/>
  <usrlogin name=jdoe01/>
</report>
<quickreports>
$ErrorActionPreference= 'silentlycontinue'
$arr=@{}
foreach ($usr in Get-ADUser -Filter *  | select samaccountname) {
$user = get-aduser -identity $usr.samaccountname -ErrorAction SilentlyContinue
$userou = (($user.DistinguishedName -split =,2)[-1].split(,)[1] -split =,2)[-1]
$key = $userou
$value = $usr.samaccountname
if ($arr.ContainsKey($userou)) {
$arr[$userou] += $usr.samaccountname
} else {
$arr[$userou] = @()
$arr.add($key,$value)
}
}
$foo = <?xml version=1.0 encoding=utf-8?>`r`n
$foo += <quickreports>`r`n
$foo += foreach ($ou in $arr.keys) {
    write-output   <report name=$ou>`r`n
    foreach ($u in $arr[$ou]) {
                if ($u.contains(01)) {
                    write-output <database name=v001/>`r`n
                } elseif ($u.contains(04)) {
                    write-output <database name=v004/>`r`n
                } else {
                    write-output <database name=/>`r`n
                }
        write-output <usrlogin name=$u/>`r`n
}
    write-output </report>`r`n
}
$foo += </quickreports>
$foo | out-file quickreport.xml
# for some reason the outputted file was dumping 0x00 into the file.  Eventually
# I'll clean all this up and just write all the attributes and elements from up above
# but now is not the time as this is just a quick and dirty POC
$fn = quickreport.xml
$xmlDoc = [system.xml.xmldocument](get-content $fn)
$xmlDoc.save($fn)

Change Allscripts ProEHR HMScan Path

Follow the steps below against correct EHR database in SQL Management Studio if you want to change the pointers yourself.

  1. select * from HPSITE.SCAN_DOCUMENTPAGE
  2. Update the Document Page from the old Server to the new Server:
UPDATE HPSITE.SCAN_DOCUMENTPAGE
SET FILELOCATION = REPLACE(FILELOCATION,'\OLDserver\Hmscan','\NEWserver\hmscan')
  1. Update the Scan Job from the old Server to the new Server:
UPDATE HPSITE.SCAN_JOB
SET DIRECTORY= REPLACE(DIRECTORY,'\OLDserver\Hmscan','\NEWserver\hmscan')
  1. Update the Locations path for all locations in the Allscripts EHR Administration Module – Locations
    1. If moved just the HMScan folder, change the path for the HMScan ONLY in the:
      1. Temp Storage
      2. Mass Storage
      3. possibly Import Default
  2. Verify paths are now correct:
select * from HPSITE.SCAN_DOCUMENTPAGE
select * from HPSITE.SCAN_JOB
  1. Test by opening a patient, with an attached image. Go into Allscripts EHR and click on the ‘Pull a Chart’ icon (yellow).

Allscripts Project

Last week I worked on one of my projects for Allscripts Vision accounting to add a few enhancements.

The major enhancement was the ability to export a detailed report for all users to Excel and create a Pivot table with chart of users’ logins over the report’s timeline.

You can read more on my project page for this project.

Allscripts ProEHR 9.10.3 database table and column extended properties text:  ProEHR 9.10.3 – Table and Column Extended Properties

Misys Vision Encounter Templates

Misys Vision Encounter (Superbill) Templates

SQL Query:

select tmpname,tmpdesc from formtmphdr where allow_edit = 'N' and tmptype = 7
tmpname       tmpdesc
CODESCAN1S    MICROSCAN ENCOUNTER 1 (8 LPI - STYLE 2)
CODESCAN3S    MICROSCAN ENCOUNTER 3 (8 LPI - STYLE 2)
ENC09         MEDIC ENCOUNTER FORM #9
ENC09LASER    MEDIC #9 LASER ENCOUNT (60 LPP STYLE 3)
ENC10         MEDIC ENCOUNTER FORM #10
ENC10LABEL    MEDIC LABEL ENCOUNTER FORM #10 (STYLE 3)
ENC10LASER    MEDIC #10 LASER ENCOUNT (60 LPP STYLE 3)
ENC11         MEDIC ENCOUNTER FORM #11
ENC11LASER    MEDIC #11 LASER ENCOUNT (60LPP STYLE 1)
ENCVIS        VISION STANDARD ENCOUNTER
ENCVISLASE    MEDIC VISION LASER ENC (60LPP STYLE 2)
MICROSCAN3    MICROSCAN ENCOUNTER (3RD VERS) 2.14.4   

These are the non-editable templates. You must copy the template (tmpname) to a new template and modify the new template accordingly.

ProEHR Refill Status Codes

I have been working on a report to indicate which refill requests will be coming in the future and I’ve had to do some digging in the database. Found this little nugget of information while working in the HPSITE.REFILL table.

This is HPSITE.REFILL table description followed by HPSITE.REFILL.RFL_STATUS description.

HPSITE.REFILL: This table stores the data related to ordering a refill of a patient’s medication.

HPSITE.REFILL.RFL_STATUS: This column indicates the current status of the refill. It equates to the dict_type of ‘RFLSTS’ in the dictionaries_master.

RFLSTS is found in the HPSITE.DICTIONARIES_VIEW

SELECT * FROM HPSITE.DICTIONARIES_VIEW WHERE DICT_TYPE='RFLSTS'
DICT_TYPE	DICT_CODE	DICT_DESCRIPTION	DICT_EXTRAINFORMATION	DICT_ORDER	DICT_TABLE	DICT_ARCHIVED
RFLSTS	0	Rejected Called In	 	0	 	0
RFLSTS	1	Approved Called In	Called In	1	 	0
RFLSTS	2	Requested	 	2	 	0
RFLSTS	3	Rejected	 	3	 	0
RFLSTS	4	Approved	Filed	4	 	0
RFLSTS	5	Approved Faxed In	Faxed	5	NULL	0
RFLSTS	6	Approved Printed	Printed	6	NULL	0
RFLSTS	7	Approved Transmitted	Transmitted	7	NULL	0
RFLSTS	9	Approved Dispensed	Dispensed	9	NULL	0

This is using current 9.3.034 version of Allscripts ProEHR.

FastClaims for Tiger in AIX

So I’ve discovered that FastClaims in Allscripts Tiger AIX servers are stored in the following location.

When a receipts are batched, they are stored in /m2/MF01/CLAIM499

When clicking on “Batch” -> Fast Claims, it then copies /m2/MF01/CLAIM499 to /src/APPS/ECONNECT/ARCHIVE/TS/CLAIM499_1.3101165443_20120131165507385. You will notice this filename is comprised of CLAIM499_[companynumber].ddmmhhmmss.yyyymmddhhmmssnnnn in gzip format.

The original /m2/MF01/CLAIM499 is renamed to /m2/MF01/oldCLAIM499.

The header of the file AA00000000 indicates start of each claim for company and the end is represented by ZA00000000 in the same file. Replace zeros with account number padded.

Note: When modifying claim file, use R in vi to replace instead of i to insert. It will void the length of the columns and cause all sorts of problems.

Misys Vision Slow to Load Fast Services Screen

I’ve seen that it takes >1hr to load the FastServices window after clicking on the FastServices button.

Here’s what I did to make this take less than 10 seconds to load.  It appears as though it does some type of parsing/processing of old log and inbox files.

# cd /Medic/APPS/fastsvc
# ls -l
total 264
drwxr-xr-x 4 dev medgrp 512 Dec 5 15:33 inbox
drwxr-xr-x 2 dev medgrp 512 Dec 5 15:31 logs
drwxrwxrwx 2 dev medgrp 512 Dec 5 15:14 outbox
drwxrwxrwx 2 dev medgrp 512 Dec 5 15:23 tmp

I moved log to logs.org and inbox to inbox.org.

# mv logs logs.org
# mv inbox inbox.org

After that, I created .fast_images directory in the inbox folder and also created .data directory in inbox.

# ls -l inbox
total 16
drwxr-xr-x 2 dev medgrp 512 Dec 5 15:33 .data
drwxr-xr-x 2 dev medgrp 512 Dec 5 15:33 .fast_images

Then, I chown’d the proper permissions.

# chown dev.medgrp inbox
# chown dev.medgrp inbox/.data
# chown dev.medgrp inbox/.fast_images
# chown dev.medgrp logs