DGRP4 ;ALB/MRL - REGISTRATION SCREEN 4/EMPLOYMENT INFORMATION;06 JUN 88@2300
;;5.3;Registration;**624,1015**;Aug 13, 1993;Build 21
N DGMRD
S DGRPS=4 D H^DGRPU S DGRPW=1 F I=0,.311,.25 S DGRP(I)=$S($D(^DPT(DFN,I)):^(I),1:"")
S X=$P($G(^DIC(11,+$P(DGRP(0),"^",5),0)),"^",3) S DGMRD=$S("^M^S^"[("^"_X_"^"):1,1:0),DGRPVV(4)=$E(DGRPVV(4))_'DGMRD ; spouse's employer only editable if married or separated
S DGAD=.311,DGA1=3,DGA2=1 D:$P(DGRP(.311),"^",1)]"" AL^DGRPU(26) S DGAD=.25,(DGA1,DGA2)=2 I $P(DGRP(.25),"^",1)]"",DGMRD D AL^DGRPU(26)
S Z=1 D WW^DGRPV W " Employer: " S Z=$S($P(DGRP(.311),"^",1)]"":$E($P(DGRP(.311),"^",1),1,23),1:DGRPU),Z1=26 D WW1^DGRPV S DGRPW=0,Z=2 D WW^DGRPV W " Spouse's: ",$S('DGMRD:"NOT APPLICABLE",$P(DGRP(.25),"^",1)]"":$P(DGRP(.25),"^",1),1:DGRPU)
F I=0:0 S I=$O(DGA(I)) Q:'I S Z=DGA(I) S:(I#2) Z=" "_Z W:(I#2)!($X>50) ! W:(I#2) Z I '(I#2) W ?54,Z
W ! I $P(DGRP(.311),"^",1)]"" W ?7,"Phone: ",$S($P(DGRP(.311),"^",9)]"":$P(DGRP(.311),"^",9),1:DGRPU)
I $P(DGRP(.25),"^",1)]"",DGMRD W ?47,"Phone: ",$S($P(DGRP(.25),"^",8)]"":$P(DGRP(.25),"^",8),1:DGRPU)
W !,?2,"Occupation: ",$S($P(DGRP(0),"^",7)]"":$P(DGRP(0),"^",7),1:DGRPU)
I DGMRD W ?42,"Occupation: ",$S($P(DGRP(.25),"^",14)]"":$P(DGRP(.25),"^",14),1:DGRPU)
W ! S X1="EMPLOYED FULL TIME^EMPLOYED PART TIME^NOT EMPLOYED^SELF EMPLOYED^RETIRED^ACTIVE MILITARY DUTY^^^UNKNOWN"
S X=$P(DGRP(.311),"^",15) W ?6,"Status: ",$S($P(X1,"^",X)]"":$P(X1,"^",X),1:DGRPU)
I DGMRD S X=$P(DGRP(.25),"^",15) W ?46,"Status: ",$S($P(X1,"^",X)]"":$P(X1,"^",X),1:DGRPU)
W !
W ?1,"Retired Dt.: "
I +$P(DGRP(.311),"^",15)=5 DO
. I +$P($G(DGRP(.311)),"^",16)>0 DO
. . N Y
. . S Y=$P(DGRP(.311),"^",16)
. . D DD^%DT
. . W Y
. . K Y
I +$P(DGRP(.311),"^",15)'=5 DO
. W "NOT APPLICABLE"
I DGMRD DO
. W ?41,"Retired Dt.: "
. I +$P(DGRP(.25),"^",15)=5 DO
. . I +$P($G(DGRP(.25)),"^",16)>0 DO
. . . N Y
. . . S Y=$P(DGRP(.25),"^",16)
. . . D DD^%DT
. . . W Y
. . . K Y
. I +$P(DGRP(.25),"^",15)'=5 DO
. . W "NOT APPLICABLE"
G ^DGRPP
DGRP4 ;ALB/MRL - REGISTRATION SCREEN 4/EMPLOYMENT INFORMATION;06 JUN 88@2300
+1 ;;5.3;Registration;**624,1015**;Aug 13, 1993;Build 21
+2 NEW DGMRD
+3 SET DGRPS=4
DO H^DGRPU
SET DGRPW=1
FOR I=0,.311,.25
SET DGRP(I)=$SELECT($DATA(^DPT(DFN,I)):^(I),1:"")
+4 ; spouse's employer only editable if married or separated
SET X=$PIECE($GET(^DIC(11,+$PIECE(DGRP(0),"^",5),0)),"^",3)
SET DGMRD=$SELECT("^M^S^"[("^"_X_"^"):1,1:0)
SET DGRPVV(4)=$EXTRACT(DGRPVV(4))_'DGMRD
+5 SET DGAD=.311
SET DGA1=3
SET DGA2=1
IF $PIECE(DGRP(.311),"^",1)]""
DO AL^DGRPU(26)
SET DGAD=.25
SET (DGA1,DGA2)=2
IF $PIECE(DGRP(.25),"^",1)]""
IF DGMRD
DO AL^DGRPU(26)
+6 SET Z=1
DO WW^DGRPV
WRITE " Employer: "
SET Z=$SELECT($PIECE(DGRP(.311),"^",1)]"":$EXTRACT($PIECE(DGRP(.311),"^",1),1,23),1:DGRPU)
SET Z1=26
DO WW1^DGRPV
SET DGRPW=0
SET Z=2
DO WW^DGRPV
WRITE " Spouse's: ",$SELECT('DGMRD:"NOT APPLICABLE",$PIECE(DGRP(.25),"^",1)]"":$PIECE(DGRP(.25),"^",1),1:DGRPU)
+7 FOR I=0:0
SET I=$ORDER(DGA(I))
IF 'I
QUIT
SET Z=DGA(I)
IF (I#2)
SET Z=" "_Z
IF (I#2)!($X>50)
WRITE !
IF (I#2)
WRITE Z
IF '(I#2)
WRITE ?54,Z
+8 WRITE !
IF $PIECE(DGRP(.311),"^",1)]""
WRITE ?7,"Phone: ",$SELECT($PIECE(DGRP(.311),"^",9)]"":$PIECE(DGRP(.311),"^",9),1:DGRPU)
+9 IF $PIECE(DGRP(.25),"^",1)]""
IF DGMRD
WRITE ?47,"Phone: ",$SELECT($PIECE(DGRP(.25),"^",8)]"":$PIECE(DGRP(.25),"^",8),1:DGRPU)
+10 WRITE !,?2,"Occupation: ",$SELECT($PIECE(DGRP(0),"^",7)]"":$PIECE(DGRP(0),"^",7),1:DGRPU)
+11 IF DGMRD
WRITE ?42,"Occupation: ",$SELECT($PIECE(DGRP(.25),"^",14)]"":$PIECE(DGRP(.25),"^",14),1:DGRPU)
+12 WRITE !
SET X1="EMPLOYED FULL TIME^EMPLOYED PART TIME^NOT EMPLOYED^SELF EMPLOYED^RETIRED^ACTIVE MILITARY DUTY^^^UNKNOWN"
+13 SET X=$PIECE(DGRP(.311),"^",15)
WRITE ?6,"Status: ",$SELECT($PIECE(X1,"^",X)]"":$PIECE(X1,"^",X),1:DGRPU)
+14 IF DGMRD
SET X=$PIECE(DGRP(.25),"^",15)
WRITE ?46,"Status: ",$SELECT($PIECE(X1,"^",X)]"":$PIECE(X1,"^",X),1:DGRPU)
+15 WRITE !
+16 WRITE ?1,"Retired Dt.: "
+17 IF +$PIECE(DGRP(.311),"^",15)=5
Begin DoDot:1
+18 IF +$PIECE($GET(DGRP(.311)),"^",16)>0
Begin DoDot:2
+19 NEW Y
+20 SET Y=$PIECE(DGRP(.311),"^",16)
+21 DO DD^%DT
+22 WRITE Y
+23 KILL Y
End DoDot:2
End DoDot:1
+24 IF +$PIECE(DGRP(.311),"^",15)'=5
Begin DoDot:1
+25 WRITE "NOT APPLICABLE"
End DoDot:1
+26 IF DGMRD
Begin DoDot:1
+27 WRITE ?41,"Retired Dt.: "
+28 IF +$PIECE(DGRP(.25),"^",15)=5
Begin DoDot:2
+29 IF +$PIECE($GET(DGRP(.25)),"^",16)>0
Begin DoDot:3
+30 NEW Y
+31 SET Y=$PIECE(DGRP(.25),"^",16)
+32 DO DD^%DT
+33 WRITE Y
+34 KILL Y
End DoDot:3
End DoDot:2
+35 IF +$PIECE(DGRP(.25),"^",15)'=5
Begin DoDot:2
+36 WRITE "NOT APPLICABLE"
End DoDot:2
End DoDot:1
+37 GOTO ^DGRPP