Showing posts with label Validation. Show all posts
Showing posts with label Validation. Show all posts

Thursday, October 6, 2016

V34 Windows Products Are Done

As of end-of-day yesterday, our Windows v34 products passed validation, so we are packaging them up today and updating our on-line store.

Wednesday, October 28, 2015

DRGFilt and CGI (Web UI)

With our new DRGFilt control file format it seemed that one could use DRGFilt as a Web page helper app. In other words, we figured it should be easy to call DRGFilt from a CGI script to add DRG assignment to a web page. So we allocated a couple of hours to put that theory to the test and ended up with a fully functional web-based interactive grouper.

We were especially interested in this experiment because we use web-based interactive groupers internally, mostly for debugging specific cases because it is easier for a customer service person to use a web page than to use DRGFilt directly for a single case. We were looking to replace our old CGI-DRG product because we did not want to maintain it in the ICD10 world.

Step 1: we created a simple and lightweight Perl script to provide a basic HTML form and to call DRGFilt which we called "drgui.pl" for "DRG User Interface" and which we eventually made publicly available here.

Step 2: we created a DRGFilt control file group to do CGI, which we cleverly called "cgi":

; this group was added to support drgfilt-as-CGI helper
[cgi]
verbose = 0;
format = csv (^)        ; separator character is in parens
base = 0                ; indices are zero-based
inheaders = 0           ; 1=input column headers, 0=no input column headers
outheaders = 0          ; 1=want column headers, 0=no headers
crlf = 0                ; type of end-of-line: either crlf or lf
blip = 1                ; want something in the log
blipeol = 1             ; 1=newline for progress report, 0=carriage return
batchver = 33
maskdir = /var/www/cgi-bin/drgstuff
log = /tmp/me.out

; input variables: name = index
inid = 0
age =  1
sex = 2
exmp = 3
ds =  4
dx = 5-29
poa = 30-54
surg= 55-79

; these are written out by DRGFilt
rc  = 0
mdc = 1
drg = 2
outver = 3
weight = 4
mean = 5
morp = 6
desc = 7
dflg = 8                ; string of flags for which dx codes were used
sflg = 9                ; string of flags for which pr codes were used
; eof


Step 3: we created some simple plumbing from drgui.pl to DRGFilt (send the input via stdin, read the output via stdout):

my @i = ();
push(@i,0);                     # 0: the record ID
push(@i,$vars{'age'});          # 1: patient age on admission
push(@i,$vars{'sex'});          # 2: patient sex (1=male, 2=female)
push(@i,$vars{'exempt'});       # 3: exempt
push(@i,$vars{'dstat'});        # 4: discharge status (home)
for (my $i = 0; $i < 25; $i++) {# 6-29: ICD DX codes
    my $icd = substr($dx,$i*7,7);
    $icd =~ s/\s+$//;
    push(@i,$icd);
}
for (my $i = 0; $i < 25; $i++) {# 30-54: POA codes
    push(@i,substr($poa,$i,1));
}
for (my $i = 0; $i < 25; $i++) {# 55-79: ICD procedure codes
    my $icd = substr($px,$i*7,7);
    $icd =~ s/\s+$//;
    push(@i,$icd);
}
my $inrec = join('^',@i);

open(PIPE,"/bin/echo \"$inrec\" | $MYDIR/drgfiltv33 -v -l /tmp/me.out $MYDIR/v33.ini cgi|");
my $retval = <PIPE>;
($rc,$mdc,$drg,$ovn,$weight,$mean,$porm,$desc,$dxu,$pru) = split(/\^/,$retval,-1);


Step 4: pick a test case from the CMS data set and try it out:

[       2]-------------------------------------------
   Age: 055   
   Sex: M   
  Disp: 01

  Exem: Z (Exempt-from-HAC indicator)

   DRG: 231    
   MDC: 05    
   GRC: 00

  DX's| Code    |POA indicator
 -----+--------------
  DX01| B5881   |Y
  DX02| I2101   |

