BLREXEC3 ;IHS/OIT/MKK - IHS Implementation of the Chronic Kidney Disease Epidemiology Collaboration (CKD-EPI) eGFR equation ; 13-Oct-2017 14:04 ; MKK
;;5.2;IHS LABORATORY;**1038,1041**;NOV 01, 1997;Build 23
;
; Equation and Warning are from the National Kidney Disease web-page (as of 12/21/2015):
; http://nkdep.nih.gov/lab-evaluation/gfr/estimating.shtml
;
EEP ; Ersatz EP
D EEP^BLRGMENU
Q
;
;
CKDEPI(CRET) ; EP - Creatinine value is passed in
Q:+$G(CRET)'>0 "" ; IHS/MSC/MKK - LR*5.2*1041 -- If CRET variable is not > 0, then return null.
;
Q:(AGE<18) "N/A" ; Cannot calculate if AGE < 18.
Q:(SEX="U") "N/A" ; Cannot calculate if SEX is Undetermined/Unknown.
;
S SEXFACTR=$S(SEX="F":1.018,1:1)
;
S:$D(BLRTFLAG)<1 RACE=$$RACE(DFN)
;
S RACEFACT=$S(RACE="B":1.159,1:1)
;
S K=$S(SEX="F":.7,1:.9)
S ALPHA=$S(SEX="F":-.329,1:-.411)
;
S CHKEPI=141*(($$MIN(CRET/K,1))**ALPHA)*(($$MAX(CRET/K,1))**-1.209)*(.993**AGE)*SEXFACTR*RACEFACT
;
Q $FN(CHKEPI,"",2) ; Round Result to 2 decimal places
;
MIN(VALUE,MIN) ; EP
Q $S(VALUE<MIN:VALUE,1:MIN)
;
MAX(VALUE,MAX) ; EP
Q $S(VALUE>MAX:VALUE,1:MAX)
;
RACE(DFN) ; EP - Race of patient: defined as black or non-black
NEW RACEPTR,RACEENT
;
S RACEPTR=$P($G(^DPT(+$G(DFN),0)),U,6)
Q:RACEPTR="" "N" ; If no entry, consider non-black
;
S RACEENT=$P($G(^DIC(10,RACEPTR,0)),U)
Q:RACEENT[("BLACK") "B" ; If RACEENT contains BLACK it implies race = Black
;
Q "N" ; Default is non-black
;
TESTEQUA ; EP - Debug -- Allows user to TEST the equation
NEW (DILOCKTM,DISYS,DT,DTIME,DUZ,IO,IOBS,IOF,IOM,ION,IOS,IOSL,IOST,IOT,IOXY,U,XPARSYS,XQXFLG)
;
S (BLRTFLAG,ONGO)="YES"
S TAB=$J("",5),TAB2=TAB_TAB,TAB3=TAB_TAB_TAB
S HEADER(1)="IHS LAB"
S HEADER(2)="CKD-EPI Equation Testing"
;
F Q:ONGO'="YES" D
. Q:$$GETSEX(.SEX)="Q"
. Q:$$GETAGE(.AGE)="Q"
. Q:$$GETRACE(.RACE,.FULLRACE)="Q"
. Q:$$GETCREAT(.CREATININE)="Q"
. ;
. D HEADERDT^BLRGMENU
. W !!,?9,"For SEX:",SEX,"; AGE:",AGE,"; RACE:",FULLRACE,!
. W ?13,"Creatinine:",CREATININE_" mg/dL"
. W !!,?14,"CKD-EPI Equation's Estimated GFR = ",$$CKDEPI(CREATININE),!!
. ;
. D ^XBFMK
. S DIR(0)="YO"
. S DIR("A")=TAB3_"Again"
. S DIR("B")="NO"
. D ^DIR
. S ONGO=$S(Y=1:"YES",1:"NO")
;
Q
;
GETSEX(SEX) ; EP - Get Sex function
D HEADERDT^BLRGMENU
D ^XBFMK
S DIR(0)="SO^1:F;2:M;3:U"
S DIR("L",1)=TAB_"Select Sex:"
S DIR("L",2)=TAB2_"1: FEMALE"
S DIR("L",3)=TAB2_"2: MALE"
S DIR("L",4)=TAB2_"3: UNKNOWN"
S DIR("L")=""
S DIR("A")=TAB3_"SEX"
D ^DIR
;
I Y<1!(+$G(DIRUT)) D GQMFDIRR S ONGO="NO" Q "Q"
;
I +X S SEX=$S(X=1:"F",X=2:"M",1:"U")
E S SEX=$$UP^XLFSTR($E(X))
Q "OK"
;
GETAGE(AGE) ; EP - Age Function
D HEADERDT^BLRGMENU
D ^XBFMK
W TAB,"Select Age:"
S DIR(0)="NO^18:150"
S DIR("A")=TAB3_"AGE"
D ^DIR
;
I Y<1!(+$G(DIRUT)) D GQMFDIRR S ONGO="NO" Q "Q"
;
S AGE=Y
Q "OK"
;
GETRACE(RACE,FULLRACE) ; EP - Race Function
D HEADERDT^BLRGMENU
D ^XBFMK
W TAB,"Select Race:"
S DIR(0)="PO^10:EMZ"
S DIR("A")=TAB3_"RACE"
D ^DIR
;
I Y<1!(+$G(DIRUT)) D GQMFDIRR S ONGO="NO" Q "Q"
;
S FULLRACE=$P(Y,"^",2)
S RACE=$$UP^XLFSTR($E(FULLRACE))
Q "OK"
;
GETCREAT(CREATININE) ; EP - Creatinine function
D HEADERDT^BLRGMENU
D ^XBFMK
S DIR(0)="NO^::2"
S DIR("A")=TAB3_"Enter Creatinine Value (mg/dL Units)"
D ^DIR
;
I X=""!(+$G(DIRUT)) D GQMFDIRR S ONGO="NO" Q "Q"
;
S CREATININE=+Y
Q "OK"
;
;
NEWDELTA ; EP - Allows users to create new Delta Check utilizing the CKD-EPI function
NEW (DILOCKTM,DISYS,DT,DTIME,DUZ,IO,IOBS,IOF,IOM,ION,IOS,IOSL,IOST,IOT,IOXY,U,XPARSYS,XQXFLG)
;
D SETBLRVS("NEWDELTA")
;
S HEADER(1)="IHS LAB"
S HEADER(2)="CKD-EPI Delta Check Creation"
D HEADERDT^BLRGMENU
;
D ^XBFMK
S DIR(0)="PO^60:EMZ"
S DIR("A")="Test to hold CKD-EPI Results"
D ^DIR
I +$G(DIRUT) D GQMFDIRR Q
;
S F60PTR=+Y
S CKDEPI60=$P(Y,"^",2)
S CKDEPIDN=$$GET1^DIQ(60,F60PTR,"DATA NAME")
I $L(CKDEPIDN)<1 D BADSTUFF("Test "_CKDEPIDN_" has no DataName.") Q
;
D HEADERDT^BLRGMENU
D ^XBFMK
S DIR(0)="PO^60:EMZ"
S DIR("A")="Creatinine Test to use for CKD-EPI calculation"
D ^DIR
I +$G(DIRUT) D GQMFDIRR Q
;
S F60PTR=+Y
S CREAT60=$P(Y,"^",2)
S CREATDN=$$GET1^DIQ(60,F60PTR,"DATA NAME")
I $L(CREATDN)<1 D BADSTUFF("Test "_CREAT60_" has no DataName.") Q
;
D HEADERDT^BLRGMENU
D ^XBFMK
S DIR(0)="FO"
S DIR("A")="Name of the Delta Check"
D ^DIR
I +$G(DIRUT) D GQMFDIRR Q
;
S NAME=$G(X)
;
; Make sure it's not a duplicate Delta Check Name
I +$O(^LAB(62.1,"B",NAME,0)) D BADSTUFF(NAME_" is a duplicate Delta Check Name.") Q
;
S XCODE="S %X="""" X:$D(LRDEL(1)) LRDEL(1) W:$G(%X)'="""" "" CKD-EPI Calculated GFR:"",%X S:LRVRM>10 LRSB($$GETDNAM^BLREXEC2("""_CKDEPIDN_"""))=%X K %,%X,%Y,%Z,%ZZ"
S OVER1STR="S %ZZ=$$GETDNAM^BLREXEC2("""_CREAT60_""") X:LRVRM>10 ""F %=%ZZ S %X(%)=$S(%=LRSB:X,$D(LRSB(%)):+LRSB(%),1:0)"" X:LRVRM>10 ""F %=%ZZ S %X(%)=$S($D(LRSB(%)):LRSB(%),1:0)"""
S OVER1=OVER1STR_" S %X=$$CKDEPI^BLREXEC3(X)"
;
S DESC(1)="This delta check, when added to a test named "
S DESC(2)=" "_$$LJ^XLFSTR(CREAT60,75)
S DESC(3)="will calculate an estimated Glomerular Filtration Rate (GFR)"
S DESC(4)="using the CKD-EPI equation."
S DESC(5)=" "
S DESC(6)="The CKD-EPI Equation's result will be stuffed into the test called"
S DESC(7)=" "_CKDEPI60
S DESC(8)=" "
;
; Warning
S DESC(9)="Creatinine-based estimating equations are not recommended for use with:"
S DESC(10)=" "
S DESC(11)=" Individuals with unstable creatinine concentrations. This includes"
S DESC(12)=" pregnant women; patients with serious co-morbid conditions; and"
S DESC(13)=" hospitalized patients, particularly those with acute renal failure."
S DESC(14)=" Creatinine-based estimating equations should be used only for"
S DESC(15)=" patients with stable creatinine concentrations."
S DESC(16)=" "
S DESC(17)=" Persons with extremes in muscle mass and diet. This includes, but"
S DESC(18)=" is not limited to, individuals who are amputees, paraplegics, body"
S DESC(19)=" builders, or obese; patients who have a muscle-wasting disease or"
S DESC(20)=" a neuromuscular disorder; and those suffering from malnutrition,"
S DESC(21)=" eating a vegetarian or low-meat diet, or taking creatine dietary"
S DESC(22)=" supplements."
;
;
D HEADERDT^BLRGMENU
;
D DLTADICA(NAME,XCODE,OVER1,.DESC)
;
D PRESSKEY^BLRGMENU(9)
Q
;
DLTADICA(NAME,XCODE,OVER1,DESC) ; EP
NEW DICT0,DICT1,FDA,ERRS,PTR
NEW HEREYAGO
;
W !!,"Adding "_NAME_" to Delta Check Dictionary.",!
;
D ^XBFMK
K ERRS,FDA,IENS,DIE
;
S DICT1="62.1"
S FDA(DICT1,"?+1,",.01)=NAME ; Find the Name node, or create it.
S FDA(DICT1,"?+1,",10)=XCODE ; Execute Code
S FDA(DICT1,"?+1,",20)=OVER1 ; Overflow 1
D UPDATE^DIE("S","FDA",,"ERRS")
;
I $D(ERRS("DIERR"))>0 D Q
. D BADSTUFF("Error in adding "_NAME_" to the Delta Check Dictionary.")
;
W !,?5,NAME_" Delta Check added to Delta Check Dictionary.",!
;
; Now, add the Description
K ERRS
S PTR=$$FIND1^DIC(62.1,,,NAME)
M WPARRAY("WP")=DESC
D WP^DIE(62.1,PTR_",",30,"K","WPARRAY(""WP"")","ERRS")
;
I $D(ERRS("DIERR"))>0 D Q
. W !!,"Error in adding DESCRIPTION to "_NAME_" Delta Check in the Delta Check Dictionary."
. D BADSTUFF("")
;
W !,?5,NAME_" Delta Check DESCRIPTION added to Delta Check Dictionary.",!
;
; Now, add the SITE NOTES DATE
K ERRS,FDA
S FDA(62.131,"?+1,"_PTR_",",.01)=$P($$NOW^XLFDT,".",1)
D UPDATE^DIE("S","FDA",,"ERRS")
;
I $D(ERRS("DIERR"))>0 D Q
. W !!,"Error in adding SITES NOTES DATE to "_NAME_" Delta Check in the Delta Check Dictionary."
. D BADSTUFF("")
;
; Now, add the TEXT
K ERRS,WPARRAY
S WPARRAY("WP",1)="Created by "_$$GET1^DIQ(200,DUZ,"NAME")_" DUZ:"_DUZ
D WP^DIE(62.131,"1,"_PTR_",",1,"K","WPARRAY(""WP"")","ERRS")
;
I $D(ERRS("DIERR"))>0 D Q
. W !!,"Error in adding TEXT to "_NAME_" Delta Check in the Delta Check Dictionary."
. D BADSTUFF("")
;
W !,?5,NAME_" Delta Check TEXT added to Delta Check Dictionary."
Q
;
; ============================= UTILITIES =============================
;
JUSTNEW ; EP - Generic RPMS EXCLUSIVE NEW
NEW (DILOCKTM,DISYS,DT,DTIME,DUZ,IO,IOBS,IOF,IOM,ION,IOS,IOSL,IOST,IOT,IOXY,U,XPARSYS,XQXFLG)
;
Q
;
SETBLRVS(TWO) ; EP - Set the BLRVERN variable(s)
K BLRVERN,BLRVERN2
;
S BLRVERN=$P($P($T(+1),";")," ")
S:$L($G(TWO)) BLRVERN2=$G(TWO)
Q
;
GQMFDIRR ; Generic "Quit" message for D ^DIR response
D BADSTUFF("No/Invalid/Quit Entry.")
Q
;
BADSTUFF(MSG,TAB) ; EP - Simple Message
S:+$G(TAB)<1 TAB=4
W !!,?TAB,$$TRIM^XLFSTR(MSG,"LR"," ")," Routine Ends."
D PRESSKEY^BLRGMENU(TAB+5)
Q
BLREXEC3 ;IHS/OIT/MKK - IHS Implementation of the Chronic Kidney Disease Epidemiology Collaboration (CKD-EPI) eGFR equation ; 13-Oct-2017 14:04 ; MKK
+1 ;;5.2;IHS LABORATORY;**1038,1041**;NOV 01, 1997;Build 23
+2 ;
+3 ; Equation and Warning are from the National Kidney Disease web-page (as of 12/21/2015):
+4 ; http://nkdep.nih.gov/lab-evaluation/gfr/estimating.shtml
+5 ;
EEP ; Ersatz EP
+1 DO EEP^BLRGMENU
+2 QUIT
+3 ;
+4 ;
CKDEPI(CRET) ; EP - Creatinine value is passed in
+1 ; IHS/MSC/MKK - LR*5.2*1041 -- If CRET variable is not > 0, then return null.
IF +$GET(CRET)'>0
QUIT ""
+2 ;
+3 ; Cannot calculate if AGE < 18.
IF (AGE<18)
QUIT "N/A"
+4 ; Cannot calculate if SEX is Undetermined/Unknown.
IF (SEX="U")
QUIT "N/A"
+5 ;
+6 SET SEXFACTR=$SELECT(SEX="F":1.018,1:1)
+7 ;
+8 IF $DATA(BLRTFLAG)<1
SET RACE=$$RACE(DFN)
+9 ;
+10 SET RACEFACT=$SELECT(RACE="B":1.159,1:1)
+11 ;
+12 SET K=$SELECT(SEX="F":.7,1:.9)
+13 SET ALPHA=$SELECT(SEX="F":-.329,1:-.411)
+14 ;
+15 SET CHKEPI=141*(($$MIN(CRET/K,1))**ALPHA)*(($$MAX(CRET/K,1))**-1.209)*(.993**AGE)*SEXFACTR*RACEFACT
+16 ;
+17 ; Round Result to 2 decimal places
QUIT $FNUMBER(CHKEPI,"",2)
+18 ;
MIN(VALUE,MIN) ; EP
+1 QUIT $SELECT(VALUE<MIN:VALUE,1:MIN)
+2 ;
MAX(VALUE,MAX) ; EP
+1 QUIT $SELECT(VALUE>MAX:VALUE,1:MAX)
+2 ;
RACE(DFN) ; EP - Race of patient: defined as black or non-black
+1 NEW RACEPTR,RACEENT
+2 ;
+3 SET RACEPTR=$PIECE($GET(^DPT(+$GET(DFN),0)),U,6)
+4 ; If no entry, consider non-black
IF RACEPTR=""
QUIT "N"
+5 ;
+6 SET RACEENT=$PIECE($GET(^DIC(10,RACEPTR,0)),U)
+7 ; If RACEENT contains BLACK it implies race = Black
IF RACEENT[("BLACK")
QUIT "B"
+8 ;
+9 ; Default is non-black
QUIT "N"
+10 ;
TESTEQUA ; EP - Debug -- Allows user to TEST the equation
+1 NEW (DILOCKTM,DISYS,DT,DTIME,DUZ,IO,IOBS,IOF,IOM,ION,IOS,IOSL,IOST,IOT,IOXY,U,XPARSYS,XQXFLG)
+2 ;
+3 SET (BLRTFLAG,ONGO)="YES"
+4 SET TAB=$JUSTIFY("",5)
SET TAB2=TAB_TAB
SET TAB3=TAB_TAB_TAB
+5 SET HEADER(1)="IHS LAB"
+6 SET HEADER(2)="CKD-EPI Equation Testing"
+7 ;
+8 FOR
IF ONGO'="YES"
QUIT
Begin DoDot:1
+9 IF $$GETSEX(.SEX)="Q"
QUIT
+10 IF $$GETAGE(.AGE)="Q"
QUIT
+11 IF $$GETRACE(.RACE,.FULLRACE)="Q"
QUIT
+12 IF $$GETCREAT(.CREATININE)="Q"
QUIT
+13 ;
+14 DO HEADERDT^BLRGMENU
+15 WRITE !!,?9,"For SEX:",SEX,"; AGE:",AGE,"; RACE:",FULLRACE,!
+16 WRITE ?13,"Creatinine:",CREATININE_" mg/dL"
+17 WRITE !!,?14,"CKD-EPI Equation's Estimated GFR = ",$$CKDEPI(CREATININE),!!
+18 ;
+19 DO ^XBFMK
+20 SET DIR(0)="YO"
+21 SET DIR("A")=TAB3_"Again"
+22 SET DIR("B")="NO"
+23 DO ^DIR
+24 SET ONGO=$SELECT(Y=1:"YES",1:"NO")
End DoDot:1
+25 ;
+26 QUIT
+27 ;
GETSEX(SEX) ; EP - Get Sex function
+1 DO HEADERDT^BLRGMENU
+2 DO ^XBFMK
+3 SET DIR(0)="SO^1:F;2:M;3:U"
+4 SET DIR("L",1)=TAB_"Select Sex:"
+5 SET DIR("L",2)=TAB2_"1: FEMALE"
+6 SET DIR("L",3)=TAB2_"2: MALE"
+7 SET DIR("L",4)=TAB2_"3: UNKNOWN"
+8 SET DIR("L")=""
+9 SET DIR("A")=TAB3_"SEX"
+10 DO ^DIR
+11 ;
+12 IF Y<1!(+$GET(DIRUT))
DO GQMFDIRR
SET ONGO="NO"
QUIT "Q"
+13 ;
+14 IF +X
SET SEX=$SELECT(X=1:"F",X=2:"M",1:"U")
+15 IF '$TEST
SET SEX=$$UP^XLFSTR($EXTRACT(X))
+16 QUIT "OK"
+17 ;
GETAGE(AGE) ; EP - Age Function
+1 DO HEADERDT^BLRGMENU
+2 DO ^XBFMK
+3 WRITE TAB,"Select Age:"
+4 SET DIR(0)="NO^18:150"
+5 SET DIR("A")=TAB3_"AGE"
+6 DO ^DIR
+7 ;
+8 IF Y<1!(+$GET(DIRUT))
DO GQMFDIRR
SET ONGO="NO"
QUIT "Q"
+9 ;
+10 SET AGE=Y
+11 QUIT "OK"
+12 ;
GETRACE(RACE,FULLRACE) ; EP - Race Function
+1 DO HEADERDT^BLRGMENU
+2 DO ^XBFMK
+3 WRITE TAB,"Select Race:"
+4 SET DIR(0)="PO^10:EMZ"
+5 SET DIR("A")=TAB3_"RACE"
+6 DO ^DIR
+7 ;
+8 IF Y<1!(+$GET(DIRUT))
DO GQMFDIRR
SET ONGO="NO"
QUIT "Q"
+9 ;
+10 SET FULLRACE=$PIECE(Y,"^",2)
+11 SET RACE=$$UP^XLFSTR($EXTRACT(FULLRACE))
+12 QUIT "OK"
+13 ;
GETCREAT(CREATININE) ; EP - Creatinine function
+1 DO HEADERDT^BLRGMENU
+2 DO ^XBFMK
+3 SET DIR(0)="NO^::2"
+4 SET DIR("A")=TAB3_"Enter Creatinine Value (mg/dL Units)"
+5 DO ^DIR
+6 ;
+7 IF X=""!(+$GET(DIRUT))
DO GQMFDIRR
SET ONGO="NO"
QUIT "Q"
+8 ;
+9 SET CREATININE=+Y
+10 QUIT "OK"
+11 ;
+12 ;
NEWDELTA ; EP - Allows users to create new Delta Check utilizing the CKD-EPI function
+1 NEW (DILOCKTM,DISYS,DT,DTIME,DUZ,IO,IOBS,IOF,IOM,ION,IOS,IOSL,IOST,IOT,IOXY,U,XPARSYS,XQXFLG)
+2 ;
+3 DO SETBLRVS("NEWDELTA")
+4 ;
+5 SET HEADER(1)="IHS LAB"
+6 SET HEADER(2)="CKD-EPI Delta Check Creation"
+7 DO HEADERDT^BLRGMENU
+8 ;
+9 DO ^XBFMK
+10 SET DIR(0)="PO^60:EMZ"
+11 SET DIR("A")="Test to hold CKD-EPI Results"
+12 DO ^DIR
+13 IF +$GET(DIRUT)
DO GQMFDIRR
QUIT
+14 ;
+15 SET F60PTR=+Y
+16 SET CKDEPI60=$PIECE(Y,"^",2)
+17 SET CKDEPIDN=$$GET1^DIQ(60,F60PTR,"DATA NAME")
+18 IF $LENGTH(CKDEPIDN)<1
DO BADSTUFF("Test "_CKDEPIDN_" has no DataName.")
QUIT
+19 ;
+20 DO HEADERDT^BLRGMENU
+21 DO ^XBFMK
+22 SET DIR(0)="PO^60:EMZ"
+23 SET DIR("A")="Creatinine Test to use for CKD-EPI calculation"
+24 DO ^DIR
+25 IF +$GET(DIRUT)
DO GQMFDIRR
QUIT
+26 ;
+27 SET F60PTR=+Y
+28 SET CREAT60=$PIECE(Y,"^",2)
+29 SET CREATDN=$$GET1^DIQ(60,F60PTR,"DATA NAME")
+30 IF $LENGTH(CREATDN)<1
DO BADSTUFF("Test "_CREAT60_" has no DataName.")
QUIT
+31 ;
+32 DO HEADERDT^BLRGMENU
+33 DO ^XBFMK
+34 SET DIR(0)="FO"
+35 SET DIR("A")="Name of the Delta Check"
+36 DO ^DIR
+37 IF +$GET(DIRUT)
DO GQMFDIRR
QUIT
+38 ;
+39 SET NAME=$GET(X)
+40 ;
+41 ; Make sure it's not a duplicate Delta Check Name
+42 IF +$ORDER(^LAB(62.1,"B",NAME,0))
DO BADSTUFF(NAME_" is a duplicate Delta Check Name.")
QUIT
+43 ;
+44 SET XCODE="S %X="""" X:$D(LRDEL(1)) LRDEL(1) W:$G(%X)'="""" "" CKD-EPI Calculated GFR:"",%X S:LRVRM>10 LRSB($$GETDNAM^BLREXEC2("""_CKDEPIDN_"""))=%X K %,%X,%Y,%Z,%ZZ"
+45 SET OVER1STR="S %ZZ=$$GETDNAM^BLREXEC2("""_CREAT60_""") X:LRVRM>10 ""F %=%ZZ S %X(%)=$S(%=LRSB:X,$D(LRSB(%)):+LRSB(%),1:0)"" X:LRVRM>10 ""F %=%ZZ S %X(%)=$S($D(LRSB(%)):LRSB(%),1:0)"""
+46 SET OVER1=OVER1STR_" S %X=$$CKDEPI^BLREXEC3(X)"
+47 ;
+48 SET DESC(1)="This delta check, when added to a test named "
+49 SET DESC(2)=" "_$$LJ^XLFSTR(CREAT60,75)
+50 SET DESC(3)="will calculate an estimated Glomerular Filtration Rate (GFR)"
+51 SET DESC(4)="using the CKD-EPI equation."
+52 SET DESC(5)=" "
+53 SET DESC(6)="The CKD-EPI Equation's result will be stuffed into the test called"
+54 SET DESC(7)=" "_CKDEPI60
+55 SET DESC(8)=" "
+56 ;
+57 ; Warning
+58 SET DESC(9)="Creatinine-based estimating equations are not recommended for use with:"
+59 SET DESC(10)=" "
+60 SET DESC(11)=" Individuals with unstable creatinine concentrations. This includes"
+61 SET DESC(12)=" pregnant women; patients with serious co-morbid conditions; and"
+62 SET DESC(13)=" hospitalized patients, particularly those with acute renal failure."
+63 SET DESC(14)=" Creatinine-based estimating equations should be used only for"
+64 SET DESC(15)=" patients with stable creatinine concentrations."
+65 SET DESC(16)=" "
+66 SET DESC(17)=" Persons with extremes in muscle mass and diet. This includes, but"
+67 SET DESC(18)=" is not limited to, individuals who are amputees, paraplegics, body"
+68 SET DESC(19)=" builders, or obese; patients who have a muscle-wasting disease or"
+69 SET DESC(20)=" a neuromuscular disorder; and those suffering from malnutrition,"
+70 SET DESC(21)=" eating a vegetarian or low-meat diet, or taking creatine dietary"
+71 SET DESC(22)=" supplements."
+72 ;
+73 ;
+74 DO HEADERDT^BLRGMENU
+75 ;
+76 DO DLTADICA(NAME,XCODE,OVER1,.DESC)
+77 ;
+78 DO PRESSKEY^BLRGMENU(9)
+79 QUIT
+80 ;
DLTADICA(NAME,XCODE,OVER1,DESC) ; EP
+1 NEW DICT0,DICT1,FDA,ERRS,PTR
+2 NEW HEREYAGO
+3 ;
+4 WRITE !!,"Adding "_NAME_" to Delta Check Dictionary.",!
+5 ;
+6 DO ^XBFMK
+7 KILL ERRS,FDA,IENS,DIE
+8 ;
+9 SET DICT1="62.1"
+10 ; Find the Name node, or create it.
SET FDA(DICT1,"?+1,",.01)=NAME
+11 ; Execute Code
SET FDA(DICT1,"?+1,",10)=XCODE
+12 ; Overflow 1
SET FDA(DICT1,"?+1,",20)=OVER1
+13 DO UPDATE^DIE("S","FDA",,"ERRS")
+14 ;
+15 IF $DATA(ERRS("DIERR"))>0
Begin DoDot:1
+16 DO BADSTUFF("Error in adding "_NAME_" to the Delta Check Dictionary.")
End DoDot:1
QUIT
+17 ;
+18 WRITE !,?5,NAME_" Delta Check added to Delta Check Dictionary.",!
+19 ;
+20 ; Now, add the Description
+21 KILL ERRS
+22 SET PTR=$$FIND1^DIC(62.1,,,NAME)
+23 MERGE WPARRAY("WP")=DESC
+24 DO WP^DIE(62.1,PTR_",",30,"K","WPARRAY(""WP"")","ERRS")
+25 ;
+26 IF $DATA(ERRS("DIERR"))>0
Begin DoDot:1
+27 WRITE !!,"Error in adding DESCRIPTION to "_NAME_" Delta Check in the Delta Check Dictionary."
+28 DO BADSTUFF("")
End DoDot:1
QUIT
+29 ;
+30 WRITE !,?5,NAME_" Delta Check DESCRIPTION added to Delta Check Dictionary.",!
+31 ;
+32 ; Now, add the SITE NOTES DATE
+33 KILL ERRS,FDA
+34 SET FDA(62.131,"?+1,"_PTR_",",.01)=$PIECE($$NOW^XLFDT,".",1)
+35 DO UPDATE^DIE("S","FDA",,"ERRS")
+36 ;
+37 IF $DATA(ERRS("DIERR"))>0
Begin DoDot:1
+38 WRITE !!,"Error in adding SITES NOTES DATE to "_NAME_" Delta Check in the Delta Check Dictionary."
+39 DO BADSTUFF("")
End DoDot:1
QUIT
+40 ;
+41 ; Now, add the TEXT
+42 KILL ERRS,WPARRAY
+43 SET WPARRAY("WP",1)="Created by "_$$GET1^DIQ(200,DUZ,"NAME")_" DUZ:"_DUZ
+44 DO WP^DIE(62.131,"1,"_PTR_",",1,"K","WPARRAY(""WP"")","ERRS")
+45 ;
+46 IF $DATA(ERRS("DIERR"))>0
Begin DoDot:1
+47 WRITE !!,"Error in adding TEXT to "_NAME_" Delta Check in the Delta Check Dictionary."
+48 DO BADSTUFF("")
End DoDot:1
QUIT
+49 ;
+50 WRITE !,?5,NAME_" Delta Check TEXT added to Delta Check Dictionary."
+51 QUIT
+52 ;
+53 ; ============================= UTILITIES =============================
+54 ;
JUSTNEW ; EP - Generic RPMS EXCLUSIVE NEW
+1 NEW (DILOCKTM,DISYS,DT,DTIME,DUZ,IO,IOBS,IOF,IOM,ION,IOS,IOSL,IOST,IOT,IOXY,U,XPARSYS,XQXFLG)
+2 ;
+3 QUIT
+4 ;
SETBLRVS(TWO) ; EP - Set the BLRVERN variable(s)
+1 KILL BLRVERN,BLRVERN2
+2 ;
+3 SET BLRVERN=$PIECE($PIECE($TEXT(+1),";")," ")
+4 IF $LENGTH($GET(TWO))
SET BLRVERN2=$GET(TWO)
+5 QUIT
+6 ;
GQMFDIRR ; Generic "Quit" message for D ^DIR response
+1 DO BADSTUFF("No/Invalid/Quit Entry.")
+2 QUIT
+3 ;
BADSTUFF(MSG,TAB) ; EP - Simple Message
+1 IF +$GET(TAB)<1
SET TAB=4
+2 WRITE !!,?TAB,$$TRIM^XLFSTR(MSG,"LR"," ")," Routine Ends."
+3 DO PRESSKEY^BLRGMENU(TAB+5)
+4 QUIT