source: FOIAVistA/trunk/r/CONSULT_REQUEST_TRACKING-GMRC-GMRS-GMRT/GMRCPRP.m@ 1208

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

initial load of FOIAVistA 6/30/08 version

File size: 2.8 KB
Line 
1GMRCPRP ;SLC/DCM - Set protocol information into ^TMP global for print and display by List Manager ;5/20/98 14:20
2 ;;3.0;CONSULT/REQUEST TRACKING;**1**;DEC 27, 1997
3ENL ;;List manager entry point
4 W !,"Compiling Report: Please Wait..."
5EN ;Entry point
6 K ^TMP("GMRCR",$J,"PRL"),ERMSG
7 S FILE="101",FIELDS=".01;1;1.1;1.11;3.5;4;6;10*;12",FLAGS="EZ",TARGET="TMP",MSG="ERROR",TAB="",$P(TAB," ",50)="",GMRCCT=1
8 S GMRCBXRF="GMRC"
9 F S GMRCBXRF=$O(^ORD(101,"B",GMRCBXRF)) Q:GMRCBXRF'["GMRC"!(GMRCBXRF="") W "." S IENS=0,IENS=$O(^ORD(101,"B",GMRCBXRF,IENS)) D GETS^DIQ(FILE,IENS,FIELDS,FLAGS,"TMP","ERMSG") D
10 .S GMRCPRNM=$E(TMP(FILE,IENS_",",.01,"E"),1,39),GMRCTXT=$S($D(TMP(FILE,IENS_",",1,"E")):$E(TMP(FILE,IENS_",",1,"E"),1,39),1:"")
11 .S GMRCSYN=$S($D(TMP(FILE,IENS_",",1.1,"E")):TMP(FILE,IENS_",",1.1,"E"),1:""),GMRCPKG=$S($D(TMP(FILE,IENS_",",12,"E")):TMP(FILE,IENS_",",12,"E"),1:"")
12 .S GMRCTYP=$S($D(TMP(FILE,IENS_",",4,"E")):TMP(FILE,IENS_",",4,"E"),1:"")
13 .S GMRCFILK=$S($D(TMP(FILE,IENS_",",6,"E")):TMP(FILE,IENS_",",6,"E"),1:"")
14 .S GMRCNM=$S($D(TMP(FILE,IENS_",",1.11,"E")):TMP(FILE,IENS_",",1.11,"E"),1:"")
15 .S ^TMP("GMRCR",$J,"PRL",GMRCCT,0)=GMRCPRNM_$E(TAB,1,40-$L(GMRCPRNM))_$E(GMRCTXT,1,39),GMRCCT=GMRCCT+1,^TMP("GMRCR",$J,"PRL",GMRCCT,0)="Type:"_$E(TAB,1,8)_GMRCTYP_$E(TAB,1,27-$L(GMRCTYP))_"Print Name: "_GMRCNM,GMRCCT=GMRCCT+1
16 .S ^TMP("GMRCR",$J,"PRL",GMRCCT,0)="Package:"_$E(TAB,1,5)_GMRCPKG_$E(TAB,1,27-$L(GMRCPKG))_"File Link: "_GMRCFILK,GMRCCT=GMRCCT+1
17 .I $O(TMP(FILE,IENS_",",3.5,0))?1N.N S GLOB="TMP("_FILE_","""_IENS_","""_",3.5)" D
18 ..S LINE="Description: " D WPSET^GMRCUTIL(GLOB,"^TMP(""GMRCR"",$J,""PRL"")",LINE,.GMRCCT,TAB,1)
19 ..Q
20 .I $O(TMP(FILE,IENS_",",3.5,0))="E" S ^TMP("GMRCR",$J,"PRL",GMRCCT,0)="Description:",GMRCCT=GMRCCT+1
21 .S ^TMP("GMRCR",$J,"PRL",GMRCCT,0)="Synonyms:"_$E(TAB,1,13)_$S($D(TMP(FILE,IENS_",",1.1,"E")):TMP(FILE,IENS_",",1.1,"E"),1:""),GMRCCT=GMRCCT+1
22 .I $O(TMP(FILE_".01",""))="" S ^TMP("GMRCR",$J,"PRL",GMRCCT,0)="Menu Items:",GMRCCT=GMRCCT+1
23 .I $O(TMP(FILE_".01",""))]"" S GMRCSUB="",GMRCITM="Menu Items: " F S GMRCSUB=$O(TMP(FILE_".01",GMRCSUB)) Q:GMRCSUB="" D
24 ..I $D(TMP(FILE_".01",GMRCSUB,.01,"E")) S GMRCITM=$S('$L(GMRCITM):$E(TAB,1,13)_GMRCITM,1:GMRCITM)_TMP(FILE_".01",GMRCSUB,.01,"E"),GMRCMNE=TMP(FILE_".01",GMRCSUB,2,"E"),GMRCNO=$J(TMP(FILE_".01",GMRCSUB,3,"E"),3,0)
25 ..I '$D(TMP(FILE_".01",GMRCSUB,.01,"E")),$L($O(ERMSG(0))) S GMRCITM=$E(TAB,1,13)_"Deleted Protocol: "_$G(ERMSG("DIERR",2,"PARAM",1)) K ERRMSG
26 ..S ^TMP("GMRCR",$J,"PRL",GMRCCT,0)=$E(GMRCITM_TAB,1,45)_GMRCNO_" "_GMRCMNE,GMRCCT=GMRCCT+1,GMRCITM=""
27 ..Q
28 .K TMP S ^TMP("GMRCR",$J,"PRL",GMRCCT,0)="",GMRCCT=GMRCCT+1
29 .Q
30 S GMRCCT=GMRCCT-1
31QUIT ;Kill off local globals and exit
32 K CNT,FLG,LNO,LN1,IENS,FILE,FLAGS,FIELDS,GLOB,LINE,ERMSG,GMRCNM,GMRCNO,GMRCND,GMRCSYN,GMRCITM,GMRCMNE,GMRCPKG,GMRCSUB,GMRCFILK,GMRCTXT,GMRCTYP,GMRDCFLN,GMRCBXRF,GMRCPRNM,TARGET
33 Q
Note: See TracBrowser for help on using the repository browser.