source: FOIAVistA/trunk/r/GEN_MED_REC_GENERATOR-GMRG/GMRGTGI1.m@ 1458

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

initial load of FOIAVistA 6/30/08 version

File size: 3.3 KB
Line 
1GMRGTGI1 ;HIRMFO/RM-PRIME DOCUMENT EDIT (cont.) ;9/1/95
2 ;;3.0;Text Generator;;Jan 24, 1996
3DISP ; DISPLAY CHARACTERISTICS OF THIS TERM
4 W !!,$P(GMRGINFO("TEXT"),"^")
5 I $P(GMRGINFO("CLAS"),"^",2)'="" W !?3,"Classification: "_$P(GMRGINFO("CLAS"),"^",2)_" "
6 E W:GMRGINFO("FORM")'="" !?3
7 I GMRGINFO("FORM")'="" W "Output Format: "_$S(GMRGINFO("FORM")="B":"BRIEF TABULAR",GMRGINFO("FORM")="T":"TABULAR",1:"SENTENCE")
8 W !?3,"Type of Term: ",$S(GMRGINFO("TYPE")=2:"FRAME",1:"TERM")
9 I GMRGINFO("ADD")'="" W ?25,"Ask Additional Text: ",$S(GMRGINFO("ADD"):"YES",1:"NO")
10 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:"")
11 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"))
12 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:"")
13 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)
14 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)
15 F GMRGW=0:0 S GMRGW=$O(GMRGINFO("SEL",GMRGW)) Q:GMRGW'>0 D PRTCHC Q:GMRGOUT
16 S:GMRGOUT GMRGOUT=$S(GMRGOUT=1:0,1:1) Q:GMRGOUT
17 Q
18PRTCHC ; LIST SELECTION AND ADD TO THE GMRGSEL ARRAY
19 I '(GMRGW#10),GMRGW\10,'GMRGOUT W !?9,"""^"" TO STOP " R Y:DTIME S:'$T!(Y="^")!(Y="^^") GMRGOUT=$S(Y="^":1,1:2)
20 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:"")
21 Q
22DOWN ; GO DOWN A LEVEL INTO THE CARE PLAN
23 S GMRGLEVL=GMRGLEVL+1,^TMP($J,"GMRGINFO",GMRGLEVL)=GMRGINFO
24 S GMRGNOL=0 L +^GMRD(124.2,GMRGSEL,0):1 G:$T CNTD
25LKDQ W !,$C(7),"ANOTHER TERMINAL IS EDITING THIS ENTRY",!,"Do you wish to wait for this entry" S %=0 D YN^DICN
26 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
27 S:%=2 GMRGNOL=1 S:%=-1 GMRGOUT=1 Q:GMRGOUT!GMRGNOL I %=1 L +^GMRD(124.2,GMRGSEL,0):600 G:'$T LKDQ
28CNTD L -^GMRD(124.2,+GMRGINFO,0) K GMRGINFO S GMRGINFO=GMRGSEL D INFOSET^GMRGTGI0
29 Q
30UP ; GO UP A LEVEL IN THE CARE PLAN
31 S GMRGNOL=0 L +^GMRD(124.2,^TMP($J,"GMRGINFO",GMRGLEVL),0):1 G:$T CNTU
32LKUQ W !,$C(7),"ANOTHER TERMINAL IS EDITING THIS ENTRY",!,"Do you wish to wait for this entry" S %=0 D YN^DICN
33 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
34 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
35CNTU L -^GMRD(124.2,+GMRGINFO,0) K GMRGINFO S GMRGINFO=^TMP($J,"GMRGINFO",GMRGLEVL)
36 D INFOSET^GMRGTGI0
37 K ^TMP($J,"GMRGINFO",GMRGLEVL) S GMRGLEVL=GMRGLEVL-1
38 Q
Note: See TracBrowser for help on using the repository browser.