Showing posts with label v33. Show all posts
Showing posts with label v33. Show all posts

Thursday, February 6, 2020

Bug Fix For DRGFilt

When validating some of our other software, we discovered a long-standing bug in our DRGFilt product which supports ICD10 codes, both the Linux and Windows implementations. This bug is in versions v33, v34 and v34a, v35 and v35a, v36 and v37.

The patched versions are as follows:

  • v33a
  • v34b
  • v35b
  • v36a
  • v37a

The bug does not affect DRG assignment; it only affects reporting of the DRG weight. Specifically, unpatched executables  report the DRG weight as 10 times greater than it is. Thus 1.2345 was reported as 12.3450.

The good news is that if you are using the weights for their usual purpose, predicting relative resource consumption, you code worked because all the weights were increased by the same factor.

The bad news is that the weights were wrong.

Here are the steps we have taken to correct this issue:

  1. We have patched the sources and built new DRGFilt executables: v33a, v34b, v35a, v36a and v37a.
  2. We have sent updated versions to any and all clients who purchased the buggy products.
  3. We have updated our on-line store with the new executables.
  4. We have posted this message on our Tech Blog
  5. We are updating our QA process to make sure that we do not have weight reporting problems ever again.

Friday, October 30, 2015

Support for 32-bit Linux in V33

In the Windows world we ship 32-bit DLLs because we count on "thunking" to allow this code to run in either 64-bit or 32-bit environments. But we do plan on upgrading our Windows development environment to 64-bit in the next four years.

In the Linux world we planned to drop 32-bit support with v33 (Oct-2015) but found that too many people still run 32-bit Linux, so we added 32-bit versions to all of our programmer tools:

  • our PHP module (phpdrgv33_32bit.so)
  • our Perl module (perldrgv33_32bit.so)
  • our C-callable object (libdrgv33_32bit.so)
  • DRGFilt (drgfiltv33_32bit)
We named the 32-bit versions by adding "_32bit" to the end of the file name and therefore before the extension. If you buy any of these modules, you get both the 32-bit and 64-bit versions. If you are in a 32-bit environment, you can either rename the object or call the 32-bit version explicitly.

Thursday, October 22, 2015

New DRGFilt Control File

Now that our validation is over, we are publishing the DRGFilt control file we used with the CMS test data set so you can see a real world example of all the new features in action:

; new format DRGFilt control file, with different groups for different purposes

;---------------
; this group is to process the standard fixed-width input file from CMS
;---------------
[fixed]
format = fixed          ; input file format
verbose = 0             ; no debugging information
blip = 1000             ; give progress report every 1,000 records
batchver = 33           ; assign version 33 DRGs to this batch
maskdir = .             ; directory in which to find drgmasks.v33

; fixed-width input variables: name = length@offset
age =   3@0
sex = 1@3
ds =  2@4
dxl=8           ; dx length does not require an offset
poa= 7
dx = 200@23
sgl=7@0         ; pr length, offset is optional & ignored
surg= 175@223
exmp = 1@6
; -----
; these are already present from the CMS grouper:
; you could overwrite the incoming values if you wanted to
; drg = 3@603
; mdc = 2@600
; rc = 2@598
; -----

; these are written out by DRGFilt
rc  = 2@1760
mdc = 2@1762
drg = 3@1764

;---------------
; this group is to validate date-handling of a CSV
;---------------
[csv-adt]
format = csv (,)        ; separator character is in parens
base = 0                ; field indices are zero-based, as opposed to 1-based, etc
inheaders = 1           ; 1=input column headers, 0=no input column headers
outheaders = 1          ; 1=want column headers, 0=no column headers
crlf = 0                ; type of end-of-line: 0=crlf (DOS), 1=lf (Unix)
blip = 1000             ; give progress report every 1,000 records
maskdir = .             ; directory in which to find drgmasks.v33
batchver = 33           ; the DRG version to apply to this entire batch
infile = adt.csv        ; input file name
outfile = x.csv         ; output file name
;outfile = blank file.csv
verbose = 1             ; give debugging output
; input variables: name = index
inid = 0
bdt =  1
sex = 2
exmp = 3
ds =  4
; these there keywords are allowed to have lists as parameters.
; lists can contain single entries, ranges, or both. for example
; 1,2,7-22,50
dx = 5-29
poa = 30-54
surg= 55-79
adt = 80
; calcver gives the index of a field to be used as the date from which
; we calculate the appropriate DRG version. If any record's calculated
; DRG version does not match the batchver, we skip that record
calcver = 80            ; NOTE: same index as "adt" because we are using the same field

