source: WorldVistAEHR/trunk/r/SPINAL_CORD_DYSFUNCTION-SPN/SPNAHOCZ.m@ 1046

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

initial load of WorldVistAEHR

File size: 2.4 KB
Line 
1SPNAHOCZ ;HISC/DAD-AD HOC REPORTS: INTERFACE COMPILER ; [ 05/17/95 5:42 PM ]
2 ;;2.0;Spinal Cord Dysfunction;;01/02/1997
3 ;
4 W !,"=== Ad Hoc Report Interface Compiler ==="
5 D EXIT,DT^DICRW,HOME^%ZIS S SPNYESNO="Please answer Y(es) or N(o)."
6 D NOW^%DTC S X=$J(%,0,6),SPNTODAY=$E(X,4,5)_"/"_$E(X,6,7)_"/"_$E(X,2,3)_" "_$E(X,9,10)_":"_$E(X,11,12)
7ROUTINE ; *** Prompt user for Ad Hoc interface routine name
8 K DIR S DIR(0)="FAO^2:8^K:X'?1U1.7UN X",DIR("?")="^D EN^SPNAHOCH(""H6"")"
9 S DIR("A")="Ad Hoc Report Interface Routine: "
10 D ^DIR G:$D(DIRUT) EXIT S (SPNPROG,X)=Y
11 X ^%ZOSF("TEST") I D G EXIT:SPNREPLC=-1 I SPNREPLC=2 W ! G ROUTINE
12 . W !!?5,"*** ",SPNPROG," already exists !! ***",$C(7)
13 . F D Q:%
14 .. W !!?5,"Do you want to replace it"
15 .. S %=2 D YN^DICN S SPNREPLC=% I '% W !!?10,SPNYESNO
16 .. Q
17 . I SPNREPLC=1 F D Q:%
18 .. W !!?5,"Replace ",SPNPROG,", are you sure"
19 .. S %=2 D YN^DICN S SPNREPLC=% I '% W !!?10,SPNYESNO
20 .. Q
21 . Q
22FILE ; *** Prompt user for the file that Ad Hoc will use
23 W !!,"Select the FILE to be used by the Ad Hoc Report Generator."
24 K DIC S DIC="^DIC(",DIC(0)="AEMNQZ",DIC("A")="Select FILE: "
25 S DIC("S")="I Y>1" D ^DIC G:Y'>0 EXIT S SPNFILE=+Y,SPNFILE(0)=Y(0,0)
26FIELDS ; *** Prompt user for the fields that Ad Hoc will use
27 W !!,"Select the FIELDS to be used by the Ad Hoc Report Generator."
28 D ^SPNAHOCY G:SPNMMAX'>0!SPNQUIT EXIT
29 I SPNSORT'>0 W !!?5,"*** No sort fields chosen !! ***",$C(7) G EXIT
30NODATA ; *** Display a 'No data found...' message on reports (Y/N)
31 F D Q:%
32 . W !!,"Automatically include the ""NO RECORDS TO PRINT"" message"
33 . S %=1 D YN^DICN S SPNNODAT=$S(%=1:1,1:0) I '% D EN^SPNAHOCH("H8")
34 . Q
35 G:%=-1 EXIT
36MENUHDR ; *** Prompt user for the sort/print menu screen header
37 K DIR S DIR(0)="FAO^0:45^K:(X[U)!(X[$C(34)) X"
38 S DIR("A")="Menu screen header: ",DIR("?")="^D EN^SPNAHOCH(""H9"")"
39 W ! D ^DIR G:$D(DTOUT)!$D(DUOUT)!$D(DIROUT) EXIT S SPNMHDR=X
40BUILD ; *** Build Ad Hoc Report interface routine(s)
41 W !!,"Building the Ad Hoc Report Generator interface routine(s)...",!
42 D BUILD^SPNAHOCX
43 W !!,"Enter 'DO ^",SPNPROG,"' to run the Ad Hoc Report Generator."
44EXIT ; *** Exit the Ad Hoc interface compiler
45 K %,%DT,%H,DIC,DIE,DIR,DIRUT,DTOUT,DUOUT
46 K ^TMP($J,"SPNTXT"),^TMP($J,"SPNROU")
47 K SP,SPI,SPN,SPNATTR,SPNCHOSN,SPNDD,SPNDONE,SPNERR,SPNFILE,SPNLEN
48 K SPNLEVEL,SPNLN,SPNMHDR,SPNMMAX,SPNNODAT,SPNPROG,SPNQUIT,SPNREPLC
49 K SPNRTN,SPNRTNNO,SPNRTNXT,SPNSORT,SPNTAB,SPNTEXT,SPNTODAY,SPNWP
50 K SPNY,SPNYESNO,X,XCM,XCN,Y
51 Q
Note: See TracBrowser for help on using the repository browser.