Proc's| Code
 -----+---------------------
  SG01| 0210093
  SG02| 02UG3JZ


Step 5: declare success and decide to put this out on the web so that our customers can debug issues with their own installations.

Friday, October 16, 2015

I10 Progress Report #10: VB Support Validated

We are delighted to announce that our Excel-DRG validation is done, which means that:
  • we have a CSV version of the CMS test data set
  • we have an API to a VB-callable DLL to assign DRGs which supports:
    • age
    • sex
    • discharge disposition
    • ICD10 diagnosis list with optional POA flags
    • ICD10 procedure list
    • POA indicator (are you sending POA flags?)
    • Exempt flag (is this case exempt?)
  • we have VB for Apps code to use the DLL to:
    • call mhdrg1() and get a DRG
    • call mhinfo() and get the description, weight, MDC, LOS
    • call mherrdesc() when there are errors
  • we have updated Excel-DRG to use this code
  • we have run the test data through Excel-DRG and confirmed that it works
We are done building products, the rest is sales and marketing and support.

We are going to start filling standing orders today and we hope to be ready to take new orders on-line by the end of next week.

Friday, October 9, 2015

V33 C-Callable DLL Validated

We have just finished validation of our new C-callable DLL for Windows, which we are calling cdrgv33.dll. It should be available for purchase next week.

Thursday, October 8, 2015

I10 Progress Report #9: Windows Version Validated

We have used the new DRGFilt10 to validate our DRG Assignment Engine (DAE) under windows (our reference platform is Windows 7 in order to avoid leading edge syndrome).

So we are hard at work putting together our Windows products for v33; we expect them to be available by mid-October at the latest.

This also gave us more experience with the new control file format, which we love. As part of the port to Windows, we added a feature to  DRGFilt10:  if you do not specify the "crlf" parameter, which controls the end of line (EOL) format, then DRGFilt10 does the environment-specific usual thing (Unix EOL under Unix, Windows EOL under Windows).

In other words, leaving the "crlf" parameter out of the control file means that output lines end with just line feed (LF) under Unix and carriage return (CR) + LF under Windows.

If you need to force CRLF under both environment, set crlf=1.

If you need to force LF under both environments, set crlf=0.

Tuesday, September 29, 2015

I10 Progress Report #8: V33 Support Validated

Hurray, our DRG Assignment Engine (DAE) correctly handles the CMS test set with ICD10 codes and v33 code attributes and logic.

Now we just have to roll out the DAE into our pared-down product catalog and overhaul our web sit and on-line store and we will be all set.

Next stop: CSV support for the new DRGFilt.

Thursday, September 24, 2015

I10 Progress Report #5: Success

At last, x32 has been validated, confirming that our new ICD10-based development path is working:

Processing version X32...ICD10 config
9187 records read with 0 errors.
All done.


So we are immediately starting work on v33, which will be our first production version for ICD10.

We are also changing our DRGFilt control file from its very 1980s fixed-width format to a very 1990s .INI file. (We hope to have support for a very 2000s XML format very soon.)

Thursday, September 17, 2015

I10 Progress Report #4

Yesterday we finished porting the attributes handling subsystem to our new development environment. We validated x32 against the CMS test data and x32 matches 97% of the time.

We are chasing that 3% but since I10 v32 was not an official release, we think that some of the discrepancy is due to last-minute changes. We are looking into running the official Grouper software so we can confirm their results.

We expect to be done with x32 no later than the end of the week and to start v33 Monday.

Tuesday, October 15, 2013

F31 Middleware Issue

We discovered and fixed an issue with our middleware, the glue between the DRG Assignment Engine and the DLL and other interfaces: any non-digit Sex cde was tested as M or F and taken as F in the default case. So the CMS test data set's entries whose Sex code was '-', which were supposed to bomb with Invalid Sex, were grouped.

This fix has been propagated for all the products depending on this middleware.

Sunday, October 6, 2013

CGI-DRG Issue

