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

BOPTD.m

Go to the documentation of this file.
BOPTD ;IHS/ILC/ALG/CIA/PLS - SEND ALL ACTIVE INPATIENTS TO INTERFACE;06-Apr-2005 13:41;SM
 ;;1.0;AUTOMATED DISPENSING INTERFACE;;Jul 26, 2005
 ;;
 S LOOP="^DPT("_$C(34)_"CN"_$C(34),CHK=LOOP,LOOP=LOOP_")"
LOOP S LOOP=$Q(@LOOP) I $E(LOOP,1,$L(CHK))'=CHK G DONE
 S DFN=$P($P(LOOP,",",3),")",1)
 D ADT^BOPCAP
 G LOOP
 ;
LOOP2 ; send orders
 S (PSPG,VEFDFN)=DFN
 F BOPO=0:0 S BOPO=$O(^PS(55,DFN,5,BOPO)) Q:BOPO<1  D
 .S BOPN0=$G(^PS(55,DFN,5,BOPO,0)) Q:'BOPN0
 .S PSGORD=BOPO ;Order Number
 .Q:$P(BOPN0,U,9)'="A"  ;Status
 .Q:'$P($G(^PS(55,DFN,5,BOPO,4)),U,9)  ;Verified
 .D NEW^BOPCAP
 .Q
DONE W !,"DONE"
 K DFN,DIC,PSGORD,PSGP
 Q