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

RADD4.m

Go to the documentation of this file.
  1. RADD4 ;HISC/GJC-Radiology Utility Routine ; Jan 31, 2023@13:22:32
  1. ;;5.0;Radiology/Nuclear Medicine;**65,198**;Mar 16, 1998;Build 1
  1. ;
  1. ;supported IA #10104 reference to STRIP^XLFSTR and LOW^XLFSTR
  1. ;
  1. VALADM() ;edit validation
  1. ;Used to validate/screen radiopharm dosage administrator,
  1. ; radiopharm prescribing phys, person who measured radiopharm dose,
  1. ;----------------------------------------------------------------------
  1. ; RAD0 : IEN of entry in question for NUC MED EXAM DATA (70.2) file
  1. ; Y : Pointer to the New Person file
  1. ; RADT : Xam Date; if not passed, calculate exam date from file 70.2
  1. ; RAUTH : 1 - only staff/resid, must be auth'zd to write med orders
  1. ; : 0 - staff/resid & tech's
  1. ;----------------------------------------------------------------------
  1. ; Output: '1' authorized to write med orders, else '0'
  1. ;----------------------------------------------------------------------
  1. N RAPS S RAPS=$G(^VA(200,Y,"PS"))
  1. ; $P(RAPS,"^") - authorized to write med orders '1': Yes
  1. ; $P(RAPS,"^",4) - person CAN'T write med orders after this date(if any)
  1. S:$G(RADT)="" RADT=$P($G(^RADPTN(RAD0,0)),"^",2)
  1. I 'RAUTH,($D(^VA(200,"ARC","R",Y))!$D(^VA(200,"ARC","S",Y))!$D(^VA(200,"ARC","T",Y))) Q 1
  1. I RAUTH,($D(^VA(200,"ARC","R",Y))!$D(^VA(200,"ARC","S",Y))),(+$P(RAPS,"^")),($S('$P(RAPS,"^",4):1,$P(RAPS,"^",4)'<RADT:1,1:0)) Q 1
  1. Q 0
  1. ;
  1. VOL() ; Validate the format of the value input for volume.
  1. ; RAX must be a number followed by a space then text -or-
  1. ; a number followed by text
  1. ; Input Variable : 'RAX'- user's input
  1. ; Output Variable: null if 'RAX' erroneous, formatted version of 'RAX'
  1. Q:(RAX'?0.5N0.1"."0.2N1" "1.30A)&(RAX'?0.5N0.1"."0.2N1.30A) ""
  1. N RAX1,RAY S RAX1=+RAX,RAY=$P(RAX,RAX1,2) Q:RAX1'>0 ""
  1. S RAY=$S($F(RAY," ")>0:$E(RAY,$F(RAY," "),9999),1:RAY)
  1. S RAY=$S($F(RAY,".")>0:$E(RAY,$F(RAY,"."),9999),1:RAY)
  1. S RAY=$$STRIP^XLFSTR(RAY,"0")
  1. S RAY=$$LOW^XLFSTR($E(RAY,1))
  1. I RAY'="c",(RAY'="m") Q ""
  1. Q RAX1_" "_RAY
  1. ;
  1. DD7012(RAY) ;radiology technologist check
  1. ;passes only if tech is active ("RA" node)
  1. ;passes only if tech is classified "T" ("RAC" node)
  1. ;Input: RAY = IEN (when +'d) of technologist from NEW PERSON file.
  1. N RAINACTIV S RAINACTIV=$P($G(^VA(200,+RAY,"RA")),U,3)
  1. I RAINACTIV>0,(RAINACTIV'>DT) Q 0
  1. Q:($D(^VA(200,"ARC","T",+RAY))\10=0) 0
  1. Q 1
  1. ;