source: WorldVistAEHR/trunk/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQORMX.m@ 1073

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

initial load of WorldVistAEHR

File size: 1.6 KB
Line 
1XQORMX ; SLC/KCM - Compile Formatted Menus ;2/3/94 09:58 ;
2 ;;8.0;KERNEL;;Jul 10, 1995
3SET ;From: XQORM (when navigating file 19) Entry: DA Exit: DA
4 ;NOTE: Lock ^DIC(19,DA) when calling
5 N X I $D(^XUTL("XQORM",DA_";DIC(19,",0)),$D(^DIC(19,DA,99)),($P(^DIC(19,DA,99),"^",1)=$P(^XUTL("XQORM",DA_";DIC(19,",0),"^",1)) Q
6 K ^TMP("XQORM",$J),^XUTL("XQORM",DA_";DIC(19,")
7 S ORMN=1,^XUTL("XQORM",DA_";DIC(19,","COL")=ORMN,ORMT=0
8 F ORM=0:0 S ORM=$O(^DIC(19,DA,10,ORM)) Q:ORM'>0 I $D(^DIC(19,DA,10,ORM,0)) S ORMX=^(0) D ORD
9 S ORM=ORMT\ORMN S:ORMT#ORMN ORM=ORM+1 S ORMT=ORM,ORMC=.1
10 S ORMI="" F ORM=0:0 S ORMI=$O(^TMP("XQORM",$J,ORMI)) Q:ORMI="" F ORM=0:0 S ORM=$O(^TMP("XQORM",$J,ORMI,ORM)) Q:ORM'>0 I $D(^DIC(19,DA,10,ORM,0)) S ORMX=^(0),ORMC=$S((ORMC\1)'<ORMT:1+($P(ORMC,".",2)/10)+.1,1:ORMC+1) D BILD
11 I $D(^DIC(19,DA,99)) S ORM=$P(^(99),"^",1),^XUTL("XQORM",DA_";DIC(19,",0)=ORM
12 K ORM,ORMX,ORMN,ORMT,ORMC,ORMI,^TMP("XQORM",$J) Q
13ORD S ORMI=$S(+$P(ORMX,"^",3):+$P(ORMX,"^",3),+$P(ORMX,"^",2):+$P(ORMX,"^",2),$L($P(ORMX,"^",2)):"M"_$P(ORMX,"^",2),1:"Z"_$S($D(^DIC(19,+$P(ORMX,"^",1),0)):$P(^(0),"^",2),1:"")) S ^TMP("XQORM",$J,ORMI,ORM)="",ORMT=ORMT+1
14 Q
15BILD S X=$S($D(^DIC(19,+$P(ORMX,"^",1),0)):$P(^(0),"^",2),1:"")
16 F %=1:1:$L(X) I ",=;-"[$E(X,%) S X=$E(X,1,%-1)_" "_$E(X,%+1,999)
17 S ^XUTL("XQORM",DA_";DIC(19,",ORMC,0)=ORM_"^"_$P(ORMX,"^",1)_"^"_X_"^"_$P(ORMX,"^",2)
18 I $L(X) D UP S ^XUTL("XQORM",DA_";DIC(19,","B",X,ORMC)=""
19 S X=$P(ORMX,"^",2) I $L(X) D UP S ^XUTL("XQORM",DA_";DIC(19,","B",X,ORMC)=1
20 Q
21UP F %=1:1:$L(X) I $E(X,%)?1L S X=$E(X,1,%-1)_$C($A(X,%)-32)_$E(X,%+1,99)
22 Q
Note: See TracBrowser for help on using the repository browser.