EC2P150A ;ALB/TXH - EC National Procedure Update; Apr 27, 2020@14:12
 ;;2.0;EVENT CAPTURE;**150**;May 8, 1996;Build 5
 ;
 ;This routine is used as a post-init in a KIDS build
 ;to update the EC National Procedure file (#725).
 ;
 Q
 ;
PRETRAN ;Load Inactivate Code table into KIDS build
 ;
 M @XPDGREF@("ECDATA")=^XTMP("ECDATA")
 Q
 ;
POST ;Post installation processes
 ;
 I $G(DUZ("AG"))'="V" Q  ;do not install in non-VA environments
 D LOADIACT              ;Load gold inactivate codes into XTMP
 I +$G(XPDQUIT) Q        ;abort installation if error loading table
 ;
 D MES^XPDUTL("Updating the EC NATIONAL PROCEDURE File (#725)...")
 D MES^XPDUTL(" ")
 ;
 ;* add new/edit national procedures
 D ADDPROC^EC2P150B  ;add new procedures
 D NAMECHG^EC2P150B  ;change description
 D CPTCHG^EC2P150C   ;change CPT code
 D INACT^EC2P150C    ;inactivate code
 ;
 ;create task to inspect event code screens
 D BMES^XPDUTL("Queuing the inspection of the EC Event Code Screens file (#720.3)")
 D MES^XPDUTL("for 09/02/2020 at 1:00 AM. If this patch is installed after that")
 D MES^XPDUTL("time, the inspection will queue immediately.")
 D MES^XPDUTL(" ")
 ;
 N ZTRTN,ZTDTH,ZTDESC,ZTIO,ZTSK
 S ZTRTN="INACTSCR^ECUTL3(1)",ZTDTH=3200902.0100
 S ZTDESC="Inspecting EC Event Code Screens file",ZTIO="" D ^%ZTLOAD
 ;
 D MES^XPDUTL("Done. Task: "_$G(ZTSK)_" has been created for this job. You")
 D MES^XPDUTL("will receive a MailMan message with the results on 09/02/2020.")
 D MES^XPDUTL(" ")
 ;
 D MES^XPDUTL("Update of EC NATIONAL PROCEDURE file (#725) completed.")
 D MES^XPDUTL(" ")
 Q
 ;
LOADIACT ;Put gold codes in local XTMP
 ;
 K ^XTMP("ECDATA")
 M ^XTMP("ECDATA")=@XPDGREF@("ECDATA")
 I '$D(^XTMP("ECDATA")) D BMES^XPDUTL("Gold inactivate code table not loaded - INSTALLATION ABORTED") S XPDQUIT=2 Q
 ; Set auto-delete date from XTMP global
 S ^XTMP("ECDATA",0)=$$FMADD^XLFDT(DT,30)_"^"_DT_"^Patch EC*2.0*150 Gold Inactivate Codes"
 Q
 
--- Routine Detail   --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HEC2P150A   1985     printed  Sep 23, 2025@19:31:26                                                                                                                                                                                                    Page 2
EC2P150A  ;ALB/TXH - EC National Procedure Update; Apr 27, 2020@14:12
 +1       ;;2.0;EVENT CAPTURE;**150**;May 8, 1996;Build 5
 +2       ;
 +3       ;This routine is used as a post-init in a KIDS build
 +4       ;to update the EC National Procedure file (#725).
 +5       ;
 +6        QUIT 
 +7       ;
PRETRAN   ;Load Inactivate Code table into KIDS build
 +1       ;
 +2        MERGE @XPDGREF@("ECDATA")=^XTMP("ECDATA")
 +3        QUIT 
 +4       ;
POST      ;Post installation processes
 +1       ;
 +2       ;do not install in non-VA environments
           IF $GET(DUZ("AG"))'="V"
               QUIT 
 +3       ;Load gold inactivate codes into XTMP
           DO LOADIACT
 +4       ;abort installation if error loading table
           IF +$GET(XPDQUIT)
               QUIT 
 +5       ;
 +6        DO MES^XPDUTL("Updating the EC NATIONAL PROCEDURE File (#725)...")
 +7        DO MES^XPDUTL(" ")
 +8       ;
 +9       ;* add new/edit national procedures
 +10      ;add new procedures
           DO ADDPROC^EC2P150B
 +11      ;change description
           DO NAMECHG^EC2P150B
 +12      ;change CPT code
           DO CPTCHG^EC2P150C
 +13      ;inactivate code
           DO INACT^EC2P150C
 +14      ;
 +15      ;create task to inspect event code screens
 +16       DO BMES^XPDUTL("Queuing the inspection of the EC Event Code Screens file (#720.3)")
 +17       DO MES^XPDUTL("for 09/02/2020 at 1:00 AM. If this patch is installed after that")
 +18       DO MES^XPDUTL("time, the inspection will queue immediately.")
 +19       DO MES^XPDUTL(" ")
 +20      ;
 +21       NEW ZTRTN,ZTDTH,ZTDESC,ZTIO,ZTSK
 +22       SET ZTRTN="INACTSCR^ECUTL3(1)"
           SET ZTDTH=3200902.0100
 +23       SET ZTDESC="Inspecting EC Event Code Screens file"
           SET ZTIO=""
           DO ^%ZTLOAD
 +24      ;
 +25       DO MES^XPDUTL("Done. Task: "_$GET(ZTSK)_" has been created for this job. You")
 +26       DO MES^XPDUTL("will receive a MailMan message with the results on 09/02/2020.")
 +27       DO MES^XPDUTL(" ")
 +28      ;
 +29       DO MES^XPDUTL("Update of EC NATIONAL PROCEDURE file (#725) completed.")
 +30       DO MES^XPDUTL(" ")
 +31       QUIT 
 +32      ;
LOADIACT  ;Put gold codes in local XTMP
 +1       ;
 +2        KILL ^XTMP("ECDATA")
 +3        MERGE ^XTMP("ECDATA")=@XPDGREF@("ECDATA")
 +4        IF '$DATA(^XTMP("ECDATA"))
               DO BMES^XPDUTL("Gold inactivate code table not loaded - INSTALLATION ABORTED")
               SET XPDQUIT=2
               QUIT 
 +5       ; Set auto-delete date from XTMP global
 +6        SET ^XTMP("ECDATA",0)=$$FMADD^XLFDT(DT,30)_"^"_DT_"^Patch EC*2.0*150 Gold Inactivate Codes"
 +7        QUIT