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

RAIPS197.m

Go to the documentation of this file.
  1. RAIPS197 ;HISC/GJC - PostInit RA5P197 ; Dec 15, 2022@09:15:05
  1. ;;5.0;Radiology/Nuclear Medicine;**197**;Mar 16, 1998;Build 2
  1. ;
  1. ; File IA Type
  1. ; -------------------------------------
  1. ; FILE^DIE 2053 (S)
  1. ; $$FIND1^DIC 2051 (S)
  1. ; BMES^XPDUTL 10141 (S)
  1. ; NEWCP^XPDUTL 10141 (S)
  1. ;
  1. ; INC 24962082
  1. ; ------------
  1. ; This post-install routine will update a single CPT code
  1. ; record CODE (#.01)in the RADIOLOGY CPT BY PROCEDURE TYPE
  1. ; (#73.2). The field updated is: WAIT TIMES PROCEDURE TYPE (#2).
  1. ;
  1. ; From: CODE = 77067; WAIT TIMES PROCEDURE TYPE = OTHER
  1. ; To: CODE = 77067; WAIT TIMES PROCEDURE TYPE = MAMMOGRAPHY
  1. ;
  1. ;
  1. EN ;entry point for P197 checkpoints
  1. N RACHX1,RACHX2
  1. S RACHX1=$$NEWCP^XPDUTL("POST1","EN1^RAIPS197")
  1. S RACHX2=$$NEWCP^XPDUTL("POST2","EN2^RAIPS197")
  1. Q
  1. ;
  1. EN1 ;find CODE '77067' free text (FT)
  1. N RACODE,RAFDA,RAIEN,RAIENS
  1. S RACODE=77067 ;CODE
  1. ;---
  1. S RAIEN=+$O(^RA(73.2,"B",RACODE,0))
  1. I RAIEN=0 D QUIT
  1. .N RATXT S RATXT="CODE '"_RACODE_"' not found; no action taken."
  1. .D BMES^XPDUTL(RATXT)
  1. .Q
  1. ;---
  1. L +^RA(73.2,RAIEN):5 I '$T D QUIT
  1. .N RATXT S RATXT(1)="CODE '"_RACODE_"' record could not be locked for editing."
  1. .S RATXT(2)="WAIT TIMES PROCEDURE TYPE failed update to: 'MAMMOGRAPHY'."
  1. .D BMES^XPDUTL(.RATXT)
  1. .Q
  1. ;---
  1. N RATXT K RAERR S RAIENS=RAIEN_"," ;string
  1. S RAFDA(73.2,RAIENS,2)="MAMMOGRAPHY"
  1. D FILE^DIE("E","RAFDA","RAERR")
  1. ;---
  1. I $D(RAERR) D
  1. .S RATXT(1)="The WAIT TIMES PROCEDURE TYPE value for CODE '"_RACODE_"' has failed to be updated"
  1. .S RATXT(2)="to 'MAMMOGRAPHY'."
  1. .Q
  1. E D
  1. .S RATXT(1)="The WAIT TIMES PROCEDURE TYPE value for CODE '"_RACODE_"' has successfully been"
  1. .S RATXT(2)="updated to 'MAMMOGRAPHY'."
  1. .Q
  1. D BMES^XPDUTL(.RATXT)
  1. K RAERR
  1. ;---
  1. L -^RA(73.2,RAIEN) ;unconditionally
  1. Q
  1. ;
  1. EN2 ;inactivate existing COVID reasons.
  1. K RACOREA,RAERR,RAFDA,RAI,RAIEN,RATXT,RAX
  1. F RAI=1:1 S RAX=$T(COVID+RAI) Q:RAX="" D
  1. .S RACOREA=$P(RAX,";",3),RAIEN=$$FIND1^DIC(75.2,"","X",RACOREA)
  1. .I RAIEN=0 D Q
  1. ..N RATXT S RATXT="Could not find reason '"_RACOREA_"' to inactivate."
  1. ..D BMES^XPDUTL(RATXT)
  1. ..Q
  1. .; ---
  1. .; ^DD(75.2,2,0)="TYPE OF REASON^S^1:CANCEL REQUEST;3:HOLD REQUEST;9:GENERAL REQUEST;^0;2^Q"
  1. .; Delete ToR (1 or 3 or 9) for each COVID reason. This will inactivate the COVID reason from
  1. .; selection by a user.
  1. .; ---
  1. .K RAFDA,RATXT S RAFDA(75.2,RAIEN_",",2)="@"
  1. .D FILE^DIE("","RAFDA","RAERR")
  1. .I $D(RAERR("DIERR"))#2 D
  1. ..S RATXT="An error occurred inactivating reason '"_RACOREA_"'. Contact your Radiology ADPAC."
  1. ..Q
  1. .E S RATXT="Reason '"_RACOREA_"' was successfully inactivated."
  1. .D BMES^XPDUTL(RATXT) K RAERR,RATXT
  1. .Q
  1. K RACOREA,RAERR,RAFDA,RAI,RAIEN,RATXT,RAX
  1. Q
  1. ;
  1. COVID ;COVID reasons (cancel/hold) to be inactivated
  1. ;;COVID-19 CONCERNS
  1. ;;COVID-19 CONCERNS
  1. ;;COVID-19 CLINICAL REVIEW
  1. ;;COVID-19 CLINICAL REVIEW COMPLETE TO SCHEDULE