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

AUMSCBT.m

Go to the documentation of this file.
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