EC2P12PT ;ALB/GTS/JAP - PATCH EC*2.0*12 Post-Init Rtn ; 5/8/98
;;2.0; EVENT CAPTURE ;**12**;8 May 96
;
POST ; entry point
N ECVRRV
;* if 725 converted, write message
; since check inserted in addproc subroutine, patch may be re-installed
I $$GET1^DID(725,"","","PACKAGE REVISION DATA")["EC*2*12" D
.D MES^XPDUTL(" ")
.D MES^XPDUTL("It appears that the EC NATIONAL PROCEDURE")
.D MES^XPDUTL("file (#725) has already been updated")
.D MES^XPDUTL("with Patch EC*2*12.")
.D MES^XPDUTL(" ")
.D MES^XPDUTL("But the patch may be re-installed...")
.D MES^XPDUTL(" ")
.D ENTUP
.D F7203
;* continue with conversion/update
I $$GET1^DID(725,"","","PACKAGE REVISION DATA")'["EC*2*12" D
.D ENTUP
.D F7203
Q
;
ENTUP ;
D MES^XPDUTL(" ")
D BMES^XPDUTL("Updating the National Procedures file (#725)...")
D MES^XPDUTL(" ")
;* inactivate national procedures
D INACT^EC725CH5
;* change name of national procedures
D NAMECHG^EC725CH6
;* change CPT codes for national procedures
D CPTCHG^EC725CH5
;* add new national procedures
D ADDPROC^EC725CH6
;* set vrrv node (file #725)
S ECVRRV=$$GET1^DID(725,"","","PACKAGE REVISION DATA")
S ECVRRV=ECVRRV_"^EC*2*12"
D PRD^DILFD(725,ECVRRV)
D MES^XPDUTL(" ")
D BMES^XPDUTL("Update of EC NATIONAL PROCEDURE file (#725)")
D BMES^XPDUTL(" completed...")
D MES^XPDUTL(" ")
Q
;
MSGTXT ; Message intro
;; Please forward this message to your local DSS Site Manager or
;; Event Capture ADPAC.
;;
;; A review of the EC EVENT CODE SCREENS file (#720.3) was done
;; after installation of patch EC*2*12 which updated the EC NATIONAL
;; PROCEDURE file (#725). This message provides the results of that
;; review.
;;
;; The EC EVENT CODE SCREENS file (#720.3) records indicated below
;; point to an inactive record in the EC NATIONAL PROCEDURE file
;; (#725) or to an inactive record in the CPT file (#81).
;;
;; The user should use the Inactivate Event Code Screens [ECNACT]
;; option to inactivate the Event Code Screen. If necessary, a new
;; Event Code Screen can be created using a currently active CPT code
;; or National Procedure.
;;
;;QUIT
;
F7203 ;* inspect/report 720.3
D BMES^XPDUTL("Inspecting EC Event Code Screens file (#720.3)...")
D BMES^XPDUTL("You will receive a MailMan message regarding file #720.3.")
D BMES^XPDUTL(" ")
S ZTRTN="F7203Q^EC2P12PT",ZTDESC="File #720.3 Review from EC*2*12",ZTIO=""
S ZTDTH=$H,ZTREQ="@",ZTSAVE("ZTREQ")="" D ^%ZTLOAD
Q
;
F7203Q ;* background job entry point
N ECPTR,ECPROCT,EC01,ECSCDA,ECFILE,ECDATA,ECLOC,ECCAT,ECCATNM,ECUNIT,ECNAM,ECPROC,ECINACT,ECWORD,COUNT,TXTVAR
S COUNT=0 K ^TMP($J,"EC2P12")
F I=1:1 S TXTVAR=$P($T(MSGTXT+I),";;",2) Q:TXTVAR="QUIT" D LINE(TXTVAR)
S (EC01,ECPROCT)=0
F S EC01=$O(^ECJ("B",EC01)) Q:+EC01=0 D
.S ECPTR=$P(EC01,"-",4)
.S ECSCDA=$O(^ECJ("B",EC01,0))
.Q:'$D(^ECJ(ECSCDA,0))
.S ECWORD="" I ($P(^ECJ(ECSCDA,0),"^",2)'="")&(+$P(^ECJ(ECSCDA,0),"^",2)<DT) S ECWORD="*inactive*"
.S ECLOC=$P(EC01,"-",1)
.S ECUNIT=$P(EC01,"-",2)
.S ECCAT=$P(EC01,"-",3)
.S ECLOC=$P($G(^DIC(4,ECLOC,0)),"^",1)
.S ECUNIT=$P($G(^ECD(ECUNIT,0)),"^",1)
.S:+ECCAT'=0 ECCATNM=$P($G(^EC(726,ECCAT,0)),"^",1)
.S:+ECCAT=0 ECCATNM="None"
.S ECFILE=$P(ECPTR,";",2)
.I ECFILE["EC(725" S ECDATA=$G(^EC(725,$P(ECPTR,";",1),0)) D
..S ECINACT=$P(ECDATA,"^",3)
..Q:ECINACT=""
..I ECINACT<DT D
...S ECPROC=$P(ECDATA,"^",1)_" ("_$P(ECDATA,"^",2)_")",ECNAM=$P(^ECJ(ECSCDA,0),";",1)
...D LINE(" ")
...D LINE(" The National Procedure for the following "_ECWORD)
...D LINE(" Event Code Screen ("_ECNAM_") is inactive --")
...D LINE(" Location: "_ECLOC)
...D LINE(" Category: "_ECCATNM)
...D LINE(" DSS Unit: "_ECUNIT)
...D LINE(" Procedure: "_ECPROC)
...S ECPROCT=ECPROCT+1
.I ECFILE["ICPT" S ECDATA=$G(^ICPT($P(ECPTR,";",1),0)) D
..S ECINACT=$P(ECDATA,"^",4)
..Q:ECINACT=""
..S ECPROC=$P(ECDATA,"^",2)_" ("_$P(ECDATA,"^",1)_")",ECNAM=$P(^ECJ(ECSCDA,0),";",1) D
...D LINE(" ")
...D LINE(" The CPT procedure for the following "_ECWORD)
...D LINE(" Event Code Screen ("_ECNAM_") is inactive --")
...D LINE(" Location: "_ECLOC)
...D LINE(" Category: "_ECCATNM)
...D LINE(" DSS Unit: "_ECUNIT)
...D LINE(" Procedure: "_ECPROC)
...S ECPROCT=ECPROCT+1
I ECPROCT=0 D
.D LINE(" ")
.D LINE("No Event Code Screens were found to be associated with inactive")
.D LINE("National Procedures or inactive CPT codes.")
D MAIL
;D MES^XPDUTL(" ")
;D MES^XPDUTL(" "_ECPROCT_" active Event Code Screens were found to be pointing")
;D MES^XPDUTL(" to inactive procedures in file #725 or file #81.")
;D MES^XPDUTL(" ")
K ^TMP($J,"EC2P12")
Q
;
LINE(TEXT) ; Add line to message global
S COUNT=COUNT+1,^TMP($J,"EC2P12",COUNT)=TEXT
Q
;
MAIL ; Send message
N XMDUZ,XMY,XMTEXT,XMSUB
S XMY(DUZ)="",XMDUZ=.5
S XMSUB="Event Code Screens to Review"
S XMTEXT="^TMP($J,""EC2P12"","
D ^XMD
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HEC2P12PT 4998 printed Nov 22, 2024@17:05:01 Page 2
EC2P12PT ;ALB/GTS/JAP - PATCH EC*2.0*12 Post-Init Rtn ; 5/8/98
+1 ;;2.0; EVENT CAPTURE ;**12**;8 May 96
+2 ;
POST ; entry point
+1 NEW ECVRRV
+2 ;* if 725 converted, write message
+3 ; since check inserted in addproc subroutine, patch may be re-installed
+4 IF $$GET1^DID(725,"","","PACKAGE REVISION DATA")["EC*2*12"
Begin DoDot:1
+5 DO MES^XPDUTL(" ")
+6 DO MES^XPDUTL("It appears that the EC NATIONAL PROCEDURE")
+7 DO MES^XPDUTL("file (#725) has already been updated")
+8 DO MES^XPDUTL("with Patch EC*2*12.")
+9 DO MES^XPDUTL(" ")
+10 DO MES^XPDUTL("But the patch may be re-installed...")
+11 DO MES^XPDUTL(" ")
+12 DO ENTUP
+13 DO F7203
End DoDot:1
+14 ;* continue with conversion/update
+15 IF $$GET1^DID(725,"","","PACKAGE REVISION DATA")'["EC*2*12"
Begin DoDot:1
+16 DO ENTUP
+17 DO F7203
End DoDot:1
+18 QUIT
+19 ;
ENTUP ;
+1 DO MES^XPDUTL(" ")
+2 DO BMES^XPDUTL("Updating the National Procedures file (#725)...")
+3 DO MES^XPDUTL(" ")
+4 ;* inactivate national procedures
+5 DO INACT^EC725CH5
+6 ;* change name of national procedures
+7 DO NAMECHG^EC725CH6
+8 ;* change CPT codes for national procedures
+9 DO CPTCHG^EC725CH5
+10 ;* add new national procedures
+11 DO ADDPROC^EC725CH6
+12 ;* set vrrv node (file #725)
+13 SET ECVRRV=$$GET1^DID(725,"","","PACKAGE REVISION DATA")
+14 SET ECVRRV=ECVRRV_"^EC*2*12"
+15 DO PRD^DILFD(725,ECVRRV)
+16 DO MES^XPDUTL(" ")
+17 DO BMES^XPDUTL("Update of EC NATIONAL PROCEDURE file (#725)")
+18 DO BMES^XPDUTL(" completed...")
+19 DO MES^XPDUTL(" ")
+20 QUIT
+21 ;
MSGTXT ; Message intro
+1 ;; Please forward this message to your local DSS Site Manager or
+2 ;; Event Capture ADPAC.
+3 ;;
+4 ;; A review of the EC EVENT CODE SCREENS file (#720.3) was done
+5 ;; after installation of patch EC*2*12 which updated the EC NATIONAL
+6 ;; PROCEDURE file (#725). This message provides the results of that
+7 ;; review.
+8 ;;
+9 ;; The EC EVENT CODE SCREENS file (#720.3) records indicated below
+10 ;; point to an inactive record in the EC NATIONAL PROCEDURE file
+11 ;; (#725) or to an inactive record in the CPT file (#81).
+12 ;;
+13 ;; The user should use the Inactivate Event Code Screens [ECNACT]
+14 ;; option to inactivate the Event Code Screen. If necessary, a new
+15 ;; Event Code Screen can be created using a currently active CPT code
+16 ;; or National Procedure.
+17 ;;
+18 ;;QUIT
+19 ;
F7203 ;* inspect/report 720.3
+1 DO BMES^XPDUTL("Inspecting EC Event Code Screens file (#720.3)...")
+2 DO BMES^XPDUTL("You will receive a MailMan message regarding file #720.3.")
+3 DO BMES^XPDUTL(" ")
+4 SET ZTRTN="F7203Q^EC2P12PT"
SET ZTDESC="File #720.3 Review from EC*2*12"
SET ZTIO=""
+5 SET ZTDTH=$HOROLOG
SET ZTREQ="@"
SET ZTSAVE("ZTREQ")=""
DO ^%ZTLOAD
+6 QUIT
+7 ;
F7203Q ;* background job entry point
+1 NEW ECPTR,ECPROCT,EC01,ECSCDA,ECFILE,ECDATA,ECLOC,ECCAT,ECCATNM,ECUNIT,ECNAM,ECPROC,ECINACT,ECWORD,COUNT,TXTVAR
+2 SET COUNT=0
KILL ^TMP($JOB,"EC2P12")
+3 FOR I=1:1
SET TXTVAR=$PIECE($TEXT(MSGTXT+I),";;",2)
if TXTVAR="QUIT"
QUIT
DO LINE(TXTVAR)
+4 SET (EC01,ECPROCT)=0
+5 FOR
SET EC01=$ORDER(^ECJ("B",EC01))
if +EC01=0
QUIT
Begin DoDot:1
+6 SET ECPTR=$PIECE(EC01,"-",4)
+7 SET ECSCDA=$ORDER(^ECJ("B",EC01,0))
+8 if '$DATA(^ECJ(ECSCDA,0))
QUIT
+9 SET ECWORD=""
IF ($PIECE(^ECJ(ECSCDA,0),"^",2)'="")&(+$PIECE(^ECJ(ECSCDA,0),"^",2)<DT)
SET ECWORD="*inactive*"
+10 SET ECLOC=$PIECE(EC01,"-",1)
+11 SET ECUNIT=$PIECE(EC01,"-",2)
+12 SET ECCAT=$PIECE(EC01,"-",3)
+13 SET ECLOC=$PIECE($GET(^DIC(4,ECLOC,0)),"^",1)
+14 SET ECUNIT=$PIECE($GET(^ECD(ECUNIT,0)),"^",1)
+15 if +ECCAT'=0
SET ECCATNM=$PIECE($GET(^EC(726,ECCAT,0)),"^",1)
+16 if +ECCAT=0
SET ECCATNM="None"
+17 SET ECFILE=$PIECE(ECPTR,";",2)
+18 IF ECFILE["EC(725"
SET ECDATA=$GET(^EC(725,$PIECE(ECPTR,";",1),0))
Begin DoDot:2
+19 SET ECINACT=$PIECE(ECDATA,"^",3)
+20 if ECINACT=""
QUIT
+21 IF ECINACT<DT
Begin DoDot:3
+22 SET ECPROC=$PIECE(ECDATA,"^",1)_" ("_$PIECE(ECDATA,"^",2)_")"
SET ECNAM=$PIECE(^ECJ(ECSCDA,0),";",1)
+23 DO LINE(" ")
+24 DO LINE(" The National Procedure for the following "_ECWORD)
+25 DO LINE(" Event Code Screen ("_ECNAM_") is inactive --")
+26 DO LINE(" Location: "_ECLOC)
+27 DO LINE(" Category: "_ECCATNM)
+28 DO LINE(" DSS Unit: "_ECUNIT)
+29 DO LINE(" Procedure: "_ECPROC)
+30 SET ECPROCT=ECPROCT+1
End DoDot:3
End DoDot:2
+31 IF ECFILE["ICPT"
SET ECDATA=$GET(^ICPT($PIECE(ECPTR,";",1),0))
Begin DoDot:2
+32 SET ECINACT=$PIECE(ECDATA,"^",4)
+33 if ECINACT=""
QUIT
+34 SET ECPROC=$PIECE(ECDATA,"^",2)_" ("_$PIECE(ECDATA,"^",1)_")"
SET ECNAM=$PIECE(^ECJ(ECSCDA,0),";",1)
Begin DoDot:3
+35 DO LINE(" ")
+36 DO LINE(" The CPT procedure for the following "_ECWORD)
+37 DO LINE(" Event Code Screen ("_ECNAM_") is inactive --")
+38 DO LINE(" Location: "_ECLOC)
+39 DO LINE(" Category: "_ECCATNM)
+40 DO LINE(" DSS Unit: "_ECUNIT)
+41 DO LINE(" Procedure: "_ECPROC)
+42 SET ECPROCT=ECPROCT+1
End DoDot:3
End DoDot:2
End DoDot:1
+43 IF ECPROCT=0
Begin DoDot:1
+44 DO LINE(" ")
+45 DO LINE("No Event Code Screens were found to be associated with inactive")
+46 DO LINE("National Procedures or inactive CPT codes.")
End DoDot:1
+47 DO MAIL
+48 ;D MES^XPDUTL(" ")
+49 ;D MES^XPDUTL(" "_ECPROCT_" active Event Code Screens were found to be pointing")
+50 ;D MES^XPDUTL(" to inactive procedures in file #725 or file #81.")
+51 ;D MES^XPDUTL(" ")
+52 KILL ^TMP($JOB,"EC2P12")
+53 QUIT
+54 ;
LINE(TEXT) ; Add line to message global
+1 SET COUNT=COUNT+1
SET ^TMP($JOB,"EC2P12",COUNT)=TEXT
+2 QUIT
+3 ;
MAIL ; Send message
+1 NEW XMDUZ,XMY,XMTEXT,XMSUB
+2 SET XMY(DUZ)=""
SET XMDUZ=.5
+3 SET XMSUB="Event Code Screens to Review"
+4 SET XMTEXT="^TMP($J,""EC2P12"","
+5 DO ^XMD
+6 QUIT