LEXUH ;ISL/KER - Miscellaneous Lexicon Utilities (Help) ;05/23/2017
;;2.0;LEXICON UTILITY;**80,86,103**;Sep 23, 1996;Build 2
;
EN ; Main Entry Point
N %ZIS,ACT,ANS,CAL,CF,COM,CONT,CT,DIR,DIRB,DIROUT,DIRUT,DNC,DTOUT,DUOUT,ENT,EOP,EXEC,EXIT
N HDR,HLP,I,ICR,IEN,INC,INT,ITEM,LAST,LC,LEN,LIN,LINE,LOC,MAX,MEN,NAM,NEXT,PAR,POP,PRE
N RAN,ROOT,RTN,SEL,TAG,TEXT,TOT,TXT,TXT1,TXT2,TXT3,X,Y,ZTDESC,ZTDTH,ZTIO,ZTQUEUED,ZTREQ
N ZTRTN,ZTSAVE,ZTSK K TEXT D MA W ! S ENT=$$ASK
S MEN=$$TM($G(SEL(+ENT))) Q:'$L(MEN) S LOC=$$TM($G(SEL(+ENT,"A"))),NAM=$$TM($G(SEL(+ENT,"C")))
S ICR=$$TM($G(SEL(+ENT,"I"))) S:$L(ICR)&(+ICR'>0) ICR="("_ICR_")" S:$L(ICR)&(+ICR>0) ICR="(ICR "_ICR_")"
S CAL=$$TM($G(SEL(+ENT,"X"))) K TEXT D:ENT>0 OA D:$O(TEXT(0))>0 DHLP K TEXT,COM,SEL
Q
;
DHLP ; Display Help
N %ZIS,CF,CONT,DNC,EOP,I,LC,ZTDESC,ZTDTH,ZTIO,ZTQUEUED,ZTREQ,ZTRTN,ZTSAVE,ZTSK,POP
S %ZIS("A")=" Device: ",ZTRTN="DISP^LEXUH",ZTDESC="Display Lexicon API Help"
S ZTIO=ION,ZTDTH=$H,%ZIS="Q",ZTSAVE("SEL(")="",ZTSAVE("ANS")="" W ! D ^%ZIS I POP K %ZIS("A") Q
S ZTIO=ION I $D(IO("Q")) D QUE,^%ZISC,HOME^%ZIS K %ZIS("A") Q
K %ZIS("A") D NOQUE Q
NOQUE ; Do not queue Display
W @IOF W:IOST["P-" !,"< Not queued, printing Lexicon API Help >",! U:IOST["P-" IO D @ZTRTN,^%ZISC,HOME^%ZIS Q
QUE ; Task queued to print Help
K IO("Q") D ^%ZTLOAD W !,$S($D(ZTSK):"Request Queued",1:"Request Cancelled"),! Q
Q
DISP ; Display
W:$L($G(IOF)) @IOF N LINE,LC,CF,CONT,EOP,EXIT S EXIT=0,EOP=+($G(IOSL))
S:EOP=0 EOP=24 S EOP=EOP-2 S (LC,LINE)=0 F S LINE=$O(TEXT(LINE)) Q:+LINE'>0 D Q:EXIT
. N TXT S TXT=$G(TEXT(LINE)) W !," ",TXT S CF=0 D LF
I CF,EXIT>0 D EOP W:$L($G(IOF)) @IOF Q
I 'CF D EOP W:$L($G(IOF)) @IOF
Q
LF ; Line Feed
S LC=LC+1 D:IOST["P-"&(LC>(EOP-7)) EOP D:IOST'["P-"&(LC>(EOP-4)) EOP
Q
EOP ; End of Page
N CONT S LC=0 W:IOST["P-" @IOF Q:IOST["P-" W !! S CONT=$$CONT S CF=1
Q
CONT(X) ; Ask to Continue
Q:+($G(EXIT))>0 "^^" N DIR,DIROUT,DIRUT,DUOUT,DTOUT,Y S DIR(0)="EAO",DIR("A")=" Enter RETURN to continue or '^' to exit: "
S DIR("PRE")="S:X[""?"" X=""??"" S:X[""^"" X=""^""",(DIR("?"),DIR("??"))="^D CONTH^LEXUH"
D ^DIR S:X["^"!($D(DTOUT)) EXIT=1 Q:$D(DIROUT)!($D(DIRUT))!($D(DUOUT))!($D(DTOUT))!(X["^") "^"
Q ""
CONTH ; Ask to Continue Help
W !," Enter either RETURN or '^'."
Q
;
ASK(X) ; Ask to Select an API
Q:+($G(EXIT))>0 "^^" W:$L($G(IOF)) @IOF
N IEN,ITEM,TOT,MAX,ENT,ANS,EXIT,LEN,ROOT,Y,INT S INT=" API Help available for:"
S:$L($G(HDR)) INT=$G(HDR) S LEN=+($G(LEN)) S:+LEN'>0 LEN=18 S (MAX,ENT,ANS,EXIT)=0,U="^"
S TOT=$O(SEL(" "),-1) G:+TOT=0 ASKQ S ANS=0 W:+TOT>1 !,INT
S ENT=0 F S ENT=$O(SEL(ENT)) Q:+ENT'>0 Q:((ANS>0)&(ANS'>ENT)) Q:EXIT D Q:EXIT
. N ITEM,IEN,TEXT S (TEXT,ITEM)=$$TM($G(SEL(ENT))) Q:'$L(ITEM)
. S MAX=ENT W:ENT#LEN=1 ! W !,$J(ENT,3),". ",ITEM
. W:ENT#LEN=0 ! S:ENT#LEN=0 ANS=$$ASKS(MAX,ENT) S:ANS["^" EXIT=1
I TOT#LEN'=0,+ANS=0 W ! S ANS=$$ASKS(MAX,TOT) S:ANS["^" EXIT=1
G ASKQ
Q X
ASKS(MAX,ENT) ; Select Multiple
Q:+($G(EXIT))>0 "^^"
N X,Y,LAST,NEXT,RAN,DIR,DTOUT,DUOUT,DIROUT,DIRUT,DIRB,HLP
S MAX=+($G(MAX)),LAST=+($G(ENT)) Q:MAX'>0 -1
S RAN=" Select 1-"_MAX_": ",NEXT=$O(SEL(+LAST))
S:+NEXT>0 DIR("A")=" Press <RETURN> for more, '^' to exit, or"_RAN
S:+NEXT'>0 DIR("A")=RAN
S HLP=" Answer must be from 1 to "_MAX_", or <Return> to continue"
S DIR("PRE")="S:X[""?"" X=""??"""
S (DIR("?"),DIR("??"))="^D ASKSH^LEXUH"
S DIR(0)="NAO^1:"_MAX_":0" D ^DIR
S:X["^^"!($D(DTOUT)) EXIT=1,X="^^"
I X["^^"!(+($G(EXIT))>0) Q "^^"
S Y=+Y S:$D(DTOUT)!(X["^") Y="^" K DIR
Q Y
ASKSH ; Select Multiple Help
I $L($G(HLP)) W !,$G(HLP) Q
Q
ASKQ ; Quit Multiple
Q:+($G(ANS))'>0 -1 S X=+($G(ANS))
Q X
;
; Build Arrays
MA ; Menu Array
N MAX,TXT,LINE S MAX=0,TXT="" F LINE=1:1 D Q:'$L(TXT)
. N ACT,CAL,COM,CT,EXEC,ICR,LIN,PAR,PRE,RTN,TAG,TAGL,TXT1,TXT2,TXT3
. S (TXT,TXT1,TXT2)="",EXEC="S TXT1=$T(APIS+"_LINE_"^LEXUH)" X EXEC
. S TXT1=$TR($G(TXT1),"""",""),TXT=$P($G(TXT1),2) Q:'$L(TXT)
. Q:'$L($P($G(TXT1),";;",3)) S TAG=$P($G(TXT1),";;",8),TAGL=$P($G(TXT1),";;",2)
. S RTN=$P($G(TXT1),";;",3),ACT=$P($G(TXT1),";;",9),PAR=$P($G(TXT1),";;",10)
. S LIN=$T(@(TAG_"^"_ACT)),ICR=$P($G(TXT1),";;",5),COM=$$TM($P(LIN,";",2,4000))
. S PRE=$P($G(TXT1),";;",7),CAL=$$TM($P(LIN,";",1))
. S:CAL["(" CAL=$P(CAL,"(",1)_"^"_RTN_"("_$P(CAL,"(",2,4000)
. S:CAL'["(" CAL=CAL_"^"_RTN S:PRE["$$"&(CAL'["$$") CAL="$$"_CAL
. Q:'$L(LIN) Q:'$L(CAL) Q:'$L(COM)
. S TXT2=$P($G(TXT1),";;",7)_$S('$L($G(TAGL)):TAGL,1:TAG)_"^"_RTN_PAR
. S TXT3=$P($G(TXT1),";;",11) S:$L(TXT2)>+(MAX) MAX=$L(TXT2)_"^"_TXT2
. S TXT=TXT2,TXT=TXT_$J(" ",(43-$L(TXT)))_TXT3 S CT=$O(SEL(" "),-1)+1
. S SEL(CT)=TXT,SEL(CT,"A")=TAG_"^"_ACT,SEL(CT,"I")=ICR,SEL(CT,"C")=COM,SEL(CT,"X")=CAL
Q
OA ; Output Array
Q:'$L($G(LOC)) N TAG,RTN,COM,TXT,LINE,HDR S TAG=$P(LOC,"^",1),RTN=$P(LOC,"^",2)
Q:'$L(TAG) Q:'$L(RTN) Q:'$L($$TM($T(@(TAG_"^"_RTN)))) Q:'$L(NAM) Q:'$L(CAL)
S:CAL="EN^LEXA1" CAL="^LEXA1" I $L($G(ICR)) S CAL=CAL_$J(" ",(65-$L(CAL)))_$G(ICR)
S TEXT(1)=" "_CAL,TEXT(2)=" ",TEXT(3)=" "_NAM,TEXT(4)=" "
S TXT="" F LINE=1:1 D Q:'$L(TXT)
. N EXEC,TXT2,TXT3,INC S (TXT,TXT2,TXT3)=""
. S EXEC="S (TXT,TXT2)=$T("_TAG_"+"_LINE_"^"_RTN_")" X EXEC
. S EXEC="S TXT3=$T("_TAG_"+"_(LINE+1)_"^"_RTN_")" X EXEC
. S TXT2=$$TM(TXT2) I TXT2="Q"!(TXT2'[";") S TXT="" Q
. S:TXT3'[";" TXT3="" S:TXT2[";" TXT2=" "_$P(TXT2,";",2,4000)
. I $L(TXT2),$L(TXT3) S INC=$O(COM(" "),-1)+1,COM(INC)=TXT2
S LINE=0 F S LINE=$O(COM(LINE)) Q:$L($$TM($G(COM(LINE)))) K COM(LINE)
S LINE=999999 F S LINE=$O(COM(LINE),-1) Q:$L($$TM($G(COM(LINE)))) K COM(LINE)
S LINE=0 F S LINE=$O(COM(LINE)) Q:+LINE'>0 D
. N INC S INC=$O(TEXT(" "),-1)+1,TEXT(INC)=$G(COM(LINE))
S LINE=$O(TEXT(" "),-1) S:+LINE>0 TEXT(0)=LINE
K COM
Q
;
; Miscellaneous
TM(X,Y) ; Trim Character Y - Default " "
S X=$G(X) Q:X="" X S Y=$G(Y) S:'$L(Y) Y=" " F Q:$E(X,1)'=Y S X=$E(X,2,$L(X))
F Q:$E(X,$L(X))'=Y S X=$E(X,1,($L(X)-1))
Q X
APIS ; List of APIs
;;LOOK;;LEXA;;"(LEXX,LEXAP,LEXLL,LEXSUB,DATE)";;2950;;1;;;;LOOK;;LEXA;;"(X,AP,LEN,SUB,CDT,SRC,CAT)";;Main Lexicon Lookup
;;;;LEXA1;;;;10006;;1;;;;EN;;LEXA1;;;;Lexicon Special Lookup
;;$$ICDSRCH;;LEX10CS;;"(TEXT,.ARRAY,DATE,LEN,FILTER)";;5681;;2;;$$;;ICDSRCH;;LEX10CS;;"(X,ARRAY,CDT,LEN,FIL)";;ICD-9/ICD-10 Diagnosis Lookup
;;$$DIAGSRCH;;LEX10CS;;"(TEXT,.ARRAY,DATE,LEN,FILTER)";;5681;;2;;$$;;DIAGSRCH;;LEX10CS;;"(X,ARRAY,CDT,LEN,FIL)";;ICD-10 Diagnosis Lookup
;;$$PCSDIG;;LEX10CS;;"(FRAG,DATE)";;5681;;2;;$$;;PCSDIG;;LEX10CS;;"(X,CDT)";;ICD-10 Procedure Lookup
;;$$CODELIST;;LEX10CS;;"(SYS,SPEC,SUB,DATE,LEN,FMT)";;5681;;2;;$$;;CODELIST;;LEX10CS2;;"(X,SPEC,SUB,CDT,LEN,FIL)";;Wild Card Code Lookup
;;CONFIG;;LEXSET;;"(LEXNS,LEXSS,DATE)";;1609;;1;;;;CONFIG;;LEXSET;;"(NS,SS,CDT)";;Setup Search Parameters
;;STATCHK;;LEXSRC2;;"(CODE,DATE,.ARY,SAB)";;4083;;2;;$$;;STATCHK;;LEXSRC2;;"(CODE,DATE,.ARY,SAB)";;Status of a Code
;;$$SC;;LEXU;;"(Y,STRING,DATE)";;5386;;1;;$$;;SC;;LEXU6;;"(IEN,SEM,CDT)";;Filter Search by Semantics
;;$$SO;;LEXU;;"(Y,STRING,DATE)";;5386;;1;;$$;;SO;;LEXU6;;"(IEN,SRC,CDT)";;Filter Search by Coding System
;;$$SCT;;LEXU;;"(Y,DATE)";;5679;;1;;$$;;SCT;;LEXU;;"(IEN,CDT)";;Filter by SNOMED CT (Human)
;;$$DX;;LEXU;;"(IEN,VDT)";;5679;;3;;$$;;DX;;LEXU;;"(IEN,CDT)";;Filter by Diagnosis System
;;$$ONE;;LEXU;;"(IEN,DATE,SAB)";;5679;;2;;$$;;ONE;;LEXU;;"(IEN,CDT,SAB)";;One Code for Source
;;$$PRF;;LEXU;;"(IEN,DATE,SAB)";;6265;;2;;$$;;PRF;;LEXU3;;"(IEN,CDT,SAB)";;One Code for Preferred Term
;;$$ALL;;LEXU;;"(IEN,DATE,SAB)";;5679;;3;;$$;;ALL;;LEXU;;"(IEN,CDT,SAB)";;Get all Codes for a Source
;;$$CPTONE;;LEXU;;"(IEN,DATE)";;1573;;1;;$$;;CPTONE;;LEXU;;"(IEN,CDT)";;Get CPT Code
;;$$CPCONE;;LEXU;;"(IEN,DATE)";;1573;;3;;$$;;CPCONE;;LEXU;;"(IEN,CDT)";;Get HCPCS Code
;;$$ICDONE;;LEXU;;"(IEN,DATE)";;1573;;1;;$$;;ICDONE;;LEXU;;"(IEN,CDT)";;Get one ICD-9-CM Code
;;$$ICD;;LEXU;;"(IEN,DATE)";;1573;;3;;$$;;ICD;;LEXU;;"(IEN,CDT)";;Get all ICD-9-CM Codes
;;$$D10ONE;;LEXU;;"(IEN,DATE)";;5679;;3;;$$;;D10ONE;;LEXU;;"(IEN,CDT)";;Get one ICD-10-CM
;;$$D10;;LEXU;;"(IEN,DATE)";;5679;;3;;$$;;D10;;LEXU;;"(IEN,CDT)";;Get all ICD-10-CM Codes
;;$$P10ONE;;LEXU;;"(IEN,DATE)";;5679;;3;;$$;;P10ONE;;LEXU;;"(IEN,CDT)";;Get one ICD-10-PCS Code
;;$$DSMONE;;LEXU;;(IEN);;1573;;3;;$$;;DSMONE;;LEXU;;"(IEN,CDT)";;Get one DSM-IV Code
;;INFO;;LEXA;;"(IEN,DATE)";;1597;;3;;;;INFO;;LEXA;;"(X,CDT)";;Get Information about a Term
;;EN;;LEXCODE;;"(LEXSO,DATE)";;1614;;3;;;;EN;;LEXCODE;;"(SO,CDT)";;Get Terms associated with Code
;;$$HIST;;LEXU;;"(CODE,SYS,.ARY)";;5679;;2;;$$;;HIST;;LEXU4;;"(CODE,SYS,.ARY)";;Get Activation History
;;$$PERIOD;;LEXU;;"(CODE,SYS,ARY)";;5679;;2;;$$;;PERIOD;;LEXU4;;"(CODE,SYS,.ARY)";;Get Activation Periods
;;$$TAX;;LEX10CS;;"(TEXT,SRC,CDT,SUB,VER)";;5681;;2;;$$;;TAX;;LEX10TAX;;"(X,SRC,CDT,SUB,VER)";;Get Taxonomies
;;$$CSDATA;;LEXU;;"(CODE,CSYS,VDT,.ARY)";;5679;;2;;$$;;CSDATA;;LEXU2;;"(CODE,CSYS,CDT,ARY)";;Get Code Data
;;$$EXP;;LEXCODE;;"(CODE,SAB,DATE)";;5680;;3;;$$;;EXP;;LEXCODE;;"(SO,SAB,CDT)";;Get the Term for a Code
;;$$CAT;;LEXU;;(CODE);;5679;;2;;$$;;CAT;;LEX10DU;;(CODE);;Get ICD-10 Category
;;$$ISCAT;;LEXU;;(CODE);;5679;;2;;$$;;ISCAT;;LEX10DU;;(CODE);;Is an ICD-10 Code a Category
;;$$FREQ;;LEXU;;(TEXT);;5679;;2;;$$;;FREQ;;LEXU3;;(TEXT);;Get Frequency of Text
;;$$MAX;;LEXU;;(SYS);;5679;;2;;$$;;MAX;;LEXU3;;(SYS);;Maximum Number to Search
;;$$NXSAB;;LEXU;;"(SAB,REV)";;5679;;3;;$$;;NXSAB;;LEXU3;;"(SYS,REV)";;Get Next Source Abbrievation
;;$$PFI;;LEXU;;"(FRAG,CDT,.ARY)";;5679;;3;;$$;;PFI;;LEXU4;;"(FRAG,CDT,.ARY)";;Get Procedure Fragment Info
;;$$CSYS;;LEXU;;"(SYS)";;5679;;2;;$$;;CSYS;;LEXU5;;(SYS);;Get Coding System Info
;;$$IMPDATE;;LEXU;;(SAB);;5679;;2;;$$;;IMPDATE;;LEXU5;;(SYS);;Get System Implementation Date
;;$$LUPD;;LEXU;;"(SAB,DATE)";;5679;;3;;$$;;LUPD;;LEXU3;;"(SYS,CDT)";;Get System Last Updated
;;$$RUPD;;LEXU;;(SAB);;5679;;3;;$$;;RUPD;;LEXU3;;(SYS);;Get System Recent Update
;;$$EXP;;LEXU;;(IEN);;6265;;3;;$$;;EXP;;LEXU3;;(IEN);;Get Expression
;;$$EXPS;;LEXU;;(IEN,CDT,ARY);;6265;;3;;$$;;EXPS;;LEXU3;;(IEN,CDT,ARY);;Get Expression/Codes for IEN
;;$$PREF;;LEXU;;"(CODE,SAB,CDT)";;6265;;3;;$$;;PREF;;LEXU3;;"(CODE,SAB,CDT)";;Get the Term for a Code
;;$$IENS;;LEXU;;(CODE,ARY,CDT);;6265;;3;;$$;;IENS;;LEXU7;;(CODE,ARY,CDT);;Get IENS for a Code
;;$$SOS;;LEXU;;(CODE,ARY,CDT);;6265;;3;;$$;;SOS;;LEXU6;;(CODE,ARY,CDT);;Get Codes for an Expression
;;$$EXM;;LEXU;;(TEXT,ARY,DF,MC);;6265;;3;;$$;;EXM;;LEXU6;;(TEXT,ARY,DF,MC);;Get Exact Match Expressions
;;SUBSETS;;LEXU;;(CODE,SRC,ARY);;6265;;3;;$$;;SUBSETS;;LEXU5;;(CODE,SRC,ARY);;Get Subsets for a Code
;;CODE;;LEXU;;(CODE,SRC,CDT,.ARY,OUT);;6265;;3;;;;CODE;;LEXINF2;;(CODE,SRC,CDT,.ARY,OUT);;Get Information about a Code
;;TERM;;LEXU;;(IEN,CDT,.ARY,OUT);;6265;;3;;;;TERM;;LEXINF3;;(IEN,CDT,.ARY,OUT);;Get Information about a Term
;;$$CODE;;LEXTRAN;;"(CODE,SOURCE,DATE,ARRAY)";;4912;;3;;$$;;CODE;;LEXTRAN;;"(CODE,SRC,CDT,ARRAY)";;Get Concept for Code/Source
;;$$TEXT;;LEXTRAN;;"(TEXT,DATE,SUBSET,SOURCE,ARRAY)";;4913;;3;;$$;;TEXT;;LEXTRAN;;"(TEXT,CDT,SUB,SRC,ARRAY)";;Get Concept for Text/Source
;;$$TXT4CS;;LEXTRAN;;"(TEXT,SOURCE)";;4914;;3;;$$;;TXT4CS;;LEXTRAN;;"(TEXT,SRC,ARRAY,SUB)";;Is Text valid for an SCT code
;;$$VERSION;;LEXTRAN;;"(LEXSRC,LEXCODE,CDT)";;5011;;3;;$$;;VERSION;;LEXTRAN;;"(SRC,CODE,VDT)";;Get a Code's Version
;;$$GETASSN;;LEXTRAN1;;"(LEXCODE,LEXMAP,CDT,LEXRAY)";;5010;;3;;$$;;GETASSN;;LEXTRAN1;;"(CODE,MAP,CDT,ARRAY)";;Get Mapped Associations
;;$$GETFSN;;LEXTRAN1;;"(LEXSRC,LEXCODE,CDT)";;5007;;3;;$$;;GETFSN;;LEXTRAN1;;"(SRC,CODE,CDT)";;Get Fully Specified Name
;;$$GETPREF;;LEXTRAN1;;"(LEXSRC,LEXCODE,CDT)";;5008;;3;;$$;;GETPREF;;LEXTRAN1;;"(SRC,CODE,CDT)";;Get Preferred Term
;;$$GETSYN;;LEXTRAN1;;"(LEXSRC,LEXCODE,CDT,LEXRAY,LEXIENS)";;5006;;3;;$$;;GETSYN;;LEXTRAN1;;"(SRC,CODE,CDT,ARARY,IENS)";;Get Concept Synonyms
;;$$GETDES;;LEXTRAN1;;"(LEXSRC,LEXTEXT,CDT)";;5009;;3;;$$;;GETDES;;LEXTRAN1;;"(SRC,TEXT,CDT)";;Get Designation Code
;;$$GETDID;;LEXTRAN1;;"(LEXSRC,LEXIEN)";;6472;;3;;$$;;GETDID;;LEXTRAN1;;"(SRC,IEN)";;Get Designation ID
;;$$MIX;;LEXXMC;;(TEXT);;6266;;3;;$$;;MIX;;LEXXMC;;(TEXT);;Convert to Mixed Case
;;EN;;LEX10CX;;;;5840;;4;;;;EN;;LEX10CX;;;;Get Suggested Code
;;EN2;;LEX10CX;;"(CODE,SAB)";;5840;;4;;;;EN2;;LEX10CX;;"(CODE,SYS)";;Get Suggested Code/Source
;;EN3;;LEX10CX;;"(CODE,SAB,.ARY,MAX)";;5840;;4;;;;EN3;;LEX10CX;;"(CODE,SYS,.ARY,MAX)";;Get Suggested Code (silent)
;;$$PAR;;LEXU;;"(TXT,.ARY)";;5679;;3;;$$;;PAR;;LEXU3;;"(TEXT,.ARY)";;Get Words from Text String
;;PR;;LEXU;;"(.ARY,LEN)";;;;1;;$$;;PR;;LEXU5;;"(.ARY,LEN)";;Wrap Text to Specified Length
;;INC;;LEXA;;"(X)";;Pending;;1;;;;INC;;LEXAR8;;"(X)";;Increment Concept Usage
;;;;;;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HLEXUH 12932 printed Nov 22, 2024@17:20:02 Page 2
LEXUH ;ISL/KER - Miscellaneous Lexicon Utilities (Help) ;05/23/2017
+1 ;;2.0;LEXICON UTILITY;**80,86,103**;Sep 23, 1996;Build 2
+2 ;
EN ; Main Entry Point
+1 NEW %ZIS,ACT,ANS,CAL,CF,COM,CONT,CT,DIR,DIRB,DIROUT,DIRUT,DNC,DTOUT,DUOUT,ENT,EOP,EXEC,EXIT
+2 NEW HDR,HLP,I,ICR,IEN,INC,INT,ITEM,LAST,LC,LEN,LIN,LINE,LOC,MAX,MEN,NAM,NEXT,PAR,POP,PRE
+3 NEW RAN,ROOT,RTN,SEL,TAG,TEXT,TOT,TXT,TXT1,TXT2,TXT3,X,Y,ZTDESC,ZTDTH,ZTIO,ZTQUEUED,ZTREQ
+4 NEW ZTRTN,ZTSAVE,ZTSK
KILL TEXT
DO MA
WRITE !
SET ENT=$$ASK
+5 SET MEN=$$TM($GET(SEL(+ENT)))
if '$LENGTH(MEN)
QUIT
SET LOC=$$TM($GET(SEL(+ENT,"A")))
SET NAM=$$TM($GET(SEL(+ENT,"C")))
+6 SET ICR=$$TM($GET(SEL(+ENT,"I")))
if $LENGTH(ICR)&(+ICR'>0)
SET ICR="("_ICR_")"
if $LENGTH(ICR)&(+ICR>0)
SET ICR="(ICR "_ICR_")"
+7 SET CAL=$$TM($GET(SEL(+ENT,"X")))
KILL TEXT
if ENT>0
DO OA
if $ORDER(TEXT(0))>0
DO DHLP
KILL TEXT,COM,SEL
+8 QUIT
+9 ;
DHLP ; Display Help
+1 NEW %ZIS,CF,CONT,DNC,EOP,I,LC,ZTDESC,ZTDTH,ZTIO,ZTQUEUED,ZTREQ,ZTRTN,ZTSAVE,ZTSK,POP
+2 SET %ZIS("A")=" Device: "
SET ZTRTN="DISP^LEXUH"
SET ZTDESC="Display Lexicon API Help"
+3 SET ZTIO=ION
SET ZTDTH=$HOROLOG
SET %ZIS="Q"
SET ZTSAVE("SEL(")=""
SET ZTSAVE("ANS")=""
WRITE !
DO ^%ZIS
IF POP
KILL %ZIS("A")
QUIT
+4 SET ZTIO=ION
IF $DATA(IO("Q"))
DO QUE
DO ^%ZISC
DO HOME^%ZIS
KILL %ZIS("A")
QUIT
+5 KILL %ZIS("A")
DO NOQUE
QUIT
NOQUE ; Do not queue Display
+1 WRITE @IOF
if IOST["P-"
WRITE !,"< Not queued, printing Lexicon API Help >",!
if IOST["P-"
USE IO
DO @ZTRTN
DO ^%ZISC
DO HOME^%ZIS
QUIT
QUE ; Task queued to print Help
+1 KILL IO("Q")
DO ^%ZTLOAD
WRITE !,$SELECT($DATA(ZTSK):"Request Queued",1:"Request Cancelled"),!
QUIT
+2 QUIT
DISP ; Display
+1 if $LENGTH($GET(IOF))
WRITE @IOF
NEW LINE,LC,CF,CONT,EOP,EXIT
SET EXIT=0
SET EOP=+($GET(IOSL))
+2 if EOP=0
SET EOP=24
SET EOP=EOP-2
SET (LC,LINE)=0
FOR
SET LINE=$ORDER(TEXT(LINE))
if +LINE'>0
QUIT
Begin DoDot:1
+3 NEW TXT
SET TXT=$GET(TEXT(LINE))
WRITE !," ",TXT
SET CF=0
DO LF
End DoDot:1
if EXIT
QUIT
+4 IF CF
IF EXIT>0
DO EOP
if $LENGTH($GET(IOF))
WRITE @IOF
QUIT
+5 IF 'CF
DO EOP
if $LENGTH($GET(IOF))
WRITE @IOF
+6 QUIT
LF ; Line Feed
+1 SET LC=LC+1
if IOST["P-"&(LC>(EOP-7))
DO EOP
if IOST'["P-"&(LC>(EOP-4))
DO EOP
+2 QUIT
EOP ; End of Page
+1 NEW CONT
SET LC=0
if IOST["P-"
WRITE @IOF
if IOST["P-"
QUIT
WRITE !!
SET CONT=$$CONT
SET CF=1
+2 QUIT
CONT(X) ; Ask to Continue
+1 if +($GET(EXIT))>0
QUIT "^^"
NEW DIR,DIROUT,DIRUT,DUOUT,DTOUT,Y
SET DIR(0)="EAO"
SET DIR("A")=" Enter RETURN to continue or '^' to exit: "
+2 SET DIR("PRE")="S:X[""?"" X=""??"" S:X[""^"" X=""^"""
SET (DIR("?"),DIR("??"))="^D CONTH^LEXUH"
+3 DO ^DIR
if X["^"!($DATA(DTOUT))
SET EXIT=1
if $DATA(DIROUT)!($DATA(DIRUT))!($DATA(DUOUT))!($DATA(DTOUT))!(X["^")
QUIT "^"
+4 QUIT ""
CONTH ; Ask to Continue Help
+1 WRITE !," Enter either RETURN or '^'."
+2 QUIT
+3 ;
ASK(X) ; Ask to Select an API
+1 if +($GET(EXIT))>0
QUIT "^^"
if $LENGTH($GET(IOF))
WRITE @IOF
+2 NEW IEN,ITEM,TOT,MAX,ENT,ANS,EXIT,LEN,ROOT,Y,INT
SET INT=" API Help available for:"
+3 if $LENGTH($GET(HDR))
SET INT=$GET(HDR)
SET LEN=+($GET(LEN))
if +LEN'>0
SET LEN=18
SET (MAX,ENT,ANS,EXIT)=0
SET U="^"
+4 SET TOT=$ORDER(SEL(" "),-1)
if +TOT=0
GOTO ASKQ
SET ANS=0
if +TOT>1
WRITE !,INT
+5 SET ENT=0
FOR
SET ENT=$ORDER(SEL(ENT))
if +ENT'>0
QUIT
if ((ANS>0)&(ANS'>ENT))
QUIT
if EXIT
QUIT
Begin DoDot:1
+6 NEW ITEM,IEN,TEXT
SET (TEXT,ITEM)=$$TM($GET(SEL(ENT)))
if '$LENGTH(ITEM)
QUIT
+7 SET MAX=ENT
if ENT#LEN=1
WRITE !
WRITE !,$JUSTIFY(ENT,3),". ",ITEM
+8 if ENT#LEN=0
WRITE !
if ENT#LEN=0
SET ANS=$$ASKS(MAX,ENT)
if ANS["^"
SET EXIT=1
End DoDot:1
if EXIT
QUIT
+9 IF TOT#LEN'=0
IF +ANS=0
WRITE !
SET ANS=$$ASKS(MAX,TOT)
if ANS["^"
SET EXIT=1
+10 GOTO ASKQ
+11 QUIT X
ASKS(MAX,ENT) ; Select Multiple
+1 if +($GET(EXIT))>0
QUIT "^^"
+2 NEW X,Y,LAST,NEXT,RAN,DIR,DTOUT,DUOUT,DIROUT,DIRUT,DIRB,HLP
+3 SET MAX=+($GET(MAX))
SET LAST=+($GET(ENT))
if MAX'>0
QUIT -1
+4 SET RAN=" Select 1-"_MAX_": "
SET NEXT=$ORDER(SEL(+LAST))
+5 if +NEXT>0
SET DIR("A")=" Press <RETURN> for more, '^' to exit, or"_RAN
+6 if +NEXT'>0
SET DIR("A")=RAN
+7 SET HLP=" Answer must be from 1 to "_MAX_", or <Return> to continue"
+8 SET DIR("PRE")="S:X[""?"" X=""??"""
+9 SET (DIR("?"),DIR("??"))="^D ASKSH^LEXUH"
+10 SET DIR(0)="NAO^1:"_MAX_":0"
DO ^DIR
+11 if X["^^"!($DATA(DTOUT))
SET EXIT=1
SET X="^^"
+12 IF X["^^"!(+($GET(EXIT))>0)
QUIT "^^"
+13 SET Y=+Y
if $DATA(DTOUT)!(X["^")
SET Y="^"
KILL DIR
+14 QUIT Y
ASKSH ; Select Multiple Help
+1 IF $LENGTH($GET(HLP))
WRITE !,$GET(HLP)
QUIT
+2 QUIT
ASKQ ; Quit Multiple
+1 if +($GET(ANS))'>0
QUIT -1
SET X=+($GET(ANS))
+2 QUIT X
+3 ;
+4 ; Build Arrays
MA ; Menu Array
+1 NEW MAX,TXT,LINE
SET MAX=0
SET TXT=""
FOR LINE=1:1
Begin DoDot:1
+2 NEW ACT,CAL,COM,CT,EXEC,ICR,LIN,PAR,PRE,RTN,TAG,TAGL,TXT1,TXT2,TXT3
+3 SET (TXT,TXT1,TXT2)=""
SET EXEC="S TXT1=$T(APIS+"_LINE_"^LEXUH)"
XECUTE EXEC
+4 SET TXT1=$TRANSLATE($GET(TXT1),"""","")
SET TXT=$PIECE($GET(TXT1),2)
if '$LENGTH(TXT)
QUIT
+5 if '$LENGTH($PIECE($GET(TXT1),";;",3))
QUIT
SET TAG=$PIECE($GET(TXT1),";;",8)
SET TAGL=$PIECE($GET(TXT1),";;",2)
+6 SET RTN=$PIECE($GET(TXT1),";;",3)
SET ACT=$PIECE($GET(TXT1),";;",9)
SET PAR=$PIECE($GET(TXT1),";;",10)
+7 SET LIN=$TEXT(@(TAG_"^"_ACT))
SET ICR=$PIECE($GET(TXT1),";;",5)
SET COM=$$TM($PIECE(LIN,";",2,4000))
+8 SET PRE=$PIECE($GET(TXT1),";;",7)
SET CAL=$$TM($PIECE(LIN,";",1))
+9 if CAL["("
SET CAL=$PIECE(CAL,"(",1)_"^"_RTN_"("_$PIECE(CAL,"(",2,4000)
+10 if CAL'["("
SET CAL=CAL_"^"_RTN
if PRE["$$"&(CAL'["$$")
SET CAL="$$"_CAL
+11 if '$LENGTH(LIN)
QUIT
if '$LENGTH(CAL)
QUIT
if '$LENGTH(COM)
QUIT
+12 SET TXT2=$PIECE($GET(TXT1),";;",7)_$SELECT('$LENGTH($GET(TAGL)):TAGL,1:TAG)_"^"_RTN_PAR
+13 SET TXT3=$PIECE($GET(TXT1),";;",11)
if $LENGTH(TXT2)>+(MAX)
SET MAX=$LENGTH(TXT2)_"^"_TXT2
+14 SET TXT=TXT2
SET TXT=TXT_$JUSTIFY(" ",(43-$LENGTH(TXT)))_TXT3
SET CT=$ORDER(SEL(" "),-1)+1
+15 SET SEL(CT)=TXT
SET SEL(CT,"A")=TAG_"^"_ACT
SET SEL(CT,"I")=ICR
SET SEL(CT,"C")=COM
SET SEL(CT,"X")=CAL
End DoDot:1
if '$LENGTH(TXT)
QUIT
+16 QUIT
OA ; Output Array
+1 if '$LENGTH($GET(LOC))
QUIT
NEW TAG,RTN,COM,TXT,LINE,HDR
SET TAG=$PIECE(LOC,"^",1)
SET RTN=$PIECE(LOC,"^",2)
+2 if '$LENGTH(TAG)
QUIT
if '$LENGTH(RTN)
QUIT
if '$LENGTH($$TM($TEXT(@(TAG_"^"_RTN))))
QUIT
if '$LENGTH(NAM)
QUIT
if '$LENGTH(CAL)
QUIT
+3 if CAL="EN^LEXA1"
SET CAL="^LEXA1"
IF $LENGTH($GET(ICR))
SET CAL=CAL_$JUSTIFY(" ",(65-$LENGTH(CAL)))_$GET(ICR)
+4 SET TEXT(1)=" "_CAL
SET TEXT(2)=" "
SET TEXT(3)=" "_NAM
SET TEXT(4)=" "
+5 SET TXT=""
FOR LINE=1:1
Begin DoDot:1
+6 NEW EXEC,TXT2,TXT3,INC
SET (TXT,TXT2,TXT3)=""
+7 SET EXEC="S (TXT,TXT2)=$T("_TAG_"+"_LINE_"^"_RTN_")"
XECUTE EXEC
+8 SET EXEC="S TXT3=$T("_TAG_"+"_(LINE+1)_"^"_RTN_")"
XECUTE EXEC
+9 SET TXT2=$$TM(TXT2)
IF TXT2="Q"!(TXT2'[";")
SET TXT=""
QUIT
+10 if TXT3'[";"
SET TXT3=""
if TXT2[";"
SET TXT2=" "_$PIECE(TXT2,";",2,4000)
+11 IF $LENGTH(TXT2)
IF $LENGTH(TXT3)
SET INC=$ORDER(COM(" "),-1)+1
SET COM(INC)=TXT2
End DoDot:1
if '$LENGTH(TXT)
QUIT
+12 SET LINE=0
FOR
SET LINE=$ORDER(COM(LINE))
if $LENGTH($$TM($GET(COM(LINE))))
QUIT
KILL COM(LINE)
+13 SET LINE=999999
FOR
SET LINE=$ORDER(COM(LINE),-1)
if $LENGTH($$TM($GET(COM(LINE))))
QUIT
KILL COM(LINE)
+14 SET LINE=0
FOR
SET LINE=$ORDER(COM(LINE))
if +LINE'>0
QUIT
Begin DoDot:1
+15 NEW INC
SET INC=$ORDER(TEXT(" "),-1)+1
SET TEXT(INC)=$GET(COM(LINE))
End DoDot:1
+16 SET LINE=$ORDER(TEXT(" "),-1)
if +LINE>0
SET TEXT(0)=LINE
+17 KILL COM
+18 QUIT
+19 ;
+20 ; Miscellaneous
TM(X,Y) ; Trim Character Y - Default " "
+1 SET X=$GET(X)
if X=""
QUIT X
SET Y=$GET(Y)
if '$LENGTH(Y)
SET Y=" "
FOR
if $EXTRACT(X,1)'=Y
QUIT
SET X=$EXTRACT(X,2,$LENGTH(X))
+2 FOR
if $EXTRACT(X,$LENGTH(X))'=Y
QUIT
SET X=$EXTRACT(X,1,($LENGTH(X)-1))
+3 QUIT X
APIS ; List of APIs
+1 ;;LOOK;;LEXA;;"(LEXX,LEXAP,LEXLL,LEXSUB,DATE)";;2950;;1;;;;LOOK;;LEXA;;"(X,AP,LEN,SUB,CDT,SRC,CAT)";;Main Lexicon Lookup
+2 ;;;;LEXA1;;;;10006;;1;;;;EN;;LEXA1;;;;Lexicon Special Lookup
+3 ;;$$ICDSRCH;;LEX10CS;;"(TEXT,.ARRAY,DATE,LEN,FILTER)";;5681;;2;;$$;;ICDSRCH;;LEX10CS;;"(X,ARRAY,CDT,LEN,FIL)";;ICD-9/ICD-10 Diagnosis Lookup
+4 ;;$$DIAGSRCH;;LEX10CS;;"(TEXT,.ARRAY,DATE,LEN,FILTER)";;5681;;2;;$$;;DIAGSRCH;;LEX10CS;;"(X,ARRAY,CDT,LEN,FIL)";;ICD-10 Diagnosis Lookup
+5 ;;$$PCSDIG;;LEX10CS;;"(FRAG,DATE)";;5681;;2;;$$;;PCSDIG;;LEX10CS;;"(X,CDT)";;ICD-10 Procedure Lookup
+6 ;;$$CODELIST;;LEX10CS;;"(SYS,SPEC,SUB,DATE,LEN,FMT)";;5681;;2;;$$;;CODELIST;;LEX10CS2;;"(X,SPEC,SUB,CDT,LEN,FIL)";;Wild Card Code Lookup
+7 ;;CONFIG;;LEXSET;;"(LEXNS,LEXSS,DATE)";;1609;;1;;;;CONFIG;;LEXSET;;"(NS,SS,CDT)";;Setup Search Parameters
+8 ;;STATCHK;;LEXSRC2;;"(CODE,DATE,.ARY,SAB)";;4083;;2;;$$;;STATCHK;;LEXSRC2;;"(CODE,DATE,.ARY,SAB)";;Status of a Code
+9 ;;$$SC;;LEXU;;"(Y,STRING,DATE)";;5386;;1;;$$;;SC;;LEXU6;;"(IEN,SEM,CDT)";;Filter Search by Semantics
+10 ;;$$SO;;LEXU;;"(Y,STRING,DATE)";;5386;;1;;$$;;SO;;LEXU6;;"(IEN,SRC,CDT)";;Filter Search by Coding System
+11 ;;$$SCT;;LEXU;;"(Y,DATE)";;5679;;1;;$$;;SCT;;LEXU;;"(IEN,CDT)";;Filter by SNOMED CT (Human)
+12 ;;$$DX;;LEXU;;"(IEN,VDT)";;5679;;3;;$$;;DX;;LEXU;;"(IEN,CDT)";;Filter by Diagnosis System
+13 ;;$$ONE;;LEXU;;"(IEN,DATE,SAB)";;5679;;2;;$$;;ONE;;LEXU;;"(IEN,CDT,SAB)";;One Code for Source
+14 ;;$$PRF;;LEXU;;"(IEN,DATE,SAB)";;6265;;2;;$$;;PRF;;LEXU3;;"(IEN,CDT,SAB)";;One Code for Preferred Term
+15 ;;$$ALL;;LEXU;;"(IEN,DATE,SAB)";;5679;;3;;$$;;ALL;;LEXU;;"(IEN,CDT,SAB)";;Get all Codes for a Source
+16 ;;$$CPTONE;;LEXU;;"(IEN,DATE)";;1573;;1;;$$;;CPTONE;;LEXU;;"(IEN,CDT)";;Get CPT Code
+17 ;;$$CPCONE;;LEXU;;"(IEN,DATE)";;1573;;3;;$$;;CPCONE;;LEXU;;"(IEN,CDT)";;Get HCPCS Code
+18 ;;$$ICDONE;;LEXU;;"(IEN,DATE)";;1573;;1;;$$;;ICDONE;;LEXU;;"(IEN,CDT)";;Get one ICD-9-CM Code
+19 ;;$$ICD;;LEXU;;"(IEN,DATE)";;1573;;3;;$$;;ICD;;LEXU;;"(IEN,CDT)";;Get all ICD-9-CM Codes
+20 ;;$$D10ONE;;LEXU;;"(IEN,DATE)";;5679;;3;;$$;;D10ONE;;LEXU;;"(IEN,CDT)";;Get one ICD-10-CM
+21 ;;$$D10;;LEXU;;"(IEN,DATE)";;5679;;3;;$$;;D10;;LEXU;;"(IEN,CDT)";;Get all ICD-10-CM Codes
+22 ;;$$P10ONE;;LEXU;;"(IEN,DATE)";;5679;;3;;$$;;P10ONE;;LEXU;;"(IEN,CDT)";;Get one ICD-10-PCS Code
+23 ;;$$DSMONE;;LEXU;;(IEN);;1573;;3;;$$;;DSMONE;;LEXU;;"(IEN,CDT)";;Get one DSM-IV Code
+24 ;;INFO;;LEXA;;"(IEN,DATE)";;1597;;3;;;;INFO;;LEXA;;"(X,CDT)";;Get Information about a Term
+25 ;;EN;;LEXCODE;;"(LEXSO,DATE)";;1614;;3;;;;EN;;LEXCODE;;"(SO,CDT)";;Get Terms associated with Code
+26 ;;$$HIST;;LEXU;;"(CODE,SYS,.ARY)";;5679;;2;;$$;;HIST;;LEXU4;;"(CODE,SYS,.ARY)";;Get Activation History
+27 ;;$$PERIOD;;LEXU;;"(CODE,SYS,ARY)";;5679;;2;;$$;;PERIOD;;LEXU4;;"(CODE,SYS,.ARY)";;Get Activation Periods
+28 ;;$$TAX;;LEX10CS;;"(TEXT,SRC,CDT,SUB,VER)";;5681;;2;;$$;;TAX;;LEX10TAX;;"(X,SRC,CDT,SUB,VER)";;Get Taxonomies
+29 ;;$$CSDATA;;LEXU;;"(CODE,CSYS,VDT,.ARY)";;5679;;2;;$$;;CSDATA;;LEXU2;;"(CODE,CSYS,CDT,ARY)";;Get Code Data
+30 ;;$$EXP;;LEXCODE;;"(CODE,SAB,DATE)";;5680;;3;;$$;;EXP;;LEXCODE;;"(SO,SAB,CDT)";;Get the Term for a Code
+31 ;;$$CAT;;LEXU;;(CODE);;5679;;2;;$$;;CAT;;LEX10DU;;(CODE);;Get ICD-10 Category
+32 ;;$$ISCAT;;LEXU;;(CODE);;5679;;2;;$$;;ISCAT;;LEX10DU;;(CODE);;Is an ICD-10 Code a Category
+33 ;;$$FREQ;;LEXU;;(TEXT);;5679;;2;;$$;;FREQ;;LEXU3;;(TEXT);;Get Frequency of Text
+34 ;;$$MAX;;LEXU;;(SYS);;5679;;2;;$$;;MAX;;LEXU3;;(SYS);;Maximum Number to Search
+35 ;;$$NXSAB;;LEXU;;"(SAB,REV)";;5679;;3;;$$;;NXSAB;;LEXU3;;"(SYS,REV)";;Get Next Source Abbrievation
+36 ;;$$PFI;;LEXU;;"(FRAG,CDT,.ARY)";;5679;;3;;$$;;PFI;;LEXU4;;"(FRAG,CDT,.ARY)";;Get Procedure Fragment Info
+37 ;;$$CSYS;;LEXU;;"(SYS)";;5679;;2;;$$;;CSYS;;LEXU5;;(SYS);;Get Coding System Info
+38 ;;$$IMPDATE;;LEXU;;(SAB);;5679;;2;;$$;;IMPDATE;;LEXU5;;(SYS);;Get System Implementation Date
+39 ;;$$LUPD;;LEXU;;"(SAB,DATE)";;5679;;3;;$$;;LUPD;;LEXU3;;"(SYS,CDT)";;Get System Last Updated
+40 ;;$$RUPD;;LEXU;;(SAB);;5679;;3;;$$;;RUPD;;LEXU3;;(SYS);;Get System Recent Update
+41 ;;$$EXP;;LEXU;;(IEN);;6265;;3;;$$;;EXP;;LEXU3;;(IEN);;Get Expression
+42 ;;$$EXPS;;LEXU;;(IEN,CDT,ARY);;6265;;3;;$$;;EXPS;;LEXU3;;(IEN,CDT,ARY);;Get Expression/Codes for IEN
+43 ;;$$PREF;;LEXU;;"(CODE,SAB,CDT)";;6265;;3;;$$;;PREF;;LEXU3;;"(CODE,SAB,CDT)";;Get the Term for a Code
+44 ;;$$IENS;;LEXU;;(CODE,ARY,CDT);;6265;;3;;$$;;IENS;;LEXU7;;(CODE,ARY,CDT);;Get IENS for a Code
+45 ;;$$SOS;;LEXU;;(CODE,ARY,CDT);;6265;;3;;$$;;SOS;;LEXU6;;(CODE,ARY,CDT);;Get Codes for an Expression
+46 ;;$$EXM;;LEXU;;(TEXT,ARY,DF,MC);;6265;;3;;$$;;EXM;;LEXU6;;(TEXT,ARY,DF,MC);;Get Exact Match Expressions
+47 ;;SUBSETS;;LEXU;;(CODE,SRC,ARY);;6265;;3;;$$;;SUBSETS;;LEXU5;;(CODE,SRC,ARY);;Get Subsets for a Code
+48 ;;CODE;;LEXU;;(CODE,SRC,CDT,.ARY,OUT);;6265;;3;;;;CODE;;LEXINF2;;(CODE,SRC,CDT,.ARY,OUT);;Get Information about a Code
+49 ;;TERM;;LEXU;;(IEN,CDT,.ARY,OUT);;6265;;3;;;;TERM;;LEXINF3;;(IEN,CDT,.ARY,OUT);;Get Information about a Term
+50 ;;$$CODE;;LEXTRAN;;"(CODE,SOURCE,DATE,ARRAY)";;4912;;3;;$$;;CODE;;LEXTRAN;;"(CODE,SRC,CDT,ARRAY)";;Get Concept for Code/Source
+51 ;;$$TEXT;;LEXTRAN;;"(TEXT,DATE,SUBSET,SOURCE,ARRAY)";;4913;;3;;$$;;TEXT;;LEXTRAN;;"(TEXT,CDT,SUB,SRC,ARRAY)";;Get Concept for Text/Source
+52 ;;$$TXT4CS;;LEXTRAN;;"(TEXT,SOURCE)";;4914;;3;;$$;;TXT4CS;;LEXTRAN;;"(TEXT,SRC,ARRAY,SUB)";;Is Text valid for an SCT code
+53 ;;$$VERSION;;LEXTRAN;;"(LEXSRC,LEXCODE,CDT)";;5011;;3;;$$;;VERSION;;LEXTRAN;;"(SRC,CODE,VDT)";;Get a Code's Version
+54 ;;$$GETASSN;;LEXTRAN1;;"(LEXCODE,LEXMAP,CDT,LEXRAY)";;5010;;3;;$$;;GETASSN;;LEXTRAN1;;"(CODE,MAP,CDT,ARRAY)";;Get Mapped Associations
+55 ;;$$GETFSN;;LEXTRAN1;;"(LEXSRC,LEXCODE,CDT)";;5007;;3;;$$;;GETFSN;;LEXTRAN1;;"(SRC,CODE,CDT)";;Get Fully Specified Name
+56 ;;$$GETPREF;;LEXTRAN1;;"(LEXSRC,LEXCODE,CDT)";;5008;;3;;$$;;GETPREF;;LEXTRAN1;;"(SRC,CODE,CDT)";;Get Preferred Term
+57 ;;$$GETSYN;;LEXTRAN1;;"(LEXSRC,LEXCODE,CDT,LEXRAY,LEXIENS)";;5006;;3;;$$;;GETSYN;;LEXTRAN1;;"(SRC,CODE,CDT,ARARY,IENS)";;Get Concept Synonyms
+58 ;;$$GETDES;;LEXTRAN1;;"(LEXSRC,LEXTEXT,CDT)";;5009;;3;;$$;;GETDES;;LEXTRAN1;;"(SRC,TEXT,CDT)";;Get Designation Code
+59 ;;$$GETDID;;LEXTRAN1;;"(LEXSRC,LEXIEN)";;6472;;3;;$$;;GETDID;;LEXTRAN1;;"(SRC,IEN)";;Get Designation ID
+60 ;;$$MIX;;LEXXMC;;(TEXT);;6266;;3;;$$;;MIX;;LEXXMC;;(TEXT);;Convert to Mixed Case
+61 ;;EN;;LEX10CX;;;;5840;;4;;;;EN;;LEX10CX;;;;Get Suggested Code
+62 ;;EN2;;LEX10CX;;"(CODE,SAB)";;5840;;4;;;;EN2;;LEX10CX;;"(CODE,SYS)";;Get Suggested Code/Source
+63 ;;EN3;;LEX10CX;;"(CODE,SAB,.ARY,MAX)";;5840;;4;;;;EN3;;LEX10CX;;"(CODE,SYS,.ARY,MAX)";;Get Suggested Code (silent)
+64 ;;$$PAR;;LEXU;;"(TXT,.ARY)";;5679;;3;;$$;;PAR;;LEXU3;;"(TEXT,.ARY)";;Get Words from Text String
+65 ;;PR;;LEXU;;"(.ARY,LEN)";;;;1;;$$;;PR;;LEXU5;;"(.ARY,LEN)";;Wrap Text to Specified Length
+66 ;;INC;;LEXA;;"(X)";;Pending;;1;;;;INC;;LEXAR8;;"(X)";;Increment Concept Usage
+67 ;;;;;;