ABSPOS2D ; IHS/FCS/DRS - Poke the queues ;
;;1.0;PHARMACY POINT OF SALE;;JUN 21, 2001
Q
POKE ;EP - from ABSPOS2A ; protocol ABSPOS P2 POKE
; If things seem to be stalled, here's a kludgey way to start up
; more background jobs to give 'em a poke.
W !,"Poking the pharmacy POS processing queues:",!
I '$$LOCKPOS^ABSPOSUD Q
W "."
N A,B,ABSBRXI F A=40,50 D
.S B="" F S B=$O(^ABSPT("AD",A,B)) Q:'B D
..W "."
..S ABSBRXI=B D SETSTAT^ABSPOSU(0) ; restart all of these
..D LOG59^ABSPOSL("POKE set this claim back to restart processing",B)
D ; kill all outbound claims, lest we send claims twice
. N DIALOUT S DIALOUT=0
. F S DIALOUT=$O(^ABSPECX("POS",DIALOUT)) Q:'DIALOUT D
. . N LOCKED S LOCKED=$$LLIST^ABSPOSAP
. . K ^ABSPECX("POS",DIALOUT,"C") ; kill outbound claims, locked or not
. . I LOCKED D ULLIST^ABSPOSAP
D ULOCKPOS^ABSPOSUD
D TASK^ABSPOSIZ W "." H 1
D TASK^ABSPOSQ1 W "." H 1
N DIALOUT
S DIALOUT=$$ANY2SEND^ABSPOSQJ
I DIALOUT D TASK^ABSPOSQ2 W "." H 1
S DIALOUT=$$ANYRESPS^ABSPOSQ4
I DIALOUT D TASK^ABSPOSQ3() W "." H 1
W "OK, they've been POKEd.",!
PZ Q
ABSPOS2D ; IHS/FCS/DRS - Poke the queues ;
+1 ;;1.0;PHARMACY POINT OF SALE;;JUN 21, 2001
+2 QUIT
POKE ;EP - from ABSPOS2A ; protocol ABSPOS P2 POKE
+1 ; If things seem to be stalled, here's a kludgey way to start up
+2 ; more background jobs to give 'em a poke.
+3 WRITE !,"Poking the pharmacy POS processing queues:",!
+4 IF '$$LOCKPOS^ABSPOSUD
QUIT
+5 WRITE "."
+6 NEW A,B,ABSBRXI
FOR A=40,50
Begin DoDot:1
+7 SET B=""
FOR
SET B=$ORDER(^ABSPT("AD",A,B))
IF 'B
QUIT
Begin DoDot:2
+8 WRITE "."
+9 ; restart all of these
SET ABSBRXI=B
DO SETSTAT^ABSPOSU(0)
+10 DO LOG59^ABSPOSL("POKE set this claim back to restart processing",B)
End DoDot:2
End DoDot:1
+11 ; kill all outbound claims, lest we send claims twice
Begin DoDot:1
+12 NEW DIALOUT
SET DIALOUT=0
+13 FOR
SET DIALOUT=$ORDER(^ABSPECX("POS",DIALOUT))
IF 'DIALOUT
QUIT
Begin DoDot:2
+14 NEW LOCKED
SET LOCKED=$$LLIST^ABSPOSAP
+15 ; kill outbound claims, locked or not
KILL ^ABSPECX("POS",DIALOUT,"C")
+16 IF LOCKED
DO ULLIST^ABSPOSAP
End DoDot:2
End DoDot:1
+17 DO ULOCKPOS^ABSPOSUD
+18 DO TASK^ABSPOSIZ
WRITE "."
HANG 1
+19 DO TASK^ABSPOSQ1
WRITE "."
HANG 1
+20 NEW DIALOUT
+21 SET DIALOUT=$$ANY2SEND^ABSPOSQJ
+22 IF DIALOUT
DO TASK^ABSPOSQ2
WRITE "."
HANG 1
+23 SET DIALOUT=$$ANYRESPS^ABSPOSQ4
+24 IF DIALOUT
DO TASK^ABSPOSQ3()
WRITE "."
HANG 1
+25 WRITE "OK, they've been POKEd.",!
PZ QUIT