Use the "v30 bug" label to see all the posts about this issue.
TEST CASE
The basic test case is this, from our new testdb.txt (line 18,374): WRONG=DRG 194; CORRECT=DRG 178. Note the Present on Admission (POA) indicators at the end of the diagnosis codes.
----------INPUT REC 18374---------- age@ 0 for 3:018 sex@ 3 for 1:1 ds@ 4 for 2:51 dx@ 23 for 96:4870 Y|85172 N|48284 Y|69556 Y|E8616 Y surg@223 for 98:9503 |9946 |9904 |9144 |9231 |3372 |0016 |9971 drg@607 for 3:178 mdc@610 for 2:04 rc@612 for 2:00 dflg@614 for 15:101100000000000 sflg@629 for 15:000000000000000
TEST CASE IN C
Here is a C program which calls our mhdrg() function on the this test case:
/* tryit.c (c) 2002 M+H Consulting, LLC C-callable demo (BFH) */ /* Sun Oct 14 18:08:14 EDT 2012 BFH test case for v30 bug */ /* Sun Oct 3 11:57:46 EDT 2010 BFH support f28 */ /* 10/06/2008 made win32 and unix versions the same */ /* 10/11/2003 added bit-string of used dx's and used procedures */ #include#include #include #define DELIM "^" #define RETURNED 10 #ifdef WIN32 /* DLL functions */ extern int mhicd(); /* mhicd.dll */ extern char * mhdrg(); /* mhdrg.dll */ extern char * mherrdesc(); /* mhdrg.dll */ #else char * mhdrg(); extern char * errdesc(); /* mhdrg.dll */ #endif int main() { char * retval; char * p; char * a[RETURNED]; char * expected; int i; /* f30 test case: bug fix ----------INPUT REC 18374---------- age@ 0 for 3:018 sex@ 3 for 1:1 ds@ 4 for 2:51 dx@ 23 for 96:4870 Y85172 N48284 Y69556 YE8616 Y surg@223 for 98:9503 9946 9904 9144 9231 3372 0016 9971 drg@607 for 3:178 mdc@610 for 2:04 rc@612 for 2:00 dflg@614 for 15:101100000000000 sflg@629 for 15:000000000000000 */ expected = "RC: 0 MDC: 04 DRG: 178"; /* call the grouper, store results in reval */ retval = mhdrg( "f30p", /* which DRG version you want */ "/drbd/mnh/src/SWIG", /* path to masks files */ "1", /* discharge status */ "18", /* patient age on admission */ "1", /* patient sex (1=male, 2=female) */ /* ICD DX codes */ "4870 Y85172 N48284 Y69556 YE8616 Y", /* ICD procedure codes */ "9503 9946 9904 9144 9231 3372 0016 9971 ", 8, /* length of each ICD DX code */ 7 /* length of each ICD procedure code */ ); /* if there was an error, alert the user */ if (retval == NULL) { printf("M+H grouper argument or environment error: %s\n", errdesc()); exit(-1); } /* show the raw return value */ printf("Raw return value from mhdrg:\n%s\n\n",retval); /* deconstruct return from mhdrg() */ p = strtok(retval,DELIM); for (i = 0; i < RETURNED && p != NULL; i++) { a[i] = p; p = strtok(NULL,DELIM); } /* last two return values are bit-strings of which ICD codes were * used in the grouping */ puts("Deconstructed return value from mhdrg:"); printf("rc=%s, mdc=%s, drg=%s, ovn=%s, weight=",a[0],a[1],a[2],a[3]); #ifdef OLD_WAY printf("%s, mean=%s, porm=%s\ndesc=%s\ndx flags:%ld, px flags: %ld\n",a[4],a[5],a[6],a[7],dxu,pxu); #else printf("%s, mean=%s, porm=%s\ndesc=%s\ndx flags:%s, px flags: %s\n",a[4],a[5],a[6],a[7],a[8],a[9]); #endif /* show what we should get */ printf("\nExpected result: %s\n",expected); /* last two return values are bit-strings of which ICD codes were used in the grouping */ puts("\nSignificant ICD codes:"); #ifdef OLD_WAY for (mask = 1L,i = 0; i < 32; i++, mask *= 2L) { if (mask & dxu) { printf(" * DX code %2d was used\n",(i+1)); } } for (mask = 1L,i = 0; i < 32; i++, mask *= 2L) { if (mask & pxu) { printf(" * Proc code %2d was used\n",(i+1)); } } #else p = a[8]; for (i = 0; i < 32 && p[i] != '\000'; i++) { if (p[i] == '1') { printf(" * DX code %2d was used\n",(i+1)); } } p = a[9]; for (i = 0; i < 32 && p[i] != '\000'; i++) { if (p[i] == '1') { printf(" * Proc code %2d was used\n",(i+1)); } } #endif exit(0); } /* eof */
TEST CASE IN CGI-DRG
Here is an example of how the DAE failure looked in our CGI-DRG product:
Before fix: incorrect DRG of 194
M+H CGI CMS (HCFA) DRG Grouper (3.0:f30) |
---|
DRG: 194 SIMPLE PNEUMONIA & PLEURISY W CC MDC: 4 Weight: 0.9996 Mean LOS: 0.00 Version: f30 |
© 2002-2012 M+H Consulting LLC, all rights reserved |
After fix: correct DRG of 178
M+H CGI CMS (HCFA) DRG Grouper (3.0:f30) |
---|
DRG: 178 RESPIRATORY INFECTIONS & INFLAMMATIONS W CC MDC: 4 Weight: 1.4403 Mean LOS: 0.00 Version: f30 |
© 2002-2012 M+H Consulting LLC, all rights reserved |
No comments:
Post a Comment