; these are written out by DRGFilt
outid = 0               ; patient ID from input, whatever inid pointed to
rc  = 1
mdc = 2
drg = 3
desc = 4
weight = 5
morp = 6
outver = 7

;---------------
; this group is to process the CSV we created from the standard fixed-width input file from CMS
;---------------
[csv]
format = csv (,) ; separator character is in parens
base = 0 ; indices are zero-based
;base = 1 ; indices are one-based
inheaders = 1           ; 1=input column headers, 0=no input column headers
outheaders = 1 ; 1=want column headers, 0=no headers
crlf = 0 ; type of end-of-line: either crlf or lf
blip = 1000
batchver = 33
maskdir = .
infile = testdbv33.csv
outfile = testdb.out.csv

; 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
outid = 0 ; patient ID from input
rc  = 1
mdc = 2
drg = 3
desc = 4
weight = 5
morp = 6
outver = 7

;---------------
; this group is to process the CSV we created from the standard fixed-width input file from CMS
;---------------
[csv-validate]
format = csv (,) ; separator character is in parens
base = 0 ; indices are zero-based
;base = 1 ; indices are one-based
inheaders = 1           ; 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 = 1000
blipeol = 0 ; 1=newline for progress report, 0=carriage return
maskdir = .
batchver = 33
inheaders = 1           ; 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 = 1000
blipeol = 0 ; 1=newline for progress report, 0=carriage return
maskdir = .
batchver = 33
infile = testdbv33.csv
outfile = testdb.validate.csv
verbose = 1

; 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
outid = 0 ; patient ID from input
drg = 1

; eof




We hope this answers any questions about how to use the new control file features.

V33 DRGFilt for AIX

We just validated our DRGFilt for AIX so we are good to go for Big Endian environments with our new code base.

You can buy DRGFiltv33 for AIX in our on-line store at drggroupers.nethttp://drggroupers.net

Wednesday, October 21, 2015

New VB-Callable API (Windows Only)

The new VB DLL API is very similar to the old one, but we will document the entire API so that this is the only reference you need.

If you have a working pre-V33 program, here is all you need to change:

The call to mhdrg()
  • the name of the DLL in your function delcarations to "vbdrgv33.dll"
  • the name of the DRG assigner from mhdrg() to mhdrg1()
  • add the POA flag: "y" means "have POA" and "n" means "no POAs"
  • add the exempt flag: "y" means "this case is exempt from HAC" and "no" means "not exempt"
  • the DX and Proc buffers both need to be bigger: 256, not 80
The call to mhinfo()
  • the declaration should have this as a Sub not a Function
  • the first argument is now ByVal, not ByRef
Below is the Visual Basics for Applications (VBA) code we use to call vbdrgv33.dll from Excel in order to run Excel-DRG:

Option Explicit

Private Declare Function mhdllver Lib "vbdrgv33.dll" (ByVal Buf As String, _
    ByVal BufLen As Integer) As Integer
Private Declare Function mhdrg1 Lib "vbdrgv33.dll" (drg As Integer, _
    ByVal DRGVersion As String, ByVal MasksPath As String, ByVal DischStat As String, _
    ByVal PtAge As String, ByVal PtGender As String, ByVal DXList As String, _
    ByVal ProcList As String, ByVal POAPresent As String, ByVal ExemptFlag As String) As Integer
Private Declare Sub mhinfo Lib "vbdrgv33.dll" (ByVal drg As Integer, _
    ByVal DRGVersion As String, ByVal MasksPath As String, ByRef mdc As Integer, _
    weight As Double, los As Double, ByVal Desc As String, ByVal DescLen As Integer)
Private Declare Function mhdrgver Lib "vbdrgv33.dll" (ByVal MPath As String, _
    ByVal Buf As String, ByVal BufLen As Integer) As Integer
Private Declare Sub mherrdesc Lib "vbdrgv33.dll" (ByVal errBuffer As String, ByVal errLength As Integer)

Public Function AssignDRG()

