OCXDI02D ;SLC/RJS,CLA - OCX PACKAGE DIAGNOSTIC ROUTINES ;SEP 7,1999 at 10:30
;;3.0;ORDER ENTRY/RESULTS REPORTING;**32**;Dec 17,1997
;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
;
S ;
;
D DOT^OCXDIAG
;
;
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("OCXDIAG",$J,$O(^TMP("OCXDIAG",$J,"A"),-1)+1)=TEXT
;
G ^OCXDI02E
;
Q
;
DATA ;
;
;;R^"860.8:",100,7
;;D^ ; I (+OCXFIL) S OCXGL=$$FILE^OCXBDTD(+OCXFIL,"GLOBAL NAME") Q:'$L(OCXGL) ""
;;R^"860.8:",100,8
;;D^ ; E S OCXGL=OCXFIL
;;R^"860.8:",100,9
;;D^ ; I +OCXKEY,(+OCXKEY=OCXKEY),$D(@(OCXGL_OCXKEY_")")) Q $G(@(OCXGL_(+OCXKEY)_","""_OCXNODE_""")"))
;;R^"860.8:",100,10
;;D^ ; S OCXDATA=$O(@(OCXGL_"""B"","""_OCXKEY_""",0)")) I OCXDATA Q $G(@(OCXGL_(+OCXDATA)_","""_OCXNODE_""")"))
;;R^"860.8:",100,11
;;D^ ; S OCXSUB="B" F S OCXSUB=$O(@(OCXGL_""""_OCXSUB_""")")) Q:'$L(OCXSUB) S OCXDATA=$O(@(OCXGL_"""B"","""_OCXKEY_""",0)")) Q:OCXDATA
;;R^"860.8:",100,12
;;D^ ; Q:'OCXDATA "" Q $G(@(OCXGL_(+OCXDATA)_","""_OCXNODE_""")"))
;;R^"860.8:",100,13
;;D^ ; ;
;;EOR^
;;KEY^860.8:^FILE DATA IN PATIENT ACTIVE DATA FILE
;;R^"860.8:",.01,"E"
;;D^FILE DATA IN PATIENT ACTIVE DATA FILE
;;R^"860.8:",.02,"E"
;;D^FILE
;;R^"860.8:",1,1
;;D^ ;FILE(DFN,OCXELE,OCXDFL) ; This Local Extrinsic Function files data
;;R^"860.8:",1,2
;;D^ ; ; in the Order Check Patient Data File
;;R^"860.8:",1,3
;;D^ ; ;
;;R^"860.8:",100,1
;;D^ ;FILE(DFN,OCXELE,OCXDFL) ; This Local Extrinsic Function logs a validated event/element.
;;R^"860.8:",100,2
;;D^ ; ;
;;R^"860.8:",100,3
;;D^T+; I $G(OCXTRACE) W !,"%%%%",?20," Execution trace DFN: ",DFN," OCXELE: ",+$G(OCXELE)," OCXDFL: ",$G(OCXDFL)
;;R^"860.8:",100,4
;;D^ ; N OCXTIMN,OCXTIML,OCXTIMT1,OCXTIMT2,OCXDATA,OCXPC,OCXPC,OCXVAL,OCXSUB,OCXDFI
;;R^"860.8:",100,5
;;D^ ; S DFN=+$G(DFN),OCXELE=+$G(OCXELE)
;;R^"860.8:",100,6
;;D^ ; ;
;;R^"860.8:",100,7
;;D^ ; Q:'DFN 1 Q:'OCXELE 1 K OCXDATA
;;R^"860.8:",100,8
;;D^ ; ;
;;R^"860.8:",100,9
;;D^ ; S OCXDATA(DFN,OCXELE)=1
;;R^"860.8:",100,10
;;D^ ; F OCXPC=1:1:$L(OCXDFL,",") S OCXDFI=$P(OCXDFL,",",OCXPC) I OCXDFI D
;;R^"860.8:",100,11
;;D^ ; .S OCXVAL=$G(OCXDF(+OCXDFI)),OCXDATA(DFN,OCXELE,+OCXDFI)=OCXVAL
;;R^"860.8:",100,12
;;D^T+; .I $G(OCXTRACE) W !,"%%%%",?20," ",$P($G(^OCXS(860.4,+OCXDFI,0)),U,1)," = """,OCXVAL,""""
;;R^"860.8:",100,13
;;D^ ; ;
;;R^"860.8:",100,14
;;D^ ; M ^TMP("OCXCHK",$J,DFN)=OCXDATA(DFN)
;;R^"860.8:",100,15
;;D^ ; ;
;;R^"860.8:",100,16
;;D^ ; Q 0
;;R^"860.8:",100,17
;;D^ ; ;
;;EOR^
;;KEY^860.8:^RETURN POINTED TO VALUE
;;R^"860.8:",.01,"E"
;;D^RETURN POINTED TO VALUE
;;R^"860.8:",.02,"E"
;;D^POINTER
;;R^"860.8:",1,1
;;D^ ;POINTER(OCXFILE,D0) ; This Local Extrinsic Function gets the value of the name field
;;R^"860.8:",1,2
;;D^ ; ; of record D0 in file OCXFILE
;;R^"860.8:",100,1
;;D^ ;POINTER(OCXFILE,D0) ; This Local Extrinsic Function gets the value of the name field
;;R^"860.8:",100,2
;;D^ ; ; of record D0 in file OCXFILE
;;R^"860.8:",100,3
;;D^T+; I $G(OCXTRACE) W !,"%%%%",?20," FILE: ",$G(OCXFILE)," D0: ",$G(D0)
;;R^"860.8:",100,4
;;D^ ; Q:'$G(D0) "" Q:'$L($G(OCXFILE)) ""
;;R^"860.8:",100,5
;;D^ ; N GLREF
;;R^"860.8:",100,6
;;D^ ; I '(OCXFILE=(+OCXFILE)) S GLREF=U_OCXFILE
;;R^"860.8:",100,7
;;D^ ; E S GLREF=$$FILE^OCXBDTD(+OCXFILE,"GLOBAL NAME") Q:'$L(GLREF) ""
;;R^"860.8:",100,8
;;D^T+; I $G(OCXTRACE) W !,"%%%%",?20," GLREF: ",GLREF," RESOLVES TO: ",$P($G(@(GLREF_(+D0)_",0)")),U,1)
;;R^"860.8:",100,9
;;D^ ; Q $P($G(@(GLREF_(+D0)_",0)")),U,1)
;;R^"860.8:",100,10
;;D^ ; ;
;;EOR^
;;KEY^860.8:^CHECK IF THIS IS A NEW ELEMENT
;;R^"860.8:",.01,"E"
;;D^CHECK IF THIS IS A NEW ELEMENT
;;R^"860.8:",.02,"E"
;;D^NEWELEM
;;R^"860.8:",1,1
;;D^ ;NEWELEM(DFN,OCXRUL,OCXREL,OCXELE,OCXTIME) ; This Local Extrinsic Function returns a 1 if this element (OCXELE)
;;R^"860.8:",1,2
;;D^ ; ; is newly triggered and a 0 if it has been responsible for triggering
;;R^"860.8:",1,3
;;D^ ; ; this rule (OCXRUL) in the past.
;;R^"860.8:",1,4
;;D^ ; ;
;;R^"860.8:",100,1
;;D^ ;NEWELEM(DFN,OCXRUL,OCXREL,OCXELE) ; This Local Extrinsic Function returns a 1 if this element (OCXELE)
;;R^"860.8:",100,2
;;D^ ; ; is newly triggered and a 0 if it has been responsible for triggering
;;R^"860.8:",100,3
;;D^ ; ; this rule (OCXRUL) in the past.
;;R^"860.8:",100,4
;;D^ ; ;
;;R^"860.8:",100,5
;;D^ ; ;
;;R^"860.8:",100,6
;;D^ ; Q
;;R^"860.8:",100,7
;;D^ ; ;
;;R^"860.8:",100,8
;;D^ ; ;
;;EOR^
;;KEY^860.8:^RETURN RENAL FUNCTION VALUES
;;R^"860.8:",.01,"E"
;;D^RETURN RENAL FUNCTION VALUES
;;R^"860.8:",.02,"E"
;;D^RENAL
;;R^"860.8:",100,1
;;D^ ;RENAL(DFN) ;
;;R^"860.8:",100,2
;;D^ ; ;
;;R^"860.8:",100,3
;;D^ ; N OCXV,OCXX,OCXTL,OCXTERM,OCXSLIST,OCXS S OCXV=""
;;R^"860.8:",100,4
;;D^ ; S OCXSLIST="" Q:'$$TERMLKUP("SERUM SPECIMEN",.OCXSLIST)
;1;
;
OCXDI02D ;SLC/RJS,CLA - OCX PACKAGE DIAGNOSTIC ROUTINES ;SEP 7,1999 at 10:30
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**32**;Dec 17,1997
+2 ;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
+3 ;
S ;
+1 ;
+2 DO DOT^OCXDIAG
+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("OCXDIAG",$JOB,$ORDER(^TMP("OCXDIAG",$JOB,"A"),-1)+1)=TEXT
End DoDot:1
IF QUIT
QUIT
+8 ;
+9 GOTO ^OCXDI02E
+10 ;
+11 QUIT
+12 ;
DATA ;
+1 ;
+2 ;;R^"860.8:",100,7
+3 ;;D^ ; I (+OCXFIL) S OCXGL=$$FILE^OCXBDTD(+OCXFIL,"GLOBAL NAME") Q:'$L(OCXGL) ""
+4 ;;R^"860.8:",100,8
+5 ;;D^ ; E S OCXGL=OCXFIL
+6 ;;R^"860.8:",100,9
+7 ;;D^ ; I +OCXKEY,(+OCXKEY=OCXKEY),$D(@(OCXGL_OCXKEY_")")) Q $G(@(OCXGL_(+OCXKEY)_","""_OCXNODE_""")"))
+8 ;;R^"860.8:",100,10
+9 ;;D^ ; S OCXDATA=$O(@(OCXGL_"""B"","""_OCXKEY_""",0)")) I OCXDATA Q $G(@(OCXGL_(+OCXDATA)_","""_OCXNODE_""")"))
+10 ;;R^"860.8:",100,11
+11 ;;D^ ; S OCXSUB="B" F S OCXSUB=$O(@(OCXGL_""""_OCXSUB_""")")) Q:'$L(OCXSUB) S OCXDATA=$O(@(OCXGL_"""B"","""_OCXKEY_""",0)")) Q:OCXDATA
+12 ;;R^"860.8:",100,12
+13 ;;D^ ; Q:'OCXDATA "" Q $G(@(OCXGL_(+OCXDATA)_","""_OCXNODE_""")"))
+14 ;;R^"860.8:",100,13
+15 ;;D^ ; ;
+16 ;;EOR^
+17 ;;KEY^860.8:^FILE DATA IN PATIENT ACTIVE DATA FILE
+18 ;;R^"860.8:",.01,"E"
+19 ;;D^FILE DATA IN PATIENT ACTIVE DATA FILE
+20 ;;R^"860.8:",.02,"E"
+21 ;;D^FILE
+22 ;;R^"860.8:",1,1
+23 ;;D^ ;FILE(DFN,OCXELE,OCXDFL) ; This Local Extrinsic Function files data
+24 ;;R^"860.8:",1,2
+25 ;;D^ ; ; in the Order Check Patient Data File
+26 ;;R^"860.8:",1,3
+27 ;;D^ ; ;
+28 ;;R^"860.8:",100,1
+29 ;;D^ ;FILE(DFN,OCXELE,OCXDFL) ; This Local Extrinsic Function logs a validated event/element.
+30 ;;R^"860.8:",100,2
+31 ;;D^ ; ;
+32 ;;R^"860.8:",100,3
+33 ;;D^T+; I $G(OCXTRACE) W !,"%%%%",?20," Execution trace DFN: ",DFN," OCXELE: ",+$G(OCXELE)," OCXDFL: ",$G(OCXDFL)
+34 ;;R^"860.8:",100,4
+35 ;;D^ ; N OCXTIMN,OCXTIML,OCXTIMT1,OCXTIMT2,OCXDATA,OCXPC,OCXPC,OCXVAL,OCXSUB,OCXDFI
+36 ;;R^"860.8:",100,5
+37 ;;D^ ; S DFN=+$G(DFN),OCXELE=+$G(OCXELE)
+38 ;;R^"860.8:",100,6
+39 ;;D^ ; ;
+40 ;;R^"860.8:",100,7
+41 ;;D^ ; Q:'DFN 1 Q:'OCXELE 1 K OCXDATA
+42 ;;R^"860.8:",100,8
+43 ;;D^ ; ;
+44 ;;R^"860.8:",100,9
+45 ;;D^ ; S OCXDATA(DFN,OCXELE)=1
+46 ;;R^"860.8:",100,10
+47 ;;D^ ; F OCXPC=1:1:$L(OCXDFL,",") S OCXDFI=$P(OCXDFL,",",OCXPC) I OCXDFI D
+48 ;;R^"860.8:",100,11
+49 ;;D^ ; .S OCXVAL=$G(OCXDF(+OCXDFI)),OCXDATA(DFN,OCXELE,+OCXDFI)=OCXVAL
+50 ;;R^"860.8:",100,12
+51 ;;D^T+; .I $G(OCXTRACE) W !,"%%%%",?20," ",$P($G(^OCXS(860.4,+OCXDFI,0)),U,1)," = """,OCXVAL,""""
+52 ;;R^"860.8:",100,13
+53 ;;D^ ; ;
+54 ;;R^"860.8:",100,14
+55 ;;D^ ; M ^TMP("OCXCHK",$J,DFN)=OCXDATA(DFN)
+56 ;;R^"860.8:",100,15
+57 ;;D^ ; ;
+58 ;;R^"860.8:",100,16
+59 ;;D^ ; Q 0
+60 ;;R^"860.8:",100,17
+61 ;;D^ ; ;
+62 ;;EOR^
+63 ;;KEY^860.8:^RETURN POINTED TO VALUE
+64 ;;R^"860.8:",.01,"E"
+65 ;;D^RETURN POINTED TO VALUE
+66 ;;R^"860.8:",.02,"E"
+67 ;;D^POINTER
+68 ;;R^"860.8:",1,1
+69 ;;D^ ;POINTER(OCXFILE,D0) ; This Local Extrinsic Function gets the value of the name field
+70 ;;R^"860.8:",1,2
+71 ;;D^ ; ; of record D0 in file OCXFILE
+72 ;;R^"860.8:",100,1
+73 ;;D^ ;POINTER(OCXFILE,D0) ; This Local Extrinsic Function gets the value of the name field
+74 ;;R^"860.8:",100,2
+75 ;;D^ ; ; of record D0 in file OCXFILE
+76 ;;R^"860.8:",100,3
+77 ;;D^T+; I $G(OCXTRACE) W !,"%%%%",?20," FILE: ",$G(OCXFILE)," D0: ",$G(D0)
+78 ;;R^"860.8:",100,4
+79 ;;D^ ; Q:'$G(D0) "" Q:'$L($G(OCXFILE)) ""
+80 ;;R^"860.8:",100,5
+81 ;;D^ ; N GLREF
+82 ;;R^"860.8:",100,6
+83 ;;D^ ; I '(OCXFILE=(+OCXFILE)) S GLREF=U_OCXFILE
+84 ;;R^"860.8:",100,7
+85 ;;D^ ; E S GLREF=$$FILE^OCXBDTD(+OCXFILE,"GLOBAL NAME") Q:'$L(GLREF) ""
+86 ;;R^"860.8:",100,8
+87 ;;D^T+; I $G(OCXTRACE) W !,"%%%%",?20," GLREF: ",GLREF," RESOLVES TO: ",$P($G(@(GLREF_(+D0)_",0)")),U,1)
+88 ;;R^"860.8:",100,9
+89 ;;D^ ; Q $P($G(@(GLREF_(+D0)_",0)")),U,1)
+90 ;;R^"860.8:",100,10
+91 ;;D^ ; ;
+92 ;;EOR^
+93 ;;KEY^860.8:^CHECK IF THIS IS A NEW ELEMENT
+94 ;;R^"860.8:",.01,"E"
+95 ;;D^CHECK IF THIS IS A NEW ELEMENT
+96 ;;R^"860.8:",.02,"E"
+97 ;;D^NEWELEM
+98 ;;R^"860.8:",1,1
+99 ;;D^ ;NEWELEM(DFN,OCXRUL,OCXREL,OCXELE,OCXTIME) ; This Local Extrinsic Function returns a 1 if this element (OCXELE)
+100 ;;R^"860.8:",1,2
+101 ;;D^ ; ; is newly triggered and a 0 if it has been responsible for triggering
+102 ;;R^"860.8:",1,3
+103 ;;D^ ; ; this rule (OCXRUL) in the past.
+104 ;;R^"860.8:",1,4
+105 ;;D^ ; ;
+106 ;;R^"860.8:",100,1
+107 ;;D^ ;NEWELEM(DFN,OCXRUL,OCXREL,OCXELE) ; This Local Extrinsic Function returns a 1 if this element (OCXELE)
+108 ;;R^"860.8:",100,2
+109 ;;D^ ; ; is newly triggered and a 0 if it has been responsible for triggering
+110 ;;R^"860.8:",100,3
+111 ;;D^ ; ; this rule (OCXRUL) in the past.
+112 ;;R^"860.8:",100,4
+113 ;;D^ ; ;
+114 ;;R^"860.8:",100,5
+115 ;;D^ ; ;
+116 ;;R^"860.8:",100,6
+117 ;;D^ ; Q
+118 ;;R^"860.8:",100,7
+119 ;;D^ ; ;
+120 ;;R^"860.8:",100,8
+121 ;;D^ ; ;
+122 ;;EOR^
+123 ;;KEY^860.8:^RETURN RENAL FUNCTION VALUES
+124 ;;R^"860.8:",.01,"E"
+125 ;;D^RETURN RENAL FUNCTION VALUES
+126 ;;R^"860.8:",.02,"E"
+127 ;;D^RENAL
+128 ;;R^"860.8:",100,1
+129 ;;D^ ;RENAL(DFN) ;
+130 ;;R^"860.8:",100,2
+131 ;;D^ ; ;
+132 ;;R^"860.8:",100,3
+133 ;;D^ ; N OCXV,OCXX,OCXTL,OCXTERM,OCXSLIST,OCXS S OCXV=""
+134 ;;R^"860.8:",100,4
+135 ;;D^ ; S OCXSLIST="" Q:'$$TERMLKUP("SERUM SPECIMEN",.OCXSLIST)
+136 ;1;
+137 ;