Print Page as PDF
DRG Code APIs ICR (4052)

DRG Code APIs    ICR (4052)

Name Value
NUMBER 4052
IA # 4052
DATE CREATED 2003/07/14
CUSTODIAL PACKAGE DRG GROUPER
CUSTODIAL ISC Albany
USAGE Private
TYPE Routine
DBIC APPROVAL STATUS APPROVED
ROUTINE ICDGTDRG
NAME DRG Code APIs
STATUS Active
KEYWORDS
  • CSV
  • DRG
DURATION Till Otherwise Agreed
EXPIRATION DATE 2019/12/05
ID ICDGTDRG
COMPONENT/ENTRY POINT
COMPONENT/ENTRY POINT COMPONENT DESCRIPTION VARIABLES
$$DRG(CODE,EDT)
This DBIA contains a supported DRG API call that can
be used to access data contained in DRG file (# 80.2). Returns a string of
information from the DRG file (#80.2) for a given DRG code and effective date.

VARIABLES TYPE VARIABLES DESCRIPTION
CODE Input
REQUIRED - DGN code, ien or .01 value
EDT Input
OPTIONAL - Effective date, default = today (Fileman
format)
$$DRG Output
If DRG code DOES exist in the database then the
function returns a "^" delimited string with the following pieces:

1  DRG name (field #.01)
2  Weight (field #2)
3  Low Trim (days) (field #3)
4  High Trim (days) (field #4)
5  MDC (field #5)
6  Surgery Flag (field #.06)
7  <null>
8  Avg Length of Stay (days) (field 10)
9  Local Low Trim Days (field #11)
10  Local High Trim Days (field #12)
11  <null>
12  Local Breakeven (field #13)
13  Activation Date (.01 field of the 66 multiple)
14  Status (.03 field of the 66 multiple)
15  Inactivation Date (.01 field of the 66 multiple)
16  Effective date (.01 field of the 66 multiple)
17  Internal Entry Number (IEN)
18  Effective date of CSV (.01 field of the 66 multiple)

If DRG code DOES NOT exist in the database then the function returns a "^"
delimited string with the following pieces:

1  -1
2  NO SUCH ENTRY
14  Status 0=inactive

$$GETDRG(CODE,DGNDT,FILE)
This DBIA contains a supported DRG API call that can
be used to access data contained in the ICD DIAGNOSIS CODE file (#80) or the
ICD OPERATION/PROCEDURE CODE file (#80.1). It returns a string of information
from the file for a given ICD DIAGNOSIS or OPERATION/PROCEDURE CODE and
effective date.
VARIABLES TYPE VARIABLES DESCRIPTION
CODE Input
REQUIRED - IEN number of the #80 or #80.1 file
DGNDT Input
OPTIONAL - Effective date, default = today (Fileman
format)
FILE Input
REQUIRED - file to access - 9:ICD9 (#80), 0:ICD0
(#80.1)
$$GETDRG Output
If the code exists in the database, then the function
returns a string with ";" delimiters:

DRG(s) associated with the code (delimited by "^") - can be 1+ (piece
1);Effective date (piece 2);status flag (piece 3)

If the code DOES NOT exist in the database then the function returns:

Piece #1 : -1 Piece #2 : error message Piece #3 : Status = 0 = Inactive
$$GETDATE(PATNUM)
This DBIA contains a supported DRG API call that can
be used to access data in the PTF file (#45).  It returns the proper effective
date for a patient to use in accessing Code Set Versioned data.
VARIABLES TYPE VARIABLES DESCRIPTION
PATNUM Input
REQUIRED - ien or .01 value for PTF file (#45)
$$GETDATE Output
The function returns a Fileman-formatted date of the
proper date to be used as the effective date.  This date can be either the
census, discharge, surgery, or movement date.  If all previous dates are
undefined, today's date is returned.
$$ISVALID
This DBA contains a supported DRG API call that can
be used to determine if an ICD DIAGNOSIS CODE (#80) or ICD OPERATION/
PROCEDURE CODE (#80.1)is active for a given effective date.  This API is
designed for use in DIC("S") Fileman calls.
VARIABLES TYPE VARIABLES DESCRIPTION
CODE Input
REQUIRED  - IEN number of the #80 or #80.1 file entry
DGNDT Input
OPTIONAL -Effective date, default = today (Fileman
format)
FILE Input
REQUIRED - file to access - 9:ICD9(#80),
0:ICD0(#80.1)
$$ISVALID Output
Returns 1 if the code is active/valid for the
effective date or 0 if it is undefined or inactive.
$$DRGD(CODE,ARRAY,DFN,DATE)
Extrinsic function that returns the full versioned
description of a Diagnostic Related Group (DRG) code, from the 68 node (field
68) of the DRG file.
VARIABLES TYPE VARIABLES DESCRIPTION
CODE Input
This is either a DRG Code or an Internal Entry Number
(IEN) in the DRG file (#80.2)
ARRAY Both
An array name in which to store the returned
versioned description.  If no name is provided, the default name will be
^TMP("DRGD",$J,.  The calling routine is responsible for killing
^TMP("DRGD",$J) after the call, if used.

On return, the array contains corresponding lines of text of the code's
versioned description (field 68)

ARRAY(1) = 1st line of description
ARRAY(last) = last line of description
ARRAY(last+1) = blank line
ARRAY(last+2) = NOTICE OF TEXTUAL INACCURACY
where last+2 is the value returned by $$DRGD.
DATE Input
This is a Fileman compliant date.  Time is ignored.
If the date is not supplied, then today's date is used.  The DRG description
(long text) will be appropriate for that date.  If no text is found that
corresponds with the date provided, the oldest possible text will be returned
and an message will be returned that the "text may be inaccurate".
DFN Input
This is a pointer to the Patient File #2 (for future
use)
SUBSCRIBING PACKAGE
SUBSCRIBING PACKAGE ISC
FEE BASIS Albany
INTEGRATED BILLING
REGISTRATION
MAIL MESSAGE 36122149