On Error GoTo Err_Group

    Dim ReturnCode As Integer
    Dim drg As Integer, mdc As Integer
    Dim Desc As String * 80
    Dim weight As Double, los As Double
    Dim masksdir As String
    Dim myver As String, mydstat As String, myage As String, mysex As String, myexempt As String, mypoa As String
    Dim mydxbuf As String * 256
    Dim mypxbuf As String * 256
    Dim tempStr As String
    Dim N As Integer, needcomma As Integer
    Dim Val As String
    Dim NumRecords As Long, NumErrors As Long
    Dim LastRow As Long
    Dim MyID As Long                                    'user's record number
    Dim myWS As Object
        
    Application.ScreenUpdating = False
    Application.Cursor = xlWait
    'start in first row, DRG column
    Range("CE2").Select
    NumRecords = 0
    NumErrors = 0
    
    'get the path to the masks directory out of the registry, if you can
    masksdir = "C:\Program Files\MandH\Masks\"          'default
    Set myWS = CreateObject("WScript.Shell")
    tempStr = myWS.RegRead("HKLM\Software\MandH\BaseDir")
    If Len(tempStr) > 0 Then
        masksdir = tempStr & "\Masks\"
    End If
    
    'loop through records making sure DRG info is blank
    'first, find last row
    Do Until IsEmpty(ActiveCell.Offset(0, -81).Range("A1").Value) = True
        ActiveCell.Offset(1, 0).Range("A1").Select
    Loop
    
    'select DRG columns and all populated rows
    LastRow = ActiveCell.Row
    LastRow = LastRow - 1
    Range("CE2:CJ" & LastRow).Select
    
    'clear selection
    Selection.ClearContents
    
    Range("CE2").Select
    'loop through records assigning drg info
    Do Until IsEmpty(ActiveCell.Offset(0, -82).Range("A1").Value) = True
        myver = ActiveCell.Offset(0, -2).Range("A1").Value
        MyID = ActiveCell.Offset(0, -82).Value
    
        'abort if version is blank
        If myver = "" Then
            MyID = ActiveCell.Offset(0, -82).Value
            MsgBox "Version is empty for record # " & MyID & ". Cannot group.", vbOKOnly, "Missing Version"
            NumErrors = NumErrors + 1
            GoTo NextOne
        End If
        
        myexempt = ActiveCell.Offset(0, -79).Range("A1").Value
        mydstat = ActiveCell.Offset(0, -78).Range("A1").Value
        mysex = ActiveCell.Offset(0, -80).Range("A1").Value
        myage = ActiveCell.Offset(0, -81).Range("A1").Value
        mypoa = ActiveCell.Offset(0, -1).Range("A1").Value
        
        'Loop through controls, getting their current values
    
        'make string out of the diagnosis codes
        tempStr = ""
        needcomma = 0
        For N = -77 To -53
            Val = ActiveCell.Offset(0, N).Range("A1").Value
            If Len(Val) > 0 Then
                'append POA flag, if present
                If ActiveCell.Offset(0, N + 25).Value <> "" Then
                    Val = Val & "~" & ActiveCell.Offset(0, N + 25).Range("A1").Value
                End If
                If needcomma <> 0 Then
                    tempStr = tempStr & ","
                End If
                needcomma = 1
                tempStr = tempStr & Val
            End If
        Next N
        mydxbuf = tempStr & "^" ' explicit end-of-data marker
        
        'make string out of the procedure codes
        tempStr = ""
        needcomma = 0
        For N = -27 To -3
            Val = ActiveCell.Offset(0, N).Range("A1").Value
            If Len(Val) > 0 Then
                If needcomma <> 0 Then
                    tempStr = tempStr & ","
                End If
                needcomma = 1
                tempStr = tempStr & Val
            End If
        Next N
        mypxbuf = tempStr & "^" ' explicit end-of-data marker
        
        'call the M+H grouper with what you got
        ReturnCode = mhdrg1(drg, myver, masksdir, mydstat, myage, mysex, mydxbuf, mypxbuf, mypoa, myexempt)
        ActiveCell.Offset(0, 2).Range("A1").Value = ReturnCode
    
        If ReturnCode <> 0 Then          'drg assignment failed, alas!
            Call mherrdesc(Desc, 80)
            ActiveCell.Offset(0, 0).Range("A1").Value = drg
            ActiveCell.Offset(0, 1).Range("A1").Value = Desc
            NumErrors = NumErrors + 1
        Else                            'drg assignment worked, hurray!
            'get the particulars of this DRG from M+H dll
            Call mhinfo(drg, myver, masksdir, mdc, weight, los, Desc, 80)
            ActiveCell.Offset(0, 0).Range("A1").Value = drg
            ActiveCell.Offset(0, 1).Range("A1").Value = Desc
            ActiveCell.Offset(0, 3).Range("A1").Value = mdc
            ActiveCell.Offset(0, 4).Range("A1").Value = weight
            ActiveCell.Offset(0, 5).Range("A1").Value = los
        End If
