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