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

RARIC1.m

Go to the documentation of this file.
  1. RARIC1 ;HISC/GJC-Check to see if Imaging package exists ;3/4/96 15:43
  1. ;;5.0;Radiology/Nuclear Medicine;**23,93**;Mar 16, 1998;Build 3
  1. ; 07/15/2008 BAY/KAM rem call 249750 RA*5*93 Correct DIK Calls
  1. ;
  1. ; API's STUFPHY and DELIMGPT are supported by DBIA#3317
  1. ;
  1. IMAGE() ; check to see if Imaging package exists
  1. ; called from RACNLU, RAPTLU and RART1
  1. ; 1 = exists
  1. ; 0 = doesn't exist
  1. S X="MAGBAPI" X ^%ZOSF("TEST") I '$T Q 0
  1. S X="MAGGTIA" X ^%ZOSF("TEST") I '$T Q 0
  1. Q $S($O(^MAG(2005,0)):1,1:0)
  1. ;
  1. ;
  1. STUFPHY(RAVERF,RASR,RARTN) ; stuff physician duz
  1. ;RASR should be rtn MAGJUPD1's RIST, =15 if staff, =12 if resident
  1. ;RAVERF=duz of physician (primary staff or primary resident)
  1. S RARTN="STUFPHY called"
  1. I '$D(DA(2))!'$D(DA(1))!'($D(DA)#2) S RARTN="Missing DA references" Q
  1. I 'RASR S RARTN="Missing RASR value" Q
  1. N RAERR,RAFLD,RAMDIV,RAMDV,RAMLC,RAESIG,RACOD
  1. ;
  1. ; check loc access
  1. S RACOD=$S(RASR=15:"S",RASR=12:"R",1:"")
  1. I RACOD="" S RARTN="Can't determine staff/resident code" Q
  1. I '$$SCRN^RAUTL8(.DA,RACOD,RAVERF,"PRI") S RARTN="Failed loc access" Q
  1. ;
  1. ; check verifier access
  1. I $D(^RADPT(DA(2),"DT",DA(1),0)) S RAMDIV=^(0),RAMLC=+$P(RAMDIV,"^",4),RAMDIV=+$P(RAMDIV,"^",3),RAMDV=$S($D(^RA(79,RAMDIV,.1)):^(.1),1:""),RAMDV=$S(RAMDV="":RAMDV,1:$TR(RAMDV,"YyNn",1100))
  1. I '$D(RAMDV) S RARTN="Can't determine RAMDV" Q
  1. D VERCHK^RAHLO3 ;returns RAERR text string
  1. I $G(RAERR)]"" S RARTN="Failed verifier: "_RAERR Q
  1. ;
  1. ; stuff data
  1. S DIE="^RADPT("_DA(2)_",""DT"","_DA(1)_",""P"","
  1. S DR=RASR_"////"_RAVERF D ^DIE K DI,DIC,DE,DQ,DIE,DR
  1. S RARTN=1
  1. ;
  1. ;delete 2nd staff/resident if it matches the primary staff/resident
  1. S RAFLD=$S(RASR=15:60,RASR=12:70,1:"")
  1. I 'RAFLD K DA Q ;can't determine secondary field to check/delete
  1. D EN^RAUTL8(RAVERF,RAFLD,.DA)
  1. K DA
  1. Q
  1. DELIMGPT(RAIE74,RAIE2005) ;delete imaging pointer
  1. ;input RAIE74 is File 74's ien
  1. ;input RAIE2005 is File 2005's ien
  1. ; quit if either input value is 0 or null or non-numeric
  1. Q:'RAIE74 Q:'RAIE2005
  1. ; quit if report doesn't have this RAIE2005 value
  1. N DA,DIK
  1. S DA=$O(^RARPT(RAIE74,2005,"B",RAIE2005,0))
  1. Q:'DA
  1. ; delete this 2005 pointer record
  1. ;07/17/2008 modified setting DIK in next line
  1. S DA(1)=RAIE74,DIK="^RARPT("_DA(1)_",2005," D ^DIK
  1. Q
  1. EHVC ; Executable Help for File 72's VISTARAD CATEGORY field
  1. N RATXT,I
  1. F I=1:1:12 S RATXT(I)=$P($T(EHVCTXT+I),";;",2)
  1. D EN^DDIOL(.RATXT)
  1. Q
  1. EHVCTXT ;
  1. ;;This field is only needed for sites that will be using VistaRad for soft-copy
  1. ;;reading of images. This information is used by VistaRad software to prepare
  1. ;;the various types of exam lists that are displayed on the VistaRad workstation,
  1. ;;and to properly manage exam locking for the radiologists.
  1. ;;
  1. ;;If this Examination Status is to be used for exams that will be
  1. ;;read with VistaRad, then enter a value that corresponds to it
  1. ;;from the following list. Note that not all status codes should
  1. ;;be assigned a VistaRad Category value, but only those that apply.
  1. ;;
  1. ;;All other Exam Status codes that may be defined in the Radiology
  1. ;;Exam Status file should NOT be entered into this field.
  1. Q