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.
Please check the FAQ first, it really is a list of answers to our most frequently-asked questions.
Showing posts with label Control file. Show all posts
Showing posts with label Control file. Show all posts
Thursday, October 22, 2015
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.
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.
Labels:
Control file,
DAE outputs,
v33,
Validation,
Versions,
Windows
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:
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
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
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
Labels:
Control file,
DAE inputs,
DAE outputs,
DRGFilt,
ICD10,
v33
Thursday, October 1, 2015
DRGFilt10 New Control File Format, part 2
We have completed and validated CSV support for both input and output for DRGFilt10, the ICD10-based version of DRGFilt. The CSV version of the control file looks like this:
; control file for new DRG filt -- CSV version
[drgfilt]
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
; 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
We hope that this upgrade fills many of the requests we have gotten over the years for extensions to the control file format.
; control file for new DRG filt -- CSV version
[drgfilt]
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
; 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
We hope that this upgrade fills many of the requests we have gotten over the years for extensions to the control file format.
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:
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.
The control file tells DRGFilt how to parse the incoming data records to pick out the data elements needed to assign a DRG:
- patient age
- patient sex
- patient discharge status
- list of diagnoses
- list of procedures
- Grouper Return Code (GRC) -- what, if anything, went wrong
- Major Diagnostic Category (MDC)
- Diagnosis Related Group (DRG)
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.
Wednesday, October 3, 2012
DRGFilt Control File Change for V30: dxc & sgc
The ancient and venerable DRGFilt control file syntax has changed slightly for v30, released in October of 2012.
The change is the addition of two new keywords, "dxc" and "sgc" and they stand for "diagnosis count" and "surgery/procedure count" respectively.
The problem they solve are records with 15 dx or 15 procedures. Since drgfilt's cntl file mechanism only has a two-digit length, it cannot directly specify all 15 when they are spaced as on these test records.
When these values are present, they are multiplied in drgfilt by the dxl and/or sgl and override the lengths on the dx and sg cards.
For example, our internal control file to process the Federal test data now looks like this:
The problem they solve are records with 15 dx or 15 procedures. Since drgfilt's cntl file mechanism only has a two-digit length, it cannot directly specify all 15 when they are spaced as on these test records.
When these values are present, they are multiplied in drgfilt by the dxl and/or sgl and override the lengths on the dx and sg cards.
For example, our internal control file to process the Federal test data now looks like this:
age 000 03 sex 003 01 ds 004 02 dxl 000 08 dxc 000 15 poa 000 07 dx 023 96 sgl 000 07 sgc 000 15 surg 223 98 #drg 603 03 #mdc 600 02 #rc 598 02 exmp 006 01 # these are written out by us drg 607 03 mdc 610 02 rc 612 02 dflg 614 15 sflg 629 15
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:
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.
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
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.
Labels:
C,
CGI-DRG,
Control file,
DRGFilt,
Linux,
Perl,
PHP,
Validation
Friday, July 9, 2010
Version NN Invalid
QUESTION
We executed an unix command from PL/SQL stored procedure and got the 'Version 27 Invalid' message from DRGFilt, but executed the same command directly from unix box in putty, everything was fine. The following is the command:
'/u01/app/oracle/product/11.2.0/dbhome_1/bin/drgfilt_lnx_64 -0 f27 drgmasks.f27 /home/mhuang/DRGFilt_control.txt </home/mhuang/DRGFilt_input.txt >/home/mhuang/output.txt'
What does the 'version 27 Invalid' mean to DRGFilt? Also can we add our custom keyword in the control file? We plan add more fields into the control file.
ANSWER
re: "Version 27 Invalid"
This means that version 27 could not be initialized. Usually, this means that the drg masks file could not be found or could not be read.
re: custom keywords
No, DRGFilt does not allow custom keywords; however, you can put line comments into the file so long as those comments are preceded by a sharp sign, like this:
sex 156 1
# this is a line comment
#mykey=5
We executed an unix command from PL/SQL stored procedure and got the 'Version 27 Invalid' message from DRGFilt, but executed the same command directly from unix box in putty, everything was fine. The following is the command:
'/u01/app/oracle/product/11.2.0/dbhome_1/bin/drgfilt_lnx_64 -0 f27 drgmasks.f27 /home/mhuang/DRGFilt_control.txt </home/mhuang/DRGFilt_input.txt >/home/mhuang/output.txt'
What does the 'version 27 Invalid' mean to DRGFilt? Also can we add our custom keyword in the control file? We plan add more fields into the control file.
ANSWER
re: "Version 27 Invalid"
This means that version 27 could not be initialized. Usually, this means that the drg masks file could not be found or could not be read.
re: custom keywords
No, DRGFilt does not allow custom keywords; however, you can put line comments into the file so long as those comments are preceded by a sharp sign, like this:
sex 156 1
# this is a line comment
#mykey=5
Sunday, October 5, 2008
Validating a DRGFilt Control File
QUESTION
I find the DRGFilt control file format kind of hard to understand. How can I be sure that I got it right?
ANSWER
We hear you: the control file format is showing its age: it was derived from a format that originated on punch cards (!).
We use the following Perl script to validate our control files in-house:
Sample usage
In the examples below, replace "control-file" with the name of the control file you are validating, and "data-file" with the name of the data file you are running against. For extra credit, replace "pt-id" with the patient, claim or record ID you are looking for.
Unix
Sample Perl Code
# chkcntl.pl - program to check a control file
my($sgl,$dxl,$recLen,%h) = Load(shift(@ARGV));
while (defined(my $l = <>)) {
$l =~ s/\r|\n//g;
# pad out input with astericks if too short
while (length($l) < $recLen) { $l .= '*'; }
my $output = "";
foreach my $key (sort (keys %h)) {
my $ref = $h{$key};
my($name,$off,$len) = @$ref;
my $val = substr($l,$off,$len);
$output .= sprintf("%4.4s@%3d for %2d:",$name,$off,$len);
if ($name =~ /^(dx|surg)$/i) {
$output .= AddBar($val, ($name =~ /dx/i)? $dxl : $sgl);
} else {
$output .= $val;
}
$output .= "\n";
}
print $output,"\n";
}
exit(0);
#-----------------------------------------------------------------
sub AddBar {
my $val = shift;
my $len = shift;
my $inLen = length($val);
my @f = ();
for (my $i = 0; $i < $inLen; $i += $len) {
push(@f,substr($val,$i,$len));
}
return join('|',@f);
}
sub Load {
my $fname = shift;
my %h; # keyed by offset, value is name
my($dxl,$sgl) = (5,4);
my $recLen = 0;
my($poa,$exempt);
open(FILE,$fname) || die "Could not open '$fname': $!";
while (defined(my $l = <FILE>)) {
next unless ($l =~ /^[a-zA-Z]/);
#age 000 03
my($name,$offset,$length) = unpack("a4xa3xa2",$l);
if ($name =~ /sgl/i) {
$sgl = $length;
next;
}
if ($name =~ /dxl/i) {
$dxl = $length;
next;
}
if ($name =~ /poa/i) {
$poa = $length;
next;
}
if ($name =~ /exmp/i) {
$exempt = $length;
next;
}
my $key = sprintf("%03d",$offset);
my $ref = [ $name, $offset, $length ];
foreach my $el (@$ref) { $el =~ s/^\s+|\s+$//g; }
$h{$key} = $ref;
}
close(FILE);
# figure out end of record: max offset + length
my ($max) = (reverse (sort keys %h));
my $ref = $h{$max};
my $recLen = $$ref[1] + $$ref[2];
return ($sgl,$dxl,$recLen,%h);
}
# eof
I find the DRGFilt control file format kind of hard to understand. How can I be sure that I got it right?
ANSWER
We hear you: the control file format is showing its age: it was derived from a format that originated on punch cards (!).
We use the following Perl script to validate our control files in-house:
Sample usage
In the examples below, replace "control-file" with the name of the control file you are validating, and "data-file" with the name of the data file you are running against. For extra credit, replace "pt-id" with the patient, claim or record ID you are looking for.
Unix
- perl chkcntl.pl control-file < data-file | more
- head -20 data-file | perl chkcntl.pl control-file | more
- fgrep pt-id data-file | perl chkcntl.pl control-file
- perl.exe chkcntl.pl control-file < data-file | more
- perl.exe chkcntl.pl control-file < data-file > output.txt
Sample Perl Code
# chkcntl.pl - program to check a control file
my($sgl,$dxl,$recLen,%h) = Load(shift(@ARGV));
while (defined(my $l = <>)) {
$l =~ s/\r|\n//g;
# pad out input with astericks if too short
while (length($l) < $recLen) { $l .= '*'; }
my $output = "";
foreach my $key (sort (keys %h)) {
my $ref = $h{$key};
my($name,$off,$len) = @$ref;
my $val = substr($l,$off,$len);
$output .= sprintf("%4.4s@%3d for %2d:",$name,$off,$len);
if ($name =~ /^(dx|surg)$/i) {
$output .= AddBar($val, ($name =~ /dx/i)? $dxl : $sgl);
} else {
$output .= $val;
}
$output .= "\n";
}
print $output,"\n";
}
exit(0);
#-----------------------------------------------------------------
sub AddBar {
my $val = shift;
my $len = shift;
my $inLen = length($val);
my @f = ();
for (my $i = 0; $i < $inLen; $i += $len) {
push(@f,substr($val,$i,$len));
}
return join('|',@f);
}
sub Load {
my $fname = shift;
my %h; # keyed by offset, value is name
my($dxl,$sgl) = (5,4);
my $recLen = 0;
my($poa,$exempt);
open(FILE,$fname) || die "Could not open '$fname': $!";
while (defined(my $l = <FILE>)) {
next unless ($l =~ /^[a-zA-Z]/);
#age 000 03
my($name,$offset,$length) = unpack("a4xa3xa2",$l);
if ($name =~ /sgl/i) {
$sgl = $length;
next;
}
if ($name =~ /dxl/i) {
$dxl = $length;
next;
}
if ($name =~ /poa/i) {
$poa = $length;
next;
}
if ($name =~ /exmp/i) {
$exempt = $length;
next;
}
my $key = sprintf("%03d",$offset);
my $ref = [ $name, $offset, $length ];
foreach my $el (@$ref) { $el =~ s/^\s+|\s+$//g; }
$h{$key} = $ref;
}
close(FILE);
# figure out end of record: max offset + length
my ($max) = (reverse (sort keys %h));
my $ref = $h{$max};
my $recLen = $$ref[1] + $$ref[2];
return ($sgl,$dxl,$recLen,%h);
}
# eof
Friday, October 3, 2008
F26 DRGFilt Control File
New this year: "poa", "exmp".
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
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
Tuesday, October 7, 1997
F15 DRGFilt Control File
# this is a DRGFilt control file for the standard HCFA test data set
# there are 3 columns: name, offset and length
# --------------------------- input fields
age 000 03
sex 003 01
ds 004 02
dxl 000 06
dx 006 60
sgl 000 07
surg 066 70
# --------------------------- output fields
drg 195 03
mdc 198 02
rc 200 01
# there are 3 columns: name, offset and length
# --------------------------- input fields
age 000 03
sex 003 01
ds 004 02
dxl 000 06
dx 006 60
sgl 000 07
surg 066 70
# --------------------------- output fields
drg 195 03
mdc 198 02
rc 200 01
Monday, October 10, 1994
F12 DRGFilt Control File
Here is the control file we used to run DRGFilt against the official F12 test dataset:
age 000 03
sex 003 01
ds 004 02
dxl 000 06
dx 006 60
sgl 000 07
surg 066 70
drg 195 03
mdc 198 02
rc 200 02
morp 202 01
age 000 03
sex 003 01
ds 004 02
dxl 000 06
dx 006 60
sgl 000 07
surg 066 70
drg 195 03
mdc 198 02
rc 200 02
morp 202 01
Subscribe to:
Posts (Atom)