Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: GMRADSP8

GMRADSP8.m

Go to the documentation of this file.
  1. GMRADSP8 ;HIRMFO/WAA-DISPLAY ALLERGY ;9/6/95 11:06
  1. ;;4.0;Adverse Reaction Tracking;;Mar 29, 1996
  1. DISPLAY(ARRAY) ;This subroutine will print out the Reactant
  1. ; ARRAY is the array that is passed
  1. N CNT
  1. Q:'$D(ARRAY)
  1. D WRITE(1,0,.ARRAY,.GMRAOUT,"HEAD^GMRADSP8")
  1. Q
  1. W #
  1. D WRITE(2,68,"OBS/")
  1. D WRITE(1,0,"REACTANT"),WRITE(0,53,"VER."),WRITE(0,59," MECH. "),WRITE(0,68,"HIST"),WRITE(0,74,"TYPE")
  1. D WRITE(1,0,"--------"),WRITE(0,53,"----"),WRITE(0,59,"-------"),WRITE(0,68,"----"),WRITE(0,74,"----")
  1. Q
  1. ;
  1. WRITE(NL,TAB,STRING,GMRAOUT,HEAD) ; This will display all the
  1. ; text in a given string.
  1. ; Requited Variables:
  1. ; NL = Numeric repersentation of New lines
  1. ; = 0 No new line
  1. ; TAB = Number of tab spaces from the las given position
  1. ; STRING = The array of text to be printed.
  1. ; STRING(X) = Continue of string
  1. ; NOTE: This continuation will line feed and tab the same
  1. ; as the string itself.
  1. ; Optional variables
  1. ; GMRAOUT = The status of the Up-arrow out of a system.
  1. ; = "" use Page break function
  1. ; HEAD = HEADER SUB-ROUTINE
  1. ;
  1. S GMRAOUT=$G(GMRAOUT),HEAD=$G(HEAD)
  1. N GMAI,GMAX
  1. I $G(STRING)'="" D Q:GMRAOUT W ?TAB,STRING
  1. .I NL F GMAI=1:1:NL S:GMRAOUT'="" GMRAOUT=$$PAGE(HEAD) Q:GMRAOUT W !
  1. .Q
  1. S GMAX=0 F S GMAX=$O(STRING(GMAX)) Q:GMAX<1 D Q:GMRAOUT W ?TAB,STRING(GMAX)
  1. .I NL F GMAI=1:1:NL S:GMRAOUT'="" GMRAOUT=$$PAGE(HEAD) Q:GMRAOUT W !
  1. .Q
  1. Q
  1. PAGE(HEAD) ; Bottom of page program
  1. ; Input variable:
  1. ; HEAD = Header program to be run
  1. ;
  1. S GMRAOUT=0
  1. D:$Y>(IOSL-3)
  1. .N DIR,Y
  1. .S DIR(0)="E",DIR("A")="Press RETURN to continue or '^' to stop listing"
  1. .S DIR("?")=" Press RETURN to continue, '^' stop reactant listing."
  1. .W ! D ^DIR I Y D:HEAD'="" @HEAD Q ;User hit return
  1. .I $D(DTOUT)!$D(DIROUT) S GMRAOUT=1
  1. .I $D(DUOUT) S GMRAOUT=2
  1. .K DIROUT,DTOUT,DIRUT,DUOUT
  1. .Q
  1. Q GMRAOUT