We do not think that this is an F31-specific issue, but in validating F31 we found an undesirable behavior in CGI-DRG:

  1. Enter a valid case and assign a DRG to it.
  2. Toggle the "exempt" flag ON and assign the DRG.
  3. Toggle the "exempt" flag OFF and assign the DRG
    1. the POA flag will be appended to the DX code as data
    2. this will cause an "Invalid Prin DX" error

Fix: after toggling the exempt flag, manually remove the POA flag from the end of any DX codes so affected.

We do not have time to address this  issue directly, but we hope to release an upgrade when the dust settles on F31.

Tuesday, October 11, 2011

F29 Release: Linux Validation

F29 Linux Product Validation Log

Masks for F29...Passed
DAE Regression Test...Passed
Linux DRGFilt for F29...Passed
Demo Linux version of DRGFilt...Passed
Linux C Shared Object for F29...Passed
Linux Perl Shared Object for F29...Passed
Linux PHP Shared Object for F29...Passed
Linux CGI-DRG for F29...Passed

Details

Masks for F29...Passed
Validated the masks file against official list, which we found here. Not that some MS-DRGs are not defined, such as 9, 18, 19, etc.

DAE Regression Test...Passed
Ran the latest DAE through our regression testing suite.

[Tue Oct 11 16:33:41 2011]     | --------SUMMARY-----------
[Tue Oct 11 16:33:41 2011]     |   v29: Ok
[Tue Oct 11 16:33:41 2011]     |   v28: Ok
[Tue Oct 11 16:33:41 2011]     |   v27(poa): Ok
[Tue Oct 11 16:33:41 2011]     |   v27: Ok
[Tue Oct 11 16:33:41 2011]     |   v26(poa): Ok
[Tue Oct 11 16:33:41 2011]     |   v26: Ok
[Tue Oct 11 16:33:41 2011]     |   v25: Ok
[Tue Oct 11 16:33:41 2011]     |   v24: Ok
[Tue Oct 11 16:33:41 2011]     |   v23: Ok
[Tue Oct 11 16:33:41 2011]     |   v22: Ok
[Tue Oct 11 16:33:41 2011]     |   v21: Ok
[Tue Oct 11 16:33:41 2011]     |   v20: Ok
[Tue Oct 11 16:33:41 2011]     |   v19: Ok
[Tue Oct 11 16:33:41 2011]     |   v18: Ok
[Tue Oct 11 16:33:41 2011]     |   v17: Ok
[Tue Oct 11 16:33:41 2011]     |   v16: Ok
[Tue Oct 11 16:33:41 2011]     |   v15: Ok
[Tue Oct 11 16:33:41 2011]     |   v14: Ok
[Tue Oct 11 16:33:41 2011]     |   v13: Ok
[Tue Oct 11 16:33:41 2011]     |   v12: Ok




Linux DRGFilt for F29...Passed
Validated the DAE with DRGFilt against the test data set with this control file:

age  000 03
sex  003 01
ds   004 02
dxl  000 08
poa  000 07
dx   023 96
sgl  000 07
surg 223 98
exmp 006 01
# these are written out by us
drg  607 03
mdc  610 02
rc   612 02
dflg 614 15
sflg 629 15

Using our validation script, we compare the incoming DRG at offset 603 to our DRG at offset 607, the incoming MDC at 600 with ours at 610, the incoming RC at offset 598 with ours at 612.

Demo Linux version of DRGFilt...Passed
This free version only does F10. Validated it against our internal F10 dataset of 35,451 records.

Interactive Test Cases
We don't run the entire test dataset through our interactive UIs because it would be too much work for too little gain. Once we validate the core DAE, we validate the UIs with a sample of the official test dataset. This year that sample looks like this:

-------------------------------------------
   Age: 049
   Sex: F
  Disp: 01
   MDC: 21
   DRG: 908
  DX's:  Code :E:P where E=exempt flag P=present on admission flag
  DX01: 99679 : :
  DX02: 25041 : :
  DX03: 5859  : :
  DX04: 2767  : :
  DX05: 25051 : :
  DX06: 36904 : :
  DX07: 25061 : :
  DX08: 3371  : :
  DX09: 40290 : :
  DX10: 2859::

