ABSPOSS9 ; IHS/FCS/DRS - ANY CRITICAL MISSING ITEMS ;
;;1.0;PHARMACY POINT OF SALE;;JUN 21, 2001
; Make sure that Point of Sale has all the necessary data in place.
; * incomplete * much more to be added
Q
REPORT ;EP
I $P($G(^ABSP(9002313.99,1,"A/R INTERFACE")),U)="" D
. D PROBLEM
. W "A/R PACKAGE field in File 9002313.99 must have a value.",!
I '$O(^ABSPEI("AFormat",0)) D
. D PROBLEM
. W "No insurers are set up for Pharmacy Electronic claims.",!
I '$O(^ABSP(9002313.53,0)) D
. D PROBLEM
. W "There are no entries in the Pricing Table",!
I '$$OPSITE(0) D
. D PROBLEM
. W "Not all OUTPATIENT SITEs are associated with a pharmacy.",!
. D OPSITE(1)
;N X S X=$$TESTNULL I 'X D
;. D PROBLEM
;. W "Failed test of the NULL device: ",X,!
Q
OPSITE(ECHO) ; is every outpatient site associated with a pharmacy?
N RET S RET=1
N A S A=0 F S A=$O(^PS(59,A)) Q:'A D
. I ECHO W "`",A," ",$P(^PS(59,A,0),U)," <--> "
. N P S P=$O(^ABSP(9002313.56,"C",A,0))
. I P D
. . I ECHO W $P(^ABSP(9002313.56,P,0),U),!
. E D
. . S RET=0
. . I ECHO W "** no associated POS pharmacy!! **",!
Q:$Q RET Q
PROBLEM W !,"*** PROBLEM FOUND:",! Q
ABSPOSS9 ; IHS/FCS/DRS - ANY CRITICAL MISSING ITEMS ;
+1 ;;1.0;PHARMACY POINT OF SALE;;JUN 21, 2001
+2 ; Make sure that Point of Sale has all the necessary data in place.
+3 ; * incomplete * much more to be added
+4 QUIT
REPORT ;EP
+1 IF $PIECE($GET(^ABSP(9002313.99,1,"A/R INTERFACE")),U)=""
Begin DoDot:1
+2 DO PROBLEM
+3 WRITE "A/R PACKAGE field in File 9002313.99 must have a value.",!
End DoDot:1
+4 IF '$ORDER(^ABSPEI("AFormat",0))
Begin DoDot:1
+5 DO PROBLEM
+6 WRITE "No insurers are set up for Pharmacy Electronic claims.",!
End DoDot:1
+7 IF '$ORDER(^ABSP(9002313.53,0))
Begin DoDot:1
+8 DO PROBLEM
+9 WRITE "There are no entries in the Pricing Table",!
End DoDot:1
+10 IF '$$OPSITE(0)
Begin DoDot:1
+11 DO PROBLEM
+12 WRITE "Not all OUTPATIENT SITEs are associated with a pharmacy.",!
+13 DO OPSITE(1)
End DoDot:1
+14 ;N X S X=$$TESTNULL I 'X D
+15 ;. D PROBLEM
+16 ;. W "Failed test of the NULL device: ",X,!
+17 QUIT
OPSITE(ECHO) ; is every outpatient site associated with a pharmacy?
+1 NEW RET
SET RET=1
+2 NEW A
SET A=0
FOR
SET A=$ORDER(^PS(59,A))
IF 'A
QUIT
Begin DoDot:1
+3 IF ECHO
WRITE "`",A," ",$PIECE(^PS(59,A,0),U)," <--> "
+4 NEW P
SET P=$ORDER(^ABSP(9002313.56,"C",A,0))
+5 IF P
Begin DoDot:2
+6 IF ECHO
WRITE $PIECE(^ABSP(9002313.56,P,0),U),!
End DoDot:2
+7 IF '$TEST
Begin DoDot:2
+8 SET RET=0
+9 IF ECHO
WRITE "** no associated POS pharmacy!! **",!
End DoDot:2
End DoDot:1
+10 IF $QUIT
QUIT RET
QUIT
PROBLEM WRITE !,"*** PROBLEM FOUND:",!
QUIT