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

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

initial load of FOIAVistA 6/30/08 version

File size: 2.7 KB
Line 
1DIFROM3 ;SFISC/XAK-CREATES RTN ENDING IN 'INIT2' (HELP FRAMES) ;02:44 PM 28 Nov 1994
2 ;;22.0;VA FileMan;;Mar 30, 1999
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 S DIRS=" S DIFQ=1"
5 S DNAME=E_2,DL=0,(DH,Q)=" ;" K ^UTILITY($J) F DD=1:1 S X=$T(TEXT+DD) Q:X="" S ^UTILITY($J,DD,0)=$E(X,4,999) S:$E(X,4)="U" ^(0)=^(0)_DIRS
6 S DIFROM=2 D ZI G ^DIFROM4
7 ;
8FILE ;
9 D:'$D(DISYS) OS^DII S DL=0,Q="Q Q",S=" ;;"
10NAME S D=$L(DH)+10
11 I DRN>12959 K DRN Q
12 S DNAME=DN_$$B36(DRN)
13ZI ;
14 I '$D(DIFROM(1)) S %H=+$H D YX^%DTC S DIFROM(1)=$E(Y,5,6)_"-"_$E(Y,1,3)_"-"_$E(Y,9,12)
152 K ^UTILITY($J,0) S ^(0,1)=DNAME_" ; ; "_DIFROM(1),^(1.1)=DILN2
16 S ^UTILITY($J,0,2)=DH,^UTILITY($J,0,3)=Q F L=4:1 S DL=$O(^UTILITY($J,DL)) Q:DL'>0 S ^UTILITY($J,0,L)=S_^(DL,0),D=$L(^(L))+D I D+380>DIFRM,$E(^(L),4)'="^",$E(^(L),4)'=$C(126) Q
17 S DRN=DRN+1,X=DNAME X ^DD("OS",DISYS,"ZS") W !,X_" HAS BEEN FILED..." G NAME:DL>0
18K K %A,%B,%C,%Z,^UTILITY($J) S DL=0 Q
19 ;
20B36(X) ;Calculate base 36 number from 0 (000) to 46,655 (ZZZ).
21 S X=$G(X) I X>46655 Q ""
22 Q $$N(X\(36*36)#36+1)_$$N(X\36#36+1)_$$N(X#36+1)
23N(%) Q $E("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",%)
24 ;
25TEXT ;
26 ;; K ^UTILITY("DIFROM",$J),DIC S DIDUZ=0 S:$D(DUZ)#2 DIDUZ=DUZ S DUZ=.5
27 ;; I $D(^DIC(9.2,0))#2,^(0)?1"HEL".E S (DIC,DLAYGO)=9.2,N="HEL",DIC(0)="LX" G ADD
28 ;; Q
29 ;; ;
30 ;;ADD F R=0:0 S R=$O(^UTILITY(U,$J,N,R)) Q:R'>0 S X=$P(^(R,0),U,1) W "." K DA D ^DIC I Y>0,'$D(DIFQ(N))!$P(Y,U,3) S ^UTILITY("DIFROM",$J,N,X)=+Y K ^DIC(9.2,+Y,1),^(2),^(3),^(10) S %X="^UTILITY(U,$J,N,R,",%Y=DIC_"+Y,",DA=+Y D %XY^%RCR
31 ;; S DIK=DIC
32 ;;HELP S R=$O(^UTILITY("DIFROM",$J,N,R)) Q:R="" W !,"'"_R_"' Help Frame filed." S DA=^(R)
33 ;; F X=0:0 S X=$O(^DIC(9.2,DA,2,X)) Q:'X S I=$S($D(^(X,0)):^(0),1:0),Y=$P(I,U,2) S:Y]"" Y=$O(^DIC(9.2,"B",Y,0)) S ^(0)=$P(^DIC(9.2,DA,2,X,0),U,1)_U_$S(Y>0:Y,1:"")_U_$P(^(0),U,3,99)
34 ;; S I=0 F X=0:0 S X=$O(^DIC(9.2,DA,10,X)) Q:'X I $D(^(X,0)) S Y=$P(^(0),U),Y=$S(Y]"":$O(^MAG("B",Y,0)),1:0) S:Y $P(^DIC(9.2,DA,10,X,0),U)=Y,I=I+1,%=X I 'Y K ^DIC(9.2,DA,10,X,0)
35 ;; I I S $P(^DIC(9.2,DA,10,0),U,3,4)=%_U_I
36 ;;IX D IX1^DIK G HELP
37 ;; ;
38 ;;U I $D(DIRUT)
39 ;; W ! Q
40 ;;REP S DIR(0)="Y",DIR("A")="Shall I change the NAME of the file to "_DIF
41 ;; S DIR("??")="^D REP^DIFROMH1",DIR("B")="NO" D ^DIR G U:$D(DIRUT)
42 ;; I Y S DIE=1,DIFQ=0,DA=N,DR=".01////"_DIF D ^DIE Q
43 ;; S DIR("A")="Shall I replace your file with mine"
44 ;; S DIR("??")="^D AG^DIFROMH1" D ^DIR G U:$D(DIRUT)!'Y
45 ;; S DIU(0)="E",DIR("A")="Do you want to keep the Data"
46 ;; S DIR("??")="^D CHG^DIFROMH1" D ^DIR G U:$D(DIRUT)
47 ;; S:'Y DIU(0)=DIU(0)_"D"
48 ;; S DIR("A")="Do you want to keep the Templates"
49 ;; S DIR("??")="^D TEMP^DIFROMH1" D ^DIR G U:$D(DIRUT) S:'Y DIU(0)=DIU(0)_"T"
50 ;; S DIFQ(N)=1,DIFKEP(N)=DIU(0) W !?15," (",DIF,") " Q
Note: See TracBrowser for help on using the repository browser.