Proc's:  Code
  SG01: 3942  
  SG02: 3993  
  SG03: 3995
-------------------------------------------
   Age: 059
   Sex: M
  Disp: 01
   MDC: 01
   DRG: 074
  DX's:  Code :E:P where E=exempt flag P=present on admission flag
  DX01: 3564  : :
  DX02: 2639  : :
  DX03: 311   : :
  DX04: 2761  : :
  DX05: 5601  : :
  DX06: 5180::

Proc's:  Code
  SG01: 9383  
  SG02: 9339

-------------------------------------------
   Age: 050
   Sex: M
  Disp: 01
   MDC: 04
   DRG: 182
  DX's:  Code :E:P where E=exempt flag P=present on admission flag
  DX01: 1628::

Proc's:  Code
  SG01: 324   
  SG02: 3409  
  SG03: 8965  
  SG04: 9396

-------------------------------------------
   Age: 077
   Sex: F
  Disp: 03
   MDC: 08
   DRG: 563
  DX's:  Code :E:P where E=exempt flag P=present on admission flag
  DX01: 81611 : :
  DX02: 25081 : :
  DX03: 2512  : :
  DX04: E8849 : :
  DX05: 3319  : :
  DX06: 04110 : :
  DX07: 8831::

Proc's:  Code
  SG01: 7904  
  SG02: 9659  
  SG03: 8659

-------------------------------------------
   Age: 081
   Sex: F
  Disp: 01
   MDC: 02
   DRG: 117
  DX's:  Code :E:P where E=exempt flag P=present on admission flag
  DX01: 3659::

Proc's:  Code
  SG01: 1279




Linux C Shared Object for F29...Passed
Validated the Linux C shared object with this test case, to also confirm that the used codes bit flag handling is now correct:

-------------------------------------------
   Age: 055
   Sex: F
  Disp: 01
   MDC: 08
   DRG: 455
  DX's:  Code :E:P where E=exempt flag P=present on admission flag
  DX01: 71500 : :Y

Proc's:  Code
  SG01: 8134  
  SG02: 8135



Raw return value from mhdrg:
0^8^455^29^5.6449^0.00^ ^COMBINED ANTERIOR/POSTERIOR SPINAL FUSION W/O CC/MCC                  ^1^11

Deconstructed return value from mhdrg:
rc=0, mdc=8, drg=455, ovn=29, weight=5.6449, mean=0.00, porm=
desc=COMBINED ANTERIOR/POSTERIOR SPINAL FUSION W/O CC/MCC                 
dx flags:1, px flags: 11

Expected result: RC: 0 MDC: 08 DRG: 455

Significant ICD codes:
 * DX code  1 was used
 * Proc code  1 was used
 * Proc code  2 was used


Linux Perl Shared Object for F29...Passed

Validated the Perl shared object against the same test case as C shared object.

THIS YEAR, WE WILL HAVE TO CHANGE OUR PROCESS TO HANDLE THE 5.8 VS POST-5.8 DIVIDE, AS WELL AS MULT-THREADED VS NOT-MULTI-THREADED.


Linux PHP Shared Object for F29...Passed
Validated the Perl shared object against the same test case as C shared object.

Linux CGI-DRG for F29...Passed
Validated the Linux CGI-DRG against same test case as C shared object.


Friday, September 28, 2007

Cross-check With US Federal Dataset

QUESTION

How do I confirm that my DRGGroupers product installation is working properly?

ANSWER

Every year, the US Federal government releases a test dataset against which we validate our implementation. In addition to the various inputs to DRG assignment, this test data set contains the expected DRG which should be the output. We run our implementation against the official mapping and ensure that our results conform.

We are happy to provide a copy of the test dataset along with the appropriate DRGFilt control file, free of charge, to any customer who asks for it.

See our FAQ for details about how we use the test dataset internally.