AUMSCBT ;IHS/OIT/NKD - SCB UPDATE - ASUFAC CONSISTENCY REPORT 3/08/2013 ;
;;13.0;TABLE MAINTENANCE;**2**;AUG 30,2012;Build 1
ALL ; EP - ASUFAC CONSISTENCY REPORT
K ^TMP("AUM",$J)
D RSLT^AUMSCBD($$REPEAT^XLFSTR("*",80))
D RSLT^AUMSCBD("* ISC: PLEASE SEND THIS REPORT WITH AN ATTACHED COPY OF THE ^TMP(""AUM"",$J) *")
D RSLT^AUMSCBD("* GLOBAL TO: HQ_OIT_RPMSAUMSupport@ihs.gov *")
D RSLT^AUMSCBD($$REPEAT^XLFSTR("*",80))
S ^TMP("AUM",$J,0)=$$GET1^DIQ(4,$P($G(^AUTTSITE(1,0)),U,1),.01,"I")_U_$$GET1^DIQ(9999999.06,$P($G(^AUTTSITE(1,0)),U,1),.12,"I")
D AREA,SU,FAC
D ST,CTY,COM
Q
AREA ;
N AUMT,AUMGL,AUMFL,AUMCNT,AUMA
S AUMT="AREA",AUMGL="^AUTTAREA(",AUMFL=9999999.21
S AUMA(1)="BLANK NAME",AUMA(2)="BLANK CODE"
S AUMCNT=0 F S AUMCNT=$O(AUMA(AUMCNT)) Q:'AUMCNT S ^TMP("AUM",$J,AUMT,AUMCNT,AUMA(AUMCNT),0)=0
D RSLT^AUMSCBD(""),RSLT^AUMSCBD("AREA")
;
S AUMCNT=0 F S AUMCNT=$O(@(AUMGL_AUMCNT_")")) Q:'AUMCNT D
. N N1,N2,N3,C1,C2,C3
. S N1=$$GET1^DIQ(AUMFL,AUMCNT,.01,"I")
. S C1=$$GET1^DIQ(AUMFL,AUMCNT,.02,"I")
. S:N1']"" ^TMP("AUM",$J,AUMT,1,AUMA(1),0)=^TMP("AUM",$J,AUMT,1,AUMA(1),0)+1,^TMP("AUM",$J,AUMT,1,AUMA(1),AUMCNT)=""
. S:C1']"" ^TMP("AUM",$J,AUMT,2,AUMA(2),0)=^TMP("AUM",$J,AUMT,2,AUMA(2),0)+1,^TMP("AUM",$J,AUMT,2,AUMA(2),AUMCNT)=""
S AUMCNT=0 F S AUMCNT=$O(AUMA(AUMCNT)) Q:'AUMCNT D RSLT^AUMSCBD(AUMA(AUMCNT)_": "_^TMP("AUM",$J,AUMT,AUMCNT,AUMA(AUMCNT),0))
Q
SU ;
N AUMT,AUMGL,AUMFL,AUMCNT,AUMA
S AUMT="SU",AUMGL="^AUTTSU(",AUMFL=9999999.22
S AUMA(1)="BLANK NAME",AUMA(2)="BLANK CODE",AUMA(3)="BLANK AREA"
S AUMA(4)="INVAL CODE",AUMA(5)="INVAL AREA"
S AUMCNT=0 F S AUMCNT=$O(AUMA(AUMCNT)) Q:'AUMCNT S ^TMP("AUM",$J,AUMT,AUMCNT,AUMA(AUMCNT),0)=0
D RSLT^AUMSCBD(""),RSLT^AUMSCBD("SERVICE UNIT")
;
S AUMCNT=0 F S AUMCNT=$O(@(AUMGL_AUMCNT_")")) Q:'AUMCNT D
. Q:$D(^AUTTSU(AUMCNT,-9))
. N N1,N2,N3,C1,C2,C3,C0
. S N1=$$GET1^DIQ(AUMFL,AUMCNT,.01,"I")
. S C1=$$GET1^DIQ(AUMFL,AUMCNT,.03,"I")
. S:N1']"" ^TMP("AUM",$J,AUMT,1,AUMA(1),0)=^TMP("AUM",$J,AUMT,1,AUMA(1),0)+1,^TMP("AUM",$J,AUMT,1,AUMA(1),AUMCNT)=""
. S:C1']"" ^TMP("AUM",$J,AUMT,2,AUMA(2),0)=^TMP("AUM",$J,AUMT,2,AUMA(2),0)+1,^TMP("AUM",$J,AUMT,2,AUMA(2),AUMCNT)=""
. S N2=$$GET1^DIQ(AUMFL,AUMCNT,.02,"I")
. S C2=$S(N2']"":"",1:$$GET1^DIQ(9999999.21,N2,.02,"I"))
. I N2']"" S ^TMP("AUM",$J,AUMT,3,AUMA(3),0)=^TMP("AUM",$J,AUMT,3,AUMA(3),0)+1,^TMP("AUM",$J,AUMT,3,AUMA(3),AUMCNT)=""
. E S:'$D(^AUTTAREA(N2)) ^TMP("AUM",$J,AUMT,5,AUMA(5),0)=^TMP("AUM",$J,AUMT,5,AUMA(5),0)+1,^TMP("AUM",$J,AUMT,5,AUMA(5),AUMCNT)=N2
. S C0=$$GET1^DIQ(AUMFL,AUMCNT,.04,"I")
. S:((C2_C1)'=C0)!($L(C2_C1_C0)'=8) ^TMP("AUM",$J,AUMT,4,AUMA(4),0)=^TMP("AUM",$J,AUMT,4,AUMA(4),0)+1,^TMP("AUM",$J,AUMT,4,AUMA(4),AUMCNT)=C2_C1_U_$$GET1^DIQ(AUMFL,AUMCNT,.04,"I")
S AUMCNT=0 F S AUMCNT=$O(AUMA(AUMCNT)) Q:'AUMCNT D RSLT^AUMSCBD(AUMA(AUMCNT)_": "_^TMP("AUM",$J,AUMT,AUMCNT,AUMA(AUMCNT),0))
Q
FAC ;
N AUMT,AUMGL,AUMFL,AUMCNT,AUMA
S AUMT="FAC",AUMGL="^AUTTLOC(",AUMFL=9999999.06
S AUMA(1)="BLANK NAME",AUMA(2)="BLANK CODE",AUMA(3)="BLANK SU",AUMA(4)="BLANK AREA"
S AUMA(5)="INVAL CODE",AUMA(6)="INVAL SU",AUMA(7)="INVAL AREA"
S AUMCNT=0 F S AUMCNT=$O(AUMA(AUMCNT)) Q:'AUMCNT S ^TMP("AUM",$J,AUMT,AUMCNT,AUMA(AUMCNT),0)=0
D RSLT^AUMSCBD(""),RSLT^AUMSCBD("FACILITY")
;
S AUMCNT=0 F S AUMCNT=$O(@(AUMGL_AUMCNT_")")) Q:'AUMCNT D
. N N1,N2,N3,C1,C2,C3,C0
. S N1=$$GET1^DIQ(4,AUMCNT,.01,"I")
. S C1=$$GET1^DIQ(AUMFL,AUMCNT,.07,"I")
. S:N1']"" ^TMP("AUM",$J,AUMT,1,AUMA(1),0)=^TMP("AUM",$J,AUMT,1,AUMA(1),0)+1,^TMP("AUM",$J,AUMT,1,AUMA(1),AUMCNT)=""
. S:C1']"" ^TMP("AUM",$J,AUMT,2,AUMA(2),0)=^TMP("AUM",$J,AUMT,2,AUMA(2),0)+1,^TMP("AUM",$J,AUMT,2,AUMA(2),AUMCNT)=""
. S N2=$$GET1^DIQ(AUMFL,AUMCNT,.05,"I")
. S C2=$S(N2']"":"",1:$$GET1^DIQ(9999999.22,N2,.03,"I"))
. I N2']"" S ^TMP("AUM",$J,AUMT,3,AUMA(3),0)=^TMP("AUM",$J,AUMT,3,AUMA(3),0)+1,^TMP("AUM",$J,AUMT,3,AUMA(3),AUMCNT)=""
. E S:'$D(^AUTTSU(N2))!$D(^AUTTSU(N2,-9)) ^TMP("AUM",$J,AUMT,6,AUMA(6),0)=^TMP("AUM",$J,AUMT,6,AUMA(6),0)+1,^TMP("AUM",$J,AUMT,6,AUMA(6),AUMCNT)=N2
. S N3=$$GET1^DIQ(AUMFL,AUMCNT,.04,"I")
. S C3=$S(N3']"":"",1:$$GET1^DIQ(9999999.21,N3,.02,"I"))
. I N3']"" S ^TMP("AUM",$J,AUMT,4,AUMA(4),0)=^TMP("AUM",$J,AUMT,4,AUMA(4),0)+1,^TMP("AUM",$J,AUMT,4,AUMA(4),AUMCNT)=""
. E S:'$D(^AUTTAREA(N3)) ^TMP("AUM",$J,AUMT,7,AUMA(7),0)=^TMP("AUM",$J,AUMT,7,AUMA(7),0)+1,^TMP("AUM",$J,AUMT,7,AUMA(7),AUMCNT)=N3
. S C0=$$GET1^DIQ(AUMFL,AUMCNT,.12,"I")
. S:((C3_C2_C1)'=C0)!($L(C3_C2_C1_C0)'=12) ^TMP("AUM",$J,AUMT,5,AUMA(5),0)=^TMP("AUM",$J,AUMT,5,AUMA(5),0)+1,^TMP("AUM",$J,AUMT,5,AUMA(5),AUMCNT)=C3_C2_C1_U_$$GET1^DIQ(AUMFL,AUMCNT,.12,"I")
S AUMCNT=0 F S AUMCNT=$O(AUMA(AUMCNT)) Q:'AUMCNT D RSLT^AUMSCBD(AUMA(AUMCNT)_": "_^TMP("AUM",$J,AUMT,AUMCNT,AUMA(AUMCNT),0))
Q
ST ;
N AUMT,AUMGL,AUMFL,AUMCNT,AUMA
S AUMT="STATE",AUMGL="^DIC(5,",AUMFL=5
S AUMA(1)="BLANK NAME",AUMA(2)="BLANK CODE"
S AUMCNT=0 F S AUMCNT=$O(AUMA(AUMCNT)) Q:'AUMCNT S ^TMP("AUM",$J,AUMT,AUMCNT,AUMA(AUMCNT),0)=0
D RSLT^AUMSCBD(""),RSLT^AUMSCBD("STATE")
;
S AUMCNT=0 F S AUMCNT=$O(@(AUMGL_AUMCNT_")")) Q:'AUMCNT D
. N N1,N2,N3,C1,C2,C3
. S N1=$$GET1^DIQ(AUMFL,AUMCNT,.01,"I")
. S C1=$$GET1^DIQ(AUMFL,AUMCNT,2,"I")
. S:N1']"" ^TMP("AUM",$J,AUMT,1,AUMA(1),0)=^TMP("AUM",$J,AUMT,1,AUMA(1),0)+1,^TMP("AUM",$J,AUMT,1,AUMA(1),AUMCNT)=""
. S:C1']"" ^TMP("AUM",$J,AUMT,2,AUMA(2),0)=^TMP("AUM",$J,AUMT,2,AUMA(2),0)+1,^TMP("AUM",$J,AUMT,2,AUMA(2),AUMCNT)=""
S AUMCNT=0 F S AUMCNT=$O(AUMA(AUMCNT)) Q:'AUMCNT D RSLT^AUMSCBD(AUMA(AUMCNT)_": "_^TMP("AUM",$J,AUMT,AUMCNT,AUMA(AUMCNT),0))
Q
CTY ;
N AUMT,AUMGL,AUMFL,AUMCNT,AUMA
S AUMT="CTY",AUMGL="^AUTTCTY(",AUMFL=9999999.23
S AUMA(1)="BLANK NAME",AUMA(2)="BLANK CODE",AUMA(3)="BLANK STATE"
S AUMA(4)="INVAL CODE",AUMA(5)="INVAL STATE"
S AUMCNT=0 F S AUMCNT=$O(AUMA(AUMCNT)) Q:'AUMCNT S ^TMP("AUM",$J,AUMT,AUMCNT,AUMA(AUMCNT),0)=0
D RSLT^AUMSCBD(""),RSLT^AUMSCBD("COUNTY")
;
S AUMCNT=0 F S AUMCNT=$O(@(AUMGL_AUMCNT_")")) Q:'AUMCNT D
. N N1,N2,N3,C1,C2,C3,C0
. S N1=$$GET1^DIQ(AUMFL,AUMCNT,.01,"I")
. S C1=$$GET1^DIQ(AUMFL,AUMCNT,.03,"I")
. S:N1']"" ^TMP("AUM",$J,AUMT,1,AUMA(1),0)=^TMP("AUM",$J,AUMT,1,AUMA(1),0)+1,^TMP("AUM",$J,AUMT,1,AUMA(1),AUMCNT)=""
. S:C1']"" ^TMP("AUM",$J,AUMT,2,AUMA(2),0)=^TMP("AUM",$J,AUMT,2,AUMA(2),0)+1,^TMP("AUM",$J,AUMT,2,AUMA(2),AUMCNT)=""
. S N2=$$GET1^DIQ(AUMFL,AUMCNT,.02,"I")
. S C2=$S(N2']"":"",1:$$GET1^DIQ(5,N2,2,"I"))
. I N2']"" S ^TMP("AUM",$J,AUMT,3,AUMA(3),0)=^TMP("AUM",$J,AUMT,3,AUMA(3),0)+1,^TMP("AUM",$J,AUMT,3,AUMA(3),AUMCNT)=""
. E S:'$D(^DIC(5,N2)) ^TMP("AUM",$J,AUMT,5,AUMA(5),0)=^TMP("AUM",$J,AUMT,5,AUMA(5),0)+1,^TMP("AUM",$J,AUMT,5,AUMA(5),AUMCNT)=N2
. S C0=$$GET1^DIQ(AUMFL,AUMCNT,.04,"I")
. S:((C2_C1)'=C0)!($L(C2_C1_C0)'=8) ^TMP("AUM",$J,AUMT,4,AUMA(4),0)=^TMP("AUM",$J,AUMT,4,AUMA(4),0)+1,^TMP("AUM",$J,AUMT,4,AUMA(4),AUMCNT)=C2_C1_U_$$GET1^DIQ(AUMFL,AUMCNT,.04,"I")
S AUMCNT=0 F S AUMCNT=$O(AUMA(AUMCNT)) Q:'AUMCNT D RSLT^AUMSCBD(AUMA(AUMCNT)_": "_^TMP("AUM",$J,AUMT,AUMCNT,AUMA(AUMCNT),0))
Q
COM ;
N AUMT,AUMGL,AUMFL,AUMCNT,AUMA
S AUMT="COM",AUMGL="^AUTTCOM(",AUMFL=9999999.05
S AUMA(1)="BLANK NAME",AUMA(2)="BLANK CODE",AUMA(3)="BLANK CTY",AUMA(4)="BLANK STATE"
S AUMA(5)="INVAL CODE",AUMA(6)="INVAL CTY",AUMA(7)="INVAL STATE"
S AUMCNT=0 F S AUMCNT=$O(AUMA(AUMCNT)) Q:'AUMCNT S ^TMP("AUM",$J,AUMT,AUMCNT,AUMA(AUMCNT),0)=0
D RSLT^AUMSCBD(""),RSLT^AUMSCBD("COMMUNITY")
;
S AUMCNT=0 F S AUMCNT=$O(@(AUMGL_AUMCNT_")")) Q:'AUMCNT D
. N N1,N2,N3,C1,C2,C3,C0
. S N1=$$GET1^DIQ(AUMFL,AUMCNT,.01,"I")
. S C1=$$GET1^DIQ(AUMFL,AUMCNT,.07,"I")
. S:N1']"" ^TMP("AUM",$J,AUMT,1,AUMA(1),0)=^TMP("AUM",$J,AUMT,1,AUMA(1),0)+1,^TMP("AUM",$J,AUMT,1,AUMA(1),AUMCNT)=""
. S:C1']"" ^TMP("AUM",$J,AUMT,2,AUMA(2),0)=^TMP("AUM",$J,AUMT,2,AUMA(2),0)+1,^TMP("AUM",$J,AUMT,2,AUMA(2),AUMCNT)=""
. S N2=$$GET1^DIQ(AUMFL,AUMCNT,.02,"I")
. S C2=$S(N2']"":"",1:$$GET1^DIQ(9999999.23,N2,.03,"I"))
. I N2']"" S ^TMP("AUM",$J,AUMT,3,AUMA(3),0)=^TMP("AUM",$J,AUMT,3,AUMA(3),0)+1,^TMP("AUM",$J,AUMT,3,AUMA(3),AUMCNT)=""
. E S:'$D(^AUTTCTY(N2)) ^TMP("AUM",$J,AUMT,6,AUMA(6),0)=^TMP("AUM",$J,AUMT,6,AUMA(6),0)+1,^TMP("AUM",$J,AUMT,6,AUMA(6),AUMCNT)=N2
. S N3=$$GET1^DIQ(AUMFL,AUMCNT,.03,"I")
. S C3=$S(N3']"":"",1:$$GET1^DIQ(5,N3,2,"I"))
. I N3']"" S ^TMP("AUM",$J,AUMT,4,AUMA(4),0)=^TMP("AUM",$J,AUMT,4,AUMA(4),0)+1,^TMP("AUM",$J,AUMT,4,AUMA(4),AUMCNT)=""
. E S:'$D(^DIC(5,N3)) ^TMP("AUM",$J,AUMT,7,AUMA(7),0)=^TMP("AUM",$J,AUMT,7,AUMA(7),0)+1,^TMP("AUM",$J,AUMT,7,AUMA(7),AUMCNT)=N3
. S C0=$$GET1^DIQ(AUMFL,AUMCNT,.08,"I")
. S:((C3_C2_C1)'=C0)!($L(C3_C2_C1_C0)'=14) ^TMP("AUM",$J,AUMT,5,AUMA(5),0)=^TMP("AUM",$J,AUMT,5,AUMA(5),0)+1,^TMP("AUM",$J,AUMT,5,AUMA(5),AUMCNT)=C3_C2_C1_U_$$GET1^DIQ(AUMFL,AUMCNT,.08,"I")
S AUMCNT=0 F S AUMCNT=$O(AUMA(AUMCNT)) Q:'AUMCNT D RSLT^AUMSCBD(AUMA(AUMCNT)_": "_^TMP("AUM",$J,AUMT,AUMCNT,AUMA(AUMCNT),0))
Q
AUMSCBT ;IHS/OIT/NKD - SCB UPDATE - ASUFAC CONSISTENCY REPORT 3/08/2013 ;
+1 ;;13.0;TABLE MAINTENANCE;**2**;AUG 30,2012;Build 1
ALL ; EP - ASUFAC CONSISTENCY REPORT
+1 KILL ^TMP("AUM",$JOB)
+2 DO RSLT^AUMSCBD($$REPEAT^XLFSTR("*",80))
+3 DO RSLT^AUMSCBD("* ISC: PLEASE SEND THIS REPORT WITH AN ATTACHED COPY OF THE ^TMP(""AUM"",$J) *")
+4 DO RSLT^AUMSCBD("* GLOBAL TO: HQ_OIT_RPMSAUMSupport@ihs.gov *")
+5 DO RSLT^AUMSCBD($$REPEAT^XLFSTR("*",80))
+6 SET ^TMP("AUM",$JOB,0)=$$GET1^DIQ(4,$PIECE($GET(^AUTTSITE(1,0)),U,1),.01,"I")_U_$$GET1^DIQ(9999999.06,$PIECE($GET(^AUTTSITE(1,0)),U,1),.12,"I")
+7 DO AREA
DO SU
DO FAC
+8 DO ST
DO CTY
DO COM
+9 QUIT
AREA ;
+1 NEW AUMT,AUMGL,AUMFL,AUMCNT,AUMA
+2 SET AUMT="AREA"
SET AUMGL="^AUTTAREA("
SET AUMFL=9999999.21
+3 SET AUMA(1)="BLANK NAME"
SET AUMA(2)="BLANK CODE"
+4 SET AUMCNT=0
FOR
SET AUMCNT=$ORDER(AUMA(AUMCNT))
IF 'AUMCNT
QUIT
SET ^TMP("AUM",$JOB,AUMT,AUMCNT,AUMA(AUMCNT),0)=0
+5 DO RSLT^AUMSCBD("")
DO RSLT^AUMSCBD("AREA")
+6 ;
+7 SET AUMCNT=0
FOR
SET AUMCNT=$ORDER(@(AUMGL_AUMCNT_")"))
IF 'AUMCNT
QUIT
Begin DoDot:1
+8 NEW N1,N2,N3,C1,C2,C3
+9 SET N1=$$GET1^DIQ(AUMFL,AUMCNT,.01,"I")
+10 SET C1=$$GET1^DIQ(AUMFL,AUMCNT,.02,"I")
+11 IF N1']""
SET ^TMP("AUM",$JOB,AUMT,1,AUMA(1),0)=^TMP("AUM",$JOB,AUMT,1,AUMA(1),0)+1
SET ^TMP("AUM",$JOB,AUMT,1,AUMA(1),AUMCNT)=""
+12 IF C1']""
SET ^TMP("AUM",$JOB,AUMT,2,AUMA(2),0)=^TMP("AUM",$JOB,AUMT,2,AUMA(2),0)+1
SET ^TMP("AUM",$JOB,AUMT,2,AUMA(2),AUMCNT)=""
End DoDot:1
+13 SET AUMCNT=0
FOR
SET AUMCNT=$ORDER(AUMA(AUMCNT))
IF 'AUMCNT
QUIT
DO RSLT^AUMSCBD(AUMA(AUMCNT)_": "_^TMP("AUM",$JOB,AUMT,AUMCNT,AUMA(AUMCNT),0))
+14 QUIT
SU ;
+1 NEW AUMT,AUMGL,AUMFL,AUMCNT,AUMA
+2 SET AUMT="SU"
SET AUMGL="^AUTTSU("
SET AUMFL=9999999.22
+3 SET AUMA(1)="BLANK NAME"
SET AUMA(2)="BLANK CODE"
SET AUMA(3)="BLANK AREA"
+4 SET AUMA(4)="INVAL CODE"
SET AUMA(5)="INVAL AREA"
+5 SET AUMCNT=0
FOR
SET AUMCNT=$ORDER(AUMA(AUMCNT))
IF 'AUMCNT
QUIT
SET ^TMP("AUM",$JOB,AUMT,AUMCNT,AUMA(AUMCNT),0)=0
+6 DO RSLT^AUMSCBD("")
DO RSLT^AUMSCBD("SERVICE UNIT")
+7 ;
+8 SET AUMCNT=0
FOR
SET AUMCNT=$ORDER(@(AUMGL_AUMCNT_")"))
IF 'AUMCNT
QUIT
Begin DoDot:1
+9 IF $DATA(^AUTTSU(AUMCNT,-9))
QUIT
+10 NEW N1,N2,N3,C1,C2,C3,C0
+11 SET N1=$$GET1^DIQ(AUMFL,AUMCNT,.01,"I")
+12 SET C1=$$GET1^DIQ(AUMFL,AUMCNT,.03,"I")
+13 IF N1']""
SET ^TMP("AUM",$JOB,AUMT,1,AUMA(1),0)=^TMP("AUM",$JOB,AUMT,1,AUMA(1),0)+1
SET ^TMP("AUM",$JOB,AUMT,1,AUMA(1),AUMCNT)=""
+14 IF C1']""
SET ^TMP("AUM",$JOB,AUMT,2,AUMA(2),0)=^TMP("AUM",$JOB,AUMT,2,AUMA(2),0)+1
SET ^TMP("AUM",$JOB,AUMT,2,AUMA(2),AUMCNT)=""
+15 SET N2=$$GET1^DIQ(AUMFL,AUMCNT,.02,"I")
+16 SET C2=$SELECT(N2']"":"",1:$$GET1^DIQ(9999999.21,N2,.02,"I"))
+17 IF N2']""
SET ^TMP("AUM",$JOB,AUMT,3,AUMA(3),0)=^TMP("AUM",$JOB,AUMT,3,AUMA(3),0)+1
SET ^TMP("AUM",$JOB,AUMT,3,AUMA(3),AUMCNT)=""
+18 IF '$TEST
IF '$DATA(^AUTTAREA(N2))
SET ^TMP("AUM",$JOB,AUMT,5,AUMA(5),0)=^TMP("AUM",$JOB,AUMT,5,AUMA(5),0)+1
SET ^TMP("AUM",$JOB,AUMT,5,AUMA(5),AUMCNT)=N2
+19 SET C0=$$GET1^DIQ(AUMFL,AUMCNT,.04,"I")
+20 IF ((C2_C1)'=C0)!($LENGTH(C2_C1_C0)'=8)
SET ^TMP("AUM",$JOB,AUMT,4,AUMA(4),0)=^TMP("AUM",$JOB,AUMT,4,AUMA(4),0)+1
SET ^TMP("AUM",$JOB,AUMT,4,AUMA(4),AUMCNT)=C2_C1_U_$$GET1^DIQ(AUMFL,AUMCNT,.04,"I")
End DoDot:1
+21 SET AUMCNT=0
FOR
SET AUMCNT=$ORDER(AUMA(AUMCNT))
IF 'AUMCNT
QUIT
DO RSLT^AUMSCBD(AUMA(AUMCNT)_": "_^TMP("AUM",$JOB,AUMT,AUMCNT,AUMA(AUMCNT),0))
+22 QUIT
FAC ;
+1 NEW AUMT,AUMGL,AUMFL,AUMCNT,AUMA
+2 SET AUMT="FAC"
SET AUMGL="^AUTTLOC("
SET AUMFL=9999999.06
+3 SET AUMA(1)="BLANK NAME"
SET AUMA(2)="BLANK CODE"
SET AUMA(3)="BLANK SU"
SET AUMA(4)="BLANK AREA"
+4 SET AUMA(5)="INVAL CODE"
SET AUMA(6)="INVAL SU"
SET AUMA(7)="INVAL AREA"
+5 SET AUMCNT=0
FOR
SET AUMCNT=$ORDER(AUMA(AUMCNT))
IF 'AUMCNT
QUIT
SET ^TMP("AUM",$JOB,AUMT,AUMCNT,AUMA(AUMCNT),0)=0
+6 DO RSLT^AUMSCBD("")
DO RSLT^AUMSCBD("FACILITY")
+7 ;
+8 SET AUMCNT=0
FOR
SET AUMCNT=$ORDER(@(AUMGL_AUMCNT_")"))
IF 'AUMCNT
QUIT
Begin DoDot:1
+9 NEW N1,N2,N3,C1,C2,C3,C0
+10 SET N1=$$GET1^DIQ(4,AUMCNT,.01,"I")
+11 SET C1=$$GET1^DIQ(AUMFL,AUMCNT,.07,"I")
+12 IF N1']""
SET ^TMP("AUM",$JOB,AUMT,1,AUMA(1),0)=^TMP("AUM",$JOB,AUMT,1,AUMA(1),0)+1
SET ^TMP("AUM",$JOB,AUMT,1,AUMA(1),AUMCNT)=""
+13 IF C1']""
SET ^TMP("AUM",$JOB,AUMT,2,AUMA(2),0)=^TMP("AUM",$JOB,AUMT,2,AUMA(2),0)+1
SET ^TMP("AUM",$JOB,AUMT,2,AUMA(2),AUMCNT)=""
+14 SET N2=$$GET1^DIQ(AUMFL,AUMCNT,.05,"I")
+15 SET C2=$SELECT(N2']"":"",1:$$GET1^DIQ(9999999.22,N2,.03,"I"))
+16 IF N2']""
SET ^TMP("AUM",$JOB,AUMT,3,AUMA(3),0)=^TMP("AUM",$JOB,AUMT,3,AUMA(3),0)+1
SET ^TMP("AUM",$JOB,AUMT,3,AUMA(3),AUMCNT)=""
+17 IF '$TEST
IF '$DATA(^AUTTSU(N2))!$DATA(^AUTTSU(N2,-9))
SET ^TMP("AUM",$JOB,AUMT,6,AUMA(6),0)=^TMP("AUM",$JOB,AUMT,6,AUMA(6),0)+1
SET ^TMP("AUM",$JOB,AUMT,6,AUMA(6),AUMCNT)=N2
+18 SET N3=$$GET1^DIQ(AUMFL,AUMCNT,.04,"I")
+19 SET C3=$SELECT(N3']"":"",1:$$GET1^DIQ(9999999.21,N3,.02,"I"))
+20 IF N3']""
SET ^TMP("AUM",$JOB,AUMT,4,AUMA(4),0)=^TMP("AUM",$JOB,AUMT,4,AUMA(4),0)+1
SET ^TMP("AUM",$JOB,AUMT,4,AUMA(4),AUMCNT)=""
+21 IF '$TEST
IF '$DATA(^AUTTAREA(N3))
SET ^TMP("AUM",$JOB,AUMT,7,AUMA(7),0)=^TMP("AUM",$JOB,AUMT,7,AUMA(7),0)+1
SET ^TMP("AUM",$JOB,AUMT,7,AUMA(7),AUMCNT)=N3
+22 SET C0=$$GET1^DIQ(AUMFL,AUMCNT,.12,"I")
+23 IF ((C3_C2_C1)'=C0)!($LENGTH(C3_C2_C1_C0)'=12)
SET ^TMP("AUM",$JOB,AUMT,5,AUMA(5),0)=^TMP("AUM",$JOB,AUMT,5,AUMA(5),0)+1
SET ^TMP("AUM",$JOB,AUMT,5,AUMA(5),AUMCNT)=C3_C2_C1_U_$$GET1^DIQ(AUMFL,AUMCNT,.12,"I")
End DoDot:1
+24 SET AUMCNT=0
FOR
SET AUMCNT=$ORDER(AUMA(AUMCNT))
IF 'AUMCNT
QUIT
DO RSLT^AUMSCBD(AUMA(AUMCNT)_": "_^TMP("AUM",$JOB,AUMT,AUMCNT,AUMA(AUMCNT),0))
+25 QUIT
ST ;
+1 NEW AUMT,AUMGL,AUMFL,AUMCNT,AUMA
+2 SET AUMT="STATE"
SET AUMGL="^DIC(5,"
SET AUMFL=5
+3 SET AUMA(1)="BLANK NAME"
SET AUMA(2)="BLANK CODE"
+4 SET AUMCNT=0
FOR
SET AUMCNT=$ORDER(AUMA(AUMCNT))
IF 'AUMCNT
QUIT
SET ^TMP("AUM",$JOB,AUMT,AUMCNT,AUMA(AUMCNT),0)=0
+5 DO RSLT^AUMSCBD("")
DO RSLT^AUMSCBD("STATE")
+6 ;
+7 SET AUMCNT=0
FOR
SET AUMCNT=$ORDER(@(AUMGL_AUMCNT_")"))
IF 'AUMCNT
QUIT
Begin DoDot:1
+8 NEW N1,N2,N3,C1,C2,C3
+9 SET N1=$$GET1^DIQ(AUMFL,AUMCNT,.01,"I")
+10 SET C1=$$GET1^DIQ(AUMFL,AUMCNT,2,"I")
+11 IF N1']""
SET ^TMP("AUM",$JOB,AUMT,1,AUMA(1),0)=^TMP("AUM",$JOB,AUMT,1,AUMA(1),0)+1
SET ^TMP("AUM",$JOB,AUMT,1,AUMA(1),AUMCNT)=""
+12 IF C1']""
SET ^TMP("AUM",$JOB,AUMT,2,AUMA(2),0)=^TMP("AUM",$JOB,AUMT,2,AUMA(2),0)+1
SET ^TMP("AUM",$JOB,AUMT,2,AUMA(2),AUMCNT)=""
End DoDot:1
+13 SET AUMCNT=0
FOR
SET AUMCNT=$ORDER(AUMA(AUMCNT))
IF 'AUMCNT
QUIT
DO RSLT^AUMSCBD(AUMA(AUMCNT)_": "_^TMP("AUM",$JOB,AUMT,AUMCNT,AUMA(AUMCNT),0))
+14 QUIT
CTY ;
+1 NEW AUMT,AUMGL,AUMFL,AUMCNT,AUMA
+2 SET AUMT="CTY"
SET AUMGL="^AUTTCTY("
SET AUMFL=9999999.23
+3 SET AUMA(1)="BLANK NAME"
SET AUMA(2)="BLANK CODE"
SET AUMA(3)="BLANK STATE"
+4 SET AUMA(4)="INVAL CODE"
SET AUMA(5)="INVAL STATE"
+5 SET AUMCNT=0
FOR
SET AUMCNT=$ORDER(AUMA(AUMCNT))
IF 'AUMCNT
QUIT
SET ^TMP("AUM",$JOB,AUMT,AUMCNT,AUMA(AUMCNT),0)=0
+6 DO RSLT^AUMSCBD("")
DO RSLT^AUMSCBD("COUNTY")
+7 ;
+8 SET AUMCNT=0
FOR
SET AUMCNT=$ORDER(@(AUMGL_AUMCNT_")"))
IF 'AUMCNT
QUIT
Begin DoDot:1
+9 NEW N1,N2,N3,C1,C2,C3,C0
+10 SET N1=$$GET1^DIQ(AUMFL,AUMCNT,.01,"I")
+11 SET C1=$$GET1^DIQ(AUMFL,AUMCNT,.03,"I")
+12 IF N1']""
SET ^TMP("AUM",$JOB,AUMT,1,AUMA(1),0)=^TMP("AUM",$JOB,AUMT,1,AUMA(1),0)+1
SET ^TMP("AUM",$JOB,AUMT,1,AUMA(1),AUMCNT)=""
+13 IF C1']""
SET ^TMP("AUM",$JOB,AUMT,2,AUMA(2),0)=^TMP("AUM",$JOB,AUMT,2,AUMA(2),0)+1
SET ^TMP("AUM",$JOB,AUMT,2,AUMA(2),AUMCNT)=""
+14 SET N2=$$GET1^DIQ(AUMFL,AUMCNT,.02,"I")
+15 SET C2=$SELECT(N2']"":"",1:$$GET1^DIQ(5,N2,2,"I"))
+16 IF N2']""
SET ^TMP("AUM",$JOB,AUMT,3,AUMA(3),0)=^TMP("AUM",$JOB,AUMT,3,AUMA(3),0)+1
SET ^TMP("AUM",$JOB,AUMT,3,AUMA(3),AUMCNT)=""
+17 IF '$TEST
IF '$DATA(^DIC(5,N2))
SET ^TMP("AUM",$JOB,AUMT,5,AUMA(5),0)=^TMP("AUM",$JOB,AUMT,5,AUMA(5),0)+1
SET ^TMP("AUM",$JOB,AUMT,5,AUMA(5),AUMCNT)=N2
+18 SET C0=$$GET1^DIQ(AUMFL,AUMCNT,.04,"I")
+19 IF ((C2_C1)'=C0)!($LENGTH(C2_C1_C0)'=8)
SET ^TMP("AUM",$JOB,AUMT,4,AUMA(4),0)=^TMP("AUM",$JOB,AUMT,4,AUMA(4),0)+1
SET ^TMP("AUM",$JOB,AUMT,4,AUMA(4),AUMCNT)=C2_C1_U_$$GET1^DIQ(AUMFL,AUMCNT,.04,"I")
End DoDot:1
+20 SET AUMCNT=0
FOR
SET AUMCNT=$ORDER(AUMA(AUMCNT))
IF 'AUMCNT
QUIT
DO RSLT^AUMSCBD(AUMA(AUMCNT)_": "_^TMP("AUM",$JOB,AUMT,AUMCNT,AUMA(AUMCNT),0))
+21 QUIT
COM ;
+1 NEW AUMT,AUMGL,AUMFL,AUMCNT,AUMA
+2 SET AUMT="COM"
SET AUMGL="^AUTTCOM("
SET AUMFL=9999999.05
+3 SET AUMA(1)="BLANK NAME"
SET AUMA(2)="BLANK CODE"
SET AUMA(3)="BLANK CTY"
SET AUMA(4)="BLANK STATE"
+4 SET AUMA(5)="INVAL CODE"
SET AUMA(6)="INVAL CTY"
SET AUMA(7)="INVAL STATE"
+5 SET AUMCNT=0
FOR
SET AUMCNT=$ORDER(AUMA(AUMCNT))
IF 'AUMCNT
QUIT
SET ^TMP("AUM",$JOB,AUMT,AUMCNT,AUMA(AUMCNT),0)=0
+6 DO RSLT^AUMSCBD("")
DO RSLT^AUMSCBD("COMMUNITY")
+7 ;
+8 SET AUMCNT=0
FOR
SET AUMCNT=$ORDER(@(AUMGL_AUMCNT_")"))
IF 'AUMCNT
QUIT
Begin DoDot:1
+9 NEW N1,N2,N3,C1,C2,C3,C0
+10 SET N1=$$GET1^DIQ(AUMFL,AUMCNT,.01,"I")
+11 SET C1=$$GET1^DIQ(AUMFL,AUMCNT,.07,"I")
+12 IF N1']""
SET ^TMP("AUM",$JOB,AUMT,1,AUMA(1),0)=^TMP("AUM",$JOB,AUMT,1,AUMA(1),0)+1
SET ^TMP("AUM",$JOB,AUMT,1,AUMA(1),AUMCNT)=""
+13 IF C1']""
SET ^TMP("AUM",$JOB,AUMT,2,AUMA(2),0)=^TMP("AUM",$JOB,AUMT,2,AUMA(2),0)+1
SET ^TMP("AUM",$JOB,AUMT,2,AUMA(2),AUMCNT)=""
+14 SET N2=$$GET1^DIQ(AUMFL,AUMCNT,.02,"I")
+15 SET C2=$SELECT(N2']"":"",1:$$GET1^DIQ(9999999.23,N2,.03,"I"))
+16 IF N2']""
SET ^TMP("AUM",$JOB,AUMT,3,AUMA(3),0)=^TMP("AUM",$JOB,AUMT,3,AUMA(3),0)+1
SET ^TMP("AUM",$JOB,AUMT,3,AUMA(3),AUMCNT)=""
+17 IF '$TEST
IF '$DATA(^AUTTCTY(N2))
SET ^TMP("AUM",$JOB,AUMT,6,AUMA(6),0)=^TMP("AUM",$JOB,AUMT,6,AUMA(6),0)+1
SET ^TMP("AUM",$JOB,AUMT,6,AUMA(6),AUMCNT)=N2
+18 SET N3=$$GET1^DIQ(AUMFL,AUMCNT,.03,"I")
+19 SET C3=$SELECT(N3']"":"",1:$$GET1^DIQ(5,N3,2,"I"))
+20 IF N3']""
SET ^TMP("AUM",$JOB,AUMT,4,AUMA(4),0)=^TMP("AUM",$JOB,AUMT,4,AUMA(4),0)+1
SET ^TMP("AUM",$JOB,AUMT,4,AUMA(4),AUMCNT)=""
+21 IF '$TEST
IF '$DATA(^DIC(5,N3))
SET ^TMP("AUM",$JOB,AUMT,7,AUMA(7),0)=^TMP("AUM",$JOB,AUMT,7,AUMA(7),0)+1
SET ^TMP("AUM",$JOB,AUMT,7,AUMA(7),AUMCNT)=N3
+22 SET C0=$$GET1^DIQ(AUMFL,AUMCNT,.08,"I")
+23 IF ((C3_C2_C1)'=C0)!($LENGTH(C3_C2_C1_C0)'=14)
SET ^TMP("AUM",$JOB,AUMT,5,AUMA(5),0)=^TMP("AUM",$JOB,AUMT,5,AUMA(5),0)+1
SET ^TMP("AUM",$JOB,AUMT,5,AUMA(5),AUMCNT)=C3_C2_C1_U_$$GET1^DIQ(AUMFL,AUMCNT,.08,"I")
End DoDot:1
+24 SET AUMCNT=0
FOR
SET AUMCNT=$ORDER(AUMA(AUMCNT))
IF 'AUMCNT
QUIT
DO RSLT^AUMSCBD(AUMA(AUMCNT)_": "_^TMP("AUM",$JOB,AUMT,AUMCNT,AUMA(AUMCNT),0))
+25 QUIT