| 1 | RABWRTE ;HISC/SM - Billing Aware Report Entry ;11/19/04  12:35
 | 
|---|
| 2 |  ;;5.0;Radiology/Nuclear Medicine;**41**;Mar 16,1998
 | 
|---|
| 3 |  Q
 | 
|---|
| 4 | ELOC ;Enter Inter. Img. Location
 | 
|---|
| 5 |  ; called from IN1^RARTE4 & NOEDIT^RARTRPV1
 | 
|---|
| 6 |  N RACLC0,RADT0,RAERR,RAXITYPI,RAXITYPE,RAIIL
 | 
|---|
| 7 |  ; RACLC0 = current switchedTo/signedOn loc's 0 node
 | 
|---|
| 8 |  ; RADT0 = exam's DT 0 node
 | 
|---|
| 9 |  ; RAXITYP = exam's Imaging Type in text
 | 
|---|
| 10 |  ; RAIIL = value of current report's Int. Img Loc ien
 | 
|---|
| 11 |  S RAERR=0
 | 
|---|
| 12 |  S RACLC0=$G(^RA(79.1,+$G(RAMLC),0)) Q:RACLC0=""
 | 
|---|
| 13 |  S RAIIL=$G(^RARPT(RARPT,"BA"))
 | 
|---|
| 14 |  S RADT0=$G(^RADPT(RADFN,"DT",RADTI,0))
 | 
|---|
| 15 |  S RAXITYPI=$P(RADT0,U,2) ; Exam's Img Type, Internal
 | 
|---|
| 16 |  S RAXITYPE=$P(^RA(79.2,+RAXITYPI,0),U) ; Exam's Img Type, External
 | 
|---|
| 17 |  ;
 | 
|---|
| 18 |  ; skip checks if there's Int. Img Loc data and its Credit Method is ok
 | 
|---|
| 19 |  I RAIIL,$P($G(^RA(79.1,+RAIIL,0)),U,21)'=3 G INPUT
 | 
|---|
| 20 |  ;
 | 
|---|
| 21 |  I $P(RACLC0,U,21)=3 D
 | 
|---|
| 22 |  . W !!?5,$C(7),"Your signed-on or switched-to location is ",$P($G(RACCESS(DUZ,"LOC",+$G(RAMLC))),U,2),",",!?5,"which has a Credit Method of '",$P($P($P(^DD(79.1,21,0),U,3),"3:",2),";"),"'."
 | 
|---|
| 23 |  . W !,?5,"This Credit Method does not allow for Interpretation work.",!
 | 
|---|
| 24 |  . S RAERR=1
 | 
|---|
| 25 |  I $P(RACLC0,U,6)'=$P(RADT0,U,2) D
 | 
|---|
| 26 |  . W !!?5,$C(7),"Your signed-on or switched-to location is ",$P($G(RACCESS(DUZ,"LOC",+$G(RAMLC))),U,2),",",!?5,"which has an Imaging Type of '",$P(^RA(79.2,+$P(RACLC0,U,6),0),U),"'."
 | 
|---|
| 27 |  . W !?5,"But the exam has an Imaging Type of '"_RAXITYPE,"'."
 | 
|---|
| 28 |  . S RAERR=2
 | 
|---|
| 29 |  I RAERR D
 | 
|---|
| 30 |  . W !!?5,"You may optionally switch your current location to a location that",!?5,"allows either Regular or Interpretation credit.  Then that location"
 | 
|---|
| 31 |  . W !?5,"will be used as the default value to this field.",!
 | 
|---|
| 32 | INPUT S DA=RARPT
 | 
|---|
| 33 |  S DIE="^RARPT("
 | 
|---|
| 34 |  S DR=86 S:'RAERR DR=DR_"//"_$P(RACCESS(DUZ,"LOC",+RAMLC),U,2)
 | 
|---|
| 35 |  W ! D ^DIE W !
 | 
|---|
| 36 |  Q
 | 
|---|
| 37 | SIIL() ; Screen Interpreting Imaging Location
 | 
|---|
| 38 |  ; called by DD(74,86's DIC("S")
 | 
|---|
| 39 |  ; check file 79.1 img loc's credit method 
 | 
|---|
| 40 |  I $P(^RA(79.1,+Y,0),U,21)=3 Q 0 ;Img Loc's Credit Meth is Tech Only
 | 
|---|
| 41 |  I '$D(RADFN) Q 1 ; can't continue, thus default to ok
 | 
|---|
| 42 |  I '$D(RADTI) Q 1 ; can't continue, thus default to ok
 | 
|---|
| 43 |  ; check file 79.1 img loc against case's imaging location
 | 
|---|
| 44 |  I $P(^RA(79.1,+Y,0),U,6)'=$P(^RADPT(RADFN,"DT",RADTI,0),U,2) Q 0
 | 
|---|
| 45 |  ; check file 79.1 img loc's INACTIVE dt against case's exam date
 | 
|---|
| 46 |  I $P(^RA(79.1,+Y,0),U,19),$G(RADTE)]$P(^RA(79.1,+Y,0),U,19) Q 0
 | 
|---|
| 47 |  Q 1
 | 
|---|