NextOne:
        ActiveCell.Offset(1, 0).Range("A1").Select
        NumRecords = NumRecords + 1
    Loop
    Application.ScreenUpdating = True
    Application.Cursor = xlDefault
    Range("CE2").Select
    
    Beep
    MsgBox NumRecords & " records were grouped with " & NumErrors & " error(s)."

Exit_Group:
   Exit Function
   
Err_Group:
    Application.Cursor = xlDefault
    MsgBox Err.Number & "-" & Err.Description
    Range("CE2").Select
    Resume Exit_Group

End Function


Please check this blog for other entries about the VB callable DLL to answer other questions.

Tuesday, October 20, 2015

POA Logic Indicator (Exempt Flag)

With the introduction of the Present On Admission concept came three distinct data elements:
  • POA Logic Indicator / Exempt flag: an official grouper parameter which is a record-level flag which tells the grouper whether  or not POA logic (including the Hospital Acquired Condition rules, or HAC);
  • POA Flag: an official grouper parameter which is a diagnosis-level flag which tells the group how to process this code against the HAC rules
  • Have POA Flag: a DRGGroupers software parameters which, when part of our API, tells our software whether or not to look for POA flags
(Since POA comes up in so many contexts, we prefer to call the "POA Logic Indicator" something else: "the exempt-from-HAC flag" or simply "the exempt flag." Be advised that this is not how CMS refers to this data element.)

There are only two legal values for this flag:


X - Exempt from POA reporting
Z - Requires POA reporting

Note that "2" seems to be used by the grouper folks to means "throw me an error if there is HAC rule processing to do."

Present On Admission (POA) Flags

Starting with version 33 and ICD10 support, diagnosis codes are supposed to have Present On Admission (POA) flags.

(Unless the institution or patient encounter is "exempt" which would be indicated by the POA Logic Indicator which we call "the exempt flag." The POA Logic Indicator gets its own post to keep confusion to a minimum.)

Here are the CMS definitions of the legal values for this single character flag:

 Flag Meaning
YYes, present at the time of inpatient admission
NNo, not present at the time of inpatient admission
UInsufficient documentation to determine if present on admission
WClinically unable to determine if present at time of admission
1Code is exempt from POA reporting (Used on 4010 form)
BlankCode is exempt from POA reporting (Used on 5010 form, effective 01/01/2011)

Many of our APIs have a "Have POA" flag which is something different: the "Have POA" flag is a record-level indication of whether or not there are POA flags in the submitted diagnosis data. The "Have POA" flag is either "y" for yes or "n" for no.

The POA flags are single-character fields at the individual diagnosis code level. There are up to 25 diagnosis codes accepted for DRG assignment and if you are using POA flags, every code should have one.

In their test data set,CMS passes the POA flag to its grouper as the last character of a fixed-width field. We support that methodology in our DRGFilt product's fixed-with mode and in our C-callable DLL as these are environments in which appending an indicator is relatively easy.

We also support passing in separate POA flag fields in our DRGFilt product's CSV mode and in our VB-callable DLL as there environments generally have better support for separate fields than for character manipulation.

Monday, October 19, 2015

New C-Callable API (both Windows DLL and Linux SO)

In keeping with our philosophy that working code is the most trust-worthy documentation, here is the new mhdrg1() call from our validation C program which we compile and run under either Windows 7 or Linux:


 #define DRGVER "v33"
 
// expected = "DRG: 614        MDC: 10         GRC: 00";

/* call the grouper, store results in retval */
retval = mhdrg1(
    DRGVER,                 /* which DRG version you want */
    "/drbd/mnh/src/SWIG",   /* path to masks files */
    "1",                    /* discharge status */
    "55",                   /* patient age on admission */
    "1",                    /* patient sex (1=male, 2=female) */
    /* ICD DX codes */
    "D352   YE2740  NN390   YE871   NF05    NR630   NR110   YR0602  YD649    ",
    /* ICD procedure codes */
    "0GB00ZZ0YUY47Z02HR30Z0L8S3ZZ0P5N0ZZ0RJP0ZZ",
    8,                      /* length of each ICD DX code */
    7,                      /* len of each ICD procedure code */
    "y",                    /* are there POA indicators? */
    "X"                     /* is this case exempt from HAC? */
    );


