ORQORB ; slc/CLA - Functions which return OE/RR Notification information ;12/15/97
;;3.0;ORDER ENTRY/RESULTS REPORTING;**6,173,190,215**;Dec 17, 1997
Q
LIST(Y) ;return list of notifications from Notification File [#100.9]
; RETURN IEN^NAME^URGENCY
N I,J,V
S I=1
S J=0 F S J=$O(^ORD(100.9,"B",J)) Q:J="" S V=0,V=$O(^ORD(100.9,"B",J,V)) S Y(I)=V_"^"_J_"^"_^ORD(100.9,V,3),I=I+1
Q
LISTON(Y,USER) ;return notifications the user has turned On or OFF
; RETURN NOTIF IEN^NOTIF NAME^ON/OFF FLAG
N I,J,V,Z,FLAG
S I=1,FLAG=""
S J=0 F S J=$O(^ORD(100.9,"B",J)) Q:J="" S V=0,V=$O(^ORD(100.9,"B",J,V)) D
.S Z=0,Z=$O(^ORD(100.9,"E",V,USER,Z))
.I Z>0 S FLAG="ON"
.E S FLAG="OFF"
.S Y(I)=V_"^"_J_"^"_FLAG,I=I+1
Q
URGENCY(ORY,ORN) ;return urgency for the notification passed
N ORSRV
S ORSRV=$G(^VA(200,DUZ,5)) I +ORSRV>0 S ORSRV=$P(ORSRV,U)
S ORY=$$GET^XPAR("USR^SRV.`"_$G(ORSRV)_"^DIV^SYS^PKG","ORB URGENCY",ORN,"I")
Q
URGLIST(ORY) ;return list of notification urgencies
N ORSRV,ORN,ORU
S ORN=0 F S ORN=$O(^ORD(100.9,ORN)) Q:+$G(ORN)<1 D
.S ORSRV=$G(^VA(200,DUZ,5)) I +ORSRV>0 S ORSRV=$P(ORSRV,U)
.S ORU=$$GET^XPAR("USR^SRV.`"_$G(ORSRV)_"^DIV^SYS^PKG","ORB URGENCY",ORN,"I")
.S ORY(ORN)=ORU
Q
SORT(ORY) ;return notification sort method for user/division/system/pkg
S ORY=$$GET^XPAR("USR^DIV^SYS^PKG","ORB SORT METHOD",1,"I")
Q
REMLIST(ORY) ;return list of notification remove without processing values
N ORN,ORU
S ORN=0 F S ORN=$O(^ORD(100.9,ORN)) Q:+$G(ORN)<1 D
.S ORU=$$GET^XPAR("SYS","ORB REMOVE",ORN,"I")
.S ORY(ORN)=ORU
Q
REMNONOR(ORY) ;return list of non-or alerts that can be removed without processing
N ORD,ORA
D GETLST^XPAR(.ORD,"ALL","ORB REMOVE NON-OR","I")
Q:+$G(ORD)<1
S ORA="" F S ORA=$O(ORD(ORA)) Q:ORA="" D
.I ORD(ORA)=1 S ORY(ORA)=""
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HORQORB 1835 printed Dec 13, 2024@02:33:20 Page 2
ORQORB ; slc/CLA - Functions which return OE/RR Notification information ;12/15/97
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**6,173,190,215**;Dec 17, 1997
+2 QUIT
LIST(Y) ;return list of notifications from Notification File [#100.9]
+1 ; RETURN IEN^NAME^URGENCY
+2 NEW I,J,V
+3 SET I=1
+4 SET J=0
FOR
SET J=$ORDER(^ORD(100.9,"B",J))
if J=""
QUIT
SET V=0
SET V=$ORDER(^ORD(100.9,"B",J,V))
SET Y(I)=V_"^"_J_"^"_^ORD(100.9,V,3)
SET I=I+1
+5 QUIT
LISTON(Y,USER) ;return notifications the user has turned On or OFF
+1 ; RETURN NOTIF IEN^NOTIF NAME^ON/OFF FLAG
+2 NEW I,J,V,Z,FLAG
+3 SET I=1
SET FLAG=""
+4 SET J=0
FOR
SET J=$ORDER(^ORD(100.9,"B",J))
if J=""
QUIT
SET V=0
SET V=$ORDER(^ORD(100.9,"B",J,V))
Begin DoDot:1
+5 SET Z=0
SET Z=$ORDER(^ORD(100.9,"E",V,USER,Z))
+6 IF Z>0
SET FLAG="ON"
+7 IF '$TEST
SET FLAG="OFF"
+8 SET Y(I)=V_"^"_J_"^"_FLAG
SET I=I+1
End DoDot:1
+9 QUIT
URGENCY(ORY,ORN) ;return urgency for the notification passed
+1 NEW ORSRV
+2 SET ORSRV=$GET(^VA(200,DUZ,5))
IF +ORSRV>0
SET ORSRV=$PIECE(ORSRV,U)
+3 SET ORY=$$GET^XPAR("USR^SRV.`"_$GET(ORSRV)_"^DIV^SYS^PKG","ORB URGENCY",ORN,"I")
+4 QUIT
URGLIST(ORY) ;return list of notification urgencies
+1 NEW ORSRV,ORN,ORU
+2 SET ORN=0
FOR
SET ORN=$ORDER(^ORD(100.9,ORN))
if +$GET(ORN)<1
QUIT
Begin DoDot:1
+3 SET ORSRV=$GET(^VA(200,DUZ,5))
IF +ORSRV>0
SET ORSRV=$PIECE(ORSRV,U)
+4 SET ORU=$$GET^XPAR("USR^SRV.`"_$GET(ORSRV)_"^DIV^SYS^PKG","ORB URGENCY",ORN,"I")
+5 SET ORY(ORN)=ORU
End DoDot:1
+6 QUIT
SORT(ORY) ;return notification sort method for user/division/system/pkg
+1 SET ORY=$$GET^XPAR("USR^DIV^SYS^PKG","ORB SORT METHOD",1,"I")
+2 QUIT
REMLIST(ORY) ;return list of notification remove without processing values
+1 NEW ORN,ORU
+2 SET ORN=0
FOR
SET ORN=$ORDER(^ORD(100.9,ORN))
if +$GET(ORN)<1
QUIT
Begin DoDot:1
+3 SET ORU=$$GET^XPAR("SYS","ORB REMOVE",ORN,"I")
+4 SET ORY(ORN)=ORU
End DoDot:1
+5 QUIT
REMNONOR(ORY) ;return list of non-or alerts that can be removed without processing
+1 NEW ORD,ORA
+2 DO GETLST^XPAR(.ORD,"ALL","ORB REMOVE NON-OR","I")
+3 if +$GET(ORD)<1
QUIT
+4 SET ORA=""
FOR
SET ORA=$ORDER(ORD(ORA))
if ORA=""
QUIT
Begin DoDot:1
+5 IF ORD(ORA)=1
SET ORY(ORA)=""
End DoDot:1
+6 QUIT