Print Page as PDF
ICDXCODE ICR (5699)

ICDXCODE    ICR (5699)

Name Value
NUMBER 5699
IA # 5699
DATE CREATED 2011/08/02
CUSTODIAL PACKAGE DRG GROUPER
USAGE Supported
TYPE Routine
ROUTINE ICDXCODE
NAME ICDXCODE
GENERAL DESCRIPTION
Routine ICDXCODE was developed to replace ICDCODE
during the ICD-10 project to navigate between the ICD-9 Diagnosis file 80 and
the ICD-10 Diagnosis file 8010 under the two file solution.  The two file
solution had the ICD-9 codes and ICD-10 codes stored in two separate files.
This solution was abandoned in favor of the one file solution where both ICD-9
and ICD-10 are stored in the same file (ICD Diagnosis file 80).  A one file
solution of these APIs can be found in the routine ICDEX (ICD Data Extraction)
Routine ICDXCODE will be exported to support applications through the
transition between the one and two file solutions.  It will be retired 18
months after the ICD-10 compliance date.

STATUS Retired
KEYWORDS
  • ICDXCODE
  • ICD10
  • ICD-10
  • ICD9
  • ICD-9
  • ICD10DX
  • ICD10PR
EXPIRATION DATE 2017/04/01
ID ICDXCODE
COMPONENT/ENTRY POINT
COMPONENT/ENTRY POINT COMPONENT DESCRIPTION VARIABLES
$$ICDDATA(CSYS,CODE,DATE,FRMT)
Extract general data of ICD Diagnosis and/or
Procedures.

VARIABLES TYPE VARIABLES DESCRIPTION
CSYS Input
Coding System (Required)

Code Type
Diagnosis:         DIAG
Procedure:         PROC

Code File
ICD-9 Diagnosis:   ICD9 or 80
ICD-10 Diagnosis:  ICD10DX or 8010
ICD-9 Procedure    ICD0 or 80.1
ICD-10 Procedure   ICD10PR or 8010.1

If Code Type is used (DIAG/PROC) then the input parameter date will be used to
determine if the out put is ICD-9 or ICD-10.  Dates before the ICD-10
implementation will return ICD-9 data, and dates on or after the ICD-10
implementation will return ICD-10 data.

