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

AUM16P3.m

Go to the documentation of this file.
AUM16P3 ;IHS/OIT/NKD - SCB UPDATE V16 P3 POST-INSTALL 07/05/2016 ;
 ;;16.0;TABLE MAINTENANCE;**3**;OCT 16,2015;Build 1
 ;
 ;
 ;
POST  ; EP FR KIDS - RUN KIDS POST-INSTALL
 D S1
 D S2
 D POST^AUMSCB
 Q
 ;
S1  ; SCAN FOR WP NODES WITH LENGTH >80 IN THE HELP TEXT FIELD OF THE MEASUREMENT TYPE FILE
 N AUMI,AUMSN,AUMCNT,CHK,AUMWPFR,AUMWPTO
 D RSLT^AUMSCBD($$REPEAT^XLFSTR("-",20)),RSLT^AUMSCBD("AUM*16.0*3 Measurement Type help text cleanup")
 S (AUMI,AUMCNT)=0 F  S AUMI=$O(^AUTTMSR(AUMI)) Q:'AUMI  D
 . S (AUMSN,CHK)=0 F  S AUMSN=$O(^AUTTMSR(AUMI,11,AUMSN)) Q:'AUMSN!CHK  S:$L($G(^AUTTMSR(AUMI,11,AUMSN,0)))>80 CHK=1
 . Q:'CHK
 . S AUMWPFR=$$GET1^DIQ(9999999.07,AUMI,1100,,"AUMWPFR"),AUMCNT=AUMCNT+1
 . S AUMSN=0 F  S AUMSN=$O(AUMWPFR(AUMSN)) Q:'AUMSN  S AUMWPTO=$G(AUMWPTO)_$S(AUMSN>1:"|",1:"")_$G(AUMWPFR(AUMSN))
 . D TEXT^AUMSCBD(.AUMWPTO),WP^DIE(9999999.07,AUMI_",",1100,,"AUMWPTO")
 . W "."
 D RSLT^AUMSCBD("Formatting corrections made to "_AUMCNT_" WP fields.")
 Q
 ;
S2  ; SCAN FOR DUPLICATE HEALTH FACTOR NAMES AND APPLY NEW FORMAT TO INACTIVE ENTRIES
 N AUMN,AUMI,AUMINA,AUMCNT,AUMFDA,AUM0,AUMP
 D RSLT^AUMSCBD($$REPEAT^XLFSTR("-",20)),RSLT^AUMSCBD("AUM*16.0*3 Duplicate Health Factor cleanup")
 S AUMCNT=0,AUMN="" F  S AUMN=$O(^AUTTHF("B",AUMN)) Q:'$L(AUMN)  D
 . S AUMI=0 F  S AUMI=$O(^AUTTHF("B",AUMN,AUMI)) Q:'AUMI  D
 . . Q:'$O(^AUTTHF("B",AUMN,AUMI))&'$O(^AUTTHF("B",AUMN,AUMI),-1)
 . . S AUM0=$G(^AUTTHF(AUMI,0)) Q:'$L(AUM0)  Q:'$P(AUM0,U,13)
 . . S AUMP=$S($P(AUM0,U,10)="C":"y",1:"z") Q:$E($P(AUM0,U))=AUMP!($E($P(AUM0,U,2))=AUMP)
 . . S AUMCNT=AUMCNT+1
 . . S AUMFDA(9999999.64,AUMI_",",.01)=$E(AUMP_AUMP_$P(AUM0,U),1,40)
 . . S AUMFDA(9999999.64,AUMI_",",.02)=AUMP_$E($P(AUM0,U,2),2,4)
 I $D(AUMFDA) D FILE^DIE(,"AUMFDA")
 D RSLT^AUMSCBD("Inactive formatting applied to "_AUMCNT_" duplicate entries.")
 Q
 ;