ABSPOS6M ; IHS/FCS/DRS - Print log of claim ;
;;1.0;PHARMACY POINT OF SALE;;JUN 21, 2001
Q
CLAIMLOG(RXI,DEST) ;EP - from ABSPOS6D
;
; optional parameters: prescription #
; and destination device (already opened)
; Prompts for any missing parameters.
;
; Note that it will give you only the most recent transmit/receive
; If there have been retransmissions, DO ^%GSE for claim number,
; and print the entire log file. The purpose of this part is to
; show when the successful I/O or last failed I/O occurred.
;
I '$D(RXI) S RXI=$$GETRX^ABSPOSIV Q:RXI<1
I $D(DEST) S IO=DEST
E D ^%ZIS I $G(POP) Q
U IO W "Pharmacy POS Log of activity for one prescription",!
N REC,X,X1,X2 M REC=^ABSPT(RXI)
N I F I=0:1:2 I '$D(REC(I)) S REC(I)=""
W "Prescription #",$P(^ABSPT(RXI,1),U,11) ;$G(^PSRX(RXI,0)),U)
S X=$P(REC(1),U) I X W " Refill #",X
W " (RXI=",RXI,")"
W !
W "Patient: "
S X=$P(REC(0),U,6) I X]"" S X=$P($G(^DPT(X,0)),U) W X
W ?50,"Visit: "
S X=$P(REC(0),U,7) I X]"" S X=$G(^AUPNVSIT(X,"VCN")) W X
W !
W "Status: "
S X=$P(REC(0),U,2) W:X'=99 "Q" W X,":",$$STATI^ABSPOSU(X),!
I X=99 D W !
.D DISPRESP^ABSPOSUA
.;W "Result: ",$$RESULTI^ABSPOSU($P(REC(2),U))
.;S X=$P(REC(2),U,2,$L(REC(2),U)) I X]"" W " - ",X
W "Submitted on " S X1=$P(REC(0),U,11) I X1]"" W $$DATETIME^ABSPOSUD(X1),!
W " Last activity @" S X2=$P(REC(0),U,8) I X2]"" D
.W $P($$DATETIME^ABSPOSUD(X2),"@",2)
I X1]"",X2]"" W " Elapsed time: " W $$TIMEDIF^ABSPOSUD(X1,X2)
W !
S X=$P(REC(0),U,4)
I X="" W "No entry "
E W "See also entry `",X
S X1=9002313.02 W " in file #",X1,", ",$P(^DIC(X1,0),U),!
I X]"" D
.S X=$P(REC(0),U,5)
.I X="" W "but there is no entry "
.E W " and entry `",X
S X1=9002313.03 W " in file #",X1,", ",$P(^DIC(X1,0),U),!
W !
W "Log of this claim's activity: ",!
I $$EXISTS^ABSPOSL(RXI) D
. D PRESSANY^ABSPOSU5()
. D PRINTLOG^ABSPOSL(RXI)
E W "Log file for ",RXI," is not on file.",!
S X=$P(REC(0),U,12),X1=$P(REC(0),U,4) ; X=where,X1=claim #
I X,X1 D
.D PRESSANY^ABSPOSU5() ; now that you've seen end of claim log
.W !,"Log of transmission, "
.W "in log file #",$P(X,",")," at line #",$P(X,",",2),":",!
.D PRCLLOG^ABSPOSL(X,X1) ;
;D PRESSANY^ABSPOSU5()
;I IO=$P D ; printout to screen
;D PRESSANY^ABSPOSU5() ; press any key to continue
I '$D(DEST) D ^%ZISC ; we opened the device so we close it
;E caller opened the device, and the caller should close it.
CZ Q
ABSPOS6M ; IHS/FCS/DRS - Print log of claim ;
+1 ;;1.0;PHARMACY POINT OF SALE;;JUN 21, 2001
+2 QUIT
CLAIMLOG(RXI,DEST) ;EP - from ABSPOS6D
+1 ;
+2 ; optional parameters: prescription #
+3 ; and destination device (already opened)
+4 ; Prompts for any missing parameters.
+5 ;
+6 ; Note that it will give you only the most recent transmit/receive
+7 ; If there have been retransmissions, DO ^%GSE for claim number,
+8 ; and print the entire log file. The purpose of this part is to
+9 ; show when the successful I/O or last failed I/O occurred.
+10 ;
+11 IF '$DATA(RXI)
SET RXI=$$GETRX^ABSPOSIV
IF RXI<1
QUIT
+12 IF $DATA(DEST)
SET IO=DEST
+13 IF '$TEST
DO ^%ZIS
IF $GET(POP)
QUIT
+14 USE IO
WRITE "Pharmacy POS Log of activity for one prescription",!
+15 NEW REC,X,X1,X2
MERGE REC=^ABSPT(RXI)
+16 NEW I
FOR I=0:1:2
IF '$DATA(REC(I))
SET REC(I)=""
+17 ;$G(^PSRX(RXI,0)),U)
WRITE "Prescription #",$PIECE(^ABSPT(RXI,1),U,11)
+18 SET X=$PIECE(REC(1),U)
IF X
WRITE " Refill #",X
+19 WRITE " (RXI=",RXI,")"
+20 WRITE !
+21 WRITE "Patient: "
+22 SET X=$PIECE(REC(0),U,6)
IF X]""
SET X=$PIECE($GET(^DPT(X,0)),U)
WRITE X
+23 WRITE ?50,"Visit: "
+24 SET X=$PIECE(REC(0),U,7)
IF X]""
SET X=$GET(^AUPNVSIT(X,"VCN"))
WRITE X
+25 WRITE !
+26 WRITE "Status: "
+27 SET X=$PIECE(REC(0),U,2)
IF X'=99
WRITE "Q"
WRITE X,":",$$STATI^ABSPOSU(X),!
+28 IF X=99
Begin DoDot:1
+29 DO DISPRESP^ABSPOSUA
+30 ;W "Result: ",$$RESULTI^ABSPOSU($P(REC(2),U))
+31 ;S X=$P(REC(2),U,2,$L(REC(2),U)) I X]"" W " - ",X
End DoDot:1
WRITE !
+32 WRITE "Submitted on "
SET X1=$PIECE(REC(0),U,11)
IF X1]""
WRITE $$DATETIME^ABSPOSUD(X1),!
+33 WRITE " Last activity @"
SET X2=$PIECE(REC(0),U,8)
IF X2]""
Begin DoDot:1
+34 WRITE $PIECE($$DATETIME^ABSPOSUD(X2),"@",2)
End DoDot:1
+35 IF X1]""
IF X2]""
WRITE " Elapsed time: "
WRITE $$TIMEDIF^ABSPOSUD(X1,X2)
+36 WRITE !
+37 SET X=$PIECE(REC(0),U,4)
+38 IF X=""
WRITE "No entry "
+39 IF '$TEST
WRITE "See also entry `",X
+40 SET X1=9002313.02
WRITE " in file #",X1,", ",$PIECE(^DIC(X1,0),U),!
+41 IF X]""
Begin DoDot:1
+42 SET X=$PIECE(REC(0),U,5)
+43 IF X=""
WRITE "but there is no entry "
+44 IF '$TEST
WRITE " and entry `",X
End DoDot:1
+45 SET X1=9002313.03
WRITE " in file #",X1,", ",$PIECE(^DIC(X1,0),U),!
+46 WRITE !
+47 WRITE "Log of this claim's activity: ",!
+48 IF $$EXISTS^ABSPOSL(RXI)
Begin DoDot:1
+49 DO PRESSANY^ABSPOSU5()
+50 DO PRINTLOG^ABSPOSL(RXI)
End DoDot:1
+51 IF '$TEST
WRITE "Log file for ",RXI," is not on file.",!
+52 ; X=where,X1=claim #
SET X=$PIECE(REC(0),U,12)
SET X1=$PIECE(REC(0),U,4)
+53 IF X
IF X1
Begin DoDot:1
+54 ; now that you've seen end of claim log
DO PRESSANY^ABSPOSU5()
+55 WRITE !,"Log of transmission, "
+56 WRITE "in log file #",$PIECE(X,",")," at line #",$PIECE(X,",",2),":",!
+57 ;
DO PRCLLOG^ABSPOSL(X,X1)
End DoDot:1
+58 ;D PRESSANY^ABSPOSU5()
+59 ;I IO=$P D ; printout to screen
+60 ;D PRESSANY^ABSPOSU5() ; press any key to continue
+61 ; we opened the device so we close it
IF '$DATA(DEST)
DO ^%ZISC
+62 ;E caller opened the device, and the caller should close it.
CZ QUIT