AUMDO1 ; IHS/OIRM/DSD/JCM,AEF - UPDATE ICD0 AND ICD9 GLOBALS ; [ 12/03/1998 2:35 PM ]
;;99.1;ICD UPDATE;;DEC 03, 1998
W !!,"ENTRY NOT PERMITTED HERE (^AUMDO1)",! Q
SPECNOTE ; SPECIAL NOTE FOR PROGRAMMERS
; ***NOTE - ALL VARIABLES ARE IN THE AUMDO("variable name') ARRAY
;
EN ; ENTRY POINT FROM EN+3^AUMDO
; GET ICD CODE FROM UPDATE GLOBAL
F AUMDO("L")=0:0 S AUMDO("ICD CODE")=$O(@(AUMDO("UPD GL REF")_"""BA"","""_AUMDO("ICD CODE")_""")")) Q:AUMDO("ICD CODE")="" S AUMDO("UPD DFN")=$O(@("^("""_AUMDO("ICD CODE")_""","""")")) D PROCICD
D TOTALS
Q ; RETURN TO ^AUMDO
PROCICD ; DO SUBROUTINES TO UPDATE THIS ENTRY
S AUMDO("TOTAL UPDATE RECORDS")=AUMDO("TOTAL UPDATE RECORDS")+1
D:$Y>55 HDR^AUMDO W !,"Updating "_AUMDO("ICD FILE")_" code "_AUMDO("ICD CODE")
I 'AUMDO("UPD DFN") S AUMDO("QUIT")=1 W ?44,$E(AUMDO("ICD FILE"),4)_" BA X-Ref null" Q
S (AUMDO("ADD"),AUMDO("CHANGE"),AUMDO("ACTIVE"),AUMDO("SUPERCEDED"),AUMDO("QUIT"),AUMDO("ADD/REPLACE"),AUMDO("VA EXPANDED"),AUMDO("ADD!A/R"),AUMDO("INACTIVE"))=0 ; RESET FLAGS
D EN^AUMDO1A ; PROCESS THE UPDATE ICD CODE ENTRY
;
D EN^AUMDO1D(AUMDO("UPD DFN"),AUMDO("ICD DFN")) ; Update PCC Inpt Edits File AEF 2981102
;
TALLY ; COUNT UPDATES (GOOD,BAD)
I AUMDO("QUIT") S AUMDO("TOTAL BAD UPDATE RECORDS")=AUMDO("TOTAL BAD UPDATE RECORDS")+1 W ?70," **ERROR**",! Q
S AUMDO("TOTAL GOOD UPDATE RECORDS")=AUMDO("TOTAL GOOD UPDATE RECORDS")+1
W ?70," - OK -",!
Q
TOTALS ; DISPLAY TOTALS
W !,AUMDO("DASHES"),!,?25,"E N D O F U P D A T E",!,AUMDO("DASHES")
D:$Y>55 HDR^AUMDO
W !,"Total "_AUMDO("ICD FILE")_" update entries = ",AUMDO("TOTAL UPDATE RECORDS")
W !,"Total "_AUMDO("ICD FILE")_" updates posted = ",AUMDO("TOTAL GOOD UPDATE RECORDS"),!,"Total "_AUMDO("ICD FILE")_" updates failed = ",AUMDO("TOTAL BAD UPDATE RECORDS"),!
W !,"Total Add update actions = ",AUMDO("TOTAL ADDS"),!,"Total Add/Replace update actions = ",AUMDO("TOTAL ADD/REPLACE"),!,"Total Change update actions = ",AUMDO("TOTAL CHANGES"),!
I AUMDO("TOTAL BAD UPDATE RECORDS")>0 W !,"There were errors encountered during this update.",!,"Review the error report for specific errors.",!
Q
AUMDO1 ; IHS/OIRM/DSD/JCM,AEF - UPDATE ICD0 AND ICD9 GLOBALS ; [ 12/03/1998 2:35 PM ]
+1 ;;99.1;ICD UPDATE;;DEC 03, 1998
+2 WRITE !!,"ENTRY NOT PERMITTED HERE (^AUMDO1)",!
QUIT
SPECNOTE ; SPECIAL NOTE FOR PROGRAMMERS
+1 ; ***NOTE - ALL VARIABLES ARE IN THE AUMDO("variable name') ARRAY
+2 ;
EN ; ENTRY POINT FROM EN+3^AUMDO
+1 ; GET ICD CODE FROM UPDATE GLOBAL
+2 FOR AUMDO("L")=0:0
SET AUMDO("ICD CODE")=$ORDER(@(AUMDO("UPD GL REF")_"""BA"","""_AUMDO("ICD CODE")_""")"))
IF AUMDO("ICD CODE")=""
QUIT
SET AUMDO("UPD DFN")=$ORDER(@("^("""_AUMDO("ICD CODE")_""","""")"))
DO PROCICD
+3 DO TOTALS
+4 ; RETURN TO ^AUMDO
QUIT
PROCICD ; DO SUBROUTINES TO UPDATE THIS ENTRY
+1 SET AUMDO("TOTAL UPDATE RECORDS")=AUMDO("TOTAL UPDATE RECORDS")+1
+2 IF $Y>55
DO HDR^AUMDO
WRITE !,"Updating "_AUMDO("ICD FILE")_" code "_AUMDO("ICD CODE")
+3 IF 'AUMDO("UPD DFN")
SET AUMDO("QUIT")=1
WRITE ?44,$EXTRACT(AUMDO("ICD FILE"),4)_" BA X-Ref null"
QUIT
+4 ; RESET FLAGS
SET (AUMDO("ADD"),AUMDO("CHANGE"),AUMDO("ACTIVE"),AUMDO("SUPERCEDED"),AUMDO("QUIT"),AUMDO("ADD/REPLACE"),AUMDO("VA EXPANDED"),AUMDO("ADD!A/R"),AUMDO("INACTIVE"))=0
+5 ; PROCESS THE UPDATE ICD CODE ENTRY
DO EN^AUMDO1A
+6 ;
+7 ; Update PCC Inpt Edits File AEF 2981102
DO EN^AUMDO1D(AUMDO("UPD DFN"),AUMDO("ICD DFN"))
+8 ;
TALLY ; COUNT UPDATES (GOOD,BAD)
+1 IF AUMDO("QUIT")
SET AUMDO("TOTAL BAD UPDATE RECORDS")=AUMDO("TOTAL BAD UPDATE RECORDS")+1
WRITE ?70," **ERROR**",!
QUIT
+2 SET AUMDO("TOTAL GOOD UPDATE RECORDS")=AUMDO("TOTAL GOOD UPDATE RECORDS")+1
+3 WRITE ?70," - OK -",!
+4 QUIT
TOTALS ; DISPLAY TOTALS
+1 WRITE !,AUMDO("DASHES"),!,?25,"E N D O F U P D A T E",!,AUMDO("DASHES")
+2 IF $Y>55
DO HDR^AUMDO
+3 WRITE !,"Total "_AUMDO("ICD FILE")_" update entries = ",AUMDO("TOTAL UPDATE RECORDS")
+4 WRITE !,"Total "_AUMDO("ICD FILE")_" updates posted = ",AUMDO("TOTAL GOOD UPDATE RECORDS"),!,"Total "_AUMDO("ICD FILE")_" updates failed = ",AUMDO("TOTAL BAD UPDATE RECORDS"),!
+5 WRITE !,"Total Add update actions = ",AUMDO("TOTAL ADDS"),!,"Total Add/Replace update actions = ",AUMDO("TOTAL ADD/REPLACE"),!,"Total Change update actions = ",AUMDO("TOTAL CHANGES"),!
+6 IF AUMDO("TOTAL BAD UPDATE RECORDS")>0
WRITE !,"There were errors encountered during this update.",!,"Review the error report for specific errors.",!
+7 QUIT