ICDEX ;SLC/KER - ICD Extractor - Main Entry Points ;12/19/2014
;;18.0;DRG Grouper;**57,67**;Oct 20, 2000;Build 1
;
; Global Variables
; None
;
; External References
; None
;
; Parameters for listed APIs
;
; ARY A local array passed by reference .ARY
;
; CDT This is the Code Set Versioning Date (Fileman
; format) and is used to resolve the correct
; entry of a file or sub-file.
;
; EDT External Date allowed by Fileman
;
; CODE This is an ICD Diagnostic or Procedural code
;
; FIELD This is a field number from either file 80 or 80.1
;
; FILE File Number 80 or 80.1
;
; FMT Input format "I"=Internal "E"=External
;
; IEN Internal Entry Number of file 80 or 80.1
;
; IEN1 Internal Entry Number of a specified sub-file
;
; IEN2 Internal Entry Number of file 80 or 80.1
;
; LEN Length of the string of text in an array.
; When passed, the short description or long
; description will be parsed into string
; lengths not to exceed the length passed.
;
; MDC Major Diagnostic Category (pointer to
; file #80.3)
;
; NUM Converts a code to a numeric representation
; of the code (used on the AN cross-reference)
; for the $$NEXT and $$PREV APIs
;
; REV Directionality flag for $ORDER
;
; 0 $Order Forwards (default)
; 1 $Order in Reverse
;
; ROOT Global Root ^ICD9( or ^ICD0(
;
; STD Coding Standard
;
; 0 ICD (default)
; 1 CPT/HCPCS
; 2 DRG
; 3 LEX
;
; SYS Coding System
;
; 1 ICD ICD-9-CM
; 2 ICP ICD-9-PCS
; 30 1OD ICD-10-CM
; 31 10P ICD-10-PCS
;
; TYPE This is any identifier that can determine the
; type of ICD code (diagnosis or procedure) that
; is being used. It can be a:
;
; File Number 80 or 80.1
; Global Root ^ICD9( or ^ICD0(
; Source Abbreviation ICD, ICP, 10D OR 10P
; Coding System 1, 2, 30, 31
; Code 250.01, B58.81, 50.11
;
; TXT Text String to search for in file 80/80.1
;
; VER Versioning flag
;
; 0 Unversioned search, return active/inactive codes
; 1 Versioned search, return only active codes
;
; WORD This is a single word parsed from a string
;
EN ; Main Entry Point
HELP ; Developer Help for an API
D EN^ICDEXH Q
;
; Code APIs
ICDDX(CODE,CDT,SYS,FMT,LOC) ; Dx Code Info
Q $$ICDDX^ICDEXC($G(CODE),$P($G(CDT),".",1),$G(SYS),$G(FMT),$G(LOC))
ICDOP(CODE,CDT,SYS,FMT,LOC) ; Procedure Code Info
Q $$ICDOP^ICDEXC($G(CODE),$P($G(CDT),".",1),$G(SYS),$G(FMT),$G(LOC))
ICDD(CODE,ARY,CDT,SYS,LEN) ; Description in Array
Q $$ICDD^ICDEXC($G(CODE),.ARY,$P($G(CDT),".",1),$G(SYS),+($G(LEN)))
CODEN(CODE,FILE) ; IEN of code
Q $$CODEN^ICDEXC($G(CODE),$G(FILE))
CODEC(FILE,IEN) ; Code from an IEN
Q $$CODE^ICDEXC($G(FILE),$G(IEN))
CODEBA(CODE,ROOT) ; IEN from Code/Root
Q $$CODEBA^ICDEXC($G(CODE),$G(ROOT))
CODEABA(CODE,ROOT,SYS) ; IEN from Code/Root/Coding System
Q $$CODEABA^ICDEXC($G(CODE),$G(ROOT),$G(SYS))
RDX(CODE,CDT) ; Resolve Diagnosis Code Fragment
Q $$RDX^ICDEXC4($G(CODE),$G(CDT))
;
; Code APIs (code data/versioned data)
CODEFI(CODE) ; File for code
Q $$CODEFI^ICDEXC2($G(CODE))
CODECS(CODE,FILE,CDT) ; Coding system for code/file
Q $$CODECS^ICDEXC2($G(CODE),$G(FILE),$P($G(CDT),".",1))
CSI(FILE,IEN) ; Coding system for IEN
Q $$CSI^ICDEXC2($G(FILE),$G(IEN))
VMDC(IEN,CDT,FMT) ; Major Diagnostic Category
Q $$VMDC^ICDEXC2($G(IEN),$P($G(CDT),".",1),$G(FMT))
VAGEL(IEN,CDT,FMT) ; Age Low
Q $$VAGEL^ICDEXC2($G(IEN),$P($G(CDT),".",1),$G(FMT))
VAGEH(IEN,CDT,FMT) ; Age High
Q $$VAGEH^ICDEXC2($G(IEN),$P($G(CDT),".",1),$G(FMT))
VCC(IEN,CDT,FMT) ; Complication/Comorbidity
Q $$VCC^ICDEXC2($G(IEN),$P($G(CDT),".",1),$G(FMT))
VCCP(IEN,CDT,FMT) ; CC Primary Flag
Q $$VCCP^ICDEXC2($G(IEN),$P($G(CDT),".",1),$G(FMT))
VSEX(FILE,IEN,CDT,FMT) ; Sex for file
Q $$VSEX^ICDEXC2($G(FILE),$G(IEN),$P($G(CDT),".",1),$G(FMT))
SAI(FILE,IEN,CDT) ; Status/Active/Inactive Dates
Q $$SAI^ICDEXC2($G(FILE),$G(IEN),$P($G(CDT),".",1))
;
; Code APIs (text/strings)
VST(FILE,IEN,CDT) ; Short Text
Q $$VST^ICDEXC3($G(FILE),$G(IEN),$P($G(CDT),".",1))
VLT(FILE,IEN,CDT) ; Long Text
Q $$VLT^ICDEXC3($G(FILE),$G(IEN),$P($G(CDT),".",1))
VSTD(IEN,CDT) ; Short Text - Diagnosis
Q $$VSTD^ICDEXC3($G(IEN),$P($G(CDT),".",1))
VSTP(IEN,CDT) ; Short Text - Procedures
Q $$VSTP^ICDEXC3($G(IEN),$P($G(CDT),".",1))
VLTD(IEN,CDT) ; Description - Diagnosis
Q $$VLTD^ICDEXC3($G(IEN),$P($G(CDT),".",1))
VLTP(IEN,CDT) ; Description - Procedures
Q $$VLTP^ICDEXC3($G(IEN),$P($G(CDT),".",1))
SD(FILE,IEN,CDT,ARY,LEN) ; Short Description (formatted)
Q $$SD^ICDEXC3($G(FILE),$G(IEN),$P($G(CDT),".",1),.ARY,$G(LEN))
LD(FILE,IEN,CDT,ARY,LEN) ; Long Description (formatted)
Q $$LD^ICDEXC3($G(FILE),$G(IEN),$P($G(CDT),".",1),.ARY,$G(LEN))
SDH(FILE,IEN,ARY) ; Short Description History
Q $$SDH^ICDEXC4($G(FILE),$G(IEN),.ARY)
LDH(FILE,IEN,ARY) ; Long Description History
Q $$LDH^ICDEXC4($G(FILE),$G(IEN),.ARY)
PAR(ARY,LEN) ; Parse Array
D PAR^ICDEXC3(.ARY,$G(LEN)) Q
IEN(CODE,ROOT,SYS) ; IEN from Code/Root/Coding System
Q $$IEN^ICDEXC3($G(CODE),$G(ROOT),$G(SYS))
;
; API Support
STATCHK(CODE,CDT,SYS) ; Status of ICD Code
Q $$STATCHK^ICDEXA($G(CODE),$P($G(CDT),".",1),$G(SYS))
DTBR(CDT,STD,SYS) ; Date Business Rules
Q $$DTBR^ICDEXA($P($G(CDT),".",1),$G(STD),$G(SYS))
IMP(SYS,CDT) ; Implementation Date
Q $$IMP^ICDEXA($G(SYS),$P($G(CDT),".",1))
MSG(CDT,STD,SYS) ; Warning Message
Q $$MSG^ICDEXA($P($G(CDT),".",1),$G(STD),$G(SYS))
SEL(FILE,IEN) ; Entry is Selectable
Q $$SEL^ICDEXA($G(FILE),$G(IEN))
NEXT(CODE,SYS,CDT) ; Next Code
Q $$NEXT^ICDEXA2($G(CODE),$G(SYS),$P($G(CDT),".",1))
PREV(CODE,SYS,CDT) ; Previous Code
Q $$PREV^ICDEXA2($G(CODE),$G(SYS),$P($G(CDT),".",1))
HIST(CODE,ARY,SYS) ; Activation History
Q $$HIST^ICDEXA2($G(CODE),.ARY,$G(SYS))
PERIOD(CODE,ARY,SYS) ; Activation Periods
Q $$PERIOD^ICDEXA2($G(CODE),.ARY,$G(SYS))
OBA(FILE,CODE,SYS,REV) ; $Order BA/ABA
Q $$OBA^ICDEXA3($G(FILE),$G(CODE),$G(SYS),$G(REV))
OD(FILE,WORD,SYS,REV) ; $Order D/AD
Q $$OD^ICDEXA3($G(FILE),$G(WORD),$G(SYS),$G(REV))
DLM(FILE,IEN,FIELD,CDT) ; Date Last Modified
Q $$DLM^ICDEXA3($G(FILE),$G(IEN),$G(FIELD),$P($G(CDT),".",1))
CS(FILE,FMT,CDT) ; Select Coding System (lookup)
Q $$CS^ICDEXA3($G(FILE),$G(FMT),$P($G(CDT),".",1))
;
; Data Extraction Support
EFF(FILE,IEN,CDT) ; Effective date and status
Q $$EFF^ICDEXS($G(FILE),$G(IEN),$P($G(CDT),".",1))
IA(FILE,IEN) ; Initial Activation Date
Q $$IA^ICDEXS($G(FILE),$G(IEN))
LA(FILE,IEN,CDT) ; Last Activation Date
Q $$LA^ICDEXS($G(FILE),$G(IEN),$P($G(CDT),".",1))
LI(FILE,IEN,CDT) ; Last Inactivation Date
Q $$LI^ICDEXS($G(FILE),$G(IEN),$P($G(CDT),".",1))
LS(FILE,IEN,CDT,FMT) ; Last Status
Q $$LS^ICDEXS($G(FILE),$G(IEN),$P($G(CDT),".",1),$G(FMT))
NUM(CODE) ; Convert Code to a Numeric
Q $$NUM^ICDEXS($G(CODE))
COD(NUM) ; Convert Numeric to a Code
Q $$COD^ICDEXS($G(NUM))
IE(CODE) ; Internal or External Format
Q $$IE^ICDEXS($G(CODE))
FILE(SYS) ; File Number from System
Q $$FILE^ICDEXS($G(SYS))
ROOT(SYS) ; Global Root
Q $$ROOT^ICDEXS($G(SYS))
SYS(SYS,CDT,FMT) ; Resolve System (uses file 80.4)
Q $$SYS^ICDEXS($G(SYS),$P($G(CDT),".",1),$G(FMT))
SINFO(SYS,CDT) ; System Info (uses file 80.4)
Q $$SINFO^ICDEXS($G(SYS),$P($G(CDT),".",1))
SNAM(SYS) ; System Name from Coding System
Q $$SNAM^ICDEXS($G(SYS))
SAB(SYS,CDT) ; Source Abbreviation
Q $$SAB^ICDEXS($G(SYS),$P($G(CDT),".",1))
EXC(FILE,IEN) ; Exclude From lookup
Q $$EXC^ICDEXS($G(FILE),$G(IEN))
VER(SYS,REL) ; Coding System Version
Q $$VER^ICDEXS2($G(SYS),$G(REL))
HDR(FILE) ; File Header Node
Q $$HDR^ICDEXS2($G(FILE))
;
; DRG Grouper Extraction Support
ISA(IEN1,IEN2,FIELD) ; Is Code 1 a condition of Code 2 (ICDDRG)
Q $$ISA^ICDEXD($G(IEN1),$G(IEN2),$G(FIELD))
ISVALID(FILE,IEN,CDT) ; Is an ICD code Valid
Q $$ISVALID^ICDEXD2($G(FILE),$G(IEN),$G(CDT))
EXIST(IEN,FIELD) ; Does a condition Exist (ICDDRGX)
Q $$EXIST^ICDEXD($G(IEN),$G(FIELD))
GETDRG(FILE,IEN,CDT,MDC) ; DRGs for an Fiscal Year (ICDGTDRG)
Q $$GETDRG^ICDEXD($G(FILE),$G(IEN),$P($G(CDT),".",1),$G(MDC))
MD(FILE,IEN,CDT,ARY,FLAG) ; MDC DRGs
D MD^ICDEXD2($G(FILE),$G(IEN),$P($G(CDT),".",1),.ARY,$G(FLAG))
EFM(EDT) ; Convert External Date to FM (ICDGTDRG)
Q $$EFM^ICDEXD6($G(EDT))
FY(CDT) ; FY 4 digit year (ICDGTDRG)
Q $$FY^ICDEXD6($P($G(CDT),".",1))
VMDCDX(IEN,CDT) ; Versioned MDC for DX (ICDREF)
Q $$VMDCDX^ICDEXD2($G(IEN),$P($G(CDT),".",1))
VMDCOP(IEN,MDC,CDT) ; Versioned MDC for Op/Pro (ICDREF)
Q $$VMDCOP^ICDEXD2($G(IEN),$G(MDC),$P($G(CDT),".",1))
REF(IEN,CDT) ; Return Reference Table (ICDREF)
Q $$REF^ICDEXD2($G(IEN),$G(CDT))
MDCG(IEN,CDT,ARY) ; Set up array of MDCs (ICDDRG)
D MDCG^ICDEXD2($G(IEN),$P($G(CDT),".",1),.ARY) Q
MDCT(IEN,CDT,ARY,FMT) ; For Multiple MDC DX Codes (ICDDRG)
Q $$MDCT^ICDEXD2($G(IEN),$P($G(CDT),".",1),.ARY,$G(FMT))
MDCD(IEN,MDC,CDT) ; Check for default MDC (ICDDRG)
Q $$MDCD^ICDEXD2($G(IEN),$G(MDC),$G(CDT))
MDCN(IEN) ; Major Diagnostic Category Name
Q $$MDCN^ICDEXD2(+($G(IEN)))
MOR(IEN) ; Major O.R. Procedure (ICDDRG)
Q $$MOR^ICDEXD2($G(IEN))
UPDX(IEN) ; Unacceptable as Principle DX
Q $$UPDX^ICDEXD6($G(IEN))
POAE(IEN) ; Present on Admission Exempt
Q $$POAE^ICDEXD6($G(IEN))
HAC(IEN) ; Hospital Acquired Conditions
Q $$HAC^ICDEXD6($G(IEN))
NOT(IEN,SUB,FMT) ; Codes not Used With
Q $$NOT^ICDEXD3($G(IEN),$G(SUB),$G(FMT))
REQ(IEN,SUB,FMT) ; Codes Required With
Q $$REQ^ICDEXD3($G(IEN),$G(SUB),$G(FMT))
NCC(IEN,SUB,FMT) ; Codes not Considered CC With
Q $$NCC^ICDEXD3($G(IEN),$G(SUB),$G(FMT))
ICDID(FILE,ID,CODE) ; Check if ICD identifier exist
Q $$ICDID^ICDEXD4($G(FILE),$G(ID),$G(CODE))
IDSTR(FILE,IEN) ; ICD identifier string (legacy)
Q $$IDSTR^ICDEXD4($G(FILE),$G(IEN))
ICDIDS(FILE,IEN,ARY) ; Returns array of ICD identifiers
Q $$ICDIDS^ICDEXD4($G(FILE),$G(IEN),.ARY)
ISOWNCC(IEN,CDT,FMT) ; Return CC if DX is Own CC
Q $$ISOWNCC^ICDEXD4($G(IEN),$G(CDT),$G(FMT))
ICDRGCC(DRG,CDT) ; Get CC/MCC flag from DRG
Q $$ICDRGCC^ICDEXD4($G(DRG),$G(CDT))
INQ ; Inquire to the ICD Files
D INQ^ICDEXD4 Q
EFD(X) ; Get Effective date in range (interactive)
Q $$EFD^ICDEXD6
PDXE(IEN) ; Primary DX Exclusion Code
Q $$PDXE^ICDEXD3($G(IEN))
DRG(CODE,CDT) ; Returns information about a DRG
Q $$DRG^ICDEXD5($G(CODE),$G(CDT))
DRGW(IEN) ; DRG Weighted Work Unit (WWU)
Q $$DRGW^ICDEXD6($G(IEN))
DRGDES(IEN,CDT,ARY,LEN) ; Formatted DRG Description
Q $$DRGDES^ICDEXD5($G(IEN),$G(CDT),.ARY,$G(LEN))
DRGD(CODE,OUTARR,CDT) ; Unformatted DRG Description
Q $$DRGD^ICDEXD5($G(CODE),$G(OUTARR),$G(CDT))
DRGN(CODE) ; Return the IEN of DRG
Q $$DRGN^ICDEXD6($G(CODE))
DRGC(IEN) ; DRG Code
Q $$DRGC^ICDEXD6($G(IEN))
GETDATE(IEN) ; Calculate Effective Date
Q $$GETDATE^ICDEXD5($G(IEN))
;
; Lookup
LK ; Special Lookup (called by DIC)
D LK^ICDEXLK Q
LKTX(X,ROOT,CDT,SYS,VER,OUT) ; Lookup Text in ROOT (silent)
Q $$LK^ICDEXLK3($G(X),$G(ROOT),$P($G(CDT),".",1),$G(SYS),$G(VER),$G(OUT))
Y(ROOT,IEN,CDT,FMT) ; Output Variable Y from Lookup
D Y^ICDEXLK2($G(ROOT),$G(IEN),$P($G(CDT),".",1),$G(FMT)) Q
TOKEN(X,ROOT,SYS,ARY) ; Parse Text into Words
D TOKEN^ICDTOKN($G(X),$G(ROOT),$G(SYS),.ARY) Q
WORD(X,ROOT,SYS) ; Word is Found
Q $$WORD^ICDEXLK3($G(X),$G(ROOT),$G(SYS))
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HICDEX 11876 printed Oct 16, 2024@17:51:10 Page 2
ICDEX ;SLC/KER - ICD Extractor - Main Entry Points ;12/19/2014
+1 ;;18.0;DRG Grouper;**57,67**;Oct 20, 2000;Build 1
+2 ;
+3 ; Global Variables
+4 ; None
+5 ;
+6 ; External References
+7 ; None
+8 ;
+9 ; Parameters for listed APIs
+10 ;
+11 ; ARY A local array passed by reference .ARY
+12 ;
+13 ; CDT This is the Code Set Versioning Date (Fileman
+14 ; format) and is used to resolve the correct
+15 ; entry of a file or sub-file.
+16 ;
+17 ; EDT External Date allowed by Fileman
+18 ;
+19 ; CODE This is an ICD Diagnostic or Procedural code
+20 ;
+21 ; FIELD This is a field number from either file 80 or 80.1
+22 ;
+23 ; FILE File Number 80 or 80.1
+24 ;
+25 ; FMT Input format "I"=Internal "E"=External
+26 ;
+27 ; IEN Internal Entry Number of file 80 or 80.1
+28 ;
+29 ; IEN1 Internal Entry Number of a specified sub-file
+30 ;
+31 ; IEN2 Internal Entry Number of file 80 or 80.1
+32 ;
+33 ; LEN Length of the string of text in an array.
+34 ; When passed, the short description or long
+35 ; description will be parsed into string
+36 ; lengths not to exceed the length passed.
+37 ;
+38 ; MDC Major Diagnostic Category (pointer to
+39 ; file #80.3)
+40 ;
+41 ; NUM Converts a code to a numeric representation
+42 ; of the code (used on the AN cross-reference)
+43 ; for the $$NEXT and $$PREV APIs
+44 ;
+45 ; REV Directionality flag for $ORDER
+46 ;
+47 ; 0 $Order Forwards (default)
+48 ; 1 $Order in Reverse
+49 ;
+50 ; ROOT Global Root ^ICD9( or ^ICD0(
+51 ;
+52 ; STD Coding Standard
+53 ;
+54 ; 0 ICD (default)
+55 ; 1 CPT/HCPCS
+56 ; 2 DRG
+57 ; 3 LEX
+58 ;
+59 ; SYS Coding System
+60 ;
+61 ; 1 ICD ICD-9-CM
+62 ; 2 ICP ICD-9-PCS
+63 ; 30 1OD ICD-10-CM
+64 ; 31 10P ICD-10-PCS
+65 ;
+66 ; TYPE This is any identifier that can determine the
+67 ; type of ICD code (diagnosis or procedure) that
+68 ; is being used. It can be a:
+69 ;
+70 ; File Number 80 or 80.1
+71 ; Global Root ^ICD9( or ^ICD0(
+72 ; Source Abbreviation ICD, ICP, 10D OR 10P
+73 ; Coding System 1, 2, 30, 31
+74 ; Code 250.01, B58.81, 50.11
+75 ;
+76 ; TXT Text String to search for in file 80/80.1
+77 ;
+78 ; VER Versioning flag
+79 ;
+80 ; 0 Unversioned search, return active/inactive codes
+81 ; 1 Versioned search, return only active codes
+82 ;
+83 ; WORD This is a single word parsed from a string
+84 ;
EN ; Main Entry Point
HELP ; Developer Help for an API
+1 DO EN^ICDEXH
QUIT
+2 ;
+3 ; Code APIs
ICDDX(CODE,CDT,SYS,FMT,LOC) ; Dx Code Info
+1 QUIT $$ICDDX^ICDEXC($GET(CODE),$PIECE($GET(CDT),".",1),$GET(SYS),$GET(FMT),$GET(LOC))
ICDOP(CODE,CDT,SYS,FMT,LOC) ; Procedure Code Info
+1 QUIT $$ICDOP^ICDEXC($GET(CODE),$PIECE($GET(CDT),".",1),$GET(SYS),$GET(FMT),$GET(LOC))
ICDD(CODE,ARY,CDT,SYS,LEN) ; Description in Array
+1 QUIT $$ICDD^ICDEXC($GET(CODE),.ARY,$PIECE($GET(CDT),".",1),$GET(SYS),+($GET(LEN)))
CODEN(CODE,FILE) ; IEN of code
+1 QUIT $$CODEN^ICDEXC($GET(CODE),$GET(FILE))
CODEC(FILE,IEN) ; Code from an IEN
+1 QUIT $$CODE^ICDEXC($GET(FILE),$GET(IEN))
CODEBA(CODE,ROOT) ; IEN from Code/Root
+1 QUIT $$CODEBA^ICDEXC($GET(CODE),$GET(ROOT))
CODEABA(CODE,ROOT,SYS) ; IEN from Code/Root/Coding System
+1 QUIT $$CODEABA^ICDEXC($GET(CODE),$GET(ROOT),$GET(SYS))
RDX(CODE,CDT) ; Resolve Diagnosis Code Fragment
+1 QUIT $$RDX^ICDEXC4($GET(CODE),$GET(CDT))
+2 ;
+3 ; Code APIs (code data/versioned data)
CODEFI(CODE) ; File for code
+1 QUIT $$CODEFI^ICDEXC2($GET(CODE))
CODECS(CODE,FILE,CDT) ; Coding system for code/file
+1 QUIT $$CODECS^ICDEXC2($GET(CODE),$GET(FILE),$PIECE($GET(CDT),".",1))
CSI(FILE,IEN) ; Coding system for IEN
+1 QUIT $$CSI^ICDEXC2($GET(FILE),$GET(IEN))
VMDC(IEN,CDT,FMT) ; Major Diagnostic Category
+1 QUIT $$VMDC^ICDEXC2($GET(IEN),$PIECE($GET(CDT),".",1),$GET(FMT))
VAGEL(IEN,CDT,FMT) ; Age Low
+1 QUIT $$VAGEL^ICDEXC2($GET(IEN),$PIECE($GET(CDT),".",1),$GET(FMT))
VAGEH(IEN,CDT,FMT) ; Age High
+1 QUIT $$VAGEH^ICDEXC2($GET(IEN),$PIECE($GET(CDT),".",1),$GET(FMT))
VCC(IEN,CDT,FMT) ; Complication/Comorbidity
+1 QUIT $$VCC^ICDEXC2($GET(IEN),$PIECE($GET(CDT),".",1),$GET(FMT))
VCCP(IEN,CDT,FMT) ; CC Primary Flag
+1 QUIT $$VCCP^ICDEXC2($GET(IEN),$PIECE($GET(CDT),".",1),$GET(FMT))
VSEX(FILE,IEN,CDT,FMT) ; Sex for file
+1 QUIT $$VSEX^ICDEXC2($GET(FILE),$GET(IEN),$PIECE($GET(CDT),".",1),$GET(FMT))
SAI(FILE,IEN,CDT) ; Status/Active/Inactive Dates
+1 QUIT $$SAI^ICDEXC2($GET(FILE),$GET(IEN),$PIECE($GET(CDT),".",1))
+2 ;
+3 ; Code APIs (text/strings)
VST(FILE,IEN,CDT) ; Short Text
+1 QUIT $$VST^ICDEXC3($GET(FILE),$GET(IEN),$PIECE($GET(CDT),".",1))
VLT(FILE,IEN,CDT) ; Long Text
+1 QUIT $$VLT^ICDEXC3($GET(FILE),$GET(IEN),$PIECE($GET(CDT),".",1))
VSTD(IEN,CDT) ; Short Text - Diagnosis
+1 QUIT $$VSTD^ICDEXC3($GET(IEN),$PIECE($GET(CDT),".",1))
VSTP(IEN,CDT) ; Short Text - Procedures
+1 QUIT $$VSTP^ICDEXC3($GET(IEN),$PIECE($GET(CDT),".",1))
VLTD(IEN,CDT) ; Description - Diagnosis
+1 QUIT $$VLTD^ICDEXC3($GET(IEN),$PIECE($GET(CDT),".",1))
VLTP(IEN,CDT) ; Description - Procedures
+1 QUIT $$VLTP^ICDEXC3($GET(IEN),$PIECE($GET(CDT),".",1))
SD(FILE,IEN,CDT,ARY,LEN) ; Short Description (formatted)
+1 QUIT $$SD^ICDEXC3($GET(FILE),$GET(IEN),$PIECE($GET(CDT),".",1),.ARY,$GET(LEN))
LD(FILE,IEN,CDT,ARY,LEN) ; Long Description (formatted)
+1 QUIT $$LD^ICDEXC3($GET(FILE),$GET(IEN),$PIECE($GET(CDT),".",1),.ARY,$GET(LEN))
SDH(FILE,IEN,ARY) ; Short Description History
+1 QUIT $$SDH^ICDEXC4($GET(FILE),$GET(IEN),.ARY)
LDH(FILE,IEN,ARY) ; Long Description History
+1 QUIT $$LDH^ICDEXC4($GET(FILE),$GET(IEN),.ARY)
PAR(ARY,LEN) ; Parse Array
+1 DO PAR^ICDEXC3(.ARY,$GET(LEN))
QUIT
IEN(CODE,ROOT,SYS) ; IEN from Code/Root/Coding System
+1 QUIT $$IEN^ICDEXC3($GET(CODE),$GET(ROOT),$GET(SYS))
+2 ;
+3 ; API Support
STATCHK(CODE,CDT,SYS) ; Status of ICD Code
+1 QUIT $$STATCHK^ICDEXA($GET(CODE),$PIECE($GET(CDT),".",1),$GET(SYS))
DTBR(CDT,STD,SYS) ; Date Business Rules
+1 QUIT $$DTBR^ICDEXA($PIECE($GET(CDT),".",1),$GET(STD),$GET(SYS))
IMP(SYS,CDT) ; Implementation Date
+1 QUIT $$IMP^ICDEXA($GET(SYS),$PIECE($GET(CDT),".",1))
MSG(CDT,STD,SYS) ; Warning Message
+1 QUIT $$MSG^ICDEXA($PIECE($GET(CDT),".",1),$GET(STD),$GET(SYS))
SEL(FILE,IEN) ; Entry is Selectable
+1 QUIT $$SEL^ICDEXA($GET(FILE),$GET(IEN))
NEXT(CODE,SYS,CDT) ; Next Code
+1 QUIT $$NEXT^ICDEXA2($GET(CODE),$GET(SYS),$PIECE($GET(CDT),".",1))
PREV(CODE,SYS,CDT) ; Previous Code
+1 QUIT $$PREV^ICDEXA2($GET(CODE),$GET(SYS),$PIECE($GET(CDT),".",1))
HIST(CODE,ARY,SYS) ; Activation History
+1 QUIT $$HIST^ICDEXA2($GET(CODE),.ARY,$GET(SYS))
PERIOD(CODE,ARY,SYS) ; Activation Periods
+1 QUIT $$PERIOD^ICDEXA2($GET(CODE),.ARY,$GET(SYS))
OBA(FILE,CODE,SYS,REV) ; $Order BA/ABA
+1 QUIT $$OBA^ICDEXA3($GET(FILE),$GET(CODE),$GET(SYS),$GET(REV))
OD(FILE,WORD,SYS,REV) ; $Order D/AD
+1 QUIT $$OD^ICDEXA3($GET(FILE),$GET(WORD),$GET(SYS),$GET(REV))
DLM(FILE,IEN,FIELD,CDT) ; Date Last Modified
+1 QUIT $$DLM^ICDEXA3($GET(FILE),$GET(IEN),$GET(FIELD),$PIECE($GET(CDT),".",1))
CS(FILE,FMT,CDT) ; Select Coding System (lookup)
+1 QUIT $$CS^ICDEXA3($GET(FILE),$GET(FMT),$PIECE($GET(CDT),".",1))
+2 ;
+3 ; Data Extraction Support
EFF(FILE,IEN,CDT) ; Effective date and status
+1 QUIT $$EFF^ICDEXS($GET(FILE),$GET(IEN),$PIECE($GET(CDT),".",1))
IA(FILE,IEN) ; Initial Activation Date
+1 QUIT $$IA^ICDEXS($GET(FILE),$GET(IEN))
LA(FILE,IEN,CDT) ; Last Activation Date
+1 QUIT $$LA^ICDEXS($GET(FILE),$GET(IEN),$PIECE($GET(CDT),".",1))
LI(FILE,IEN,CDT) ; Last Inactivation Date
+1 QUIT $$LI^ICDEXS($GET(FILE),$GET(IEN),$PIECE($GET(CDT),".",1))
LS(FILE,IEN,CDT,FMT) ; Last Status
+1 QUIT $$LS^ICDEXS($GET(FILE),$GET(IEN),$PIECE($GET(CDT),".",1),$GET(FMT))
NUM(CODE) ; Convert Code to a Numeric
+1 QUIT $$NUM^ICDEXS($GET(CODE))
COD(NUM) ; Convert Numeric to a Code
+1 QUIT $$COD^ICDEXS($GET(NUM))
IE(CODE) ; Internal or External Format
+1 QUIT $$IE^ICDEXS($GET(CODE))
FILE(SYS) ; File Number from System
+1 QUIT $$FILE^ICDEXS($GET(SYS))
ROOT(SYS) ; Global Root
+1 QUIT $$ROOT^ICDEXS($GET(SYS))
SYS(SYS,CDT,FMT) ; Resolve System (uses file 80.4)
+1 QUIT $$SYS^ICDEXS($GET(SYS),$PIECE($GET(CDT),".",1),$GET(FMT))
SINFO(SYS,CDT) ; System Info (uses file 80.4)
+1 QUIT $$SINFO^ICDEXS($GET(SYS),$PIECE($GET(CDT),".",1))
SNAM(SYS) ; System Name from Coding System
+1 QUIT $$SNAM^ICDEXS($GET(SYS))
SAB(SYS,CDT) ; Source Abbreviation
+1 QUIT $$SAB^ICDEXS($GET(SYS),$PIECE($GET(CDT),".",1))
EXC(FILE,IEN) ; Exclude From lookup
+1 QUIT $$EXC^ICDEXS($GET(FILE),$GET(IEN))
VER(SYS,REL) ; Coding System Version
+1 QUIT $$VER^ICDEXS2($GET(SYS),$GET(REL))
HDR(FILE) ; File Header Node
+1 QUIT $$HDR^ICDEXS2($GET(FILE))
+2 ;
+3 ; DRG Grouper Extraction Support
ISA(IEN1,IEN2,FIELD) ; Is Code 1 a condition of Code 2 (ICDDRG)
+1 QUIT $$ISA^ICDEXD($GET(IEN1),$GET(IEN2),$GET(FIELD))
ISVALID(FILE,IEN,CDT) ; Is an ICD code Valid
+1 QUIT $$ISVALID^ICDEXD2($GET(FILE),$GET(IEN),$GET(CDT))
EXIST(IEN,FIELD) ; Does a condition Exist (ICDDRGX)
+1 QUIT $$EXIST^ICDEXD($GET(IEN),$GET(FIELD))
GETDRG(FILE,IEN,CDT,MDC) ; DRGs for an Fiscal Year (ICDGTDRG)
+1 QUIT $$GETDRG^ICDEXD($GET(FILE),$GET(IEN),$PIECE($GET(CDT),".",1),$GET(MDC))
MD(FILE,IEN,CDT,ARY,FLAG) ; MDC DRGs
+1 DO MD^ICDEXD2($GET(FILE),$GET(IEN),$PIECE($GET(CDT),".",1),.ARY,$GET(FLAG))
EFM(EDT) ; Convert External Date to FM (ICDGTDRG)
+1 QUIT $$EFM^ICDEXD6($GET(EDT))
FY(CDT) ; FY 4 digit year (ICDGTDRG)
+1 QUIT $$FY^ICDEXD6($PIECE($GET(CDT),".",1))
VMDCDX(IEN,CDT) ; Versioned MDC for DX (ICDREF)
+1 QUIT $$VMDCDX^ICDEXD2($GET(IEN),$PIECE($GET(CDT),".",1))
VMDCOP(IEN,MDC,CDT) ; Versioned MDC for Op/Pro (ICDREF)
+1 QUIT $$VMDCOP^ICDEXD2($GET(IEN),$GET(MDC),$PIECE($GET(CDT),".",1))
REF(IEN,CDT) ; Return Reference Table (ICDREF)
+1 QUIT $$REF^ICDEXD2($GET(IEN),$GET(CDT))
MDCG(IEN,CDT,ARY) ; Set up array of MDCs (ICDDRG)
+1 DO MDCG^ICDEXD2($GET(IEN),$PIECE($GET(CDT),".",1),.ARY)
QUIT
MDCT(IEN,CDT,ARY,FMT) ; For Multiple MDC DX Codes (ICDDRG)
+1 QUIT $$MDCT^ICDEXD2($GET(IEN),$PIECE($GET(CDT),".",1),.ARY,$GET(FMT))
MDCD(IEN,MDC,CDT) ; Check for default MDC (ICDDRG)
+1 QUIT $$MDCD^ICDEXD2($GET(IEN),$GET(MDC),$GET(CDT))
MDCN(IEN) ; Major Diagnostic Category Name
+1 QUIT $$MDCN^ICDEXD2(+($GET(IEN)))
MOR(IEN) ; Major O.R. Procedure (ICDDRG)
+1 QUIT $$MOR^ICDEXD2($GET(IEN))
UPDX(IEN) ; Unacceptable as Principle DX
+1 QUIT $$UPDX^ICDEXD6($GET(IEN))
POAE(IEN) ; Present on Admission Exempt
+1 QUIT $$POAE^ICDEXD6($GET(IEN))
HAC(IEN) ; Hospital Acquired Conditions
+1 QUIT $$HAC^ICDEXD6($GET(IEN))
NOT(IEN,SUB,FMT) ; Codes not Used With
+1 QUIT $$NOT^ICDEXD3($GET(IEN),$GET(SUB),$GET(FMT))
REQ(IEN,SUB,FMT) ; Codes Required With
+1 QUIT $$REQ^ICDEXD3($GET(IEN),$GET(SUB),$GET(FMT))
NCC(IEN,SUB,FMT) ; Codes not Considered CC With
+1 QUIT $$NCC^ICDEXD3($GET(IEN),$GET(SUB),$GET(FMT))
ICDID(FILE,ID,CODE) ; Check if ICD identifier exist
+1 QUIT $$ICDID^ICDEXD4($GET(FILE),$GET(ID),$GET(CODE))
IDSTR(FILE,IEN) ; ICD identifier string (legacy)
+1 QUIT $$IDSTR^ICDEXD4($GET(FILE),$GET(IEN))
ICDIDS(FILE,IEN,ARY) ; Returns array of ICD identifiers
+1 QUIT $$ICDIDS^ICDEXD4($GET(FILE),$GET(IEN),.ARY)
ISOWNCC(IEN,CDT,FMT) ; Return CC if DX is Own CC
+1 QUIT $$ISOWNCC^ICDEXD4($GET(IEN),$GET(CDT),$GET(FMT))
ICDRGCC(DRG,CDT) ; Get CC/MCC flag from DRG
+1 QUIT $$ICDRGCC^ICDEXD4($GET(DRG),$GET(CDT))
INQ ; Inquire to the ICD Files
+1 DO INQ^ICDEXD4
QUIT
EFD(X) ; Get Effective date in range (interactive)
+1 QUIT $$EFD^ICDEXD6
PDXE(IEN) ; Primary DX Exclusion Code
+1 QUIT $$PDXE^ICDEXD3($GET(IEN))
DRG(CODE,CDT) ; Returns information about a DRG
+1 QUIT $$DRG^ICDEXD5($GET(CODE),$GET(CDT))
DRGW(IEN) ; DRG Weighted Work Unit (WWU)
+1 QUIT $$DRGW^ICDEXD6($GET(IEN))
DRGDES(IEN,CDT,ARY,LEN) ; Formatted DRG Description
+1 QUIT $$DRGDES^ICDEXD5($GET(IEN),$GET(CDT),.ARY,$GET(LEN))
DRGD(CODE,OUTARR,CDT) ; Unformatted DRG Description
+1 QUIT $$DRGD^ICDEXD5($GET(CODE),$GET(OUTARR),$GET(CDT))
DRGN(CODE) ; Return the IEN of DRG
+1 QUIT $$DRGN^ICDEXD6($GET(CODE))
DRGC(IEN) ; DRG Code
+1 QUIT $$DRGC^ICDEXD6($GET(IEN))
GETDATE(IEN) ; Calculate Effective Date
+1 QUIT $$GETDATE^ICDEXD5($GET(IEN))
+2 ;
+3 ; Lookup
LK ; Special Lookup (called by DIC)
+1 DO LK^ICDEXLK
QUIT
LKTX(X,ROOT,CDT,SYS,VER,OUT) ; Lookup Text in ROOT (silent)
+1 QUIT $$LK^ICDEXLK3($GET(X),$GET(ROOT),$PIECE($GET(CDT),".",1),$GET(SYS),$GET(VER),$GET(OUT))
Y(ROOT,IEN,CDT,FMT) ; Output Variable Y from Lookup
+1 DO Y^ICDEXLK2($GET(ROOT),$GET(IEN),$PIECE($GET(CDT),".",1),$GET(FMT))
QUIT
TOKEN(X,ROOT,SYS,ARY) ; Parse Text into Words
+1 DO TOKEN^ICDTOKN($GET(X),$GET(ROOT),$GET(SYS),.ARY)
QUIT
WORD(X,ROOT,SYS) ; Word is Found
+1 QUIT $$WORD^ICDEXLK3($GET(X),$GET(ROOT),$GET(SYS))