source: WorldVistAEHR/trunk/r/NOIS-FSC/FSCRU.m@ 691

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

initial load of WorldVistAEHR

File size: 2.1 KB
Line 
1FSCRU ;SLC/STAFF-NOIS Report Utility ;8/29/94 10:20
2 ;;1.1;NOIS;;Sep 06, 1998
3 ;
4DISPLAY(DISPLAY,OK) ; from FSCOPT, FSCRPTS
5 N DIR,X,Y K DIR S DISPLAY="",OK=1
6 S DIR(0)="SAMO^DEVICE:DEVICE;VIEW:VIEW",DIR("A")="Select (D)evice or (V)iew: ",DIR("B")="View"
7 S DIR("?",1)="Enter DEVICE to display the report to the screen or queue to a device."
8 S DIR("?",2)="Enter VIEW to display the report on the NOIS View Screen using List Manager."
9 S DIR("?")="^D HELP^FSCU(.DIR)"
10 S DIR("??")="FSC U1 NOIS"
11 D ^DIR K DIR
12 I $D(DIRUT) S OK=0 Q
13 S DISPLAY=Y
14 Q
15 ;
16PT ; from FSCLMP
17 D DEV("VALM*",VALMAR,"DQPT^FSCRUDQ","NOIS - Print Text",.OK)
18 Q
19 ;
20PS ; from FSCLMP
21 D DEV("VALM*",VALMAR,"DQPS^FSCRUDQ","NOIS - Print Screen",.OK)
22 Q
23 ;
24DEV(SAVE,SAVEG,RTN,DESC,OK) ; from FSCOPT, FSCRPTS
25 I '$L($G(RTN)) Q
26 N %ZIS,FIRST,FSCDEV,PAGEBRK,POP,ZTDESC,ZTIO,ZTRTN,ZTSAVE,ZTSK K %ZIS,ZTSAVE S (FSCDEV,OK)=1,PAGEBRK=0
27 I $P($G(FSCSTYLE(0)),U,8),$L($G(DESC)),DESC'["Print Screen" S OK=1 D I 'OK Q
28 .I DESC="NOIS Report" D PAGEBRK(.PAGEBRK,.OK) Q
29 .I $L($G(VALMAR)),@VALMAR>1 D PAGEBRK(.PAGEBRK,.OK) Q
30 .I $G(SAVEG)="^TMP(""FSC LIST"",$J," S FIRST=$O(^TMP("FSC LIST",$J,0)) I FIRST,$O(^(FIRST)) D PAGEBRK(.PAGEBRK,.OK)
31 D
32 .S %ZIS="Q",%ZIS("B")=""
33 .D ^%ZIS I POP S OK=0 Q
34 .I $G(IO("Q"))'=1 D @RTN Q
35 .S ZTIO=ION_";"_IOST I $L($G(IO("DOC"))) S ZTIO=ZTIO_";"_IO("DOC")
36 .S ZTSAVE("FSC*")="",ZTSAVE("PAGEBRK")=""
37 .I $L($G(SAVE)) S ZTSAVE(SAVE)=""
38 .I $L($G(SAVEG)) S ZTSAVE(SAVEG)="",SAVEG=$E(SAVEG,1,$L(SAVEG)-1)_",",ZTSAVE(SAVEG)=""
39 .S ZTRTN=RTN
40 .S ZTDESC=$G(DESC)
41 .D ^%ZTLOAD
42 .W !,$S($D(ZTSK):"Request queued",1:"Request cancelled")
43 .D HOME^%ZIS
44 W ! D ^%ZISC
45 Q
46 ;
47PAGEBRK(PAGEBRK,OK) ;
48 N DIR,X,Y K DIR S PAGEBRK=0
49 S DIR(0)="YAO",DIR("A")="Start each call on a new page: ",DIR("B")="NO"
50 S DIR("?",1)="Enter YES to have each call begin on a new page."
51 S DIR("?",2)="Enter NO to simply print the display text."
52 S DIR("?")="^D HELP^FSCU(.DIR)"
53 S DIR("??")="FSC U1 NOIS"
54 D ^DIR K DIR
55 I $D(DIRUT) S OK=0 Q
56 I Y=1 S PAGEBRK=1
57 Q
58 ;
59REPLACE(STR,CHAR,WITH) ; $$(string,replace characters,with characters) -> new string
60 N ARRAY K ARRAY
61 S ARRAY(CHAR)=WITH
62 Q $$REPLACE^XLFSTR(STR,.ARRAY)
Note: See TracBrowser for help on using the repository browser.