source: FOIAVistA/trunk/r/VA_FILEMAN-ARJT-DI-DD-DM-DT-%DT-%RCR/DITC3.m@ 1516

Last change on this file since 1516 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 1.5 KB
Line 
1DITC3 ;SFISC/XAK-COMPARE FILE ENTRIES ;9/17/91 3:12 PM
2 ;;22.0;VA FileMan;;Mar 30, 1999
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 F I=1:1:(IOSL-$Y-1) W !
5 W "Enter RETURN to continue: " R X:DTIME S:'$T DTOUT=1
6ASK Q:$D(DTOUT) K DUOUT,DIRUT W @IOF,!,"OK. I'M READY TO DO THE MERGE."
7 S DIR(0)="S^P:PROCEED to merge the data;S:SUMMARIZE the modifications before proceeding;E:EDIT the data again before proceeding"
8 S DIR("A")="ACTION" D ^DIR K DIR
9 Q:$D(DIRUT) I Y="E" D ^DITC2 Q:$D(DTOUT) G ASK:X=U,DITC3:$D(^UTILITY($J,"DIT",U)),ASK
10 S DIACT=Y,DNUM=0 D ACT Q:DIACT="P" G:$D(DIRUT) ASK G DITC3
11ACT ;
12 I DIACT="S" D SUMHD
13 S DIT1="" F K=0:0 Q:$D(DTOUT) S DIT1=$O(^UTILITY($J,"DIT",DIT1)) Q:DIT1="" S DIT2="" F K=0:0 Q:$D(DTOUT) S DIT2=$O(^UTILITY($J,"DIT",DIT1,DIT2)) Q:DIT2="" S X(0)=^(DIT2,0),%=$P(X(0),U,3) I %,DDEF'=% D EACH
14 W !!,?2,"NOTE: Multiples will be merged into the target record"
15 K DIT1,DIT2 Q
16EACH ;
17 I DIACT="S" G SUMEACH
18 S DIE=DFF(1),DA=$P(DIT(DDEF),","),X2=$S($D(^UTILITY($J,"DITI",DIT1,DIT2,%)):^(%),'$D(^UTILITY($J,"DIT",DIT1,DIT2,%)):"@",1:^(%))
19 S DR=+X(0)_"///"_X2 D ^DIE W "."
20 K DR,DIE Q
21SUMHD ;
22 W @IOF,!,"SUMMARY OF MODIFICATIONS TO ",$P(DHD(DFL),U,DDEF),!,"FIELD",?DV,$S(DDEF=1:"OLD",1:"NEW")," VALUE",?(DV*2),$S(DDEF=1:"NEW",1:"OLD")," VALUE",!,DDSH
23 Q
24SUMEACH ;
25 I $Y+5>IOSL K DIR S DIR(0)="E" D ^DIR K DIR Q:$D(DIRUT) D SUMHD
26 K D S X2="",X(0)=$P(X(0),U,2) F I=1:1:2 S X(I)=$S($D(^UTILITY($J,"DIT",DIT1,DIT2,I)):^(I),1:"")
27 D D20^DITC2
28 Q
Note: See TracBrowser for help on using the repository browser.