LEXQIDA ;ISL/KER - Query - ICD Diagnosis - Ask ;10/10/2017
;;2.0;LEXICON UTILITY;**62,80,103,114**;Sep 23, 1996;Build 1
;
; Global Variables
; None
;
; External References
; ^DIC ICR 10006
; ^DIR ICR 10026
; $$CODEC^ICDEX ICR 5747
; $$ICDDX^ICDEX ICR 5747
; $$NCC^ICDEX ICR 5747
; $$NOT^ICDEX ICR 5747
; $$REQ^ICDEX ICR 5747
; $$ROOT^ICDEX ICR 5747
; $$SYS^ICDEX ICR 5747
; $$DT^XLFDT ICR 10103
; $$FMTE^XLFDT ICR 10103
; $$UP^XLFSTR ICR 10104
;
; Local Variables NEWed or KILLed in LEXQID
; LEXCDT Code Set Date
; LEXEXIT Exit Flag
;
ICD(X) ; ICD DX Code
Q:+($G(LEXEXIT))>0 "^^" N DIC,DICB,DTOUT,DUOUT,LEXDX,LEXSO,LEXVDT,LEXDTXT,LEXVTXT,Y,ICDVDT,ICDSYS,ICDFMT
S DICB=$G(X),ICDFMT=2 S:$P($G(LEXCDT),"^",2)?7N (LEXVDT,ICDVDT)=$P($G(LEXCDT),"^",2)
S:'$L($G(LEXVDT))&($P($G(LEXCDT),"^",1)?7N) (LEXVDT,ICDVDT)=$P($G(LEXCDT),"^",1)
S DIC(0)="AEQMZ",DIC=$$ROOT^ICDEX(80) S:$D(LEXQUIET) DIC(0)="MZ" I $L(DIC) D
. N ICDVDT,VDT S VDT=$$LUPD^LEXU("10D") S:VDT?7N VDT=$$FMADD^XLFDT(VDT,740) S:VDT?7N ICDVDT=VDT
. S DIC("A")=" Select an ICD Diagnosis code: " S:$L($G(DICB)) (X,DIC("B"))=$G(DICB) W ! D ^DIC
N LEXQUIET S:$G(X)["^^"!($D(DTOUT)) LEXEXIT=1 Q:$G(X)["^^"!(+($G(LEXEXIT))>0) "^^"
Q:$G(X)="^" "^" Q:$G(X)["^^" "^^" Q:$D(DTOUT)!($D(DUOUT)) "^" S LEXSO=$P($G(Y),"^",2) S X="" I +Y>0,$L(LEXSO) D
. N LEXSYS S LEXSYS=$$SYS^ICDEX(LEXSO) S:+LEXSYS'>0 LEXSYS="" S LEXVDT=$G(LEXCDT) S:LEXVDT'?7N LEXVDT=$$DT^XLFDT
. S X=Y,LEXDTXT=$P($G(Y(0)),"^",2),LEXDX=$$ICDDX^ICDEX(LEXSO,LEXVDT,LEXSYS,"E")
. S:$L($G(LEXDTXT)) LEXDTXT=LEXDTXT_" (Text not Versioned)" S LEXVTXT=$P(LEXDX,"^",4) S:'$L(LEXVTXT) LEXVTXT=LEXDTXT
. S X=+Y_"^"_LEXSO S:$L(LEXVTXT) X=X_"^"_LEXVTXT
S X=$$UP^XLFSTR(X) Q:'$L(X) "^"
Q X
;
NOT(X) ; Include ICD Codes not to use with ***.**
Q:+($G(LEXEXIT))>0 "^^" N DIR,DIRUT,DIROUT,DTOUT,DUOUT,Y,DIRB,LEXIEN,LEXLSO,LEXCT,LEXCTE,LEXI S LEXIEN=+($G(X))
S LEXCT=$$NOT^ICDEX(+LEXIEN,,0) Q:LEXCT'>0 0 S LEXLSO=$$CODEC^ICDEX(80,+LEXIEN)
S LEXCTE=$S(LEXCT=1:"one",LEXCT=2:"two",LEXCT=3:"three",LEXCT=4:"four",LEXCT=5:"five",LEXCT=6:"six",LEXCT=7:"seven",LEXCT=8:"eight",LEXCT=9:"nine",1:LEXCT)
S DIRB=$$RET^LEXQD("LEXQIDA","NOT",+($G(DUZ)),"Include ICD Codes not to use with") S:'$L(DIRB) DIRB="No"
S DIR(0)="YAO" S:LEXCT=1 DIR("A")=" Include the single ICD Code that can not be used with "_LEXLSO_"? (Y/N) "
S:LEXCT>1 DIR("A")=" Include the "_LEXCTE_" ICD Codes that can not be used with "_LEXLSO_"? (Y/N) "
S:"^YES^NO^Yes^No^"[("^"_DIRB_"^") DIR("B")=DIRB
S DIR("PRE")="S:X[""?"" X=""??""" S (DIR("?"),DIR("??"))="^D NOTH^LEXQIDA"
W ! D ^DIR S:X["^^"!($D(DTOUT)) LEXEXIT=1 Q:X["^^"!(+($G(LEXEXIT))>0) "^^" Q:$D(DIRUT)!($D(DIROUT))!($D(DTOUT))!($D(DUOUT)) "^" S DIRB=$S(Y=1:"Yes",Y=0:"No",X["^":"",1:"")
D:$L(DIRB) SAV^LEXQD("LEXQIDA","NOT",+($G(DUZ)),"Include ICD Codes not to use with",$G(DIRB)) S X=+Y
Q X
NOTH ; Include NOT Help
W:'$L($G(LEXLSO)) !,?5,"Answer 'Yes' to include in the display all ICD Code(s) that can",!,?5,"not be used with the selected ICD code. Answer 'No' to exclude",!,?5,"codes that can not not be used with the selected ICD code."
W:$L($G(LEXLSO)) !,?5,"Answer 'Yes' to include all ICD Code(s) that can not be used with",!,?5,"ICD Code "_$G(LEXLSO)_". Answer 'No' to exclude codes that can not be",!,?5,"used with ICD code "_$G(LEXLSO)_"."
Q
;
REQ(X) ; Include ICD Codes required with ***.**
Q:+($G(LEXEXIT))>0 "^^" N DIR,DIRUT,DIROUT,DTOUT,DUOUT,Y,DIRB,LEXIEN,LEXLSO,LEXCT,LEXCTE,LEXI S LEXIEN=+($G(X))
S LEXCT=$$REQ^ICDEX(+LEXIEN,,0) Q:LEXCT'>0 0 S LEXLSO=$$CODEC^ICDEX(80,+LEXIEN)
S LEXCTE=$S(LEXCT=1:"one",LEXCT=2:"two",LEXCT=3:"three",LEXCT=4:"four",LEXCT=5:"five",LEXCT=6:"six",LEXCT=7:"seven",LEXCT=8:"eight",LEXCT=9:"nine",1:LEXCT)
S DIRB=$$RET^LEXQD("LEXQIDA","REQ",+($G(DUZ)),"Include ICD Required with") S:'$L(DIRB) DIRB="No"
S DIR(0)="YAO" S:LEXCT=1 DIR("A")=" Include the one ICD Code that is required with "_LEXLSO_"? (Y/N) "
S:LEXCT>1 DIR("A")=" Include the "_LEXCTE_" ICD Codes that are required with "_LEXLSO_"? (Y/N) "
S:"^YES^NO^Yes^No^"[("^"_DIRB_"^") DIR("B")=DIRB
S DIR("PRE")="S:X[""?"" X=""??""" S (DIR("?"),DIR("??"))="^D REQH^LEXQIDA"
W ! D ^DIR S:X["^^"!($D(DTOUT)) LEXEXIT=1 Q:X["^^"!(+($G(LEXEXIT))>0) "^^" Q:$D(DIRUT)!($D(DIROUT))!($D(DTOUT))!($D(DUOUT)) "^" S DIRB=$S(Y=1:"Yes",Y=0:"No",X["^":"",1:"")
D:$L(DIRB) SAV^LEXQD("LEXQIDA","REQ",+($G(DUZ)),"Include ICD Required with",$G(DIRB)) S X=+Y
Q X
REQH ; Include REQ Help
W:'$L($G(LEXLSO)) !,?5,"Answer 'Yes' to include in the display all ICD Code(s) that are",!,?5,"required with the selected ICD code. Answer 'No' to exclude",!,?5,"codes that are required with the selected ICD code."
W:$L($G(LEXLSO)) !,?5,"Answer 'Yes' to include all ICD Code(s) that are required with",!,?5,"ICD Code "_$G(LEXLSO)_". Answer 'No' to exclude codes that are requried",!,?5,"with ICD code "_$G(LEXLSO)_"."
Q
Q
;
NCC(X) ; Include the codes that ***.** is not CC with
Q:+($G(LEXEXIT))>0 "^^" N DIR,DIRUT,DIROUT,DTOUT,DUOUT,Y,DIRB,LEXIEN,LEXLSO,LEXCT,LEXCTE,LEXI,LEXNCC S LEXIEN=+($G(X))
S LEXCT=$$NCC^ICDEX(+LEXIEN,,0) Q:LEXCT'>0 0 S LEXLSO=$$CODEC^ICDEX(80,+LEXIEN)
S LEXCTE=$S(LEXCT=1:"one",LEXCT=2:"two",LEXCT=3:"three",LEXCT=4:"four",LEXCT=5:"five",LEXCT=6:"six",LEXCT=7:"seven",LEXCT=8:"eight",LEXCT=9:"nine",1:LEXCT)
S DIRB=$$RET^LEXQD("LEXQIDA","NCC",+($G(DUZ)),"Include Codes not CC with") S:'$L(DIRB) DIRB="No"
S DIR(0)="YAO" S:LEXCT=1 DIR("A")=" Include the one ICD Code that "_LEXLSO_" is not CC with? (Y/N) "
S:LEXCT>1 DIR("A")=" Include the "_LEXCTE_" ICD Codes that "_LEXLSO_" are not CC with? (Y/N) "
S:"^YES^NO^Yes^No^"[("^"_DIRB_"^") DIR("B")=DIRB
S DIR("PRE")="S:X[""?"" X=""??""" S (DIR("?"),DIR("??"))="^D NCCH^LEXQIDA"
W ! D ^DIR S:X["^^"!($D(DTOUT)) LEXEXIT=1 Q:X["^^"!(+($G(LEXEXIT))>0) "^^" Q:$D(DIRUT)!($D(DIROUT))!($D(DTOUT))!($D(DUOUT)) "^" S DIRB=$S(Y=1:"Yes",Y=0:"No",X["^":"",1:"")
D:$L(DIRB) SAV^LEXQD("LEXQIDA","NCC",+($G(DUZ)),"Include Codes not CC with",$G(DIRB)) S X=+Y
Q X
NCCH ; Include NCC Help
I $L($G(LEXLSO)),$L($G(LEXCT)) D
. W !,?5,"Code ",LEXLSO," is not considered as Complication/Comorbidity (CC)"
. W !,?5,"with ",$S(+($G(LEXCT))>1:"some codes.",1:"one code.")," Answer 'Yes' to include "
. I +($G(LEXCT))>1 W "these codes. Answer",!,?5,"'No' to exclude these codes."
. I +($G(LEXCT))'>1 W "this code. Answer 'No'",!,?5,"to exclude this code."
. Q
. W $S(+($G(LEXCT))>1:"these codes. Answer 'No'",1:"this code. Answer 'No'")
. W $S(+($G(LEXCT))>1:"these codes. Answer 'No'",1:"this code. Answer 'No'")
I $L($G(LEXLSO)),'$L($G(LEXCT)) D
. W !,?5,"Code "_LEXLSO_" is not considered as Complication/Comorbidity (CC)"
. W !,?5,"with some codes. Answer 'Yes' to include these codes. Answer",!,?5,"'No' to exclude these codes."
I '$L($G(LEXLSO)),'$L($G(LEXCT)) D
. W !,?5,"This code is not considered as Complication/Comorbidity (CC)"
. W !,?5,"with some codes. Answer 'Yes' to include these codes. Answer ",!,?5,"'No' to exclude these codes."
Q
;
SD(X) ; Short Date
Q $TR($$FMTE^XLFDT(+($G(X)),"5DZ"),"@"," ")
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HLEXQIDA 7479 printed Dec 13, 2024@02:08:50 Page 2
LEXQIDA ;ISL/KER - Query - ICD Diagnosis - Ask ;10/10/2017
+1 ;;2.0;LEXICON UTILITY;**62,80,103,114**;Sep 23, 1996;Build 1
+2 ;
+3 ; Global Variables
+4 ; None
+5 ;
+6 ; External References
+7 ; ^DIC ICR 10006
+8 ; ^DIR ICR 10026
+9 ; $$CODEC^ICDEX ICR 5747
+10 ; $$ICDDX^ICDEX ICR 5747
+11 ; $$NCC^ICDEX ICR 5747
+12 ; $$NOT^ICDEX ICR 5747
+13 ; $$REQ^ICDEX ICR 5747
+14 ; $$ROOT^ICDEX ICR 5747
+15 ; $$SYS^ICDEX ICR 5747
+16 ; $$DT^XLFDT ICR 10103
+17 ; $$FMTE^XLFDT ICR 10103
+18 ; $$UP^XLFSTR ICR 10104
+19 ;
+20 ; Local Variables NEWed or KILLed in LEXQID
+21 ; LEXCDT Code Set Date
+22 ; LEXEXIT Exit Flag
+23 ;
ICD(X) ; ICD DX Code
+1 if +($GET(LEXEXIT))>0
QUIT "^^"
NEW DIC,DICB,DTOUT,DUOUT,LEXDX,LEXSO,LEXVDT,LEXDTXT,LEXVTXT,Y,ICDVDT,ICDSYS,ICDFMT
+2 SET DICB=$GET(X)
SET ICDFMT=2
if $PIECE($GET(LEXCDT),"^",2)?7N
SET (LEXVDT,ICDVDT)=$PIECE($GET(LEXCDT),"^",2)
+3 if '$LENGTH($GET(LEXVDT))&($PIECE($GET(LEXCDT),"^",1)?7N)
SET (LEXVDT,ICDVDT)=$PIECE($GET(LEXCDT),"^",1)
+4 SET DIC(0)="AEQMZ"
SET DIC=$$ROOT^ICDEX(80)
if $DATA(LEXQUIET)
SET DIC(0)="MZ"
IF $LENGTH(DIC)
Begin DoDot:1
+5 NEW ICDVDT,VDT
SET VDT=$$LUPD^LEXU("10D")
if VDT?7N
SET VDT=$$FMADD^XLFDT(VDT,740)
if VDT?7N
SET ICDVDT=VDT
+6 SET DIC("A")=" Select an ICD Diagnosis code: "
if $LENGTH($GET(DICB))
SET (X,DIC("B"))=$GET(DICB)
WRITE !
DO ^DIC
End DoDot:1
+7 NEW LEXQUIET
if $GET(X)["^^"!($DATA(DTOUT))
SET LEXEXIT=1
if $GET(X)["^^"!(+($GET(LEXEXIT))>0)
QUIT "^^"
+8 if $GET(X)="^"
QUIT "^"
if $GET(X)["^^"
QUIT "^^"
if $DATA(DTOUT)!($DATA(DUOUT))
QUIT "^"
SET LEXSO=$PIECE($GET(Y),"^",2)
SET X=""
IF +Y>0
IF $LENGTH(LEXSO)
Begin DoDot:1
+9 NEW LEXSYS
SET LEXSYS=$$SYS^ICDEX(LEXSO)
if +LEXSYS'>0
SET LEXSYS=""
SET LEXVDT=$GET(LEXCDT)
if LEXVDT'?7N
SET LEXVDT=$$DT^XLFDT
+10 SET X=Y
SET LEXDTXT=$PIECE($GET(Y(0)),"^",2)
SET LEXDX=$$ICDDX^ICDEX(LEXSO,LEXVDT,LEXSYS,"E")
+11 if $LENGTH($GET(LEXDTXT))
SET LEXDTXT=LEXDTXT_" (Text not Versioned)"
SET LEXVTXT=$PIECE(LEXDX,"^",4)
if '$LENGTH(LEXVTXT)
SET LEXVTXT=LEXDTXT
+12 SET X=+Y_"^"_LEXSO
if $LENGTH(LEXVTXT)
SET X=X_"^"_LEXVTXT
End DoDot:1
+13 SET X=$$UP^XLFSTR(X)
if '$LENGTH(X)
QUIT "^"
+14 QUIT X
+15 ;
NOT(X) ; Include ICD Codes not to use with ***.**
+1 if +($GET(LEXEXIT))>0
QUIT "^^"
NEW DIR,DIRUT,DIROUT,DTOUT,DUOUT,Y,DIRB,LEXIEN,LEXLSO,LEXCT,LEXCTE,LEXI
SET LEXIEN=+($GET(X))
+2 SET LEXCT=$$NOT^ICDEX(+LEXIEN,,0)
if LEXCT'>0
QUIT 0
SET LEXLSO=$$CODEC^ICDEX(80,+LEXIEN)
+3 SET LEXCTE=$SELECT(LEXCT=1:"one",LEXCT=2:"two",LEXCT=3:"three",LEXCT=4:"four",LEXCT=5:"five",LEXCT=6:"six",LEXCT=7:"seven",LEXCT=8:"eight",LEXCT=9:"nine",1:LEXCT)
+4 SET DIRB=$$RET^LEXQD("LEXQIDA","NOT",+($GET(DUZ)),"Include ICD Codes not to use with")
if '$LENGTH(DIRB)
SET DIRB="No"
+5 SET DIR(0)="YAO"
if LEXCT=1
SET DIR("A")=" Include the single ICD Code that can not be used with "_LEXLSO_"? (Y/N) "
+6 if LEXCT>1
SET DIR("A")=" Include the "_LEXCTE_" ICD Codes that can not be used with "_LEXLSO_"? (Y/N) "
+7 if "^YES^NO^Yes^No^"[("^"_DIRB_"^")
SET DIR("B")=DIRB
+8 SET DIR("PRE")="S:X[""?"" X=""??"""
SET (DIR("?"),DIR("??"))="^D NOTH^LEXQIDA"
+9 WRITE !
DO ^DIR
if X["^^"!($DATA(DTOUT))
SET LEXEXIT=1
if X["^^"!(+($GET(LEXEXIT))>0)
QUIT "^^"
if $DATA(DIRUT)!($DATA(DIROUT))!($DATA(DTOUT))!($DATA(DUOUT))
QUIT "^"
SET DIRB=$SELECT(Y=1:"Yes",Y=0:"No",X["^":"",1:"")
+10 if $LENGTH(DIRB)
DO SAV^LEXQD("LEXQIDA","NOT",+($GET(DUZ)),"Include ICD Codes not to use with",$GET(DIRB))
SET X=+Y
+11 QUIT X
NOTH ; Include NOT Help
+1 if '$LENGTH($GET(LEXLSO))
WRITE !,?5,"Answer 'Yes' to include in the display all ICD Code(s) that can",!,?5,"not be used with the selected ICD code. Answer 'No' to exclude",!,?5,"codes that can not not be used with the selected ICD code."
+2 if $LENGTH($GET(LEXLSO))
WRITE !,?5,"Answer 'Yes' to include all ICD Code(s) that can not be used with",!,?5,"ICD Code "_$GET(LEXLSO)_". Answer 'No' to exclude codes that can not be",!,?5,"used with ICD code "_$GET(LEXLSO)_"."
+3 QUIT
+4 ;
REQ(X) ; Include ICD Codes required with ***.**
+1 if +($GET(LEXEXIT))>0
QUIT "^^"
NEW DIR,DIRUT,DIROUT,DTOUT,DUOUT,Y,DIRB,LEXIEN,LEXLSO,LEXCT,LEXCTE,LEXI
SET LEXIEN=+($GET(X))
+2 SET LEXCT=$$REQ^ICDEX(+LEXIEN,,0)
if LEXCT'>0
QUIT 0
SET LEXLSO=$$CODEC^ICDEX(80,+LEXIEN)
+3 SET LEXCTE=$SELECT(LEXCT=1:"one",LEXCT=2:"two",LEXCT=3:"three",LEXCT=4:"four",LEXCT=5:"five",LEXCT=6:"six",LEXCT=7:"seven",LEXCT=8:"eight",LEXCT=9:"nine",1:LEXCT)
+4 SET DIRB=$$RET^LEXQD("LEXQIDA","REQ",+($GET(DUZ)),"Include ICD Required with")
if '$LENGTH(DIRB)
SET DIRB="No"
+5 SET DIR(0)="YAO"
if LEXCT=1
SET DIR("A")=" Include the one ICD Code that is required with "_LEXLSO_"? (Y/N) "
+6 if LEXCT>1
SET DIR("A")=" Include the "_LEXCTE_" ICD Codes that are required with "_LEXLSO_"? (Y/N) "
+7 if "^YES^NO^Yes^No^"[("^"_DIRB_"^")
SET DIR("B")=DIRB
+8 SET DIR("PRE")="S:X[""?"" X=""??"""
SET (DIR("?"),DIR("??"))="^D REQH^LEXQIDA"
+9 WRITE !
DO ^DIR
if X["^^"!($DATA(DTOUT))
SET LEXEXIT=1
if X["^^"!(+($GET(LEXEXIT))>0)
QUIT "^^"
if $DATA(DIRUT)!($DATA(DIROUT))!($DATA(DTOUT))!($DATA(DUOUT))
QUIT "^"
SET DIRB=$SELECT(Y=1:"Yes",Y=0:"No",X["^":"",1:"")
+10 if $LENGTH(DIRB)
DO SAV^LEXQD("LEXQIDA","REQ",+($GET(DUZ)),"Include ICD Required with",$GET(DIRB))
SET X=+Y
+11 QUIT X
REQH ; Include REQ Help
+1 if '$LENGTH($GET(LEXLSO))
WRITE !,?5,"Answer 'Yes' to include in the display all ICD Code(s) that are",!,?5,"required with the selected ICD code. Answer 'No' to exclude",!,?5,"codes that are required with the selected ICD code."
+2 if $LENGTH($GET(LEXLSO))
WRITE !,?5,"Answer 'Yes' to include all ICD Code(s) that are required with",!,?5,"ICD Code "_$GET(LEXLSO)_". Answer 'No' to exclude codes that are requried",!,?5,"with ICD code "_$GET(LEXLSO)_"."
+3 QUIT
+4 QUIT
+5 ;
NCC(X) ; Include the codes that ***.** is not CC with
+1 if +($GET(LEXEXIT))>0
QUIT "^^"
NEW DIR,DIRUT,DIROUT,DTOUT,DUOUT,Y,DIRB,LEXIEN,LEXLSO,LEXCT,LEXCTE,LEXI,LEXNCC
SET LEXIEN=+($GET(X))
+2 SET LEXCT=$$NCC^ICDEX(+LEXIEN,,0)
if LEXCT'>0
QUIT 0
SET LEXLSO=$$CODEC^ICDEX(80,+LEXIEN)
+3 SET LEXCTE=$SELECT(LEXCT=1:"one",LEXCT=2:"two",LEXCT=3:"three",LEXCT=4:"four",LEXCT=5:"five",LEXCT=6:"six",LEXCT=7:"seven",LEXCT=8:"eight",LEXCT=9:"nine",1:LEXCT)
+4 SET DIRB=$$RET^LEXQD("LEXQIDA","NCC",+($GET(DUZ)),"Include Codes not CC with")
if '$LENGTH(DIRB)
SET DIRB="No"
+5 SET DIR(0)="YAO"
if LEXCT=1
SET DIR("A")=" Include the one ICD Code that "_LEXLSO_" is not CC with? (Y/N) "
+6 if LEXCT>1
SET DIR("A")=" Include the "_LEXCTE_" ICD Codes that "_LEXLSO_" are not CC with? (Y/N) "
+7 if "^YES^NO^Yes^No^"[("^"_DIRB_"^")
SET DIR("B")=DIRB
+8 SET DIR("PRE")="S:X[""?"" X=""??"""
SET (DIR("?"),DIR("??"))="^D NCCH^LEXQIDA"
+9 WRITE !
DO ^DIR
if X["^^"!($DATA(DTOUT))
SET LEXEXIT=1
if X["^^"!(+($GET(LEXEXIT))>0)
QUIT "^^"
if $DATA(DIRUT)!($DATA(DIROUT))!($DATA(DTOUT))!($DATA(DUOUT))
QUIT "^"
SET DIRB=$SELECT(Y=1:"Yes",Y=0:"No",X["^":"",1:"")
+10 if $LENGTH(DIRB)
DO SAV^LEXQD("LEXQIDA","NCC",+($GET(DUZ)),"Include Codes not CC with",$GET(DIRB))
SET X=+Y
+11 QUIT X
NCCH ; Include NCC Help
+1 IF $LENGTH($GET(LEXLSO))
IF $LENGTH($GET(LEXCT))
Begin DoDot:1
+2 WRITE !,?5,"Code ",LEXLSO," is not considered as Complication/Comorbidity (CC)"
+3 WRITE !,?5,"with ",$SELECT(+($GET(LEXCT))>1:"some codes.",1:"one code.")," Answer 'Yes' to include "
+4 IF +($GET(LEXCT))>1
WRITE "these codes. Answer",!,?5,"'No' to exclude these codes."
+5 IF +($GET(LEXCT))'>1
WRITE "this code. Answer 'No'",!,?5,"to exclude this code."
+6 QUIT
+7 WRITE $SELECT(+($GET(LEXCT))>1:"these codes. Answer 'No'",1:"this code. Answer 'No'")
+8 WRITE $SELECT(+($GET(LEXCT))>1:"these codes. Answer 'No'",1:"this code. Answer 'No'")
End DoDot:1
+9 IF $LENGTH($GET(LEXLSO))
IF '$LENGTH($GET(LEXCT))
Begin DoDot:1
+10 WRITE !,?5,"Code "_LEXLSO_" is not considered as Complication/Comorbidity (CC)"
+11 WRITE !,?5,"with some codes. Answer 'Yes' to include these codes. Answer",!,?5,"'No' to exclude these codes."
End DoDot:1
+12 IF '$LENGTH($GET(LEXLSO))
IF '$LENGTH($GET(LEXCT))
Begin DoDot:1
+13 WRITE !,?5,"This code is not considered as Complication/Comorbidity (CC)"
+14 WRITE !,?5,"with some codes. Answer 'Yes' to include these codes. Answer ",!,?5,"'No' to exclude these codes."
End DoDot:1
+15 QUIT
+16 ;
SD(X) ; Short Date
+1 QUIT $TRANSLATE($$FMTE^XLFDT(+($GET(X)),"5DZ"),"@"," ")