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

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

initial load of FOIAVistA 6/30/08 version

File size: 3.6 KB
Line 
1%ZISS1 ;AC/SFISC - Collect screen parameters 5/29/88 2:02 PM ;1/24/08 16:10
2 ;;8.0;KERNEL;**69,440**;JUL 10, 1995;Build 13
3 ;Per VHA Directive 2004-038, this routine should not be modified
4VALID ;
5 N %ZISI,%ZISNP,ZISCH,ZISEND,ZISNUM,ZISQ,ZISXL,ZISXLN ;p440
6 D L
7 Q
8 ;
9SET2 ;
10 S %ZISFN="" F %ZISZ=0:0 S %ZISFN=$O(%ZISZ(%ZISFN)) Q:%ZISFN="" I $D(%ZISZ(%ZISFN))#2 S %ZISXX=%ZISZ(%ZISFN) D INDCK
11 Q
12INDCK ;
13 S %ZISY=""
14 I "IOEFLD^IOSTBM"[%ZISFN S @%ZISFN=%ZISXX Q
15 I %ZISXX]"" S @("%ZISY="_%ZISXX)
16 ;E S @("%ZISY="_"""""")
17 I $E(%ZISFN,1,2)="IO" S @%ZISFN=%ZISY
18 E S @("IO"_$E(%ZISFN,1,6))=%ZISY
19 Q:'$D(%ZIS)#2 Q:%ZIS'["I" Q:'$D(%ZISZ(%ZISFN,1))
20 ;
21SRAY ;
22 S %=%ZISY,%ZISY=$A($E(%ZISY,1))
23 F %1=2:1:$L(%) S %ZISY=%ZISY_$S($A(%,%1)<32:$A(%,%1),$A(%,%1)=127:127,1:$E(%,%1))
24 S IOIS(%ZISY)=%ZISFN
25 Q
26CHECK ;Entry point called from input transforms of fields in DEV/TT files.
27 N %ZISXX,%ZISYY,%ZISI,%ZISNP,%ZISX1,%ZISX2,ZISCH,ZISNUM,ZISQ,ZISXL,ZISXLN ;p440
28 S %ZISXX=X D L S X=%ZISYY
29 Q
30CHECK1 ;Entry point called from input transforms of fields in DEV/TT files.
31 N %ZISXX,%ZISYY,%ZISI,%ZISNP,%ZISX1,%ZISX2,ZISCH,ZISNUM,ZISQ,ZISXL,ZISXLN ;p440
32 S %ZISXX=$S(X?1"W ".E:$E(X,3,$L(X)),1:X)
33 D L S X=$S(X?1"W ".E:"W "_%ZISYY,1:%ZISYY)
34 Q
35FORM ;Entry point called from input transforms of fields in DEV/TT files.
36 Q:$L(X,"_")'>1
37 N %ZISSI,%ZISSY ;p440
38 ;F %ZISSI=1:1:$L(X,"_") S %ZISX1=$P(X,"_",%ZISSI) I %ZISX1]"","#?!"[$E(%ZISX1) S X=$S(%ZISSI=1:"",1:$P(X,"_",1,%ZISSI-1)_",")_%ZISX1_$S(%ZISSI<$L(X,"_"):","_$P(X,"_",%ZISSI+1,255),1:"") W !,%ZISSI_"==>"_X
39 S %ZISSY=""
40 F %ZISSI=1:1:$L(X,"_") S %ZISSY=%ZISSY_$P(X,"_",%ZISSI)_$S($P(X,"_",%ZISSI+1)="":"","#?!"[$E($P(X,"_",%ZISSI+1)):",","#?!"[$E($P(X,"_",%ZISSI)):",",1:"_")
41 S X=%ZISSY
42 Q
43 ;
44L S ZISQ="""",%ZISNP=0,ZISXLN=$L(%ZISXX) I 'ZISXLN S %ZISYY="" Q
45 S ZISXL=0,%ZISYY="" F %ZISI=0:0 S ZISXL=ZISXL+1 S ZISCH=$E(%ZISXX,ZISXL) D L1 Q:ZISXL'<ZISXLN
46 ;I $L(%ZISYY,"$C(")>2,%ZISYY[")_$C(" S %ZISXX=%ZISYY D L2,L3 S %ZISYY=%ZISXX Q
47 S %ZISXX=%ZISYY D L2,L3 S %ZISYY=%ZISXX
48 Q
49L1 I ZISCH="_"!(ZISCH=",") S %ZISYY=%ZISYY_"_" Q
50 I ZISCH=ZISQ D QUOTE Q
51 I ZISCH="$" D DOLR Q
52 I ZISCH="*" D STAR Q
53 I ZISCH="(" D PAREN Q
54 S %ZISYY=%ZISYY_ZISCH
55 Q
56L2 ;Find $C(x)_$C(y) and merge
57 N I ;p440
58 F I=1:1:$L(%ZISXX,"_") S %ZISX1=$P(%ZISXX,"_",I),%ZISX2=$P(%ZISXX,"_",I+1) I $E(%ZISX1,1,3)="$C(",$E(%ZISX2,1,3)="$C(" D S2
59 Q
60L3 ;
61 N I
62 F I=1:1:$L(%ZISXX,"_") I $P(%ZISXX,"_",I)["+","$("'[$E($P(%ZISXX,"_",I)),")"'[$E($P(%ZISXX,"_",I),$L($P(%ZISXX,"_",I))) S $P(%ZISXX,"_",I)="("_$P(%ZISXX,"_",I)_")"
63 Q
64STAR ;S ZISNUM="" F %ZISI=0:0 S ZISXL=ZISXL+1 S ZISCH=$E(%ZISXX,ZISXL) S:ZISCH?1N ZISNUM=ZISNUM_ZISCH I ZISCH=""!(ZISCH=",") S %ZISYY=%ZISYY_"$C("_+ZISNUM_")",ZISXL=ZISXL-1 Q
65 S ZISNUM="" F %ZISI=0:0 S ZISXL=ZISXL+1 S ZISCH=$E(%ZISXX,ZISXL) S:ZISCH'=""&(ZISCH'=",") ZISNUM=ZISNUM_ZISCH I ZISCH=""!(ZISCH=",") S %ZISYY=%ZISYY_"$C("_ZISNUM_")",ZISXL=ZISXL-1 Q
66 Q
67QUOTE S %ZISYY=%ZISYY_ZISCH F %ZISI=0:0 S ZISXL=ZISXL+1 S ZISCH=$E(%ZISXX,ZISXL),%ZISYY=%ZISYY_ZISCH I ZISCH=ZISQ!(ZISXL'<ZISXLN) Q
68 Q
69DOLR ;Looking for $C.
70 I "IXY"[$E(%ZISXX,ZISXL+1) S %ZISYY=%ZISYY_"$"_$E(%ZISXX,ZISXL+1) S ZISXL=ZISXL+1 Q
71 I "ACDEFJLNOPRSTV"[$E(%ZISXX,ZISXL+1)&($E(%ZISXX,ZISXL+2)="(") S %ZISYY=%ZISYY_"$"_$E(%ZISXX,ZISXL+1),ZISXL=ZISXL+2 D PAREN Q
72 S %ZISYY=%ZISYY_"$" ;p440
73 Q
74PAREN S %ZISYY=%ZISYY_"(",ZISEND=")",%ZISNP=%ZISNP+1 D SCAN S %ZISNP=%ZISNP-1
75 Q
76SCAN F %ZISI=0:0 S ZISXL=ZISXL+1,ZISCH=$E(%ZISXX,ZISXL) D S1 Q:ZISXL'<ZISXLN!(ZISEND=ZISCH&(%ZISNP))
77 Q
78S1 I ZISCH=ZISQ D QUOTE Q
79 I ZISCH="$" D DOLR Q
80 I ZISCH="(" D PAREN Q
81 S %ZISYY=%ZISYY_ZISCH
82 Q
83 ;
84S2 ;MERGE $C
85 S %ZISX1=$E(%ZISX1,1,$L(%ZISX1)-1),%ZISX2=","_$E(%ZISX2,4,$L(%ZISX2))
86 S $P(%ZISXX,"_",I,I+1)=%ZISX1_%ZISX2
87 N I D L2
88 Q
Note: See TracBrowser for help on using the repository browser.