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

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

initial load of FOIAVistA 6/30/08 version

File size: 1.7 KB
Line 
1DMSQP ;SFISC/EZ-PRINT SQLI TABLE POINTERS ;10/30/97 16:49
2 ;;22.0;VA FileMan;;Mar 30, 1999
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 Q
5EN1 ; in pointers (to this table from others)
6 D DT^DICRW S DMQ="" D D EXIT
7 . D OK,ASK:'DMQ,CHK:'DMQ,PR1:'DMQ
8 Q
9EN2 ; out pointers (from this table out)
10 D DT^DICRW S DMQ="" D D EXIT
11 . D OK,ASK:'DMQ,CHK:'DMQ,CHK1:'DMQ,PR2:'DMQ
12 Q
13OK ; check if okay to run
14 I '$O(^DMSQ("S",0)) W !?5,"Sorry, SQLI files are empty.",! S DMQ=1 Q
15 I $$WAIT^DMSQT1 D S DMQ=1 Q
16 . W !?5,"Try later. SQLI is being re-built right now."
17 Q
18ASK S DIC="1.5215",DIC(0)="QEAM" ; select starting-point table
19 D ^DIC K DIC S DMY=+Y S:$D(DTOUT)!$D(DUOUT)!(Y=-1) DMQ=1
20 Q
21CHK I '$D(^DMSQ("E","F",DMY,"F")) S DMQ=1 W !,?5,"NO POINTERS",!
22 Q
23CHK1 ; check file access needed for navigation in PR2 report
24 I DUZ(0)'="@" F DIFILE=1.5212 D K DIAC
25 . S DIAC="RD" D EN^DIAC S:'% DMQ=1
26 D:DMQ
27 . W !!?5,"You need 'Read' access to one SQLI file to run this report."
28 . W !?5,"It is file 1.5212."
29 . W !!?5,"Contact your system manager to be granted single file access.",!
30 Q
31PR1 S DIC="1.5216",L=0 ; only foreign keys (screen-out primary)
32 S DIS(0)="I '$D(^DMSQ(""E"",""E"",""P"",D0))"
33 S DHD="TABLES POINTING TO "_$P(^DMSQ("T",DMY,0),U,1)
34 S FLDS="""FROM TABLE: "";S;C5,!E_TABLE;X"
35 S FLDS(1)="""VIA FOREIGN KEY: "";C5,E_NAME;X"
36 S DMY1=$O(^DMSQ("DM","C",DMY,0))
37 S BY(0)="^DMSQ(""E"",""C"",DMY1,",L(0)=1 D EN1^DIP
38 Q
39PR2 S DIC="1.5216",L=0
40 S DHD="TABLES POINTED-TO BY "_$P(^DMSQ("T",DMY,0),U,1)
41 S FLDS="""TO TABLE: "";S;C5,E_DOMAIN:,!DM_TABLE;X"
42 S FLDS(1)="""VA FOREIGN KEY: "";C5,E_NAME;X"
43 S BY(0)="DMSQ(""E"",""F"",DMY,""F"",",L(0)=1 D EN1^DIP
44 Q
45EXIT K DMY,DMY1,DMQ Q
Note: See TracBrowser for help on using the repository browser.