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

RAIPR175.m

Go to the documentation of this file.
  1. RAIPR175 ;HISC/GJC-preinit 175 ; Jan 19, 2021@15:45:32
  1. ;;5.0;Radiology/Nuclear Medicine;**175**;Mar 16, 1998;Build 2
  1. ;
  1. ;Routine File IA Type
  1. ;----------------------------------------------
  1. ;$$FIND1^DIC() 2051 (S)
  1. ;BMES^XPDUTL 10141 (S)
  1. ;$$DELETE^XPDMENU() 1157 (S)
  1. ;DELIX^DDMOD() 2916 (S)
  1. ;
  1. EN ;entry point to remove ITEMS from the RA ORDER menu
  1. ; first, get the IEN for the RA ORDER menu
  1. N RAERR,RAITEM,RAMENU,RAX S RAX="RA ORDER"
  1. S RAMENU=$$FIND1(RAX)
  1. ; not found, record incident and exit
  1. I RAMENU=-1 D Q
  1. .D BMES^XPDUTL("Exiting: the 'RA ORDER' menu was not found!")
  1. .Q
  1. ;save off name
  1. S RAMENU=RAX
  1. ;
  1. ;Find the specific options listed in the FOR loop.
  1. ;If success, save the IEN of those option names as
  1. ;a subscript in the RAITEM() array.
  1. ;
  1. F RAX="RA ORDERLOG","RA ORDERPENDING","RA ORDERLOGLOC" D
  1. .N Y S Y=$$FIND1(RAX)
  1. .I Y=-1 D BMES^XPDUTL("Option: "_RAX_" was not found!") Q
  1. .S RAITEM(RAX)=Y
  1. .Q
  1. ;
  1. I ($D(RAITEM)\10)=0 D Q
  1. .D BMES^XPDUTL("Exiting: There are no '"_RAMENU_"' menu ITEMS to be removed.")
  1. .Q
  1. ;
  1. ; Remove the options, save as subscripts from the menu identifed
  1. ; by RAORDER.
  1. ;
  1. S (RAX,Y)=""
  1. F S RAX=$O(RAITEM(RAX)) Q:RAX="" D
  1. .S Y=$$DELETE^XPDMENU(RAMENU,RAX)
  1. .;Y = 1 success; else 0
  1. .S RATXT(1)="'"_RAX_"' was "_$S(Y=0:"not ",1:"")_"removed as an ITEM"
  1. .S RATXT(2)="under the '"_RAMENU_"' menu."
  1. .D BMES^XPDUTL(.RATXT)
  1. .Q
  1. K RATXT
  1. ; call ACHN (see comments below)
  1. D ACHN
  1. Q
  1. ;
  1. ;// subroutines //
  1. FIND1(RAX) ;find the option IEN based on the option name
  1. ;Input: RAX = option name
  1. ;Return: IEN option name; else -1
  1. N RAERR,Y
  1. S Y=$$FIND1^DIC(19,,"X",RAX,"","","RAERR")
  1. Q $S(Y=0!($D(RAERR)):-1,1:Y)
  1. ;
  1. ACHN ;remove the "ACHN" xref file: 75.1, fld: 5
  1. ; Pre-"ACHN" deletion defn
  1. ;^DD(75.1,5,1,0)="^.1^^-1" ^DD(75.1,5,1,2,0)="75.1^ACHN^MUMPS"
  1. ;^DD(75.1,5,1,2,1)="D:$$ORVR^RAORDU()=2.5&((X=1)!(X=3)) CH^RADD2(DA,X)"
  1. ;^DD(75.1,5,1,2,2)="Q" ^DD(75.1,5,1,2,3)="Do not delete."
  1. ;
  1. ; delete the REQUEST STATUS "ACHN" xref (xref #: 2)
  1. ; results are recorded in RARSLT
  1. ; errors, if any, are recorded in RAERR.
  1. ; - RADD2 has no IAs
  1. ; - there are no external calls to CH^RADD2
  1. ; (vivian dot worldvista dot org)
  1. ; The CH tag is to be removed from RADD2.
  1. ;
  1. K RARSLT,RAERR D DELIX^DDMOD(75.1,5,2,"","RARSLT","RAERR")
  1. I $D(RAERR) D
  1. .D BMES^XPDUTL("Error when trying to delete the ""ACHN"" xref (75.1; 5).")
  1. .Q
  1. E D
  1. .D BMES^XPDUTL("The ""ACHN"" xref (75.1; 5) was successfully deleted.")
  1. .D:$G(RARSLT("DDAUD"))=1 BMES^XPDUTL("""ACHN"" deletion was recorded in the DD AUDIT (#.6) file.")
  1. .;national no longer compiles input tempates or cross-references on this file.
  1. .Q
  1. EXIT ;clean up
  1. K RARSLT,RAERR
  1. Q
  1. ;