- 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
- ;
- AUM16P3 ;IHS/OIT/NKD - SCB UPDATE V16 P3 POST-INSTALL 07/05/2016 ;
- +1 ;;16.0;TABLE MAINTENANCE;**3**;OCT 16,2015;Build 1
- +2 ;
- +3 ;
- +4 ;
- POST ; EP FR KIDS - RUN KIDS POST-INSTALL
- +1 DO S1
- +2 DO S2
- +3 DO POST^AUMSCB
- +4 QUIT
- +5 ;
- S1 ; SCAN FOR WP NODES WITH LENGTH >80 IN THE HELP TEXT FIELD OF THE MEASUREMENT TYPE FILE
- +1 NEW AUMI,AUMSN,AUMCNT,CHK,AUMWPFR,AUMWPTO
- +2 DO RSLT^AUMSCBD($$REPEAT^XLFSTR("-",20))
- DO RSLT^AUMSCBD("AUM*16.0*3 Measurement Type help text cleanup")
- +3 SET (AUMI,AUMCNT)=0
- FOR
- SET AUMI=$ORDER(^AUTTMSR(AUMI))
- IF 'AUMI
- QUIT
- Begin DoDot:1
- +4 SET (AUMSN,CHK)=0
- FOR
- SET AUMSN=$ORDER(^AUTTMSR(AUMI,11,AUMSN))
- IF 'AUMSN!CHK
- QUIT
- IF $LENGTH($GET(^AUTTMSR(AUMI,11,AUMSN,0)))>80
- SET CHK=1
- +5 IF 'CHK
- QUIT
- +6 SET AUMWPFR=$$GET1^DIQ(9999999.07,AUMI,1100,,"AUMWPFR")
- SET AUMCNT=AUMCNT+1
- +7 SET AUMSN=0
- FOR
- SET AUMSN=$ORDER(AUMWPFR(AUMSN))
- IF 'AUMSN
- QUIT
- SET AUMWPTO=$GET(AUMWPTO)_$SELECT(AUMSN>1:"|",1:"")_$GET(AUMWPFR(AUMSN))
- +8 DO TEXT^AUMSCBD(.AUMWPTO)
- DO WP^DIE(9999999.07,AUMI_",",1100,,"AUMWPTO")
- +9 WRITE "."
- End DoDot:1
- +10 DO RSLT^AUMSCBD("Formatting corrections made to "_AUMCNT_" WP fields.")
- +11 QUIT
- +12 ;
- S2 ; SCAN FOR DUPLICATE HEALTH FACTOR NAMES AND APPLY NEW FORMAT TO INACTIVE ENTRIES
- +1 NEW AUMN,AUMI,AUMINA,AUMCNT,AUMFDA,AUM0,AUMP
- +2 DO RSLT^AUMSCBD($$REPEAT^XLFSTR("-",20))
- DO RSLT^AUMSCBD("AUM*16.0*3 Duplicate Health Factor cleanup")
- +3 SET AUMCNT=0
- SET AUMN=""
- FOR
- SET AUMN=$ORDER(^AUTTHF("B",AUMN))
- IF '$LENGTH(AUMN)
- QUIT
- Begin DoDot:1
- +4 SET AUMI=0
- FOR
- SET AUMI=$ORDER(^AUTTHF("B",AUMN,AUMI))
- IF 'AUMI
- QUIT
- Begin DoDot:2
- +5 IF '$ORDER(^AUTTHF("B",AUMN,AUMI))&'$ORDER(^AUTTHF("B",AUMN,AUMI),-1)
- QUIT
- +6 SET AUM0=$GET(^AUTTHF(AUMI,0))
- IF '$LENGTH(AUM0)
- QUIT
- IF '$PIECE(AUM0,U,13)
- QUIT
- +7 SET AUMP=$SELECT($PIECE(AUM0,U,10)="C":"y",1:"z")
- IF $EXTRACT($PIECE(AUM0,U))=AUMP!($EXTRACT($PIECE(AUM0,U,2))=AUMP)
- QUIT
- +8 SET AUMCNT=AUMCNT+1
- +9 SET AUMFDA(9999999.64,AUMI_",",.01)=$EXTRACT(AUMP_AUMP_$PIECE(AUM0,U),1,40)
- +10 SET AUMFDA(9999999.64,AUMI_",",.02)=AUMP_$EXTRACT($PIECE(AUM0,U,2),2,4)
- End DoDot:2
- End DoDot:1
- +11 IF $DATA(AUMFDA)
- DO FILE^DIE(,"AUMFDA")
- +12 DO RSLT^AUMSCBD("Inactive formatting applied to "_AUMCNT_" duplicate entries.")
- +13 QUIT
- +14 ;