This is an actual case from the CMS test data set. This is an actual call to mhdrg1(), which replaces mhdrg() as the entry point in the DLL.

We changed the name to make it possible to have a single program call either the ICD9-based version or the new ICD10-based version.

The API is only slightly different: there are two new arguments at the end of the argument list:
  • The POA indicator: are there POA flags appended to the DX codes? This argument is always a character pointer (char *) but can be either "1" (yes there are) or "0" (no there are not), or "y" (yes there are) or "n" (no there are not).
  • The POA Logic indicator: this is also a character pointer and represents the HAC exempt status of the patient encounter:
    • NULL means there is no exempt flag or encounter is not exempt
    • "X" or "1" means that this encounter is exempt
    • "Z" means that this encounter is not exempt
    • any other value is not allowed and will result in throwing an HAC error if there is a dx code with a CC exclusion of either kind.

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.

Linux V33 Products Validated

We have completed wrapping our DRG Assignment Engine in the following Linux products:
  • DRGFiltv33
  • The C object module
  • The Perl-callable module
  • The PHP-callable module
In response to customer suggestsion, we are developing a straight Web service for assigning DRGs but we will not be releasing the service until after the standard products are available.

Work on the Windows products has already begun and should be complete very soon.

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.

Wednesday, October 7, 2015

DRGFilt10 New Control File Format, part 3

Today we validated group handling in our new DRGFilt Control File; the group name is given in square brackets and every configuration item until the next group is part of the current group.

DRGFilt10 now only processes the configuration information in the active group. The default active group is "drgfilt".  You can either specify an active group on the command line or let the default active group be used.

Therefore the new DRGFilt10 syntax is this:

drgfilt10 {ini-file-name} [group-name]

For example, we are validating with a control file called "v33.ini". That control file defines several jobs:
  • "fixed" defines the job to process the standard CMS test data set
  • "csv" defines the job to process the CSV we created from the CMS file
  • "csv-validate" defines the job which creates output for our validator
When we want to run the job to process the standard CMS test data set, we run this command:

drgfilt10 v33.ini fixed < TESTDB > output.fixed 

We choose to use the Unix-style filter feature of DRGFilt, but the new control file allows us to specify an input file, an output file, or both or neither.

Here is a sample DRGFilt control file which documents all the currently supported features:

; new format DRGFilt control file, with different groups for different purposes

;---------------
; this group is to process the standard fixed-width input file from CMS
;---------------
[fixed]
format = fixed          ; input file format
verbose = 0             ; no debugging information
blip = 1000             ; give progress report every 1,000 records
batchver = 33           ; assign version 33 DRGs to this batch
maskdir = .             ; directory in which to find drgmasks.v33

; fixed-width input variables: name = length@offset
age =   3@0
sex = 1@3
ds =  2@4
dxl=8           ; dx length does not require an offset
poa= 7
dx = 200@23
sgl=7@0         ; pr length, offset is optional & ignored
surg= 175@223
exmp = 1@6
; -----
; these are already present from the CMS grouper:
; you could overwrite the incoming values if you wanted to
; drg = 3@603
; mdc = 2@600

; rc = 2@598
; -----

; these are written out by DRGFilt
rc  = 2@1760
mdc = 2@1762
drg = 3@1764

;---------------
; this group is to validate date-handling of a CSV
;---------------
[csv-adt]
format = csv (,)        ; separator character is in parens
base = 0                ; field indices are zero-based, as opposed to 1-based, etc
headers = 1             ; 1=want column headers, 0=no headers
crlf = 0                ; type of end-of-line: 0=crlf (DOS), 1=lf (Unix)
blip = 1000             ; give progress report every 1,000 records
maskdir = .             ; directory in which to find drgmasks.v33
batchver = 33           ; the DRG version to apply to this entire batch
infile = adt.csv        ; input file name
outfile = x.csv         ; output file name
;outfile = blank file.csv
verbose = 1             ; give debugging output

; input variables: name = index
inid = 0
bdt =  1
sex = 2
exmp = 3
ds =  4
; these there keywords are allowed to have lists as parameters.
; lists can contain single entries, ranges, or both. for example
; 1,2,7-22,50
dx = 5-29
poa = 30-54
surg= 55-79
adt = 80
; calcver gives the index of a field to be used as the date from which
; we calculate the appropriate DRG version. If any record's calculated
; DRG version does not match the batchver, we skip that record
calcver = 80            ; NOTE: same index as "adt" because we are using the same field

