ECXFELOC ;BIR/DMA,CML-Print Feeder Locations; [ 05/07/96 8:41 AM ] ;;3.0;DSS EXTRACTS;**1,8**;Dec 22, 1997 EN ;entry point from option W !!,"Print list of feeder locations.",! S QFLG=1 K %ZIS S %ZIS="Q" D ^%ZIS Q:POP I $D(IO("Q")) S ZTDESC="Feeder Location List (DSS)",ZTRTN="START^ECXFELOC" D ^%ZTLOAD D ^%ZISC G OUT U IO START ;queued entry point I '$D(DT) S DT=$$HTFM^XLFDT(+$H) K ^TMP($J) S (QFLG,PG)=0,$P(LN,"-",81)="" LAB S EC=0 F S EC=$O(^LRO(68,EC)) Q:'EC I $D(^(EC,0)) S EC1=^(0),^TMP($J,"LAB",$P(EC1,U,11),EC)=$P(EC1,U) ECS S EC=0 I $P($G(^EC(720.1,1,0)),U,2) D G IV .F S EC=$O(^ECJ(EC)) Q:'EC I $D(^(EC,0)) S EC1=$P(^(0),"-",1,2),EC2=$P($G(^ECD(+$P(EC1,"-",2),0)),U),^TMP($J,"ECS",EC1,EC1)=EC2 F S EC=$O(^ECK(EC)) Q:'EC I $D(^(EC,0)) S EC1=$P(^(0),"-",1,2),EC2=$P($G(^ECD(+$P(EC1,"-",2),0)),U),^TMP($J,"ECS",EC1,EC1)=EC2 IV S EC=0 F S EC=$O(^DG(40.8,EC)) Q:'EC I $D(^DG(40.8,EC,0)) S EC1=$E($P(^(0),U),1,30),^TMP($J,"IVP","IVP"_EC,EC)="IV Pharmacy-"_EC1 CLI S EC=0 F S EC=$O(^SC(EC)) Q:'EC I $D(^(EC,0)) S EC1=^(0),ECS=$P(EC1,U,15),ECSC=$P($G(^DIC(40.7,+$P(EC1,U,7),0)),U,2),ECD=$P(EC1,U) S:'ECS ECS=1 D .I $P(EC1,U,17)'="Y",$P(EC1,U,3)="C" S DAT=$G(^SC(EC,"I")),ID=+DAT,RD=$P(DAT,U,2) I 'ID!(ID>DT)!(RD&(RD