CODE Input
This is an ICD code or an Internal Entry Number (IEN)
or a Variable Pointer:
IEN;ICD9(
IEN;ICD0(
IEN;ICD10DX(
IEN;ICD10PR(

DATE Input
Date in Fileman format.  If not supplied it defaults
to TODAY.  This date is normally the date that service was provided to the
patient (i.e. visit date, movement date, or date of onset).

FRMT Input
Format of the input CODE (optional)

"E" = external format
"I" = internal format (IEN)

If supplied, it must be consistent with the CODE input parameter.

If a variable pointer is passed as CODE, then "I" internal format is assumed.

$$ICDXCODE Output
Diagnosis Code Passed:

A 19 piece caret (^) delimited string

1 IEN of code in file 80/8010
2 ICD-9/ICD-10 Diagnosis Code (#.01)
3 Id (#2)
4 Versioned Diagnosis Short Name (67 multiple)
5 Unacceptable as Principal Diagnosis (#101)
6 Major Dx Cat (#5)
7 MDC13 (5.5)
8 Compl/Comorb (#70)
9 ICD Expanded (#8) 1:Yes 0:No (ICD-9 only)
10 Status (66 multiple)
11 Sex (#9.5)
12 Inactive Date (66 multiple)
13 MDC24 (#5.7)
14 MDC25 (#5.9)
15 Age Low (#14)
16 Age High (#15)
17 Activation Date (.01 of 66 multiple)
18 Message (ICD-9 only)
19 Versioned Complication/Comorbidity (#103)

Procedure Code Passed:

A 14 piece caret (^) delimited string

1 IEN of code in file 80.1/8010.1
2 ICD-9/ICD-10 code (#.01)
3 Id (#2)
4 MDC24 (#5)
5 Versioned Oper/Proc (67 multiple)
6 <null>
7 <null>
8 <null>
9 ICD Expanded (#8) 1:Yes 0:No (ICD-9 only)
10 Status (66 multiple)
11 Use with Sex (#9.5)
12 Inactive Date (66 multipl
13 Activation Date (66 multiple)
14 Message

or

-1^Error Description


$$ICDDESC(CSYS,CODE,DATE,OUTARR)
This API returns the long description of either an
ICD-9 or ICD-10 code.

VARIABLES TYPE VARIABLES DESCRIPTION
CSYS Input
Coding System (Required)

Code Type
Diagnosis:         DIAG
Procedure:         PROC

Code File
ICD-9 Diagnosis:   ICD9 or 80
ICD-10 Diagnosis:  ICD10DX or 8010
ICD-9 Procedure    ICD0 or 80.1
ICD-10 Procedure   ICD10PR or 8010.1

Code System
ICD-9 Diagnosis    1
ICD-10 Diagnosis   30
ICD-9 Procedure    2
ICD-10 Procedure   31

If Code Type is used (DIAG/PROC) then the input parameter date will be used to
determine if the out put is ICD-9 or ICD-10.  Dates before the ICD-10
implementation date will return ICD-9 data, and dates on or after the ICD-10
implementation date will return ICD-10 data.

CODE Input
This is an ICD code (Required)

It can be an ICD-9 Diagnosis Code, ICD-9 Procedure code, an ICD-10 Diagnosis
Code or an ICD-10 Procedure code.  The code should be consistent with the
Coding System (first input parameter)

DATE Input
Date in Fileman format.  If not supplied it defaults
to TODAY.  This date is normally the date that service was provided to the
patient (i.e.  visit date, movement date, or date of onset). The date is used
to return the appropriate description for the date service was provided.

OUTARR Both
Input:  Array Name

e.g. "ARY", "ABC" or "ABC("TEST")"
Default = ^TMP("ICDD",$J)

If ^TMP("ICDD",$J) is used, the calling application is responsible for killing
the global variable when no longer needed.

Output

@ARY(1) = Versioned Description (68 multiple)
@ARY(2) = Blank (ICD-9 only)
@ARY(3) = Message (ICD-9 only):
CODE TEXT MAY BE INACCURATE

$$ICDDESC Output
Number of lines in output array

$$HIST(SYS,CODE,.ARY)
This API returns the effective dates and status from
the code's status history.

VARIABLES TYPE VARIABLES DESCRIPTION
SYS Input
This is a pointer to the the CODING SYSTEM file 80.4

1 = ICD-9-CM
2 = ICD-9-PCS
30 = ICD-10-CM
31 = ICD-10-PCS

CODE Input
This is an ICD Code (IEN not allowed)

.ARY Both
This is a local array name passed by reference that
will contain the output.

ARY(0)      =  Number of Activation History
Entries or -1 on error

ARY(<date>) =  Status    where: 1 is Active
ARY("IEN")  =  <ien>

$$HIST Output
This output variable mirrors ARY(0) if histories are
found or, -1 on error.

$$NEXT(SYS,CODE)
This API returns the next code in a sequence.

VARIABLES TYPE VARIABLES DESCRIPTION
SYS Input
This is a pointer to the the CODING SYSTEM file 80.4

1 = ICD-9-CM
2 = ICD-9-PCS
30 = ICD-10-CM
31 = ICD-10-PCS

CODE Input
This is an ICD Code (IEN not allowed)

$$NEXT Output
The Next ICD Code, or the first ICD code if CODE is
null or null if CODE is the last ICD code.

$$PREV(SYS,CODE)
This API returns the previous ICD code in a sequence.

VARIABLES TYPE VARIABLES DESCRIPTION
SYS Input
This is a pointer to the the CODING SYSTEM file 80.4

1 = ICD-9-CM
2 = ICD-9-PCS
30 = ICD-10-CM
31 = ICD-10-PCS

CODE Input
This is an ICD Code (IEN not allowed)

$$PREV Output
The Previous ICD Code, or the last ICD code if CODE
is null or null if CODE is the first ICD code.

$$STATCHK(SYS,CODE,CDT)
This API returns the status of a code and the code's
Internal Entry Number (IEN).

VARIABLES TYPE VARIABLES DESCRIPTION
SYS Input
This is a pointer to the the CODING SYSTEM file 80.4

1 = ICD-9-CM
2 = ICD-9-PCS
30 = ICD-10-CM
31 = ICD-10-PCS

CODE Input
This is an ICD Code (IEN not allowed)

CDT Input
This is a date in Fileman format that will be used to
determin the status of CODE.  (Optional, default = TODAY)

$$STATCHK Output
This is a 2-piece "^" delimited string containing the
code's status and the IEN if the code exists, else -1.  The following are
possible outputs:

1^IEN    Active Code
0^IEN    Inactive Code
0^-1     Code not Found

$$PERIOD(SYS,CODE,.ARY)
This API returns activation periods (from/to dates).

VARIABLES TYPE VARIABLES DESCRIPTION
SYS Input
This is a pointer to the the CODING SYSTEM file 80.4

1 = ICD-9-CM
2 = ICD-9-PCS
30 = ICD-10-CM
31 = ICD-10-PCS

CODE Input
This is an ICD Code (IEN not allowed)

.ARY Both
This is a local array name passed by reference that
will contain the output.

ARY(0) = IEN ^ Selectable ^ Error Message

Where IEN = -1 if error
Selectable = 0 for unselectable
Error Message if applicable

ARY(Activation Date) = Inactivation Date^Short Name

Where the Short Name is versioned as follows:

Period is active    Short Description for the date
the period became active

Period is inactive  Short Description for the date
the period became inactive

DATE ACTIVATED 2016/04/14