; these are written out by DRGFilt
outid = 0               ; patient ID from input, whatever inid pointed to
rc  = 1
mdc = 2
drg = 3
desc = 4
weight = 5
morp = 6
outver = 7

;---------------
; this group is to process the CSV we created from the standard fixed-width input file from CMS

;---------------
[csv]
format = csv (,) ; separator character is in parens
base = 0 ; indices are zero-based
;base = 1 ; indices are one-based
headers = 1 ; 1=want column headers, 0=no headers
crlf = 0 ; type of end-of-line: either crlf or lf
blip = 1000
batchver = 33
maskdir = .
infile = testdbv33.csv
outfile = testdb.out.csv

; 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
outid = 0 ; patient ID from input
rc  = 1
mdc = 2
drg = 3
desc = 4
weight = 5
morp = 6
outver = 7

;---------------
; this group is to process the CSV we created from the standard fixed-width input file from CMS
;---------------
[csv-validate]
format = csv (,) ; separator character is in parens
base = 0 ; indices are zero-based
;base = 1 ; indices are one-based
headers = 0 ; 1=want column headers, 0=no headers
crlf = 0 ; type of end-of-line: either crlf or lf
blip = 1000
maskdir = .
batchver = 33
infile = testdbv33.csv
outfile = testdb.validate.csv
verbose = 1

; 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
outid = 0 ; patient ID from input
drg = 1

; eof

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.

Monday, September 28, 2015

I10 Progress Report #8: Masks File Has Been Built

We have built and validated the v33 masks file, so we are ready for integrated testing as soon as the logic module has been updated. We expect the logic upgrade to be done by midday tomorrow.

I10 Progress eport #7: So Far, So Good

We have finished our assessment of the v33 upgrade and we have started the work:
  • the attributes seem to be only minor different between v32 and v33
  • the logic seems somewhat different between v32 and v33
We expect to have have masks file built first thing tomorrow, so that when the software update is done mid-day tomorrow, validation can begin.

Currently, our goal is to have our DRG Assignment Engine (DAE) will be upgraded to support v33 by end the of the day on October 1, 2015.

I10 Progress Report #6: on to V33

We are hard at work on support for v33, which currently is moving along three different tracks:

DRGFilt Upgrade
We are upgrading DRGFilt to handle CSVs as well as fixed-width input. (We may also get to adding support for the very simple equation format: one line per column, each line of the form "col_name=value")

V33 Masks File
To support v33, we need to support logic and the ICD10 code attributes, which we call "the masks" and some people call "the tables." We encode the logice in our software and we create a database of attributes which we call "the masks file." We are hard at work creating the masks file.

V33 Logic Support
Of course we are upgrading our logic module to match the v33 logic module so that our software can work in conjunction with the v33 attributes to assign v33 DRGs.

Saturday, September 26, 2015

DRGFilt10 New Control File Format

The version of DRGFilt which supports ICD10-based DRG assignment is called DRGFilt10. Since we are overhauling our product line, we decided to knock a very long-standing item off the list: the DRGFilt control file format.

The control file tells DRGFilt how to parse the incoming data records to pick out the data elements needed to assign a DRG:
  1. patient age
  2. patient sex
  3. patient discharge status
  4. list of diagnoses
  5. list of procedures
The control file also tells DRGFilt where to put its output:
  1. Grouper Return Code (GRC) -- what, if anything, went wrong
  2. Major Diagnostic Category (MDC)
  3. Diagnosis Related Group (DRG)
The original control file format was based on the old IBM punch cards (!) so it was definitely time to ditch the 1960s. For our first upgrade, we decided to move on up to the 1990s by supporting a .INI-like format.

Our first step along the moderization path is Specifically, this is the control file we are using to validate the new DRGFilt against the CMS test data set:

; control file for new DRG filt
[drgfilt]
format = fixed
; fixed-width input variables: name = length@offset
age =    3@0
sex = 1@3
ds =  2@4
dxl=8        ; dx length does not require an offset
poa= 7
dx = 200@23
sgl=7@0     ; pr length, offset is optional & ignored
surg= 175@223
exmp = 1@6
; -----
; these are already present from the CMS grouper:
; you could overwrite the incomin values if you wanted to
; drg = 3@603
; mdc = 2@600
; rc = 2@598
; -----

; these are written out by DRGFilt
rc  = 2@1760
mdc = 2@1762
drg = 3@1764

; eof


We hope to roll out the long-awaited CSV support very soon.

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.