NURAPROD ;HIRMFO/MD-POPULATE POSITION CONTROL PRODUCT LINE
;;4.0;NURSING SERVICE;;Apr 25, 1997
EN1 ;
S NPROD=$P($G(^DIC(213.9,1,0)),U,11) G:'+NPROD QUIT
W !!,"DO YOU WANT TO ASSIGN THE NURSING PRODUCT LINE ENTRY TO ALL EMPLOYEES",!,"WITH NO DATA IN THE PRODUCT LINE FIELD" S %=1 D YN^DICN
I %=0 W !!,$C(7),"ANSWER 'YES' or 'NO'" G EN1
I %'=1 G QUIT
S DA(1)=0 F S DA(1)=$O(^NURSF(211.8,DA(1))) Q:DA(1)'>0 S DA=0 F S DA=$O(^NURSF(211.8,DA(1),1,DA)) Q:DA'>0 I $D(^NURSF(211.8,DA(1),1,DA,0)) W:$R(100) "." D
. I '$P($G(^NURSF(211.8,DA(1),1,DA,0)),U,5) S $P(^(0),U,5)=+NPROD
. Q
QUIT ;
K DA,NPROD
Q
NURAPROD ;HIRMFO/MD-POPULATE POSITION CONTROL PRODUCT LINE
+1 ;;4.0;NURSING SERVICE;;Apr 25, 1997
EN1 ;
+1 SET NPROD=$PIECE($GET(^DIC(213.9,1,0)),U,11)
IF '+NPROD
GOTO QUIT
+2 WRITE !!,"DO YOU WANT TO ASSIGN THE NURSING PRODUCT LINE ENTRY TO ALL EMPLOYEES",!,"WITH NO DATA IN THE PRODUCT LINE FIELD"
SET %=1
DO YN^DICN
+3 IF %=0
WRITE !!,$CHAR(7),"ANSWER 'YES' or 'NO'"
GOTO EN1
+4 IF %'=1
GOTO QUIT
+5 SET DA(1)=0
FOR
SET DA(1)=$ORDER(^NURSF(211.8,DA(1)))
IF DA(1)'>0
QUIT
SET DA=0
FOR
SET DA=$ORDER(^NURSF(211.8,DA(1),1,DA))
IF DA'>0
QUIT
IF $DATA(^NURSF(211.8,DA(1),1,DA,0))
IF $RANDOM(100)
WRITE "."
Begin DoDot:1
+6 IF '$PIECE($GET(^NURSF(211.8,DA(1),1,DA,0)),U,5)
SET $PIECE(^(0),U,5)=+NPROD
+7 QUIT
End DoDot:1
QUIT ;
+1 KILL DA,NPROD
+2 QUIT