Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ABSPOS6M

ABSPOS6M.m

Go to the documentation of this file.
  1. ABSPOS6M ; IHS/FCS/DRS - Print log of claim ;
  1. ;;1.0;PHARMACY POINT OF SALE;;JUN 21, 2001
  1. Q
  1. CLAIMLOG(RXI,DEST) ;EP - from ABSPOS6D
  1. ;
  1. ; optional parameters: prescription #
  1. ; and destination device (already opened)
  1. ; Prompts for any missing parameters.
  1. ;
  1. ; Note that it will give you only the most recent transmit/receive
  1. ; If there have been retransmissions, DO ^%GSE for claim number,
  1. ; and print the entire log file. The purpose of this part is to
  1. ; show when the successful I/O or last failed I/O occurred.
  1. ;
  1. I '$D(RXI) S RXI=$$GETRX^ABSPOSIV Q:RXI<1
  1. I $D(DEST) S IO=DEST
  1. E D ^%ZIS I $G(POP) Q
  1. U IO W "Pharmacy POS Log of activity for one prescription",!
  1. N REC,X,X1,X2 M REC=^ABSPT(RXI)
  1. N I F I=0:1:2 I '$D(REC(I)) S REC(I)=""
  1. W "Prescription #",$P(^ABSPT(RXI,1),U,11) ;$G(^PSRX(RXI,0)),U)
  1. S X=$P(REC(1),U) I X W " Refill #",X
  1. W " (RXI=",RXI,")"
  1. W !
  1. W "Patient: "
  1. S X=$P(REC(0),U,6) I X]"" S X=$P($G(^DPT(X,0)),U) W X
  1. W ?50,"Visit: "
  1. S X=$P(REC(0),U,7) I X]"" S X=$G(^AUPNVSIT(X,"VCN")) W X
  1. W !
  1. W "Status: "
  1. S X=$P(REC(0),U,2) W:X'=99 "Q" W X,":",$$STATI^ABSPOSU(X),!
  1. I X=99 D W !
  1. .D DISPRESP^ABSPOSUA
  1. .;W "Result: ",$$RESULTI^ABSPOSU($P(REC(2),U))
  1. .;S X=$P(REC(2),U,2,$L(REC(2),U)) I X]"" W " - ",X
  1. W "Submitted on " S X1=$P(REC(0),U,11) I X1]"" W $$DATETIME^ABSPOSUD(X1),!
  1. W " Last activity @" S X2=$P(REC(0),U,8) I X2]"" D
  1. .W $P($$DATETIME^ABSPOSUD(X2),"@",2)
  1. I X1]"",X2]"" W " Elapsed time: " W $$TIMEDIF^ABSPOSUD(X1,X2)
  1. W !
  1. S X=$P(REC(0),U,4)
  1. I X="" W "No entry "
  1. E W "See also entry `",X
  1. S X1=9002313.02 W " in file #",X1,", ",$P(^DIC(X1,0),U),!
  1. I X]"" D
  1. .S X=$P(REC(0),U,5)
  1. .I X="" W "but there is no entry "
  1. .E W " and entry `",X
  1. S X1=9002313.03 W " in file #",X1,", ",$P(^DIC(X1,0),U),!
  1. W !
  1. W "Log of this claim's activity: ",!
  1. I $$EXISTS^ABSPOSL(RXI) D
  1. . D PRESSANY^ABSPOSU5()
  1. . D PRINTLOG^ABSPOSL(RXI)
  1. E W "Log file for ",RXI," is not on file.",!
  1. S X=$P(REC(0),U,12),X1=$P(REC(0),U,4) ; X=where,X1=claim #
  1. I X,X1 D
  1. .D PRESSANY^ABSPOSU5() ; now that you've seen end of claim log
  1. .W !,"Log of transmission, "
  1. .W "in log file #",$P(X,",")," at line #",$P(X,",",2),":",!
  1. .D PRCLLOG^ABSPOSL(X,X1) ;
  1. ;D PRESSANY^ABSPOSU5()
  1. ;I IO=$P D ; printout to screen
  1. ;D PRESSANY^ABSPOSU5() ; press any key to continue
  1. I '$D(DEST) D ^%ZISC ; we opened the device so we close it
  1. ;E caller opened the device, and the caller should close it.
  1. CZ Q