RAIPS197 ;HISC/GJC - PostInit RA5P197 ; Dec 15, 2022@09:15:05
;;5.0;Radiology/Nuclear Medicine;**197**;Mar 16, 1998;Build 2
;
; File IA Type
; -------------------------------------
; FILE^DIE 2053 (S)
; $$FIND1^DIC 2051 (S)
; BMES^XPDUTL 10141 (S)
; NEWCP^XPDUTL 10141 (S)
;
; INC 24962082
; ------------
; This post-install routine will update a single CPT code
; record CODE (#.01)in the RADIOLOGY CPT BY PROCEDURE TYPE
; (#73.2). The field updated is: WAIT TIMES PROCEDURE TYPE (#2).
;
; From: CODE = 77067; WAIT TIMES PROCEDURE TYPE = OTHER
; To: CODE = 77067; WAIT TIMES PROCEDURE TYPE = MAMMOGRAPHY
;
;
EN ;entry point for P197 checkpoints
N RACHX1,RACHX2
S RACHX1=$$NEWCP^XPDUTL("POST1","EN1^RAIPS197")
S RACHX2=$$NEWCP^XPDUTL("POST2","EN2^RAIPS197")
Q
;
EN1 ;find CODE '77067' free text (FT)
N RACODE,RAFDA,RAIEN,RAIENS
S RACODE=77067 ;CODE
;---
S RAIEN=+$O(^RA(73.2,"B",RACODE,0))
I RAIEN=0 D QUIT
.N RATXT S RATXT="CODE '"_RACODE_"' not found; no action taken."
.D BMES^XPDUTL(RATXT)
.Q
;---
L +^RA(73.2,RAIEN):5 I '$T D QUIT
.N RATXT S RATXT(1)="CODE '"_RACODE_"' record could not be locked for editing."
.S RATXT(2)="WAIT TIMES PROCEDURE TYPE failed update to: 'MAMMOGRAPHY'."
.D BMES^XPDUTL(.RATXT)
.Q
;---
N RATXT K RAERR S RAIENS=RAIEN_"," ;string
S RAFDA(73.2,RAIENS,2)="MAMMOGRAPHY"
D FILE^DIE("E","RAFDA","RAERR")
;---
I $D(RAERR) D
.S RATXT(1)="The WAIT TIMES PROCEDURE TYPE value for CODE '"_RACODE_"' has failed to be updated"
.S RATXT(2)="to 'MAMMOGRAPHY'."
.Q
E D
.S RATXT(1)="The WAIT TIMES PROCEDURE TYPE value for CODE '"_RACODE_"' has successfully been"
.S RATXT(2)="updated to 'MAMMOGRAPHY'."
.Q
D BMES^XPDUTL(.RATXT)
K RAERR
;---
L -^RA(73.2,RAIEN) ;unconditionally
Q
;
EN2 ;inactivate existing COVID reasons.
K RACOREA,RAERR,RAFDA,RAI,RAIEN,RATXT,RAX
F RAI=1:1 S RAX=$T(COVID+RAI) Q:RAX="" D
.S RACOREA=$P(RAX,";",3),RAIEN=$$FIND1^DIC(75.2,"","X",RACOREA)
.I RAIEN=0 D Q
..N RATXT S RATXT="Could not find reason '"_RACOREA_"' to inactivate."
..D BMES^XPDUTL(RATXT)
..Q
.; ---
.; ^DD(75.2,2,0)="TYPE OF REASON^S^1:CANCEL REQUEST;3:HOLD REQUEST;9:GENERAL REQUEST;^0;2^Q"
.; Delete ToR (1 or 3 or 9) for each COVID reason. This will inactivate the COVID reason from
.; selection by a user.
.; ---
.K RAFDA,RATXT S RAFDA(75.2,RAIEN_",",2)="@"
.D FILE^DIE("","RAFDA","RAERR")
.I $D(RAERR("DIERR"))#2 D
..S RATXT="An error occurred inactivating reason '"_RACOREA_"'. Contact your Radiology ADPAC."
..Q
.E S RATXT="Reason '"_RACOREA_"' was successfully inactivated."
.D BMES^XPDUTL(RATXT) K RAERR,RATXT
.Q
K RACOREA,RAERR,RAFDA,RAI,RAIEN,RATXT,RAX
Q
;
COVID ;COVID reasons (cancel/hold) to be inactivated
;;COVID-19 CONCERNS
;;COVID-19 CONCERNS
;;COVID-19 CLINICAL REVIEW
;;COVID-19 CLINICAL REVIEW COMPLETE TO SCHEDULE
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HRAIPS197 3006 printed Nov 22, 2024@17:46:17 Page 2
RAIPS197 ;HISC/GJC - PostInit RA5P197 ; Dec 15, 2022@09:15:05
+1 ;;5.0;Radiology/Nuclear Medicine;**197**;Mar 16, 1998;Build 2
+2 ;
+3 ; File IA Type
+4 ; -------------------------------------
+5 ; FILE^DIE 2053 (S)
+6 ; $$FIND1^DIC 2051 (S)
+7 ; BMES^XPDUTL 10141 (S)
+8 ; NEWCP^XPDUTL 10141 (S)
+9 ;
+10 ; INC 24962082
+11 ; ------------
+12 ; This post-install routine will update a single CPT code
+13 ; record CODE (#.01)in the RADIOLOGY CPT BY PROCEDURE TYPE
+14 ; (#73.2). The field updated is: WAIT TIMES PROCEDURE TYPE (#2).
+15 ;
+16 ; From: CODE = 77067; WAIT TIMES PROCEDURE TYPE = OTHER
+17 ; To: CODE = 77067; WAIT TIMES PROCEDURE TYPE = MAMMOGRAPHY
+18 ;
+19 ;
EN ;entry point for P197 checkpoints
+1 NEW RACHX1,RACHX2
+2 SET RACHX1=$$NEWCP^XPDUTL("POST1","EN1^RAIPS197")
+3 SET RACHX2=$$NEWCP^XPDUTL("POST2","EN2^RAIPS197")
+4 QUIT
+5 ;
EN1 ;find CODE '77067' free text (FT)
+1 NEW RACODE,RAFDA,RAIEN,RAIENS
+2 ;CODE
SET RACODE=77067
+3 ;---
+4 SET RAIEN=+$ORDER(^RA(73.2,"B",RACODE,0))
+5 IF RAIEN=0
Begin DoDot:1
+6 NEW RATXT
SET RATXT="CODE '"_RACODE_"' not found; no action taken."
+7 DO BMES^XPDUTL(RATXT)
+8 QUIT
End DoDot:1
QUIT
+9 ;---
+10 LOCK +^RA(73.2,RAIEN):5
IF '$TEST
Begin DoDot:1
+11 NEW RATXT
SET RATXT(1)="CODE '"_RACODE_"' record could not be locked for editing."
+12 SET RATXT(2)="WAIT TIMES PROCEDURE TYPE failed update to: 'MAMMOGRAPHY'."
+13 DO BMES^XPDUTL(.RATXT)
+14 QUIT
End DoDot:1
QUIT
+15 ;---
+16 ;string
NEW RATXT
KILL RAERR
SET RAIENS=RAIEN_","
+17 SET RAFDA(73.2,RAIENS,2)="MAMMOGRAPHY"
+18 DO FILE^DIE("E","RAFDA","RAERR")
+19 ;---
+20 IF $DATA(RAERR)
Begin DoDot:1
+21 SET RATXT(1)="The WAIT TIMES PROCEDURE TYPE value for CODE '"_RACODE_"' has failed to be updated"
+22 SET RATXT(2)="to 'MAMMOGRAPHY'."
+23 QUIT
End DoDot:1
+24 IF '$TEST
Begin DoDot:1
+25 SET RATXT(1)="The WAIT TIMES PROCEDURE TYPE value for CODE '"_RACODE_"' has successfully been"
+26 SET RATXT(2)="updated to 'MAMMOGRAPHY'."
+27 QUIT
End DoDot:1
+28 DO BMES^XPDUTL(.RATXT)
+29 KILL RAERR
+30 ;---
+31 ;unconditionally
LOCK -^RA(73.2,RAIEN)
+32 QUIT
+33 ;
EN2 ;inactivate existing COVID reasons.
+1 KILL RACOREA,RAERR,RAFDA,RAI,RAIEN,RATXT,RAX
+2 FOR RAI=1:1
SET RAX=$TEXT(COVID+RAI)
if RAX=""
QUIT
Begin DoDot:1
+3 SET RACOREA=$PIECE(RAX,";",3)
SET RAIEN=$$FIND1^DIC(75.2,"","X",RACOREA)
+4 IF RAIEN=0
Begin DoDot:2
+5 NEW RATXT
SET RATXT="Could not find reason '"_RACOREA_"' to inactivate."
+6 DO BMES^XPDUTL(RATXT)
+7 QUIT
End DoDot:2
QUIT
+8 ; ---
+9 ; ^DD(75.2,2,0)="TYPE OF REASON^S^1:CANCEL REQUEST;3:HOLD REQUEST;9:GENERAL REQUEST;^0;2^Q"
+10 ; Delete ToR (1 or 3 or 9) for each COVID reason. This will inactivate the COVID reason from
+11 ; selection by a user.
+12 ; ---
+13 KILL RAFDA,RATXT
SET RAFDA(75.2,RAIEN_",",2)="@"
+14 DO FILE^DIE("","RAFDA","RAERR")
+15 IF $DATA(RAERR("DIERR"))#2
Begin DoDot:2
+16 SET RATXT="An error occurred inactivating reason '"_RACOREA_"'. Contact your Radiology ADPAC."
+17 QUIT
End DoDot:2
+18 IF '$TEST
SET RATXT="Reason '"_RACOREA_"' was successfully inactivated."
+19 DO BMES^XPDUTL(RATXT)
KILL RAERR,RATXT
+20 QUIT
End DoDot:1
+21 KILL RACOREA,RAERR,RAFDA,RAI,RAIEN,RATXT,RAX
+22 QUIT
+23 ;
COVID ;COVID reasons (cancel/hold) to be inactivated
+1 ;;COVID-19 CONCERNS
+2 ;;COVID-19 CONCERNS
+3 ;;COVID-19 CLINICAL REVIEW
+4 ;;COVID-19 CLINICAL REVIEW COMPLETE TO SCHEDULE