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

GMRGTGI1.m

Go to the documentation of this file.
GMRGTGI1 ;HIRMFO/RM-PRIME DOCUMENT EDIT (cont.) ;9/1/95
 ;;3.0;Text Generator;;Jan 24, 1996
DISP ; DISPLAY CHARACTERISTICS OF THIS TERM
 W !!,$P(GMRGINFO("TEXT"),"^")
 I $P(GMRGINFO("CLAS"),"^",2)'="" W !?3,"Classification: "_$P(GMRGINFO("CLAS"),"^",2)_"   "
 E  W:GMRGINFO("FORM")'="" !?3
 I GMRGINFO("FORM")'="" W "Output Format: "_$S(GMRGINFO("FORM")="B":"BRIEF TABULAR",GMRGINFO("FORM")="T":"TABULAR",1:"SENTENCE")
 W !?3,"Type of Term: ",$S(GMRGINFO("TYPE")=2:"FRAME",1:"TERM")
 I GMRGINFO("ADD")'="" W ?25,"Ask Additional Text: ",$S(GMRGINFO("ADD"):"YES",1:"NO")
 I GMRGINFO("MAX")'=""!(GMRGINFO("MIN")'="") W !?3,$S(GMRGINFO("MIN")'="":"Minimum number of selections: "_+GMRGINFO("MIN")_"    ",1:""),$S(GMRGINFO("MAX")'="":"Maximum number of selections: "_+GMRGINFO("MAX"),1:"")
 I GMRGINFO("SMES")'="" W !?3,"Supress min/max message: ",$S('GMRGINFO("SMES"):"NO SUPRESSION",1:"SUPRESS "_$S(GMRGINFO("SMES")=1:"MIN MESSAGE",GMRGINFO("SMES")=2:"MAX MESSAGE",1:"BOTH MESSAGES"))
 I GMRGINFO("SPLIT")'=""!(GMRGINFO("TTOP")'="") W !?3,$S(GMRGINFO("SPLIT")'="":"Split Screen: "_$S(GMRGINFO("SPLIT"):"YES",1:"NO")_"    ",1:""),$S(GMRGINFO("TTOP")'="":"Text on top: "_$S(GMRGINFO("TTOP"):"YES",1:"NO"),1:"")
 I GMRGINFO("LEAD")'="" W !?3,"Lead Text: " S GMRGL=IOM-14,GMRGPLN=GMRGINFO("LEAD") F GMRG1=1:1 Q:GMRGPLN=""  S GMRGLEN=GMRGL D FITLINE^GMRGRUT1 W ?14,GMRGPLN(0) W:GMRGPLN(1)'="" ! S GMRGPLN=GMRGPLN(1)
 I GMRGINFO("TRAIL")'="" W !?3,"Trail Text: " S GMRGL=IOM-15,GMRGPLN=GMRGINFO("TRAIL") F GMRG1=1:1 Q:GMRGPLN=""  S GMRGLEN=GMRGL D FITLINE^GMRGRUT1 W ?15,GMRGPLN(0) W:GMRGPLN(1)'="" ! S GMRGPLN=GMRGPLN(1)
 F GMRGW=0:0 S GMRGW=$O(GMRGINFO("SEL",GMRGW)) Q:GMRGW'>0  D PRTCHC Q:GMRGOUT
 S:GMRGOUT GMRGOUT=$S(GMRGOUT=1:0,1:1) Q:GMRGOUT
 Q
PRTCHC ; LIST SELECTION AND ADD TO THE GMRGSEL ARRAY
 I '(GMRGW#10),GMRGW\10,'GMRGOUT W !?9,"""^"" TO STOP " R Y:DTIME S:'$T!(Y="^")!(Y="^^") GMRGOUT=$S(Y="^":1,1:2)
 I 'GMRGOUT W !?(6-$L(GMRGW)),GMRGW,".  ",$P(GMRGINFO("SEL",GMRGW),"^",3),?$X+6,$S($P(GMRGINFO("SEL",GMRGW),"^",4)'="":"("_$P(GMRGINFO("SEL",GMRGW),"^",4)_")",1:"")
 Q
DOWN ; GO DOWN A LEVEL INTO THE CARE PLAN
 S GMRGLEVL=GMRGLEVL+1,^TMP($J,"GMRGINFO",GMRGLEVL)=GMRGINFO
 S GMRGNOL=0 L +^GMRD(124.2,GMRGSEL,0):1 G:$T CNTD
LKDQ W !,$C(7),"ANOTHER TERMINAL IS EDITING THIS ENTRY",!,"Do you wish to wait for this entry" S %=0 D YN^DICN
 I '% W !?3,"If you think that the person editing this entry is only doing so",!?3,"temporarily, and you will be able to continue answer Yes, else answer No." G LKDQ
 S:%=2 GMRGNOL=1 S:%=-1 GMRGOUT=1 Q:GMRGOUT!GMRGNOL  I %=1 L +^GMRD(124.2,GMRGSEL,0):600 G:'$T LKDQ
CNTD L -^GMRD(124.2,+GMRGINFO,0) K GMRGINFO S GMRGINFO=GMRGSEL D INFOSET^GMRGTGI0
 Q
UP ; GO UP A LEVEL IN THE CARE PLAN
 S GMRGNOL=0 L +^GMRD(124.2,^TMP($J,"GMRGINFO",GMRGLEVL),0):1 G:$T CNTU
LKUQ W !,$C(7),"ANOTHER TERMINAL IS EDITING THIS ENTRY",!,"Do you wish to wait for this entry" S %=0 D YN^DICN
 I '% W !?3,"If you think that the person editing this entry is only doing so",!?3,"temporarily, and you will be able to continue answer Yes, else answer No." G LKUQ
 S:%=2 GMRGNOL=1 S:%=-1 GMRGOUT=1 Q:GMRGOUT!GMRGNOL  I %=1 L +^GMRD(124.2,^TMP($J,"GMRGINFO",GMRGLEVL),0):600 G:'$T LKUQ
CNTU L -^GMRD(124.2,+GMRGINFO,0) K GMRGINFO S GMRGINFO=^TMP($J,"GMRGINFO",GMRGLEVL)
 D INFOSET^GMRGTGI0
 K ^TMP($J,"GMRGINFO",GMRGLEVL) S GMRGLEVL=GMRGLEVL-1
 Q