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

DGINS.m

Go to the documentation of this file.
DGINS ;ALB/MRL - INSURANCE COMPANY ADD/EDIT; 13 SEP 88@2200
 ;;5.3;Registration;**1015**;Aug 13, 1993;Build 21
1 W !! D Q S DGINS="",DGINSW=1,DIC="^DIC(36,",DIC(0)="AEQMLZ" D ^DIC G Q:Y'>0 S DGINS=+Y,DGNEW=+$P(Y,"^",3) D ED G 1
 ;
ED D OLD S DIE=DIC,DR=".01;1;2;.05:.08;.09;.1;.111;S:X="""" Y=.114;.112;S:X="""" Y=.114;.113:.116;.131;.132;.133;",(DA,Y)=DGINS D ^DIE:DGINSW F I=.11,.13 S DGINS1(I)=$S($D(^DIC(36,DGINS,I)):^(I),1:"")
 I DGINSW S C=0 F I=1,4,5,6 S:$P(DGINS(.11),"^",I)'=$P(DGINS1(.11),"^",I) C=1 S X1=$S(I=1:.01,1:(I-2)),DGINSE(X1)=$P(DGINS1(.11),"^",I)
 I DGINSW S:$P(DGINS(.13),"^",1)'=$P(DGINS1(.13),"^",1) C=1 S DGINSE(5)=$P(DGINS1(.13),"^",1)
 I DGNEW S C=1,DGINSE(5)=$P(DGINS1(.13),"^",1) F I=1,4,5,6 S X1=$S(I=1:.01,1:(I-2)) I $P(DGINS1(.11),"^",I)]"" S DGINSE(X1)=$P(DGINS1(.11),"^",I)
 Q:'C  W:DGINSW !!,"...Updating multiple ADDRESS field with new information...",!
 I $D(^DIC(36,+DGINS,2,1,0)) S:'$D(^DIC(36,+DGINS,2,0)) ^(0)="^36.02I^1^1" S DIK="^DIC(36,"_DGINS_",2,",DA(2)=36,DA(1)=DGINS,DA=1 D ^DIK K DIK W:DGINSW "...."
 S DIC(0)="QMZL",DIC="^DIC(36,"_DGINS_",2,",DA(2)=36,DA(1)=DGINS,(DA,DINUM)=1,X=$P(DGINS1(.11),"^",1) I X]"" S:'$D(^DIC(36,+DGINS,2,0)) ^(0)="^36.02I^^" K DD,DO D DR,FILE^DICN K DINUM W:DGINSW !!,"DONE...",*7 Q
 ;
DR K DR S DIC("DR")="" F I=0:0 S I=$O(DGINSE(I)) Q:'I  S DIC("DR")=DIC("DR")_I_"///"_DGINSE(I)_";" W:DGINSW "...."
 S DIC("DR")=DIC("DR")_"6///"_DGINS_";" K DGINSE Q
 ;
Q K DGNEW,X,X1,DIC,DIE,DR,I,C,DGINS,DGINS1,DGINSE,DGINSW,DA,Y Q
 ;
ALL F DGINS=0:0 S DGINS=$O(^DIC(36,DGINS)) Q:'DGINS  S DIC="^DIC(36,",DGNEW=1,DGINSW=0 D ED W "."
 W !!,"DONE!",*7 G Q
OLD F I=.11,.13 S DGINS(I)=$S($D(^DIC(36,+DGINS,I)):^(I),1:"")
 Q