source: WorldVistAEHR/trunk/r/GEN_MED_REC_GENERATOR-GMRG/GMRGTGIF.m@ 619

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

initial load of WorldVistAEHR

File size: 3.0 KB
Line 
1GMRGTGIF ;HIRMFO/DDA,RM-TEXT GENERATOR PRIME DOCUMENT EDIT ;1/23/96
2 ;;3.0;Text Generator;;Jan 24, 1996
3EN1 ; ENTRY TO ADD DATA TO AGGREGATE TERM FILE IF PACKAGE IS UNKNOWN
4 Q:'$D(GMRGPK)
5 W ! S DX=$X,DY=0 X ^%ZOSF("XY")
6 S DIC("S")="I $S($P(^(0),U,4)="""":0,'$D(^GMRD(124.25,$P(^GMRD(124.2,+Y,0),U,4),0)):0,$P(^(0),U)=""PRIME DOCUMENT"":1,1:0)",DIC("A")="Select Prime Document to be modified: ",DIC="^GMRD(124.2,",DIC(0)="AEQML",DLAYGO=124.2
7 S DIC("DR")=".03///^S X=GMRGPK;.02///^S X=2;.04///^S X=""PRIME DOCUMENT"""
8 D ^DIC K DIC,DLAYGO
9 G:+Y'>0 Q S GMRGRT=+Y D EN4 I GMRGOUT K GMRGOUT,GMRGRT Q
10 G EN1
11EN4 ; ENTRY TO ADD DATA IF PACKAGE AND PRIME DOCUMENT ARE BOTH KNOWN
12 ; GMRGPK=PACKAGE REFERENCE GMRGRT=PRIME DOCUMENT IN AGG. TERM FILE
13 Q:'$D(GMRGPK)!'$D(GMRGRT) S GMRGRT(0)=$S($D(^GMRD(124.2,GMRGRT,0)):^(0),1:""),IOP="HOME",(GMRGLEVL,GMRGUP,GMRGOUT)=0 D ^%ZIS S GMRGINFO=GMRGRT D INFOSET^GMRGTGI0
14A D EN2 G Q:GMRGUP,A:'GMRGOUT
15Q L -^GMRD(124.2,+GMRGINFO,0) K ^TMP($J),%,D0,DA,DIC,DIE,DIK,DINUM,DR,DTOUT,GMRGANW,GMRGDOL,GMRGDUP,GMRGINFO,GMRGL,GMRGLEVL,GMRGNOL,GMRGNUP,GMRGOK,GMRGR,GMRGS,GMRGSEL,GMRGT,GMRGU,GMRGUP,GMRGW,GMRGX,GMRGY,GMRGZ,I
16 Q
17EN2 ; ENTRY TO MODIFY A PRIME DOCUMENT GMRGRT=PRIME DOC. (PTR TO 124.2),
18 ; GMRGINFO AND GMRGINFO( WHICH CONTAINS THE FOLLOWING ELEMEMTS:
19 ; GMRGINFO = AGGY ENTRY WHICH FOLLOWING INFO PERTAINS (PTR FILE 124.2)
20 ; GMRGINFO("PACK")=PACKAGE (PTR TO FILE 9.4).
21 ; GMRGINFO("TYPE")=$S(1:"DOCUMENT",2:"FRAME",3:"TERM"),
22 ; GMRGINFO("LEAD"),GMRGINFO("TRAIL")= LEAD OR TRAIL TEXT 1-200 CHARS.
23 ; GMRGINFO("TEXT")= TEXT OF TERM ^ NODE IDENTIFIER
24 ; GMRGINFO("FORM")=$S("B":"BRIEF TABULAR","T":"TABULAR",S:"SENTENCE")
25 ; GMRGINFO("CLAS")=CLASSIFICATION (PTR TO FILE 124.25) ^ CLASS. TEXT
26 ; GMRGINFO("MAX"),GMRGINFO("MIN")= MIN OR MAX # OF SELECTABLE ITEMS
27 ; GMRGINFO("ACTS"),GMRGINFO("ACTF") = SELECTION OR FILING ACTION
28 ; GMRGINFO("SEL") = # OF CHILDREN FOR THIS ENTRY
29 ; GMRGINFO("SEL",SELECTION #) = SELCTION IEN (ENTRY IN CHILD MULT) ^
30 ; SELECTION PTR (PTR TO 124.2) ^ SELECTION TEXT
31 K GMRGXVER D DISP^GMRGTGI1 Q:GMRGOUT
32CHADE ; CHOOSE DELETE/ADD/EDIT A SELECTION, OR EDIT THE ENTRY
33 W !!,"Enter appropriate action, or type a '?' to see what you can do: " R Y:DTIME
34 S:Y="^"!(Y="^^")!'$T GMRGOUT=1 Q:GMRGOUT I '$L(Y)!(Y?1N.N0.1"@")!(Y?1N.N1"D")!(Y?1N.N1"d")!($L(Y)=1) S:'$L(Y) GMRGUP=1 Q:GMRGUP I Y?1N.N0.1"@"!(Y?1N.N1"D")!(Y?1N.N1"d")!($L(Y)=1&("Tt"[Y!("Aa"[Y)!("Rr"[Y))) Q:"Rr"[Y D EN1^GMRGTGI2 Q
35 I Y'?1"?".E W !?3,$C(7),"Incorrect response, enter a '?' for more help."
36 I Y?1"?".E S XQH="GMRG-EDIT CHOICES" D EN^XQH K XQH
37 G CHADE
38EN3 ; SELECT PACKAGE FOR WHICH ADDING TERMS
39 W !!,"PACKAGE REFERENCE: " R X:DTIME G Q3:"^^"[X!'$T
40 I $L(X)<2!($L(X)>5)!(X?1P.E) W !?5,$C(7),"This is a reference for which to identify which package an aggregate",!?5,"term entry belongs. Answer must be 2-5 characters in length.",!!?5,"References already used include: " D LP G EN3
41 S GMRGPK=X D EN1
42Q3 K GMRGLP,GMRGPK
43 Q
44LP ;
45 S X="" F GMRGLP=0:0 S X=$O(^GMRD(124.2,"AA",X)) Q:X="" W !?18,X
46 Q
Note: See TracBrowser for help on using the repository browser.