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

ACGSIE.m

Go to the documentation of this file.
ACGSIE ;IHS/OIRM/DSD/THL,AEF - INTERRELATIONSHIP EDITS; [ 03/27/2000   2:22 PM ]
 ;;2.0t1;CONTRACT INFORMATION SYSTEM;;FEB 16, 2000
 ;;ROUTINE TO CHECK THE INTEGRITY BETWEEN VARIOUS FIELDS WITHIN EACH
 ;;CONTRACT ACTION
EXIT ;
 Q
12 ;G:$D(^ACGS(DA,"SP")) SP12
 Q  N ACGI,ACG1,ACG13,ACG17,ACG19
 F ACGI=1,13,17,19 S ACG="ACG"_ACGI D @ACG^ACGSIE1
1213 G:ACG13=""!(ACG19="")!(ACG13'="A1")!(ACG19<59)!(ACG19>60) 1217
 I ACG13="A1",ACG19="60",Y="B" Q
 I ACG13="A1",ACG19="59",Y="A" Q
1217 G:ACG17="" 1219
 I "BOTU"'[$E(ACG1),"ABCDEFGHIJ"[$E(ACG17,2),Y="A" Q
 I "BOTU"'[$E(ACG1),ACG17="4K",Y'="A"
1219 Q:ACG19=""
 I ACG19<60,Y="A" Q
 I ACG19>59,Y'="A"
 G EXIT
SP12 Q:"^15^17^"'[(U_+^ACGS(DA,"DT")_U)  S ACG306=$P(^("SP"),U,6)
 Q:ACG306=1!(ACG306=5)
 I ACG306>1,ACG306<5,Y="A"
 G EXIT
13 N ACGI,ACG12,ACG19
 F ACGI=12,19 S ACG="ACG"_ACGI D @ACG^ACGSIE1
 S ACG13=$P(^AUTTTOB(+Y,0),U)
 Q:ACG19=""
 I 5960[ACG19,ACG13="A1" Q
 I "50525355"[ACG19,"A2A3C5"[ACG13 Q
 I "505253555960"'[ACG19
 G EXIT
16 N ACGI
 F ACGI=271 S ACG="ACG"_ACGI D @ACG^ACGSIE1
 Q:ACG271=""
 I ACG271=1,Y=1 Q
 I ACG271=2,Y=2
 G EXIT
17 N ACGI,ACG12,ACG18,ACG19,ACG27
 F ACGI=12,18,19,27 S ACG="ACG"_ACGI D @ACG^ACGSIE1
 S ACG17=$P(^ACGSP(Y,0),U)
1712 G:ACG12="" 1719
 I ACG12'="A",ACG17="4K" Q
 I ACG12="A",ACG17'="4K"
1719 Q:ACG19<59!(ACG19>60)
 I ACG19=59,ACG17="4J" Q
 I ACG19=60,ACG17="4K" Q
 G EXIT
18 N ACGI,ACG17,ACG19
 F ACGI=1,17,19,62 S ACG="ACG"_ACGI D @ACG^ACGSIE1
 S ACG18=$P(^ACGFAO(Y,0),U)
 I ACG62="C",ACG18=81 Q
 I ACG17="4K",ACG19=60,ACG18=81 Q
 I ACG17="4K",ACG18>69 Q
 I ACG17'="4K"
 G EXIT
19 N ACGI,ACG12
 F ACGI=1,12,13,17 S ACG="ACG"_ACGI D @ACG^ACGSIE1
 S ACG19=$P(^ACGEOC(Y,0),U)
 Q:ACG12=""&(ACG13="")
 I ACG12]"" D  Q:'$T
 .I "BCD"[ACG12,ACG19>59 Q
 .I ACG12="A",ACG17'="4J",ACG19<60 Q
 .I ACG12="A",ACG17="4J",ACG19<60,(ACG19>49&(ACG19<56))!(ACG19>57) Q
 I ACG13]"" D
 .I ACG13="A1",ACG19=59!(ACG19=60) Q
 .I "A2A3C5"[ACG13,50525355[ACG19 Q
 .I "A1A2A3C5"'[ACG13,505253555960'[ACG19 Q
 G EXIT
20 N ACGI,ACG13,ACG17
 F ACGI=1,12,13,17 S ACG="ACG"_ACGI D @ACG^ACGSIE1
 S ACG20=$P(^ACGMOC(Y,0),U)
2012 G:ACG12="" 2017
 I ACG12="A",ACG20<4 G 2017
 I ACG12'="A",ACG20<4 G EXIT
2017 G:ACG17="" 2019
 I ACG17="4A",ACG20<3 G EXIT
 I ACG17="4K",ACG20=4 G EXIT
 I ACG17'="4K",ACG20<4
 G EXIT
2019 Q
21 Q  N ACGI
 F ACGI=1,13,17,19 S ACG="ACG"_ACGI D @ACG^ACGSIE1
 G EXIT
26 Q  N ACGI
 F ACGI=1,13,17,19 S ACG="ACG"_ACGI D @ACG^ACGSIE1
 G EXIT
27 N ACGI
 F ACGI=1,13,16,17,19 S ACG="ACG"_ACGI D @ACG^ACGSIE1
 G:ACG16="" EXIT
 ;I ACG16=$P(^ACGPPC(+Y,0),U,4)
 G EXIT
30 N ACGI
 F ACGI=1,13 S ACG="ACG"_ACGI D @ACG^ACGSIE1
 I "A1A2A3"'[ACG13,Y=1 I 0 G EXIT
 I "A1A2A3"[ACG13,Y=1!(Y=2) G EXIT
 I "A1A2A3"'[ACG13,Y=2 G EXIT
 G EXIT
31 Q  N ACGI
 F ACGI=1,13,17,19 S ACG="ACG"_ACGI D @ACG^ACGSIE1
 G EXIT
34 Q  N ACGI
 F ACGI=1,13,17,19 S ACG="ACG"_ACGI D @ACG^ACGSIE1
 G EXIT
45 Q  N ACGI
 F ACGI=1,13,17,19 S ACG="ACG"_ACGI D @ACG^ACGSIE1
 G EXIT
52 Q  N ACGI
 F ACGI=1,13,17,19 S ACG="ACG"_ACGI D @ACG^ACGSIE1
 G EXIT
56 Q  N ACGI
 F ACGI=1,13,17,19 S ACG="ACG"_ACGI D @ACG^ACGSIE1
 G EXIT
62 Q  N ACGI
 F ACGI=1,13,17,19 S ACG="ACG"_ACGI D @ACG^ACGSIE1
 G EXIT
63 Q  N ACGI
 D ACG27,ACG53
 F ACGI=1,13,17,19,27,53 S ACG="ACG"_ACGI D @ACG^ACGSIE1
 I "A1A2A3B1B2"'[ACG13 Q
 I '$D(ACG27(ACG27))&'$D(ACG53(ACG53)) Q
 I Y=1 Q
 G EXIT
66 N ACGI
 D ACG13^ACGSIE1
 I "^A1^A2^A3^"[(U_ACG13_U) Q
 I "^A1^A2^A3^"'[(U_ACG13_U),X="" Q
 G EXIT
67 N ACGI
 D ACG13^ACGSIE1
 I ACG13="C5" Q
 E  K X
 G EXIT
68 N ACGI
 D ACG13^ACGSIE1
 I ACG13="C5" Q
 E  K X
 G EXIT
69 N ACGI
 D ACG13^ACGSIE1
 I ACG13="C5" Q
 E  K X
 G EXIT
SP17 D ACGSP17
 Q:ACGSP17="A1"  I Y=2!(Y=4)!(Y=5)
 G EXIT
ACGSP17 S ACGSP17=$P(^ACGS(DA,"SP"),U,XX)
 Q
ACG53 F X=1521,1522,1531,1541,1542,1611,1622,1623,1629,1711,1721,1731,1741,1742,1743,1751,1752,1761,1771,1781,1791,1793,1794,1795,1796,1799 S ACG53(X)=""
 Q
ACG27 F X=11:1:19,21:1:24,29,30 S ACG27("C1"_X)=""
 F X=11,13:1:16,19 S ACG27("C2"_X)=""
 F X="G004","J099","J999","K099","Q201","R404","R406","R497","S205" S ACG27(X)=""
 F X=2,4,6,8,9 S ACG27("T00"_X)=""
 F X="T014",6505,7045,7110,7510 S ACG27(X)=""
 Q