1 | DGUTL1 ;ALB/MJK - Re-Compile Templates/x-refs ; 8/8/90;
|
---|
2 | ;;5.3;Registration;;Aug 13, 1993
|
---|
3 | ;
|
---|
4 | ; ******* DO NOT MAP THIS ROUTINE *******
|
---|
5 | Q
|
---|
6 | ;
|
---|
7 | EN ; Entry point to re-compile templates
|
---|
8 | ; input: DGKIND = OUTPUT or INPUT
|
---|
9 | ;
|
---|
10 | K DGLINE S U="^",$P(DGLINE,"=",81)="",DGMAX=^DD("ROU")
|
---|
11 | G ENQ:'$D(DGKIND),ENQ:"^OUTPUT^INPUT^"'[(U_DGKIND_U)
|
---|
12 | I DGKIND="OUTPUT" S DGFILE="^DIPT",DGROU="EN^DIPZ"
|
---|
13 | I DGKIND="INPUT" S DGFILE="^DIE",DGROU="EN^DIEZ"
|
---|
14 | W !,DGLINE,!?20,"Recompilation of '",DGKIND,"' Templates",!,DGLINE
|
---|
15 | ;
|
---|
16 | F DGX="DFzzzz","SCzzzz" F DGI=1:1 S DGX=$O(@DGFILE@("B",DGX)) Q:DGX=""!("^DG^SD^"'[(U_$E(DGX,1,2)_U)) S Y=+$O(^(DGX,0)) I $D(@DGFILE@(Y,"ROUOLD")),^("ROUOLD")]"",$D(^(0)) S (DGEMP,Y)=Y,X=$P(^("ROUOLD"),"^"),DG0=^(0) D COMP
|
---|
17 | ;
|
---|
18 | ENQ K DGROU,DG0,DGX,DGI,DGMAX,DGEMP,DGFILE,DGI,DGLINE Q
|
---|
19 | ;
|
---|
20 | COMP ; re-compile
|
---|
21 | I DGKIND="INPUT",$P(DG0,U)="DG TEN" G COMPQ
|
---|
22 | I $P(DG0,U)?1"DGHI".E G COMPQ ; excludes HINQ templates
|
---|
23 | S DMAX=DGMAX D @DGROU W !!,DGLINE
|
---|
24 | COMPQ Q
|
---|
25 | ;
|
---|
26 | ALL ; compile templates and x-refs
|
---|
27 | S:'$D(DTIME) DTIME=300 S U="^"
|
---|
28 | S DIR(0)="Y",DIR("A")="Re-compile all 'DG' and 'SD' templates and cross references"
|
---|
29 | S DIR("?",1)="Yes to re-compile",DIR("?",2)="No to stop recompilation process",DIR("?")=" "
|
---|
30 | D ^DIR K DIR G ALLQ:'Y
|
---|
31 | D DIEZ W !!
|
---|
32 | D DIPZ W !!
|
---|
33 | D DIKZ
|
---|
34 | W !!,"...Done.",!!,"NOTE: Recompilation should be performed on ALL systems."
|
---|
35 | ALLQ K A,C,L,O,X1,DQ,DIE,DMAX,DIEZ,DIEZDUP,DK,DR Q
|
---|
36 | ;
|
---|
37 | DIEZ ; -- re-compile all DG and SD 'edit' templates
|
---|
38 | S DGKIND="INPUT" D EN K DGKIND Q
|
---|
39 | ;
|
---|
40 | DIPZ ; -- re-compile all DG and SD 'print' templates
|
---|
41 | S DGKIND="OUTPUT" D EN K DGKIND Q
|
---|
42 | ;
|
---|
43 | DIKZ ; -- compile x-refs
|
---|
44 | W !!,">>> Compiling cross references for PTF, PATIENT MOVEMENT,",!,"INDIVIDUAL ANNUAL INCOME, INCOME RELATION",!,"and ANNUAL MEANS TEST files:"
|
---|
45 | F DGN=45,405,408.21,408.22,408.31 S N=DGN W ! I ^DD("VERSION")>17.5,$D(^DD(+N,0,"DIK"))#2 S X=^("DIK"),Y=+N,DMAX=^DD("ROU") D EN^DIKZ
|
---|
46 | K DGN,N,DMAX
|
---|
47 | Q
|
---|