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

GMRGTGIF.m

Go to the documentation of this file.
GMRGTGIF ;HIRMFO/DDA,RM-TEXT GENERATOR PRIME DOCUMENT EDIT ;1/23/96
 ;;3.0;Text Generator;;Jan 24, 1996
EN1 ; ENTRY TO ADD DATA TO AGGREGATE TERM FILE IF PACKAGE IS UNKNOWN
 Q:'$D(GMRGPK)
 W ! S DX=$X,DY=0 X ^%ZOSF("XY")
 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
 S DIC("DR")=".03///^S X=GMRGPK;.02///^S X=2;.04///^S X=""PRIME DOCUMENT"""
 D ^DIC K DIC,DLAYGO
 G:+Y'>0 Q S GMRGRT=+Y D EN4 I GMRGOUT K GMRGOUT,GMRGRT Q
 G EN1
EN4 ; ENTRY TO ADD DATA IF PACKAGE AND PRIME DOCUMENT ARE BOTH KNOWN
 ; GMRGPK=PACKAGE REFERENCE   GMRGRT=PRIME DOCUMENT IN AGG. TERM FILE
 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
A D EN2 G Q:GMRGUP,A:'GMRGOUT
Q 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
 Q
EN2 ; ENTRY TO MODIFY A PRIME DOCUMENT GMRGRT=PRIME DOC. (PTR TO 124.2),
 ; GMRGINFO AND GMRGINFO( WHICH CONTAINS THE FOLLOWING ELEMEMTS:
 ; GMRGINFO = AGGY ENTRY WHICH FOLLOWING INFO PERTAINS (PTR FILE 124.2)
 ; GMRGINFO("PACK")=PACKAGE (PTR TO FILE 9.4).
 ; GMRGINFO("TYPE")=$S(1:"DOCUMENT",2:"FRAME",3:"TERM"),
 ; GMRGINFO("LEAD"),GMRGINFO("TRAIL")= LEAD OR TRAIL TEXT 1-200 CHARS.
 ; GMRGINFO("TEXT")= TEXT OF TERM ^ NODE IDENTIFIER
 ; GMRGINFO("FORM")=$S("B":"BRIEF TABULAR","T":"TABULAR",S:"SENTENCE")
 ; GMRGINFO("CLAS")=CLASSIFICATION (PTR TO FILE 124.25) ^ CLASS. TEXT
 ; GMRGINFO("MAX"),GMRGINFO("MIN")= MIN OR MAX # OF SELECTABLE ITEMS
 ; GMRGINFO("ACTS"),GMRGINFO("ACTF") = SELECTION OR FILING ACTION
 ; GMRGINFO("SEL") = # OF CHILDREN FOR THIS ENTRY
 ; GMRGINFO("SEL",SELECTION #) = SELCTION IEN (ENTRY IN CHILD MULT) ^
 ;     SELECTION PTR (PTR TO 124.2) ^ SELECTION TEXT
 K GMRGXVER D DISP^GMRGTGI1 Q:GMRGOUT
CHADE ; CHOOSE DELETE/ADD/EDIT A SELECTION, OR EDIT THE ENTRY
 W !!,"Enter appropriate action, or type a '?' to see what you can do: " R Y:DTIME
 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
 I Y'?1"?".E W !?3,$C(7),"Incorrect response, enter a '?' for more help."
 I Y?1"?".E S XQH="GMRG-EDIT CHOICES" D EN^XQH K XQH
 G CHADE
EN3 ; SELECT PACKAGE FOR WHICH ADDING TERMS
 W !!,"PACKAGE REFERENCE: " R X:DTIME G Q3:"^^"[X!'$T
 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
 S GMRGPK=X D EN1
Q3 K GMRGLP,GMRGPK
 Q
LP ;
 S X="" F GMRGLP=0:0 S X=$O(^GMRD(124.2,"AA",X)) Q:X=""  W !?18,X
 Q