Friday, February 8, 2013

CGI-DRG on A PC (VB-DRG Replacement)

We are discontinuing VB-DRG (details here) which means that we do not have a simple desktop DRG assigning solution--or do we?

One of our developers pointed out that he runs CGI-DRG on his Windows 7 PC and that others could as well.

Our customer service head was doubtful that this is a solution for most users, since it requires installing a web server on the PC first. But we let the developer write up his solution so we could post it in case it is more widely interesting than Customer Service thinks. This is the tech blog after all.

To run CGI-DRG on a PC, you need to do three things:
  1. install a web server on the PC (just do this once)
  2. install CGI-DRG (need a new one every year)
  3. install MASKS (need a new one every year)


If you have IT support, perhaps they can put a "personal web server" (PWS) on your PC for you; just remember that your PWS has to be able to run CGI scripts.

(A PWS should not be too much of a security issue since it should be configured to only provide service to the PC itself, not over the network.)

If you have to install it yourself, it isn't too big a deal. I choose the Abyss Web Server from Aprelium because it is highly reviewed, it is free and it worked the first time:

In order to write these instructions, I started with a fresh Windows 7 machine and did the following:
  1. Download the free PWS installation appropriate to your O/S from here: (I chose the Windows link, the first one.) This downloaded abwsx1.exe, which contained both 32-bit and 64-bit versions. Not sure which one you need? Don't panic, Microsoft tells you how to find out here: But it did not matter for me, the installer correctly chose 32-bit automatically.
  2. Run the installer (abwsx1.exe) and take all the defaults. I chose to have the web server start on user login because I don't want to have to start it up myself when I need it, but I am irrationally afraid of making it a windows service. Do whatever makes sense to you.
  3. The Windows 7 firewall complained about something. I agreed to the default and most strict option.
  4. I confirmed that the Abyss Web Server was up and running by entering into my local browser; is the IP address of the local machine. I got back the default Abyss Web Server web page, so I knew that all was well.
  5. Now we need to allow this PWS to run CGI scripts; first, we create the directory in which to put the CGI scripts: c:\Abyss Web Server\htdocs\cgi-bin". In other words, you are adding a subdirectory "cgi-bin" to the existing directory "c:\Abyss Web Server\htdocs".
  6. Now the only slightly tricky part: giving this directory permission to run scripts. You go to this URL and follow the prompts:
    1. choose a language (English, French or Arabic)
    2. set up web server credentials
    3. use the web server credentials to log in 
    4. hit the "configure" button in the blue "Hosts" box
    5. choose Aliases, then Add
    6. Virtual path="/cgi-bin", Real path="C:\Abyss Web Server\htdocs\cgi-bin"
    7. hit OK
    8. choose Scripting Parameters add a new script path for "/cgi-bin"
    9. hit Restart and wait until the console returns


I am not sure how customers get CGI-DRG: I get it as cgi-drg.exe. I put that file into c:\Abyss Web Server\htdocs\cgi-bin; I like to use the command line like this:

c>\users\dev> copy cgi-drg.exe "c:\Abyss Web Server\htdocs\cgi-bin"

but you can use the Windows Explorer or whatever you want to put cgi-drg.exe into that directory.


You can use the standard installer to install the masks file, in which case if you take the default, it (they) will go into "c:\program files\mandh\masks" so I will assume that did that or copied the masks file into that directory.


Once all three installs are done, to run CGI-DRG you enter the following URL into the browser of your choice:

Note that CGI-DRG automatically detects all the versions that you have bought and will give you the ability to choose which one you want for any individual DRG assignment session.

What could be simpler?


Almost forgot, here is what it looks like:

Monday, February 4, 2013

Issue with Access-DRG and Weights


Access-DRG is showing the decimal point in the wrong place for DRG weights, eg Access-DRG reports the weight for DRG 2 as 1.1754 instead of 11.7540.


We confirmed the issue on our Windows validation platform. We confirmed that
this bug did NOT exist on our reference platform. We checked our records and found that our initial drgmasks.f27 file had the decimal place in the wrong place for some weights which was detected as part of quality control. However, we failed to update the canonical image with the corrected file, resulting in at least some customers getting the bad masks file.


We confirmed that running the newly updated installer for the f27 masks file corrects the problem. We are sending the bug reporting customer an update right away and working to update our site as soon as possible.

Do not run the masks file "uninstall" as we have an open ticket in which a user claims that running the masks file uninstall removes all masks files, not just the one you want to remove.

If you are not sure if your installation is correct, please run the following test case through our system and see what is returned as the DRG weight; alternately, you can simply download either the Windows installer or masks file directly below.

   Age: 074
   Sex: M
  Disp: 01
   MDC: 05
   DRG: 002
  DX's: Code :E:P E=exempt flag P=present on admission flag
  DX01: 4280::

Proc's: Code
  SG01: 3764  
  SG02: 3765

MD5 digest of the bad file and the good file:

2f35a9084f929e0075bcddc8d1bcaa35 badweights.drgmasks.f27
7fb9267df1268ab182126ce67700da64 drgmasks.f27

MD5 digest of the bad installer and the good installer:

7b30bb3e24904a7d04d86b4bec60e146 badweights.mhmasksf27.exe
d0995cf7d3174f01425b2fba5e6320c7 mhmasksf27.exe