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

AUMDO.m

Go to the documentation of this file.
AUMDO ; IHS/OIRM/DSD/JCM,AEF - ENTRY PROGRAM FOR UPDATING ICD0 AND ICD9 FILES ;  [ 12/03/1998   2:35 PM ]
 ;;99.1;ICD UPDATE;;DEC 03, 1998
 W !,"ENTRY NOT PERMITTED HERE (^AUMDO)" Q
 ; This is the main calling routine to update the ICD0 and ICD9 files
 ; It is called either by DOing PGRMODE^AUMDO in programmer mode
 ; or from TASKMAN by scheduling it with the AUMDO option.
 ; If the AUMDDTMP or AUMDOTMP update globals do not exist,
 ; then that file is not updated.
 ;
SPECNOTE ; SPECIAL NOTE FOR PROGRAMMERS
 ; ***NOTE - ALL VARIABLES ARE IN THE AUMDO("variable name') ARRAY
 ;
PGRMODE ; ENTRY POINT FROM AUMDO^AUMD
 ; GET OUTPUT DEVICE AND/OR QUEUE TO TASKMAN
 D EN^AUMDODEV
 I $D(IO("Q"))!(POP) K POP Q  ;QUIT IF QUEUED TO TASKMAN
 ;
EN ; ENTRY POINT FROM TASKMAN IF OUTPUT IS QUEUED
 U IO
 D ^XBKVAR ; GET KERNEL VARIABLES
 F AUMDO("ICD FILE")="ICD0","ICD9" D INITVAR,EN^AUMDO1:'AUMDO("QUIT")
 D UPDATE^AUMDOPKG ;AEF 2981030
 D CLEANUP
 Q  ; END OF JOB - RETURN TO SYSTEM
INITVAR ; INITIALIZE VARIABLES AND CHECK FOR EXISTANCE OF UPDATE GLOBAL
 S (AUMDO("PAGE #"),AUMDO("QUIT"),AUMDO("ICD0"),AUMDO("ICD9"))=0
 S AUMDO(AUMDO("ICD FILE"))=1 ; SET ICD FILE FLAG
 ; CHECK TO SEE IF THERE IS AN UPDATE GLOBAL
 I $D(@$S(AUMDO("ICD0"):"^AUMDOTMP",AUMDO("ICD9"):"^AUMDDTMP"))
 E  W "AUMDO - **** Update global file ^AUMDO"_$S(AUMDO("ICD0"):"OP",AUMDO("ICD9"):"DX")_"U does not exist! ****",!,?10,"**** "_AUMDO("ICD FILE")_" update not performed. ****",!! S AUMDO("QUIT")=1 Q  ; SET QUIT FLAG
 S $P(AUMDO("DASHES"),"-",80)=""
 S AUMDO("UPD GL REF")=$S(AUMDO("ICD0"):"^AUMDOTMP(",AUMDO("ICD9"):"^AUMDDTMP(")
 S AUMDO("ICD GL REF")=$S(AUMDO("ICD0"):"^ICD0(",AUMDO("ICD9"):"^ICD9(")
 S AUMDO("DLAYGO ICD")=$S(AUMDO("ICD0"):80.1,AUMDO("ICD9"):80)
 S AUMDO("DLAYGO DRG")=$S(AUMDO("ICD0"):80.11,AUMDO("ICD9"):80.01)
 S AUMDO("DLAYGO MDC")=80.12
 S AUMDO("DLAYGO KWD")=$S(AUMDO("ICD0"):"80.1999999921",AUMDO("ICD9"):"80.999999921")
 S AUMDO("DIC(P) DRG")=$S(AUMDO("ICD0"):"^DD(80.1,6,0)",AUMDO("ICD9"):"^DD(80,6,0)")
 S AUMDO("DIC(P) KWD")=$S(AUMDO("ICD0"):"^DD(80.1,9999999.21,0)",AUMDO("ICD9"):"^DD(80,9999999.21,0)")
 S AUMDO("DIC(P) MDC")="^DD(80.1,7,0)"
 S AUMDO("ICD CODE")=9999999
 S (AUMDO("TOTAL UPDATE RECORDS"),AUMDO("TOTAL GOOD UPDATE RECORDS"),AUMDO("TOTAL BAD UPDATE RECORDS"),AUMDO("TOTAL ADDS"),AUMDO("TOTAL ADD/REPLACE"),AUMDO("TOTAL CHANGES"))=0 ; SET COUNTERS AND START $O VALUE
 D HDR ; PRINT HEADING
 Q
CLEANUP ; KILL AUMDO* QUIT GRACEFULLY
 K AUMDO
 D ^%ZISC
 I $D(ZTQUEUED) S ZTREQ="@"
 Q
HDR ; ENTRY POINT FROM MULTIPLE POINTS IN ^AUMDO1,^AUMDO1A,^AUMDO1B,^AUMDO1BS,^AUMDO1C TO PRINT PAGE HEADINGS
 S AUMDO("PAGE #")=AUMDO("PAGE #")+1
 D NOW^%DTC S Y=% X ^DD("DD") ; GET DATE/TIME
 S AUMDO("DATE")=$P(Y,"@"),AUMDO("TIME")=$E($P(Y,"@",2),1,5)
 W:$D(IOF) @IOF
 W AUMDO("DASHES"),!
 W ?5,"I C D "_$E(AUMDO("ICD FILE"),4)_"    O N - L I N E   U P D A T E   A C T I V I T Y",?65,"Page # "_AUMDO("PAGE #"),!,AUMDO("DASHES"),!,AUMDO("DATE")_" at "_AUMDO("TIME"),!
 Q