APSPOSTP ; IHS/DSD/ENM - OUTPATIENT/INTERVENTION PROV CONT/DIV ; [ 09/03/97 1:30 PM ]
;;6.0;IHS PHARMACY MODIFICATIONS;;09/03/97
EP ;
S APSP1=0
;I $P($G(^PS(59.7,1,9999999)),"^",5)]"" Q
;I +$P($G(^PS(59.7,1,9999999)),"^",6) S APSP1=$P(^(9999999),"^",6)-1
F S APSP1=$O(^APSPQA(32.4,APSP1)) Q:'APSP1 S APSP2=$P($G(^APSPQA(32.4,APSP1,0)),"^",11) I APSP2]"" D SET ;S $P(^PS(59.7,1,9999999),"^",6)=APSP1
;S APSPM1=" ",APSPM2="The Outpatient Pharmacy Intervention/Provider update ",APSPM3="has finished on "
;D MSG^APSPOST2,NOW^%DTC S $P(^PS(59.7,1,9999999),"^",5)=$E(%,1,12)
K APSP1,APSP2,APSPM1,APSPM2,APSPM3,DIE,DA,DR
Q
SET S APSP3=$G(^DIC(16,APSP2,"A3"))
I +APSP3,$D(^VA(200,APSP3,0)) D SET1
Q
SET1 S DIE="^APSPQA(32.4,",DA=APSP1,DR=".11////^S X=APSP3" D ^DIE
Q
EP1 ; Entry Point for file 9009032.4 field .16(Division) CONVERSION
S APSPVAR=1,APSP1=0
F S APSP1=$O(^APSPQA(32.4,APSP1)) Q:'APSP1 D SET2
S APSPM1=" ",APSPM2="The Outpatient Pharmacy Intervention/Division update ",APSPM3="has finished on "
D MSG^APSPOST2
Q
SET2 S DIE="^APSPQA(32.4,",DA=APSP1,DR=".16////^S X=APSPVAR" D ^DIE
Q
APSPOSTP ; IHS/DSD/ENM - OUTPATIENT/INTERVENTION PROV CONT/DIV ; [ 09/03/97 1:30 PM ]
+1 ;;6.0;IHS PHARMACY MODIFICATIONS;;09/03/97
EP ;
+1 SET APSP1=0
+2 ;I $P($G(^PS(59.7,1,9999999)),"^",5)]"" Q
+3 ;I +$P($G(^PS(59.7,1,9999999)),"^",6) S APSP1=$P(^(9999999),"^",6)-1
+4 ;S $P(^PS(59.7,1,9999999),"^",6)=APSP1
FOR
SET APSP1=$ORDER(^APSPQA(32.4,APSP1))
IF 'APSP1
QUIT
SET APSP2=$PIECE($GET(^APSPQA(32.4,APSP1,0)),"^",11)
IF APSP2]""
DO SET
+5 ;S APSPM1=" ",APSPM2="The Outpatient Pharmacy Intervention/Provider update ",APSPM3="has finished on "
+6 ;D MSG^APSPOST2,NOW^%DTC S $P(^PS(59.7,1,9999999),"^",5)=$E(%,1,12)
+7 KILL APSP1,APSP2,APSPM1,APSPM2,APSPM3,DIE,DA,DR
+8 QUIT
SET SET APSP3=$GET(^DIC(16,APSP2,"A3"))
+1 IF +APSP3
IF $DATA(^VA(200,APSP3,0))
DO SET1
+2 QUIT
SET1 SET DIE="^APSPQA(32.4,"
SET DA=APSP1
SET DR=".11////^S X=APSP3"
DO ^DIE
+1 QUIT
EP1 ; Entry Point for file 9009032.4 field .16(Division) CONVERSION
+1 SET APSPVAR=1
SET APSP1=0
+2 FOR
SET APSP1=$ORDER(^APSPQA(32.4,APSP1))
IF 'APSP1
QUIT
DO SET2
+3 SET APSPM1=" "
SET APSPM2="The Outpatient Pharmacy Intervention/Division update "
SET APSPM3="has finished on "
+4 DO MSG^APSPOST2
+5 QUIT
SET2 SET DIE="^APSPQA(32.4,"
SET DA=APSP1
SET DR=".16////^S X=APSPVAR"
DO ^DIE
+1 QUIT