OCXRU009 ;SLC/RJS,CLA - OCX PACKAGE RULE TRANSPORT ROUTINE (Delete after Install of OR*3*96) ;JAN 30,2001 at 11:16
;;3.0;ORDER ENTRY/RESULTS REPORTING;**96**;Dec 17,1997
;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
;
S ;
;
D DOT^OCXRULE
;
;
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 ^OCXRU00A
;
Q
;
DATA ;
;
;;R^"860.8:",100,61
;;D^T-; ..D SETAP(OCXGR2_")","860.71223P",.OCXDATA,OCXDFI)
;;R^"860.8:",100,62
;;D^ ; ;
;;R^"860.8:",100,63
;;D^ ; Q 1
;;R^"860.8:",100,64
;;D^ ; ;
;;R^"860.8:",100,65
;;D^T+;SETAP(ROOT,DD,ITEM,ITEMNAME,DATA,DA) ; Set Rule Event data
;;R^"860.8:",100,66
;;D^T-;SETAP(ROOT,DD,DATA,DA) ; Set Rule Event data
;;R^"860.8:",100,67
;;D^ ; S:(DD&'$D(@ROOT@(0))) @ROOT@(0)=U_DD_U
;;R^"860.8:",100,68
;;D^ ; S:'$D(@ROOT@(DA,0)) $P(@ROOT@(0),U,3)=$P(@ROOT@(0),U,3)+1,$P(@ROOT@(0),U,4)=DA
;;R^"860.8:",100,69
;;D^ ; M @ROOT=DATA
;;R^"860.8:",100,70
;;D^T+; W:$G(OCXTRACE) !,"File Active Data ",ITEM,": ",ITEMNAME
;;R^"860.8:",100,71
;;D^ ; ;
;;R^"860.8:",100,72
;;D^ ; Q
;;R^"860.8:",100,73
;;D^ ; ;
;;R^"860.8:",100,74
;;D^ ; ;
;;EOR^
;;KEY^860.8:^ORDER CANCELING PROVIDER
;;R^"860.8:",.01,"E"
;;D^ORDER CANCELING PROVIDER
;;R^"860.8:",.02,"E"
;;D^CANCELER
;;R^"860.8:",1,1
;;D^Extrinsic function returns DUZ of provider who cancelled the order.
;;R^"860.8:",100,1
;;D^ ;CANCELER(ORNUM) ;
;;R^"860.8:",100,2
;;D^ ; ;
;;R^"860.8:",100,3
;;D^ ; Q:'$G(ORNUM) ""
;;R^"860.8:",100,4
;;D^ ; S ORNUM=+$G(ORNUM)
;;R^"860.8:",100,5
;;D^ ; N ORQDUZ
;;R^"860.8:",100,6
;;D^ ; Q:'$D(^OR(100,ORNUM,6)) ""
;;R^"860.8:",100,7
;;D^ ; S ORQDUZ=$P(^OR(100,ORNUM,6),U,2)
;;R^"860.8:",100,8
;;D^ ; Q ORQDUZ
;;R^"860.8:",100,9
;;D^ ; ;
;;EOR^
;;KEY^860.8:^ORDERABLE ITEM
;;R^"860.8:",.01,"E"
;;D^ORDERABLE ITEM
;;R^"860.8:",.02,"E"
;;D^OI
;;R^"860.8:",1,1
;;D^Extrinsic function returns the orderable item for an order number.
;;R^"860.8:",100,1
;;D^ ;OI(OCXOR) ;func rtns orderable item for an order number (OCXOR)
;;R^"860.8:",100,2
;;D^ ; Q:+$G(OCXOR)<1 ""
;;R^"860.8:",100,3
;;D^ ; N OCXOI S OCXOI=""
;;R^"860.8:",100,4
;;D^ ; S OCXOI=$G(^OR(100,+$G(OCXOR),.1,1,0))
;;R^"860.8:",100,5
;;D^ ; Q OCXOI
;;R^"860.8:",100,6
;;D^ ; ;
;;EOR^
;;KEY^860.8:^ORDERING PROVIDER
;;R^"860.8:",.01,"E"
;;D^ORDERING PROVIDER
;;R^"860.8:",.02,"E"
;;D^ORDERER
;;R^"860.8:",1,1
;;D^Extrinsic function returns DUZ of provider who entered original order.
;;R^"860.8:",100,1
;;D^ ;ORDERER(ORNUM) ;
;;R^"860.8:",100,2
;;D^ ; ;
;;R^"860.8:",100,3
;;D^ ; Q:'$G(ORNUM) ""
;;R^"860.8:",100,4
;;D^ ; S ORNUM=+$G(ORNUM)
;;R^"860.8:",100,5
;;D^ ; N ORQDUZ,ORQI S ORQDUZ=""
;;R^"860.8:",100,6
;;D^ ; I $L($G(^OR(100,ORNUM,8,0))) D
;;R^"860.8:",100,7
;;D^ ; .S ORQI=0,ORQI=$O(^OR(100,ORNUM,8,"C","NW",ORQI))
;;R^"860.8:",100,8
;;D^ ; Q:+$G(ORQI)<1 ""
;;R^"860.8:",100,9
;;D^ ; S ORQDUZ=$P(^OR(100,ORNUM,8,ORQI,0),U,3)
;;R^"860.8:",100,10
;;D^ ; Q ORQDUZ
;;R^"860.8:",100,11
;;D^ ; ;
;;EOR^
;;KEY^860.8:^PATIENT LOCATION
;;R^"860.8:",.01,"E"
;;D^PATIENT LOCATION
;;R^"860.8:",.02,"E"
;;D^PATLOC
;;R^"860.8:",1,1
;;D^Returns the Inpatient or Outpatient location for the patient.
;;R^"860.8:",1,2
;;D^
;;R^"860.8:",1,3
;;D^ Input: DFN
;;R^"860.8:",1,4
;;D^ Output: Patient Status (I/O) Inpatient/Outpatient
;;R^"860.8:",1,5
;;D^ Patient Location (Free text name)
;;R^"860.8:",100,1
;;D^ ;PATLOC(DFN) ;
;;R^"860.8:",100,2
;;D^ ; ;
;;R^"860.8:",100,3
;;D^ ; N OCXP1,OCXP2
;;R^"860.8:",100,4
;;D^ ; S OCXP1=$G(^TMP("OCXSWAP",$J,"OCXODATA","PV1",2))
;;R^"860.8:",100,5
;;D^ ; S OCXP2=$P($G(^TMP("OCXSWAP",$J,"OCXODATA","PV1",3)),"^",1)
;;R^"860.8:",100,6
;;D^T+; W:$G(OCXTRACE) !,"OCXP2: ",$G(OCXP1)
;;R^"860.8:",100,7
;;D^T+; W:$G(OCXTRACE) !,"OCXP2: ",$G(OCXP2)
;;R^"860.8:",100,8
;;D^ ; I OCXP2 D
;;R^"860.8:",100,9
;;D^ ; .S OCXP2=$P($G(^SC(+OCXP2,0)),"^",1,2)
;;R^"860.8:",100,10
;;D^ ; .I $L($P(OCXP2,"^",2)) S OCXP2=$P(OCXP2,"^",2)
;;R^"860.8:",100,11
;;D^ ; .E S OCXP2=$P(OCXP2,"^",1)
;;R^"860.8:",100,12
;;D^ ; .S:'$L(OCXP2) OCXP2="NO LOC"
;;R^"860.8:",100,13
;;D^ ; I $L(OCXP1),$L(OCXP2) Q OCXP1_"^"_OCXP2
;;R^"860.8:",100,14
;;D^ ; ;
;;R^"860.8:",100,15
;;D^ ; S OCXP2=$G(^DPT(+$G(DFN),.1))
;;R^"860.8:",100,16
;;D^ ; I $L(OCXP2) Q "I^"_OCXP2
;;R^"860.8:",100,17
;;D^ ; Q "O^OUTPT"
;;R^"860.8:",100,18
;;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:^STRING CONTAINS ONE OF A LIST OF VALUES
;;R^"860.8:",.01,"E"
;;D^STRING CONTAINS ONE OF A LIST OF VALUES
;;R^"860.8:",.02,"E"
;;D^CLIST
;;R^"860.8:",100,1
;;D^ ;CLIST(DATA,LIST) ; DOES THE DATA FIELD CONTAIN AN ELEMENT IN THE LIST
;;R^"860.8:",100,2
;;D^ ; ;
;;R^"860.8:",100,3
;;D^T+; W:$G(OCXTRACE) !!,"$$CLIST(",DATA,",""",LIST,""")"
;;R^"860.8:",100,4
;;D^ ; N PC F PC=1:1:$L(LIST,","),0 I PC,$L($P(LIST,",",PC)),(DATA[$P(LIST,",",PC)) Q
;;R^"860.8:",100,5
;;D^ ; Q ''PC
;;EOR^
;;KEY^860.8:^WARD ROOM-BED
;;R^"860.8:",.01,"E"
;;D^WARD ROOM-BED
;;R^"860.8:",.02,"E"
;;D^WARDRMBD
;;R^"860.8:",1,1
;;D^Returns the patient's ward and room-bed if they exist. Can be used to
;;R^"860.8:",1,2
;;D^determine if the patient is inpatient or outpatient. Official MAS policy
;;R^"860.8:",1,3
;;D^indicates that if the patient has a ward (^DPT(DFN,.1)), then they are an
;;R^"860.8:",1,4
;;D^inpatient. If the .1 node does not exist, they are an outpatient.
;;R^"860.8:",100,1
;;D^ ;WARDRMBD(DFN) ;
;;R^"860.8:",100,2
;;D^ ; ;
;;R^"860.8:",100,3
;;D^ ; Q:'$G(DFN) 0
;;R^"860.8:",100,4
;;D^ ; N OUT S OUT=$G(^DPT(DFN,.1)) Q:'$L(OUT) 0
;;R^"860.8:",100,5
;;D^ ; S OUT=1_"^"_OUT_" "_$G(^DPT(DFN,.101)) Q OUT
;;R^"860.8:",100,6
;;D^ ; ;
;;EOR^
;;EOF^OCXS(860.8)^1
;;SOF^860.6 ORDER CHECK DATA CONTEXT
;;KEY^860.6:^CPRS ORDER PRESCAN
;;R^"860.6:",.01,"E"
;;D^CPRS ORDER PRESCAN
;;R^"860.6:",.02,"E"
;;D^OEPS
;;R^"860.6:",1,"E"
;;D^DATA DRIVEN
;;EOR^
;;KEY^860.6:^CPRS ORDER PROTOCOL
;;R^"860.6:",.01,"E"
;;D^CPRS ORDER PROTOCOL
;;R^"860.6:",.02,"E"
;;D^OERR
;;R^"860.6:",1,"E"
;;D^DATA DRIVEN
;;EOR^
;;KEY^860.6:^DATABASE LOOKUP
;;R^"860.6:",.01,"E"
;;D^DATABASE LOOKUP
;;R^"860.6:",.02,"E"
;;D^DL
;;R^"860.6:",1,"E"
;;D^PACKAGE LOOKUP
;;EOR^
;;KEY^860.6:^GENERIC HL7 MESSAGE ARRAY
;1;
;
OCXRU009 ;SLC/RJS,CLA - OCX PACKAGE RULE TRANSPORT ROUTINE (Delete after Install of OR*3*96) ;JAN 30,2001 at 11:16
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**96**;Dec 17,1997
+2 ;; ;;ORDER CHECK EXPERT version 1.01 released OCT 29,1998
+3 ;
S ;
+1 ;
+2 DO DOT^OCXRULE
+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 ^OCXRU00A
+10 ;
+11 QUIT
+12 ;
DATA ;
+1 ;
+2 ;;R^"860.8:",100,61
+3 ;;D^T-; ..D SETAP(OCXGR2_")","860.71223P",.OCXDATA,OCXDFI)
+4 ;;R^"860.8:",100,62
+5 ;;D^ ; ;
+6 ;;R^"860.8:",100,63
+7 ;;D^ ; Q 1
+8 ;;R^"860.8:",100,64
+9 ;;D^ ; ;
+10 ;;R^"860.8:",100,65
+11 ;;D^T+;SETAP(ROOT,DD,ITEM,ITEMNAME,DATA,DA) ; Set Rule Event data
+12 ;;R^"860.8:",100,66
+13 ;;D^T-;SETAP(ROOT,DD,DATA,DA) ; Set Rule Event data
+14 ;;R^"860.8:",100,67
+15 ;;D^ ; S:(DD&'$D(@ROOT@(0))) @ROOT@(0)=U_DD_U
+16 ;;R^"860.8:",100,68
+17 ;;D^ ; S:'$D(@ROOT@(DA,0)) $P(@ROOT@(0),U,3)=$P(@ROOT@(0),U,3)+1,$P(@ROOT@(0),U,4)=DA
+18 ;;R^"860.8:",100,69
+19 ;;D^ ; M @ROOT=DATA
+20 ;;R^"860.8:",100,70
+21 ;;D^T+; W:$G(OCXTRACE) !,"File Active Data ",ITEM,": ",ITEMNAME
+22 ;;R^"860.8:",100,71
+23 ;;D^ ; ;
+24 ;;R^"860.8:",100,72
+25 ;;D^ ; Q
+26 ;;R^"860.8:",100,73
+27 ;;D^ ; ;
+28 ;;R^"860.8:",100,74
+29 ;;D^ ; ;
+30 ;;EOR^
+31 ;;KEY^860.8:^ORDER CANCELING PROVIDER
+32 ;;R^"860.8:",.01,"E"
+33 ;;D^ORDER CANCELING PROVIDER
+34 ;;R^"860.8:",.02,"E"
+35 ;;D^CANCELER
+36 ;;R^"860.8:",1,1
+37 ;;D^Extrinsic function returns DUZ of provider who cancelled the order.
+38 ;;R^"860.8:",100,1
+39 ;;D^ ;CANCELER(ORNUM) ;
+40 ;;R^"860.8:",100,2
+41 ;;D^ ; ;
+42 ;;R^"860.8:",100,3
+43 ;;D^ ; Q:'$G(ORNUM) ""
+44 ;;R^"860.8:",100,4
+45 ;;D^ ; S ORNUM=+$G(ORNUM)
+46 ;;R^"860.8:",100,5
+47 ;;D^ ; N ORQDUZ
+48 ;;R^"860.8:",100,6
+49 ;;D^ ; Q:'$D(^OR(100,ORNUM,6)) ""
+50 ;;R^"860.8:",100,7
+51 ;;D^ ; S ORQDUZ=$P(^OR(100,ORNUM,6),U,2)
+52 ;;R^"860.8:",100,8
+53 ;;D^ ; Q ORQDUZ
+54 ;;R^"860.8:",100,9
+55 ;;D^ ; ;
+56 ;;EOR^
+57 ;;KEY^860.8:^ORDERABLE ITEM
+58 ;;R^"860.8:",.01,"E"
+59 ;;D^ORDERABLE ITEM
+60 ;;R^"860.8:",.02,"E"
+61 ;;D^OI
+62 ;;R^"860.8:",1,1
+63 ;;D^Extrinsic function returns the orderable item for an order number.
+64 ;;R^"860.8:",100,1
+65 ;;D^ ;OI(OCXOR) ;func rtns orderable item for an order number (OCXOR)
+66 ;;R^"860.8:",100,2
+67 ;;D^ ; Q:+$G(OCXOR)<1 ""
+68 ;;R^"860.8:",100,3
+69 ;;D^ ; N OCXOI S OCXOI=""
+70 ;;R^"860.8:",100,4
+71 ;;D^ ; S OCXOI=$G(^OR(100,+$G(OCXOR),.1,1,0))
+72 ;;R^"860.8:",100,5
+73 ;;D^ ; Q OCXOI
+74 ;;R^"860.8:",100,6
+75 ;;D^ ; ;
+76 ;;EOR^
+77 ;;KEY^860.8:^ORDERING PROVIDER
+78 ;;R^"860.8:",.01,"E"
+79 ;;D^ORDERING PROVIDER
+80 ;;R^"860.8:",.02,"E"
+81 ;;D^ORDERER
+82 ;;R^"860.8:",1,1
+83 ;;D^Extrinsic function returns DUZ of provider who entered original order.
+84 ;;R^"860.8:",100,1
+85 ;;D^ ;ORDERER(ORNUM) ;
+86 ;;R^"860.8:",100,2
+87 ;;D^ ; ;
+88 ;;R^"860.8:",100,3
+89 ;;D^ ; Q:'$G(ORNUM) ""
+90 ;;R^"860.8:",100,4
+91 ;;D^ ; S ORNUM=+$G(ORNUM)
+92 ;;R^"860.8:",100,5
+93 ;;D^ ; N ORQDUZ,ORQI S ORQDUZ=""
+94 ;;R^"860.8:",100,6
+95 ;;D^ ; I $L($G(^OR(100,ORNUM,8,0))) D
+96 ;;R^"860.8:",100,7
+97 ;;D^ ; .S ORQI=0,ORQI=$O(^OR(100,ORNUM,8,"C","NW",ORQI))
+98 ;;R^"860.8:",100,8
+99 ;;D^ ; Q:+$G(ORQI)<1 ""
+100 ;;R^"860.8:",100,9
+101 ;;D^ ; S ORQDUZ=$P(^OR(100,ORNUM,8,ORQI,0),U,3)
+102 ;;R^"860.8:",100,10
+103 ;;D^ ; Q ORQDUZ
+104 ;;R^"860.8:",100,11
+105 ;;D^ ; ;
+106 ;;EOR^
+107 ;;KEY^860.8:^PATIENT LOCATION
+108 ;;R^"860.8:",.01,"E"
+109 ;;D^PATIENT LOCATION
+110 ;;R^"860.8:",.02,"E"
+111 ;;D^PATLOC
+112 ;;R^"860.8:",1,1
+113 ;;D^Returns the Inpatient or Outpatient location for the patient.
+114 ;;R^"860.8:",1,2
+115 ;;D^
+116 ;;R^"860.8:",1,3
+117 ;;D^ Input: DFN
+118 ;;R^"860.8:",1,4
+119 ;;D^ Output: Patient Status (I/O) Inpatient/Outpatient
+120 ;;R^"860.8:",1,5
+121 ;;D^ Patient Location (Free text name)
+122 ;;R^"860.8:",100,1
+123 ;;D^ ;PATLOC(DFN) ;
+124 ;;R^"860.8:",100,2
+125 ;;D^ ; ;
+126 ;;R^"860.8:",100,3
+127 ;;D^ ; N OCXP1,OCXP2
+128 ;;R^"860.8:",100,4
+129 ;;D^ ; S OCXP1=$G(^TMP("OCXSWAP",$J,"OCXODATA","PV1",2))
+130 ;;R^"860.8:",100,5
+131 ;;D^ ; S OCXP2=$P($G(^TMP("OCXSWAP",$J,"OCXODATA","PV1",3)),"^",1)
+132 ;;R^"860.8:",100,6
+133 ;;D^T+; W:$G(OCXTRACE) !,"OCXP2: ",$G(OCXP1)
+134 ;;R^"860.8:",100,7
+135 ;;D^T+; W:$G(OCXTRACE) !,"OCXP2: ",$G(OCXP2)
+136 ;;R^"860.8:",100,8
+137 ;;D^ ; I OCXP2 D
+138 ;;R^"860.8:",100,9
+139 ;;D^ ; .S OCXP2=$P($G(^SC(+OCXP2,0)),"^",1,2)
+140 ;;R^"860.8:",100,10
+141 ;;D^ ; .I $L($P(OCXP2,"^",2)) S OCXP2=$P(OCXP2,"^",2)
+142 ;;R^"860.8:",100,11
+143 ;;D^ ; .E S OCXP2=$P(OCXP2,"^",1)
+144 ;;R^"860.8:",100,12
+145 ;;D^ ; .S:'$L(OCXP2) OCXP2="NO LOC"
+146 ;;R^"860.8:",100,13
+147 ;;D^ ; I $L(OCXP1),$L(OCXP2) Q OCXP1_"^"_OCXP2
+148 ;;R^"860.8:",100,14
+149 ;;D^ ; ;
+150 ;;R^"860.8:",100,15
+151 ;;D^ ; S OCXP2=$G(^DPT(+$G(DFN),.1))
+152 ;;R^"860.8:",100,16
+153 ;;D^ ; I $L(OCXP2) Q "I^"_OCXP2
+154 ;;R^"860.8:",100,17
+155 ;;D^ ; Q "O^OUTPT"
+156 ;;R^"860.8:",100,18
+157 ;;D^ ; ;
+158 ;;EOR^
+159 ;;KEY^860.8:^RETURN POINTED TO VALUE
+160 ;;R^"860.8:",.01,"E"
+161 ;;D^RETURN POINTED TO VALUE
+162 ;;R^"860.8:",.02,"E"
+163 ;;D^POINTER
+164 ;;R^"860.8:",1,1
+165 ;;D^ ;POINTER(OCXFILE,D0) ; This Local Extrinsic Function gets the value of the name field
+166 ;;R^"860.8:",1,2
+167 ;;D^ ; ; of record D0 in file OCXFILE
+168 ;;R^"860.8:",100,1
+169 ;;D^ ;POINTER(OCXFILE,D0) ; This Local Extrinsic Function gets the value of the name field
+170 ;;R^"860.8:",100,2
+171 ;;D^ ; ; of record D0 in file OCXFILE
+172 ;;R^"860.8:",100,3
+173 ;;D^T+; I $G(OCXTRACE) W !,"%%%%",?20," FILE: ",$G(OCXFILE)," D0: ",$G(D0)
+174 ;;R^"860.8:",100,4
+175 ;;D^ ; Q:'$G(D0) "" Q:'$L($G(OCXFILE)) ""
+176 ;;R^"860.8:",100,5
+177 ;;D^ ; N GLREF
+178 ;;R^"860.8:",100,6
+179 ;;D^ ; I '(OCXFILE=(+OCXFILE)) S GLREF=U_OCXFILE
+180 ;;R^"860.8:",100,7
+181 ;;D^ ; E S GLREF=$$FILE^OCXBDTD(+OCXFILE,"GLOBAL NAME") Q:'$L(GLREF) ""
+182 ;;R^"860.8:",100,8
+183 ;;D^T+; I $G(OCXTRACE) W !,"%%%%",?20," GLREF: ",GLREF," RESOLVES TO: ",$P($G(@(GLREF_(+D0)_",0)")),U,1)
+184 ;;R^"860.8:",100,9
+185 ;;D^ ; Q $P($G(@(GLREF_(+D0)_",0)")),U,1)
+186 ;;R^"860.8:",100,10
+187 ;;D^ ; ;
+188 ;;EOR^
+189 ;;KEY^860.8:^STRING CONTAINS ONE OF A LIST OF VALUES
+190 ;;R^"860.8:",.01,"E"
+191 ;;D^STRING CONTAINS ONE OF A LIST OF VALUES
+192 ;;R^"860.8:",.02,"E"
+193 ;;D^CLIST
+194 ;;R^"860.8:",100,1
+195 ;;D^ ;CLIST(DATA,LIST) ; DOES THE DATA FIELD CONTAIN AN ELEMENT IN THE LIST
+196 ;;R^"860.8:",100,2
+197 ;;D^ ; ;
+198 ;;R^"860.8:",100,3
+199 ;;D^T+; W:$G(OCXTRACE) !!,"$$CLIST(",DATA,",""",LIST,""")"
+200 ;;R^"860.8:",100,4
+201 ;;D^ ; N PC F PC=1:1:$L(LIST,","),0 I PC,$L($P(LIST,",",PC)),(DATA[$P(LIST,",",PC)) Q
+202 ;;R^"860.8:",100,5
+203 ;;D^ ; Q ''PC
+204 ;;EOR^
+205 ;;KEY^860.8:^WARD ROOM-BED
+206 ;;R^"860.8:",.01,"E"
+207 ;;D^WARD ROOM-BED
+208 ;;R^"860.8:",.02,"E"
+209 ;;D^WARDRMBD
+210 ;;R^"860.8:",1,1
+211 ;;D^Returns the patient's ward and room-bed if they exist. Can be used to
+212 ;;R^"860.8:",1,2
+213 ;;D^determine if the patient is inpatient or outpatient. Official MAS policy
+214 ;;R^"860.8:",1,3
+215 ;;D^indicates that if the patient has a ward (^DPT(DFN,.1)), then they are an
+216 ;;R^"860.8:",1,4
+217 ;;D^inpatient. If the .1 node does not exist, they are an outpatient.
+218 ;;R^"860.8:",100,1
+219 ;;D^ ;WARDRMBD(DFN) ;
+220 ;;R^"860.8:",100,2
+221 ;;D^ ; ;
+222 ;;R^"860.8:",100,3
+223 ;;D^ ; Q:'$G(DFN) 0
+224 ;;R^"860.8:",100,4
+225 ;;D^ ; N OUT S OUT=$G(^DPT(DFN,.1)) Q:'$L(OUT) 0
+226 ;;R^"860.8:",100,5
+227 ;;D^ ; S OUT=1_"^"_OUT_" "_$G(^DPT(DFN,.101)) Q OUT
+228 ;;R^"860.8:",100,6
+229 ;;D^ ; ;
+230 ;;EOR^
+231 ;;EOF^OCXS(860.8)^1
+232 ;;SOF^860.6 ORDER CHECK DATA CONTEXT
+233 ;;KEY^860.6:^CPRS ORDER PRESCAN
+234 ;;R^"860.6:",.01,"E"
+235 ;;D^CPRS ORDER PRESCAN
+236 ;;R^"860.6:",.02,"E"
+237 ;;D^OEPS
+238 ;;R^"860.6:",1,"E"
+239 ;;D^DATA DRIVEN
+240 ;;EOR^
+241 ;;KEY^860.6:^CPRS ORDER PROTOCOL
+242 ;;R^"860.6:",.01,"E"
+243 ;;D^CPRS ORDER PROTOCOL
+244 ;;R^"860.6:",.02,"E"
+245 ;;D^OERR
+246 ;;R^"860.6:",1,"E"
+247 ;;D^DATA DRIVEN
+248 ;;EOR^
+249 ;;KEY^860.6:^DATABASE LOOKUP
+250 ;;R^"860.6:",.01,"E"
+251 ;;D^DATABASE LOOKUP
+252 ;;R^"860.6:",.02,"E"
+253 ;;D^DL
+254 ;;R^"860.6:",1,"E"
+255 ;;D^PACKAGE LOOKUP
+256 ;;EOR^
+257 ;;KEY^860.6:^GENERIC HL7 MESSAGE ARRAY
+258 ;1;
+259 ;