ECUD1 ;BIR/DMA-Store data from unit dose package into 728.904 ; 26 Sep 95 / 12:44 PM
;;3.0;DSS EXTRACTS;;Dec 22, 1997
;called from 2 unit dose routines - PSGPLF and PSGAMSA
;load UD data into an EC file for later extract to vendor
;
I '$D(^ECX(728.904)) Q
L +^ECX(728.904,0):1 Q:'$T
N DA,DIK
S EC=-$O(^ECX(728.904,"AINV","")) F S EC=EC+1 Q:'$D(^ECX(728.904,EC))
S ^ECX(728.904,EC,0)=EC_"^"_ECUD L -^ECX(728.904,0)
S DA=EC,DIK="^ECX(728.904," D IX^DIK
K EC Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HECUD1 482 printed Oct 16, 2024@17:59:45 Page 2
ECUD1 ;BIR/DMA-Store data from unit dose package into 728.904 ; 26 Sep 95 / 12:44 PM
+1 ;;3.0;DSS EXTRACTS;;Dec 22, 1997
+2 ;called from 2 unit dose routines - PSGPLF and PSGAMSA
+3 ;load UD data into an EC file for later extract to vendor
+4 ;
+5 IF '$DATA(^ECX(728.904))
QUIT
+6 LOCK +^ECX(728.904,0):1
if '$TEST
QUIT
+7 NEW DA,DIK
+8 SET EC=-$ORDER(^ECX(728.904,"AINV",""))
FOR
SET EC=EC+1
if '$DATA(^ECX(728.904,EC))
QUIT
+9 SET ^ECX(728.904,EC,0)=EC_"^"_ECUD
LOCK -^ECX(728.904,0)
+10 SET DA=EC
SET DIK="^ECX(728.904,"
DO IX^DIK
+11 KILL EC
QUIT