source: WorldVistAEHR/trunk/r/VA_FILEMAN-ARJT-DI-DD-DM-DT-%DT-%RCR/DIDH1.m@ 700

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

initial load of WorldVistAEHR

File size: 4.0 KB
RevLine 
[613]1DIDH1 ;SFISC-HDR FOR DD LISTS ;7:34 AM 29 Sep 2003
2 ;;22.0;VA FileMan;**76,105,131**;Mar 30, 1999
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 N DIDHI,DIDHJ,W D ;*131*
5 .N I,J D IJ^DIUTL(DFF) M DIDHJ=J,DIDHI=I S DIDHJ=$O(J(""),-1)
6 S M=1 I DC=1 S (F(1),DA)=DFF,Z=1
7 E I $Y,IOST?1"C".E W $C(7) R M:DTIME I M=U!'$T K DIOEND S M=U,DN=0 Q
8 S M1=$S($G(^DD(F(1),0,"VR"))]"":" (VERSION "_$P(^("VR"),U)_") ",1:"") I IOST?1"C".E S DIFF=1
9 W:$D(DIFF)&($Y) @IOF S DIFF=1 W $S(DHIT["DIDX":"BRIEF",DHIT["DIDG":"GLOBAL MAP",$D(DINM):"MODIFIED",1:"STANDARD")
10 W " DATA DICTIONARY #"_DFF_" -- "_$O(^DD(DFF,0,"NM",0))_" "_$S(DIDHJ:"SUB-",1:"")_"FILE "
11 S DIC=^DIC(DUB,0,"GL") D
12 .N X,Y
13 .X ^DD("FUNC",24,1) S Y=X X ^DD("DD")
14 .S W=Y_" PAGE "_DC W:$L(W)+$X+2>IOM ! W ?(IOM-$L(W)-1),W
15 S M=IOM\2,S=" ",W="" I $D(^DD("SITE")) S W="SITE: "_^("SITE")_" "
16 I $D(^%ZOSF("UCI"))#2 X ^("UCI") S W=W_"UCI: "_Y
17 W ! I DHIT["DIDX" W W,?(IOM-$L(M1)-1),M1 S W="",$P(W,"-",IOM)="" W !,W S W="" G Q^DIDH
18 W "STORED IN ",DIC F I=1:1 Q:'$D(DIDHI(I)) W "D",I-1,",",DIDHI(I),","
19 I 'DIDHJ D
20 .I $O(@(DIC_"0)"))'>0 W " *** NO DATA STORED YET ***" Q
21 .S I=$P(^(0),U,4) W:I " ("_I_" ENTR"_$S(I=1:"Y)",1:"IES)")
22 W " ",W,?(IOM-$L(M1)-1),M1 D:DHIT'["DIDG"
23 .W !!,"DATA",?14,"NAME",?36,"GLOBAL",?50,"DATA",!,"ELEMENT",?14,"TITLE",?36,"LOCATION",?50,"TYPE"
24G W ! F I=1:1:IOM-1 W "-"
25 S W="" Q:DC>1!$G(DIDRANGE)
26PAGE1 I 'DIDHJ,'$$WP^DIUTL($NA(^DIC(DA,"%D"))) S M="^" Q
27 I DIDHJ D I M=U Q
28 .S W=DIDHJ(DIDHJ-1),W=$NA(^DD(W,+$O(^DD(W,"SB",DFF,"")))) I '$$WP^DIUTL($NA(@W@(21))) S M=U Q
29 .I $D(@W@(23)) W !,"TECHNICAL DESCRIPTION:",! I '$$WP^DIUTL($NA(@W@(23))) S M=U
30 .F I=8,9 I $D(@W@(I)) W !,?15,$P("READ^WRITE",U,I-7)," ACCESS: ",^(I)
31 I DHIT["DIDG" D Q
32 . D XR^DIDH Q:M=U
33 . N DIDPG S DIDPG("H")="W """" D H^DIDH S:M=U PAGE(U)=1"
34 . D LIST^DIKCP(DA,"","C15",.DIDPG) Q:M=U
35 . D WRLN^DIKCP1("",0,.DIDPG)
36 Q:DHIT["DIDX"!(M=U) W !
37 F %=1:1:4 S X=$P("SCR^DIC^ACT^DIK",U,%) I $G(^DD(DA,0,X))]"" W !,$P("FILE SCREEN (SCR-node) ^SPECIAL LOOKUP ROUTINE ^POST-SELECTION ACTION ^COMPILED CROSS-REFERENCE ROUTINE",U,%)_": " S W=^(X) D W^DIDH G Q:M=U
38 W:$P($G(^DD(DA,0,"DI")),U)["Y" !,"THIS IS AN ARCHIVE FILE."
39 W:$P($G(^DD(DA,0,"DI")),U,2)["Y" !,"EDITING OF FILE IS NOT ALLOWED."
40 F N="DD","RD","WR","DEL","LAYGO","AUDIT" I $D(^DIC(DA,0,N)) W !?(Z+Z+14-$L(N)),N," ACCESS: ",^(N)
41 I $D(^VA(200,"AFOF")) W !!?8,"(NOTE: Kernel's File Access Security has been installed in this UCI.)",!
42 I $O(^DD(DA,0,"ID",""))]"" W !,"IDENTIFIED BY: "
43 S X=0 F S X=$O(^DD(DA,0,"ID",X)) Q:X="" Q:'$D(^DD(DA,X,0)) S I1=$P(^(0),U)_" (#"_X_")"_$S($P(^(0),U,2)["R":"[R]",1:"") W:($L(I1)+$X)+1>IOM ! W ?15,I1 I $O(^DD(DA,0,"ID",X)) W ", "
44 S:X="" X=-1
45 ;
46 ;Print "WRITE" identifiers
47 I '$D(DINM) S X=" " F S X=$O(^DD(DA,0,"ID",X)) Q:X="" D Q:M=U
48 . N DIDLN,DIDPG
49 . S DIDLN(1)=$G(^DD(DA,0,"ID",X)) Q:DIDLN(1)?."^"
50 . S DIDLN(0)=""""_X_""": "
51 . S DIDLN(0)=$J("",15-$L(DIDLN(0)))_DIDLN(0)
52 . S DIDPG("H")="W """" D H^DIDH S:M=U PAGE(U)=1"
53 . D WRPHI^DIKCP1(.DIDLN,IOM-16,0,15,1,.DIDPG)
54 Q:M=U
55 ;
56 I $D(^DD("KEY","B",DA)) D
57 . N DIDPG
58 . S DIDPG("H")="W """" D H^DIDH S:M=U PAGE(U)=1"
59 . D PRINT^DIKKP(DA,"","C20",.DIDPG)
60 D POINT^DIDH Q:M=U D TRIG^DIDH,XR^DIDH Q:M=U
61 I $D(^DD("IX","B",DA)) D Q:M=U W !
62 . N DIDPG
63 . S DIDPG("H")="W """" D H^DIDH S:M=U PAGE(U)=1"
64 . D LIST^DIKCP(DA,"","C15",.DIDPG)
65 S N=$G(^DIC(DA,"%A")),Y=$P(N,U,2) I Y X ^DD("DD") W !!?3,"CREATED ON: "_Y I $S($D(^VA(200,0)):1,1:$D(^DIC(3,0))),^(0)["NEW PERSON"!(^(0)["USER")!(^(0)["EMPLOY"),$D(^(+N,0)) W " by "_$P(^(0),U)
66Q Q
67W W:$X+$L(W)+3>IOM !,?$S(IOM-$L(W)-5<M:IOM-5-$L(W),1:M),S S %Y=$E(W,IOM-$X,999) W $E(W,1,IOM-$X-1),S Q:%Y="" S W=%Y G W
68 Q
69WR ;
70 S W="TRIGGERED by the "_$P(^(0),U)_" field"
71UP1 S W=W_" of the "_$O(^DD(%,0,"NM",0))
72 I $D(^DD(%,0,"UP")) S %=^("UP") S W=W_" sub-field" G UP1
73 S W=W_" File"
74W1 S DDV1="" W ?DDL2 F K=1:1 S DDV=$P(W," ",K)_" ",DDV1=DDV1_DDV W:$L(DDV)+$X>IOM !?DDL2 W DDV Q:$L(DDV1)>$L(W)
75 I $Y+6>IOSL S DC=DC+1 D DIDH1
76 K DDV,DDV1 Q
77DE ;
78 W !?DDL1,$P("DESCRIPTION:^TECHNICAL DESCR:",U,%Y=23+1)
79 I '$$WP^DIUTL($NA(^DD(F(Z),DJ(Z),%Y)),DDL2+1) S M="^"
80 Q
Note: See TracBrowser for help on using the repository browser.