[613] | 1 | RADD4 ;HISC/GJC-Radiology Utility Routine ;11/25/97 12:40
|
---|
| 2 | ;;5.0;Radiology/Nuclear Medicine;**65**;Mar 16, 1998;Build 8
|
---|
| 3 | ;
|
---|
| 4 | ;supported IA #10104 reference to STRIP^XLFSTR and LOW^XLFSTR
|
---|
| 5 | ;
|
---|
| 6 | VALADM() ;edit validation
|
---|
| 7 | ;Used to validate/screen radiopharm dosage administrator,
|
---|
| 8 | ; radiopharm prescribing phys, person who measured radiopharm dose,
|
---|
| 9 | ;----------------------------------------------------------------------
|
---|
| 10 | ; RAD0 : IEN of entry in question for NUC MED EXAM DATA (70.2) file
|
---|
| 11 | ; Y : Pointer to the New Person file
|
---|
| 12 | ; RADT : Xam Date; if not passed, calculate exam date from file 70.2
|
---|
| 13 | ; RAUTH : 1 - only staff/resid, must be auth'zd to write med orders
|
---|
| 14 | ; : 0 - staff/resid & tech's
|
---|
| 15 | ;----------------------------------------------------------------------
|
---|
| 16 | ; Output: '1' authorized to write med orders, else '0'
|
---|
| 17 | ;----------------------------------------------------------------------
|
---|
| 18 | N RAPS S RAPS=$G(^VA(200,Y,"PS"))
|
---|
| 19 | ; $P(RAPS,"^") - authorized to write med orders '1': Yes
|
---|
| 20 | ; $P(RAPS,"^",4) - person CAN'T write med orders after this date(if any)
|
---|
| 21 | S:$G(RADT)="" RADT=$P($G(^RADPTN(RAD0,0)),"^",2)
|
---|
| 22 | I 'RAUTH,($D(^VA(200,"ARC","R",Y))!$D(^VA(200,"ARC","S",Y))!$D(^VA(200,"ARC","T",Y))) Q 1
|
---|
| 23 | 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
|
---|
| 24 | Q 0
|
---|
| 25 | ;
|
---|
| 26 | VOL() ; Validate the format of the value input for volume.
|
---|
| 27 | ; RAX must be a number followed by a space then text -or-
|
---|
| 28 | ; a number followed by text
|
---|
| 29 | ; Input Variable : 'RAX'- user's input
|
---|
| 30 | ; Output Variable: null if 'RAX' erroneous, formatted version of 'RAX'
|
---|
| 31 | Q:(RAX'?0.5N0.1"."0.2N1" "1.30A)&(RAX'?0.5N0.1"."0.2N1.30A) ""
|
---|
| 32 | N RAX1,RAY S RAX1=+RAX,RAY=$P(RAX,RAX1,2) Q:RAX1'>0 ""
|
---|
| 33 | S RAY=$S($F(RAY," ")>0:$E(RAY,$F(RAY," "),9999),1:RAY)
|
---|
| 34 | S RAY=$S($F(RAY,".")>0:$E(RAY,$F(RAY,"."),9999),1:RAY)
|
---|
| 35 | S RAY=$$STRIP^XLFSTR(RAY,"0")
|
---|
| 36 | S RAY=$$LOW^XLFSTR($E(RAY,1))
|
---|
| 37 | I RAY'="c",(RAY'="m") Q ""
|
---|
| 38 | Q RAX1_" "_RAY
|
---|