source: WorldVistAEHR/trunk/r/ADVERSE_REACTION_TRACKING-GMRA-GMA/GMRADSP8.m@ 1753

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

initial load of WorldVistAEHR

File size: 1.9 KB
RevLine 
[613]1GMRADSP8 ;HIRMFO/WAA-DISPLAY ALLERGY ;9/6/95 11:06
2 ;;4.0;Adverse Reaction Tracking;;Mar 29, 1996
3DISPLAY(ARRAY) ;This subroutine will print out the Reactant
4 ; ARRAY is the array that is passed
5 N CNT
6 Q:'$D(ARRAY)
7 D WRITE(1,0,.ARRAY,.GMRAOUT,"HEAD^GMRADSP8")
8 Q
9HEAD ;Print the top of page for the display
10 W #
11 D WRITE(2,68,"OBS/")
12 D WRITE(1,0,"REACTANT"),WRITE(0,53,"VER."),WRITE(0,59," MECH. "),WRITE(0,68,"HIST"),WRITE(0,74,"TYPE")
13 D WRITE(1,0,"--------"),WRITE(0,53,"----"),WRITE(0,59,"-------"),WRITE(0,68,"----"),WRITE(0,74,"----")
14 Q
15 ;
16WRITE(NL,TAB,STRING,GMRAOUT,HEAD) ; This will display all the
17 ; text in a given string.
18 ; Requited Variables:
19 ; NL = Numeric repersentation of New lines
20 ; = 0 No new line
21 ; TAB = Number of tab spaces from the las given position
22 ; STRING = The array of text to be printed.
23 ; STRING(X) = Continue of string
24 ; NOTE: This continuation will line feed and tab the same
25 ; as the string itself.
26 ; Optional variables
27 ; GMRAOUT = The status of the Up-arrow out of a system.
28 ; = "" use Page break function
29 ; HEAD = HEADER SUB-ROUTINE
30 ;
31 S GMRAOUT=$G(GMRAOUT),HEAD=$G(HEAD)
32 N GMAI,GMAX
33 I $G(STRING)'="" D Q:GMRAOUT W ?TAB,STRING
34 .I NL F GMAI=1:1:NL S:GMRAOUT'="" GMRAOUT=$$PAGE(HEAD) Q:GMRAOUT W !
35 .Q
36 S GMAX=0 F S GMAX=$O(STRING(GMAX)) Q:GMAX<1 D Q:GMRAOUT W ?TAB,STRING(GMAX)
37 .I NL F GMAI=1:1:NL S:GMRAOUT'="" GMRAOUT=$$PAGE(HEAD) Q:GMRAOUT W !
38 .Q
39 Q
40PAGE(HEAD) ; Bottom of page program
41 ; Input variable:
42 ; HEAD = Header program to be run
43 ;
44 S GMRAOUT=0
45 D:$Y>(IOSL-3)
46 .N DIR,Y
47 .S DIR(0)="E",DIR("A")="Press RETURN to continue or '^' to stop listing"
48 .S DIR("?")=" Press RETURN to continue, '^' stop reactant listing."
49 .W ! D ^DIR I Y D:HEAD'="" @HEAD Q ;User hit return
50 .I $D(DTOUT)!$D(DIROUT) S GMRAOUT=1
51 .I $D(DUOUT) S GMRAOUT=2
52 .K DIROUT,DTOUT,DIRUT,DUOUT
53 .Q
54 Q GMRAOUT
Note: See TracBrowser for help on using the repository browser.