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

ACGSIMP1.m

Go to the documentation of this file.
ACGSIMP1 ;IHS/OIRM/DSD/THL,AEF - CON'T OF ACGSIMP1 SETS LOCAL VARIABLES    [ 03/27/2000   2:22 PM ]
 ;;2.0t1;CONTRACT INFORMATION SYSTEM;;FEB 16, 2000
 D 2,5,8,9,10,11,13,23,28,34,37,53 Q
1 S ACG1=$E(ACGX),ACG1=$S(ACG1="":"",$D(^ACGTPA("B",ACG1)):$O(^ACGTPA("B",ACG1,0)),1:"")
2 S ACG=$E(ACGX,2,16) D S S ACGX2=ACG Q  ;S:'ACG ACG=$E(ACGX,17,19)_$E(ACG,4,99) S ACG2=ACG,ACGCO=$E(ACG,1,3)_"00000"
3 S ACG=$E(ACGX,17,28) D S S ACG3=ACG
4 S ACG=$E(ACGX,29,31) D S S ACG4=ACG
5 S ACG=$E(ACGX,32,71) D S S ACGX5=$E(ACG,1,30),ACG5DA="" Q
6 S ACG=$E(ACGX,72,101) D S S ACG6=ACG
7 S ACG=$E(ACGX,102,124) D S S ACG7=ACG,ACG7DA=""
8 S ACG=$E(ACGX,125,143) D S S (ACGX8,ACGSTATE)=ACG Q  ;D STATE S ACG8NAM=ACGSTNAM,ACG8=ACGSTDA,ACG8CD=ACGSTCD
9 S ACG=$E(ACGX,144,148) D S S ACGX9=ACG Q
10 S ACG=$E(ACGX,149,151) D S S ACGX10=ACG Q
11 S ACG=$E(ACGX,152,163) D S S ACGX11=ACG Q  ;,ACG11SUF=$E(ACG11,11,12),ACG11=$E(ACG11,1,10)
12 S ACG12=$E(ACGX,164),ACG12=$S(ACG12'=" ":ACG12,1:"")
13 S ACG13=$E(ACGX,165,166),ACGX13=$S(ACG13="":"",$D(^AUTTTOB("B",ACG13)):$O(^AUTTTOB("B",ACG13,0)),1:"")
14 S ACG=$E(ACGX,167,168) D S S ACG14=ACG
15 S ACGX15=$E(ACGX,169,170) Q  ;,ACG15=$S(ACG15="":"",$D(^ACGTOC("B",ACG15)):$O(^(ACG15,0)),1:"")
16 S ACG16=$E(ACGX,171),ACG16=$S(ACG16'=" ":ACG16,1:"")
17 S ACGX17=$E(ACGX,172,173) Q  ;,ACG17=$S(ACG17="":"",$D(^ACGSP("B",ACG17)):$O(^(ACG17,0)),1:"")
18 S ACGX18=$E(ACGX,174,175) S:'ACGX18 ACGX18="" Q  ;,ACG18=$S(ACG18="":"",$D(^ACGFAO("B",ACG18)):$O(^(ACG18,0)),1:"")
19 S ACGX19=$E(ACGX,176,177) Q  ;,ACG19=$S(ACG19="":"",$D(^ACGEOC("B",ACG19)):$O(^(ACG19,0)),1:"")
20 S ACGX20=$E(ACGX,178) Q  ;,ACG20=$S(ACG20="":"",$D(^ACGMOC("B",ACG20)):$O(^(ACG20,0)),1:"")
21 S ACG21=+$E(ACGX,179,180)
22 S ACG=$E(ACGX,181,277) D S S ACG22=ACG
23 S ACG23=$E(ACGX,278,283),ACG23=$S($L(ACG23)=6&+ACG23:2_ACG23,1:""),ACGX23=ACG23 Q
24 S ACG24=$E(ACGX,284,289),ACG24=$S($L(ACG24)=6&+ACG24:2_ACG24,1:"")
25 S ACG25=$E(ACGX,290,295),ACG25=$S($L(ACG25)=6&+ACG25:2_ACG25,1:"")
26 S ACG26=+$E(ACGX,296,304)
27 S ACG27=$E(ACGX,305,308),ACG27=$S(ACG27="":"",$D(^ACGPPC("B",ACG27)):$O(^(ACG27,0)),1:"")
28 S ACG=$E(ACGX,309,333) D S S ACGX28=ACG Q  ;,ACG28DA="",ACG28ST=$E(ACG28,1,2),ACG28PL=$E(ACG28,3,7),ACG28=$E(ACG28,8,25) S ACGSTATE=ACG28ST D STATE S ACG28STN=ACGSTNAM,ACG28STC=ACGSTCD,ACG28STD=ACGSTDA Q
29 S ACG29=$E(ACGX,334),ACG29=$S(ACG29:ACG29,1:"")
30 S ACG30=$E(ACGX,335),ACG30=$S(ACG30'=" ":ACG30,1:"")
31 S ACG31=$E(ACGX,336),ACG31=$S(ACG31'=" ":ACG31,1:"")
32 S ACG32=$E(ACGX,337),ACG32=$S(ACG32'=" ":ACG32,1:"")
33 S ACG=$E(ACGX,338,345) D S S ACG33=ACG
34 S ACG34=$E(ACGX,346,351),ACG34=$S($L(ACG34)=6&+ACG34:2_ACG34,1:""),ACGX34=ACG34 Q
35 S ACG=$E(ACGX,352,371) D S S ACG35=ACG
36 S ACG36=+$E(ACGX,372,380)
37 S ACG=$E(ACGX,381,388) S ACGX37=ACG,ACGXX37=$S($E(ACG,2)?1AN:$E(ACG,2,8),1:"") Q  ;D S S ACG37=ACG Q  ;$S($L(ACG)=8:$E(ACG,2,8),1:""),ACGFY=$S($L(ACG)=8:$E(ACG),1:""),ACG37DA=$S(ACG37="":"",1:$O(^AUTTCAN("B",ACG37,0))) Q
38 S ACG38=+$E(ACGX,389,397)
39 S ACG=$E(ACGX,398,405) D S S ACG39=$S($L(ACG)=8:$E(ACG,2,8),1:""),ACG39DA=$S(ACG39="":"",1:$O(^AUTTCAN("B",ACG39,0)))
40 S ACG40=+$E(ACGX,406,414)
41 S ACG=$E(ACGX,415,422) D S S ACG41=$S($L(ACG)=8:$E(ACG,2,8),1:""),ACG41DA=$S(ACG41="":"",1:$O(^AUTTCAN("B",ACG41,0)))
42 S ACG42=+$E(ACGX,423,431)
43 S ACG43=+$E(ACGX,432,440)
44 S ACG44=+$E(ACGX,441,449)
45 S ACG45=$E(ACGX,450),ACG45=$S(ACG45:ACG45,1:"")
46 S ACG46=+$E(ACGX,451,459)
47 S ACG47=+$E(ACGX,460,468)
48 S ACG48=+$E(ACGX,469,477)
49 S ACG49=+$E(ACGX,478,486)
50 S ACG50=+$E(ACGX,487,496)
51 S ACG51=$E(ACGX,497),ACG51=$S(ACG51:ACG51,1:"")
52 S ACG52=$E(ACGX,498),ACG52=$S(ACG52:ACG52,1:"")
53 S ACG=$E(ACGX,499,502) D S S ACG53=ACG,ACGX53=ACG53 Q
54 S ACG=$E(ACGX,503,532) D S S ACG54=ACG
55 S ACG=$E(ACGX,533,541) D S S ACG55=ACG
56 S ACG56=$E(ACGX,542),ACG56=$S(ACG56:ACG56,1:"")
57 S ACG57=$E(ACGX,543),ACG57=$S(ACG57:ACG57,1:"")
58 S ACG58=$E(ACGX,544),ACG58=$S(ACG58:ACG58,1:"")
59 S ACG59=+$E(ACGX,545,553)
60 S ACG60=$E(ACGX,554),ACG60=$S(ACG60:ACG60,1:"")
61 S ACG=$E(ACGX,555,558) D S S ACG61=ACG
62 S ACG62=$E(ACGX,559),ACG62=$S(ACG62'=" ":ACG62,1:"")
63 S ACG63=$E(ACGX,560),ACG63=$S(ACG63'=" ":ACG63,1:"")
64 S ACG64=$E(ACGX,561),ACG64=$S(ACG64:ACG64,1:"")
65 S ACG65=$E(ACGX,562),ACG65=$S(ACG65:ACG65,1:"")
66 S ACG66=$E(ACGX,563),ACG66=$S(ACG66="":"",$D(^AUTTSOB("B",ACG66)):$O(^(ACG66,0)),1:"")
 Q
S F ACGI=$L(ACG):-1:1 I $E(ACG,ACGI)'=" " S ACG=$E(ACG,1,ACGI) Q
 I ACGI=1,$E(ACG)=" " S ACG=""
 Q
STATE S (ACGSTNAM,ACGSTCD)="",ACGSTDA=0
 I $L(ACGSTATE)>2 S ACGSTDA=$O(^DIC(5,"B",ACGSTATE,0)) I ACGSTDA,$D(^DIC(5,ACGSTDA,0)) S ACGSTNAM=ACGSTATE,ACGSTCD=$P(^(0),U,3) Q
 I $L(ACGSTATE)=2 S ACGSTDA=0 F  S ACGSTDA=$O(^DIC(5,ACGSTDA)) Q:'ACGSTDA  I ACGSTATE=$P(^DIC(5,ACGSTDA,0),U,3) S ACGSTNAM=$P(^(0),U),ACGSTCD=ACGSTATE Q
 Q