ORY10506 ;SLC/RJS,CLA - OCX PACKAGE RULE TRANSPORT ROUTINE (Delete after Install of OR*3*105) ;OCT 16,2001 at 15:39
;;3.0;ORDER ENTRY/RESULTS REPORTING;**105**;Dec 17,1997
;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
;
S ;
;
D DOT^ORY105ES
;
;
K REMOTE,LOCAL,OPCODE,REF
F LINE=1:1:500 S TEXT=$P($T(DATA+LINE),";",2,999) Q:TEXT I $L(TEXT) D Q:QUIT
.S ^TMP("OCXRULE",$J,$O(^TMP("OCXRULE",$J,"A"),-1)+1)=TEXT
;
G ^ORY10507
;
Q
;
DATA ;
;
;;R^"860.8:",100,4
;;D^ ; ;
;;R^"860.8:",100,5
;;D^ ; Q:'$L($G(OCXDT)) ""
;;R^"860.8:",100,6
;;D^ ; N OCXDIFF,OCXVAL S (OCXDIFF,OCXVAL)=0
;;R^"860.8:",100,7
;;D^ ; ;
;;R^"860.8:",100,8
;;D^ ; I $L(OCXDT),'OCXDT,(OCXDT[" at ") D ; EXTERNAL EXPERT SYSTEM FORMAT 1 TO EXTERNAL FORMAT
;;R^"860.8:",100,9
;;D^ ; .N OCXHR,OCXMIN,OCXTIME
;;R^"860.8:",100,10
;;D^ ; .S OCXTIME=$P($P(OCXDT," at ",2),".",1),OCXHR=$P(OCXTIME,":",1),OCXMIN=$P(OCXTIME,":",2)
;;R^"860.8:",100,11
;;D^ ; .S:(OCXDT["Midnight") OCXHR=00
;;R^"860.8:",100,12
;;D^ ; .S:(OCXDT["PM") OCXHR=OCXHR+12
;;R^"860.8:",100,13
;;D^ ; .S OCXDT=$P(OCXDT," at ")_"@"_$E(OCXHR+100,2,3)_$E(OCXMIN+100,2,3)
;;R^"860.8:",100,14
;;D^ ; ;
;;R^"860.8:",100,15
;;D^ ; I $L(OCXDT),(OCXDT?1.2N1"/"1.2N.1" ".2N.1":".2N) D ; EXTERNAL EXPERT SYSTEM FORMAT 2 TO EXTERNAL FORMAT
;;R^"860.8:",100,16
;;D^ ; .N OCXMON
;;R^"860.8:",100,17
;;D^ ; .S OCXMON=$P("January^February^March^April^May^June^July^August^September^October^November^December",U,$P(OCXDT,"/",1))
;;R^"860.8:",100,18
;;D^ ; .I $L($P(OCXDT," ",2)) S OCXDT=OCXMON_" "_$P($P(OCXDT," ",1),"/",2)_"@"_$TR($P(OCXDT," ",2),":","")
;;R^"860.8:",100,19
;;D^ ; .E S OCXDT=OCXMON_" "_$P($P(OCXDT," ",1),"/",2)
;;R^"860.8:",100,20
;;D^ ; ;
;;R^"860.8:",100,21
;;D^ ; I $L(OCXDT),(OCXDT?1.2N1"/"1.2N1"/"1.2N.1" ".2N.1":".2N) D ; EXTERNAL EXPERT SYSTEM FORMAT 3 TO EXTERNAL FORMAT
;;R^"860.8:",100,22
;;D^ ; .N OCXMON
;;R^"860.8:",100,23
;;D^ ; .S OCXMON=$P("January^February^March^April^May^June^July^August^September^October^November^December",U,$P(OCXDT,"/",1))
;;R^"860.8:",100,24
;;D^ ; .I $L($P(OCXDT," ",2)) S OCXDT=OCXMON_" "_$P($P(OCXDT," ",1),"/",2)_","_$P($P(OCXDT," ",1),"/",3)_"@"_$TR($P(OCXDT," ",2),":","")
;;R^"860.8:",100,25
;;D^ ; .E S OCXDT=OCXMON_" "_$P($P(OCXDT," ",1),"/",2)_", "_$P($P(OCXDT," ",1),"/",3)
;;R^"860.8:",100,26
;;D^ ; ;
;;R^"860.8:",100,27
;;D^ ; I $L(OCXDT),'OCXDT D ; EXTERNAL FORMAT TO INTERNAL FILEMAN FORMAT
;;R^"860.8:",100,28
;;D^ ; .I (OCXDT["@0000") S OCXDT=$P(OCXDT,"@",1),OCXDIFF=1
;;R^"860.8:",100,29
;;D^ ; .N %DT,X,Y S X=OCXDT,%DT="" S:(OCXDT["@")!(OCXDT="N") %DT="T" D ^%DT S OCXDT=+Y
;;R^"860.8:",100,30
;;D^ ; ;
;;R^"860.8:",100,31
;;D^ ; I ($L(OCXDT\1)>7) S OCXDT=$$HL7TFM^XLFDT(OCXDT) ; HL7 FORMAT TO INTERNAL FILEMAN FORMAT
;;R^"860.8:",100,32
;;D^ ; ;
;;R^"860.8:",100,33
;;D^ ; I ($L(OCXDT\1)=7) S OCXDT=$$FMTH^XLFDT(+OCXDT) ; INTERNAL FILEMAN FORMAT TO $H FORMAT
;;R^"860.8:",100,34
;;D^ ; ;
;;R^"860.8:",100,35
;;D^ ; I (OCXDT?5N1","1.5N) S OCXVAL=(OCXDT*86400)+$P(OCXDT,",",2) ; $H FORMAT TO EXPERT SYSTEM INTERNAL FORMAT
;;R^"860.8:",100,36
;;D^ ; ;
;;R^"860.8:",100,37
;;D^ ; Q OCXVAL
;;R^"860.8:",100,38
;;D^ ; ;
;;EOR^
;;KEY^860.8:^CONVERT DATE FROM OCX FORMAT TO READABLE FORMAT
;;R^"860.8:",.01,"E"
;;D^CONVERT DATE FROM OCX FORMAT TO READABLE FORMAT
;;R^"860.8:",.02,"E"
;;D^INT2DT
;;R^"860.8:",1,1
;;D^ ;INT2DT(OCXDT,OCXF) ; This Local Extrinsic Function converts an OCX internal format
;;R^"860.8:",1,2
;;D^ ; ; date into an Externl Format (Human Readable) date. 'OCXF=SHORT FORMAT OCXF=LONG FORMAT
;;R^"860.8:",1,3
;;D^ ; ;
;;R^"860.8:",100,1
;;D^ ;INT2DT(OCXDT,OCXF) ; This Local Extrinsic Function converts an OCX internal format
;;R^"860.8:",100,2
;;D^ ; ; date into an Externl Format (Human Readable) date. 'OCXF=SHORT FORMAT OCXF=LONG FORMAT
;;R^"860.8:",100,3
;;D^ ; ;
;;R^"860.8:",100,4
;;D^ ; Q:'$L($G(OCXDT)) "" S OCXF=+$G(OCXF)
;;R^"860.8:",100,5
;;D^ ; N OCXYR,OCXLPYR,OCXMON,OCXDAY,OCXHR,OCXMIN,OCXSEC,OCXCYR
;;R^"860.8:",100,6
;;D^ ; S (OCXYR,OCXLPYR,OCXMON,OCXDAY,OCXHR,OCXMIN,OCXSEC,OCXAP)=""
;;R^"860.8:",100,7
;;D^ ; S OCXSEC=$E(OCXDT#60+100,2,3),OCXDT=OCXDT\60
;;R^"860.8:",100,8
;;D^ ; S OCXMIN=$E(OCXDT#60+100,2,3),OCXDT=OCXDT\60
;;R^"860.8:",100,9
;;D^ ; S OCXHR=$E(OCXDT#24+100,2,3),OCXDT=OCXDT\24
;;R^"860.8:",100,10
;;D^ ; S OCXCYR=($H\1461)*4+1841+(($H#1461)\365)
;;R^"860.8:",100,11
;;D^ ; S OCXYR=(OCXDT\1461)*4+1841,OCXDT=OCXDT#1461
;;R^"860.8:",100,12
;;D^ ; S OCXLPYR=(OCXDT\365),OCXDT=OCXDT-(OCXLPYR*365),OCXYR=OCXYR+OCXLPYR
;;R^"860.8:",100,13
;;D^ ; S OCXCNT="031^059^090^120^151^181^212^243^273^304^334^365"
;;R^"860.8:",100,14
;;D^ ; S:(OCXLPYR=3) OCXCNT="031^060^091^121^152^182^213^244^274^305^335^366"
;;R^"860.8:",100,15
;;D^ ; F OCXMON=1:1:12 Q:(OCXDT<$P(OCXCNT,U,OCXMON))
;;R^"860.8:",100,16
;;D^ ; S OCXDAY=OCXDT-$P(OCXCNT,U,OCXMON-1)+1
;;R^"860.8:",100,17
;;D^ ; I OCXF S OCXMON=$P("January^February^March^April^May^June^July^August^September^October^November^December",U,OCXMON)
;;R^"860.8:",100,18
;;D^ ; E S OCXMON=$E(OCXMON+100,2,3)
;;R^"860.8:",100,19
;;D^ ; S OCXAP=$S('OCXHR:"Midnight",(OCXHR=12):"Noon",(OCXHR<12):"AM",1:"PM")
;;R^"860.8:",100,20
;;D^ ; I OCXF S OCXHR=OCXHR#12 S:'OCXHR OCXHR=12
;;R^"860.8:",100,21
;;D^ ; Q:'OCXF $E(OCXMON+100,2,3)_"/"_$E(OCXDAY+100,2,3)_$S((OCXCYR=OCXYR):" "_OCXHR_":"_OCXMIN,1:"/"_$E(OCXYR,3,4))
;;R^"860.8:",100,22
;;D^ ; Q:(OCXHR+OCXMIN+OCXSEC) OCXMON_" "_OCXDAY_","_OCXYR_" at "_OCXHR_":"_OCXMIN_"."_OCXSEC_" "_OCXAP
;;R^"860.8:",100,23
;;D^ ; Q OCXMON_" "_OCXDAY_","_OCXYR
;;R^"860.8:",100,24
;;D^ ; ;
;;EOR^
;;KEY^860.8:^DETERMINE IF RENAL LAB RESULTS ARE ABNORMAL HIGH OR LOW
;;R^"860.8:",.01,"E"
;;D^DETERMINE IF RENAL LAB RESULTS ARE ABNORMAL HIGH OR LOW
;;R^"860.8:",.02,"E"
;;D^ABREN
;;R^"860.8:",100,1
;;D^ ;ABREN(DFN) ;
;;R^"860.8:",100,2
;;D^ ; ;
;;R^"860.8:",100,3
;;D^ ; N OCXFLAG,OCXVAL,OCXLIST,OCXTEST,UNAV,OCXTLIST,OCXTERM,OCXSLIST,OCXSPEC
;;R^"860.8:",100,4
;;D^ ; S (OCXLIST,OCXTLIST)="",UNAV="0^<Unavailable>"
;;R^"860.8:",100,5
;;D^ ; S OCXSLIST="" Q:'$$TERMLKUP("SERUM SPECIMEN",.OCXSLIST) UNAV
;;R^"860.8:",100,6
;;D^ ; F OCXTERM="SERUM CREATININE","SERUM UREA NITROGEN" D
;;R^"860.8:",100,7
;;D^ ; .Q:'$$TERMLKUP(OCXTERM,.OCXTLIST)
;;R^"860.8:",100,8
;;D^ ; .S OCXTEST=0 F S OCXTEST=$O(OCXTLIST(OCXTEST)) Q:'OCXTEST D
;;R^"860.8:",100,9
;;D^ ; ..S OCXSPEC=0 F S OCXSPEC=$O(OCXSLIST(OCXSPEC)) Q:'OCXSPEC D
;;R^"860.8:",100,10
;;D^ ; ...S OCXVAL=$$LOCL^ORQQLR1(DFN,OCXTEST,OCXSPEC),OCXFLAG=$P(OCXVAL,U,5)
;;R^"860.8:",100,11
;;D^ ; ...I $L(OCXVAL),((OCXFLAG["H")!(OCXFLAG["L")) D
;;R^"860.8:",100,12
;;D^ ; ....N OCXY S OCXY=""
;;R^"860.8:",100,13
;;D^ ; ....S OCXY=$P(OCXVAL,U,2)_": "_$P(OCXVAL,U,3)_" "_$P(OCXVAL,U,4)
;;R^"860.8:",100,14
;;D^ ; ....S OCXY=OCXY_" "_$S($L(OCXFLAG):"["_OCXFLAG_"]",1:"")
;;R^"860.8:",100,15
;;D^ ; ....S OCXY=OCXY_" "_$$FMTE^XLFDT($P(OCXVAL,U,7),"2P")
;;R^"860.8:",100,16
;;D^ ; ....S:$L(OCXLIST) OCXLIST=OCXLIST_" " S OCXLIST=OCXLIST_OCXY
;1;
;
ORY10506 ;SLC/RJS,CLA - OCX PACKAGE RULE TRANSPORT ROUTINE (Delete after Install of OR*3*105) ;OCT 16,2001 at 15:39
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**105**;Dec 17,1997
+2 ;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
+3 ;
S ;
+1 ;
+2 DO DOT^ORY105ES
+3 ;
+4 ;
+5 KILL REMOTE,LOCAL,OPCODE,REF
+6 FOR LINE=1:1:500
SET TEXT=$PIECE($TEXT(DATA+LINE),";",2,999)
IF TEXT
QUIT
IF $LENGTH(TEXT)
Begin DoDot:1
+7 SET ^TMP("OCXRULE",$JOB,$ORDER(^TMP("OCXRULE",$JOB,"A"),-1)+1)=TEXT
End DoDot:1
IF QUIT
QUIT
+8 ;
+9 GOTO ^ORY10507
+10 ;
+11 QUIT
+12 ;
DATA ;
+1 ;
+2 ;;R^"860.8:",100,4
+3 ;;D^ ; ;
+4 ;;R^"860.8:",100,5
+5 ;;D^ ; Q:'$L($G(OCXDT)) ""
+6 ;;R^"860.8:",100,6
+7 ;;D^ ; N OCXDIFF,OCXVAL S (OCXDIFF,OCXVAL)=0
+8 ;;R^"860.8:",100,7
+9 ;;D^ ; ;
+10 ;;R^"860.8:",100,8
+11 ;;D^ ; I $L(OCXDT),'OCXDT,(OCXDT[" at ") D ; EXTERNAL EXPERT SYSTEM FORMAT 1 TO EXTERNAL FORMAT
+12 ;;R^"860.8:",100,9
+13 ;;D^ ; .N OCXHR,OCXMIN,OCXTIME
+14 ;;R^"860.8:",100,10
+15 ;;D^ ; .S OCXTIME=$P($P(OCXDT," at ",2),".",1),OCXHR=$P(OCXTIME,":",1),OCXMIN=$P(OCXTIME,":",2)
+16 ;;R^"860.8:",100,11
+17 ;;D^ ; .S:(OCXDT["Midnight") OCXHR=00
+18 ;;R^"860.8:",100,12
+19 ;;D^ ; .S:(OCXDT["PM") OCXHR=OCXHR+12
+20 ;;R^"860.8:",100,13
+21 ;;D^ ; .S OCXDT=$P(OCXDT," at ")_"@"_$E(OCXHR+100,2,3)_$E(OCXMIN+100,2,3)
+22 ;;R^"860.8:",100,14
+23 ;;D^ ; ;
+24 ;;R^"860.8:",100,15
+25 ;;D^ ; I $L(OCXDT),(OCXDT?1.2N1"/"1.2N.1" ".2N.1":".2N) D ; EXTERNAL EXPERT SYSTEM FORMAT 2 TO EXTERNAL FORMAT
+26 ;;R^"860.8:",100,16
+27 ;;D^ ; .N OCXMON
+28 ;;R^"860.8:",100,17
+29 ;;D^ ; .S OCXMON=$P("January^February^March^April^May^June^July^August^September^October^November^December",U,$P(OCXDT,"/",1))
+30 ;;R^"860.8:",100,18
+31 ;;D^ ; .I $L($P(OCXDT," ",2)) S OCXDT=OCXMON_" "_$P($P(OCXDT," ",1),"/",2)_"@"_$TR($P(OCXDT," ",2),":","")
+32 ;;R^"860.8:",100,19
+33 ;;D^ ; .E S OCXDT=OCXMON_" "_$P($P(OCXDT," ",1),"/",2)
+34 ;;R^"860.8:",100,20
+35 ;;D^ ; ;
+36 ;;R^"860.8:",100,21
+37 ;;D^ ; I $L(OCXDT),(OCXDT?1.2N1"/"1.2N1"/"1.2N.1" ".2N.1":".2N) D ; EXTERNAL EXPERT SYSTEM FORMAT 3 TO EXTERNAL FORMAT
+38 ;;R^"860.8:",100,22
+39 ;;D^ ; .N OCXMON
+40 ;;R^"860.8:",100,23
+41 ;;D^ ; .S OCXMON=$P("January^February^March^April^May^June^July^August^September^October^November^December",U,$P(OCXDT,"/",1))
+42 ;;R^"860.8:",100,24
+43 ;;D^ ; .I $L($P(OCXDT," ",2)) S OCXDT=OCXMON_" "_$P($P(OCXDT," ",1),"/",2)_","_$P($P(OCXDT," ",1),"/",3)_"@"_$TR($P(OCXDT," ",2),":","")
+44 ;;R^"860.8:",100,25
+45 ;;D^ ; .E S OCXDT=OCXMON_" "_$P($P(OCXDT," ",1),"/",2)_", "_$P($P(OCXDT," ",1),"/",3)
+46 ;;R^"860.8:",100,26
+47 ;;D^ ; ;
+48 ;;R^"860.8:",100,27
+49 ;;D^ ; I $L(OCXDT),'OCXDT D ; EXTERNAL FORMAT TO INTERNAL FILEMAN FORMAT
+50 ;;R^"860.8:",100,28
+51 ;;D^ ; .I (OCXDT["@0000") S OCXDT=$P(OCXDT,"@",1),OCXDIFF=1
+52 ;;R^"860.8:",100,29
+53 ;;D^ ; .N %DT,X,Y S X=OCXDT,%DT="" S:(OCXDT["@")!(OCXDT="N") %DT="T" D ^%DT S OCXDT=+Y
+54 ;;R^"860.8:",100,30
+55 ;;D^ ; ;
+56 ;;R^"860.8:",100,31
+57 ;;D^ ; I ($L(OCXDT\1)>7) S OCXDT=$$HL7TFM^XLFDT(OCXDT) ; HL7 FORMAT TO INTERNAL FILEMAN FORMAT
+58 ;;R^"860.8:",100,32
+59 ;;D^ ; ;
+60 ;;R^"860.8:",100,33
+61 ;;D^ ; I ($L(OCXDT\1)=7) S OCXDT=$$FMTH^XLFDT(+OCXDT) ; INTERNAL FILEMAN FORMAT TO $H FORMAT
+62 ;;R^"860.8:",100,34
+63 ;;D^ ; ;
+64 ;;R^"860.8:",100,35
+65 ;;D^ ; I (OCXDT?5N1","1.5N) S OCXVAL=(OCXDT*86400)+$P(OCXDT,",",2) ; $H FORMAT TO EXPERT SYSTEM INTERNAL FORMAT
+66 ;;R^"860.8:",100,36
+67 ;;D^ ; ;
+68 ;;R^"860.8:",100,37
+69 ;;D^ ; Q OCXVAL
+70 ;;R^"860.8:",100,38
+71 ;;D^ ; ;
+72 ;;EOR^
+73 ;;KEY^860.8:^CONVERT DATE FROM OCX FORMAT TO READABLE FORMAT
+74 ;;R^"860.8:",.01,"E"
+75 ;;D^CONVERT DATE FROM OCX FORMAT TO READABLE FORMAT
+76 ;;R^"860.8:",.02,"E"
+77 ;;D^INT2DT
+78 ;;R^"860.8:",1,1
+79 ;;D^ ;INT2DT(OCXDT,OCXF) ; This Local Extrinsic Function converts an OCX internal format
+80 ;;R^"860.8:",1,2
+81 ;;D^ ; ; date into an Externl Format (Human Readable) date. 'OCXF=SHORT FORMAT OCXF=LONG FORMAT
+82 ;;R^"860.8:",1,3
+83 ;;D^ ; ;
+84 ;;R^"860.8:",100,1
+85 ;;D^ ;INT2DT(OCXDT,OCXF) ; This Local Extrinsic Function converts an OCX internal format
+86 ;;R^"860.8:",100,2
+87 ;;D^ ; ; date into an Externl Format (Human Readable) date. 'OCXF=SHORT FORMAT OCXF=LONG FORMAT
+88 ;;R^"860.8:",100,3
+89 ;;D^ ; ;
+90 ;;R^"860.8:",100,4
+91 ;;D^ ; Q:'$L($G(OCXDT)) "" S OCXF=+$G(OCXF)
+92 ;;R^"860.8:",100,5
+93 ;;D^ ; N OCXYR,OCXLPYR,OCXMON,OCXDAY,OCXHR,OCXMIN,OCXSEC,OCXCYR
+94 ;;R^"860.8:",100,6
+95 ;;D^ ; S (OCXYR,OCXLPYR,OCXMON,OCXDAY,OCXHR,OCXMIN,OCXSEC,OCXAP)=""
+96 ;;R^"860.8:",100,7
+97 ;;D^ ; S OCXSEC=$E(OCXDT#60+100,2,3),OCXDT=OCXDT\60
+98 ;;R^"860.8:",100,8
+99 ;;D^ ; S OCXMIN=$E(OCXDT#60+100,2,3),OCXDT=OCXDT\60
+100 ;;R^"860.8:",100,9
+101 ;;D^ ; S OCXHR=$E(OCXDT#24+100,2,3),OCXDT=OCXDT\24
+102 ;;R^"860.8:",100,10
+103 ;;D^ ; S OCXCYR=($H\1461)*4+1841+(($H#1461)\365)
+104 ;;R^"860.8:",100,11
+105 ;;D^ ; S OCXYR=(OCXDT\1461)*4+1841,OCXDT=OCXDT#1461
+106 ;;R^"860.8:",100,12
+107 ;;D^ ; S OCXLPYR=(OCXDT\365),OCXDT=OCXDT-(OCXLPYR*365),OCXYR=OCXYR+OCXLPYR
+108 ;;R^"860.8:",100,13
+109 ;;D^ ; S OCXCNT="031^059^090^120^151^181^212^243^273^304^334^365"
+110 ;;R^"860.8:",100,14
+111 ;;D^ ; S:(OCXLPYR=3) OCXCNT="031^060^091^121^152^182^213^244^274^305^335^366"
+112 ;;R^"860.8:",100,15
+113 ;;D^ ; F OCXMON=1:1:12 Q:(OCXDT<$P(OCXCNT,U,OCXMON))
+114 ;;R^"860.8:",100,16
+115 ;;D^ ; S OCXDAY=OCXDT-$P(OCXCNT,U,OCXMON-1)+1
+116 ;;R^"860.8:",100,17
+117 ;;D^ ; I OCXF S OCXMON=$P("January^February^March^April^May^June^July^August^September^October^November^December",U,OCXMON)
+118 ;;R^"860.8:",100,18
+119 ;;D^ ; E S OCXMON=$E(OCXMON+100,2,3)
+120 ;;R^"860.8:",100,19
+121 ;;D^ ; S OCXAP=$S('OCXHR:"Midnight",(OCXHR=12):"Noon",(OCXHR<12):"AM",1:"PM")
+122 ;;R^"860.8:",100,20
+123 ;;D^ ; I OCXF S OCXHR=OCXHR#12 S:'OCXHR OCXHR=12
+124 ;;R^"860.8:",100,21
+125 ;;D^ ; Q:'OCXF $E(OCXMON+100,2,3)_"/"_$E(OCXDAY+100,2,3)_$S((OCXCYR=OCXYR):" "_OCXHR_":"_OCXMIN,1:"/"_$E(OCXYR,3,4))
+126 ;;R^"860.8:",100,22
+127 ;;D^ ; Q:(OCXHR+OCXMIN+OCXSEC) OCXMON_" "_OCXDAY_","_OCXYR_" at "_OCXHR_":"_OCXMIN_"."_OCXSEC_" "_OCXAP
+128 ;;R^"860.8:",100,23
+129 ;;D^ ; Q OCXMON_" "_OCXDAY_","_OCXYR
+130 ;;R^"860.8:",100,24
+131 ;;D^ ; ;
+132 ;;EOR^
+133 ;;KEY^860.8:^DETERMINE IF RENAL LAB RESULTS ARE ABNORMAL HIGH OR LOW
+134 ;;R^"860.8:",.01,"E"
+135 ;;D^DETERMINE IF RENAL LAB RESULTS ARE ABNORMAL HIGH OR LOW
+136 ;;R^"860.8:",.02,"E"
+137 ;;D^ABREN
+138 ;;R^"860.8:",100,1
+139 ;;D^ ;ABREN(DFN) ;
+140 ;;R^"860.8:",100,2
+141 ;;D^ ; ;
+142 ;;R^"860.8:",100,3
+143 ;;D^ ; N OCXFLAG,OCXVAL,OCXLIST,OCXTEST,UNAV,OCXTLIST,OCXTERM,OCXSLIST,OCXSPEC
+144 ;;R^"860.8:",100,4
+145 ;;D^ ; S (OCXLIST,OCXTLIST)="",UNAV="0^<Unavailable>"
+146 ;;R^"860.8:",100,5
+147 ;;D^ ; S OCXSLIST="" Q:'$$TERMLKUP("SERUM SPECIMEN",.OCXSLIST) UNAV
+148 ;;R^"860.8:",100,6
+149 ;;D^ ; F OCXTERM="SERUM CREATININE","SERUM UREA NITROGEN" D
+150 ;;R^"860.8:",100,7
+151 ;;D^ ; .Q:'$$TERMLKUP(OCXTERM,.OCXTLIST)
+152 ;;R^"860.8:",100,8
+153 ;;D^ ; .S OCXTEST=0 F S OCXTEST=$O(OCXTLIST(OCXTEST)) Q:'OCXTEST D
+154 ;;R^"860.8:",100,9
+155 ;;D^ ; ..S OCXSPEC=0 F S OCXSPEC=$O(OCXSLIST(OCXSPEC)) Q:'OCXSPEC D
+156 ;;R^"860.8:",100,10
+157 ;;D^ ; ...S OCXVAL=$$LOCL^ORQQLR1(DFN,OCXTEST,OCXSPEC),OCXFLAG=$P(OCXVAL,U,5)
+158 ;;R^"860.8:",100,11
+159 ;;D^ ; ...I $L(OCXVAL),((OCXFLAG["H")!(OCXFLAG["L")) D
+160 ;;R^"860.8:",100,12
+161 ;;D^ ; ....N OCXY S OCXY=""
+162 ;;R^"860.8:",100,13
+163 ;;D^ ; ....S OCXY=$P(OCXVAL,U,2)_": "_$P(OCXVAL,U,3)_" "_$P(OCXVAL,U,4)
+164 ;;R^"860.8:",100,14
+165 ;;D^ ; ....S OCXY=OCXY_" "_$S($L(OCXFLAG):"["_OCXFLAG_"]",1:"")
+166 ;;R^"860.8:",100,15
+167 ;;D^ ; ....S OCXY=OCXY_" "_$$FMTE^XLFDT($P(OCXVAL,U,7),"2P")
+168 ;;R^"860.8:",100,16
+169 ;;D^ ; ....S:$L(OCXLIST) OCXLIST=OCXLIST_" " S OCXLIST=OCXLIST_OCXY
+170 ;1;
+171 ;