ABSPOSR2 ; IHS/FCS/DRS - silent claim submitter ;
;;1.0;PHARMACY POINT OF SALE;;JUN 21, 2001
; SHOWQ subroutine - continuation of ABSPOSRX
Q
SHOWQ ;EP - ABSPOSRX ; ^ABSPECP("ABSPOSRX",type,RXI,RXR)
N ROOT S ROOT="^ABSPECP(""ABSPOSRX"")"
N COUNT S COUNT=0
I '$O(@ROOT@(""))="" W "None",! Q
N TYPE,RXI,RXR
F TYPE="CLAIM","UNCLAIM" D
. W TYPE
. I '$D(@ROOT@(TYPE)) W " - none",! Q
. W ":",!
. S RXI="" F S RXI=$O(@ROOT@(TYPE,RXI)) Q:RXI="" D
. . S RXR="" F S RXR=$O(@ROOT@(TYPE,RXI,RXR)) Q:RXR="" D
. . . W RXI,",",RXR
. . . ; details like patient, drug could go here
. . . W !
. . . S COUNT=COUNT+1
. W "Total ",COUNT," ",TYPE W:COUNT'=1 "s"
. W !
Q
ABSPOSR2 ; IHS/FCS/DRS - silent claim submitter ;
+1 ;;1.0;PHARMACY POINT OF SALE;;JUN 21, 2001
+2 ; SHOWQ subroutine - continuation of ABSPOSRX
+3 QUIT
SHOWQ ;EP - ABSPOSRX ; ^ABSPECP("ABSPOSRX",type,RXI,RXR)
+1 NEW ROOT
SET ROOT="^ABSPECP(""ABSPOSRX"")"
+2 NEW COUNT
SET COUNT=0
+3 IF '$ORDER(@ROOT@(""))=""
WRITE "None",!
QUIT
+4 NEW TYPE,RXI,RXR
+5 FOR TYPE="CLAIM","UNCLAIM"
Begin DoDot:1
+6 WRITE TYPE
+7 IF '$DATA(@ROOT@(TYPE))
WRITE " - none",!
QUIT
+8 WRITE ":",!
+9 SET RXI=""
FOR
SET RXI=$ORDER(@ROOT@(TYPE,RXI))
IF RXI=""
QUIT
Begin DoDot:2
+10 SET RXR=""
FOR
SET RXR=$ORDER(@ROOT@(TYPE,RXI,RXR))
IF RXR=""
QUIT
Begin DoDot:3
+11 WRITE RXI,",",RXR
+12 ; details like patient, drug could go here
+13 WRITE !
+14 SET COUNT=COUNT+1
End DoDot:3
End DoDot:2
+15 WRITE "Total ",COUNT," ",TYPE
IF COUNT'=1
WRITE "s"
+16 WRITE !
End DoDot:1
+17 QUIT