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

RABWRTE.m

Go to the documentation of this file.
  1. RABWRTE ;HISC/SM - Billing Aware Report Entry ;11/19/04 12:35
  1. ;;5.0;Radiology/Nuclear Medicine;**41**;Mar 16,1998
  1. Q
  1. ELOC ;Enter Inter. Img. Location
  1. ; called from IN1^RARTE4 & NOEDIT^RARTRPV1
  1. N RACLC0,RADT0,RAERR,RAXITYPI,RAXITYPE,RAIIL
  1. ; RACLC0 = current switchedTo/signedOn loc's 0 node
  1. ; RADT0 = exam's DT 0 node
  1. ; RAXITYP = exam's Imaging Type in text
  1. ; RAIIL = value of current report's Int. Img Loc ien
  1. S RAERR=0
  1. S RACLC0=$G(^RA(79.1,+$G(RAMLC),0)) Q:RACLC0=""
  1. S RAIIL=$G(^RARPT(RARPT,"BA"))
  1. S RADT0=$G(^RADPT(RADFN,"DT",RADTI,0))
  1. S RAXITYPI=$P(RADT0,U,2) ; Exam's Img Type, Internal
  1. S RAXITYPE=$P(^RA(79.2,+RAXITYPI,0),U) ; Exam's Img Type, External
  1. ;
  1. ; skip checks if there's Int. Img Loc data and its Credit Method is ok
  1. I RAIIL,$P($G(^RA(79.1,+RAIIL,0)),U,21)'=3 G INPUT
  1. ;
  1. I $P(RACLC0,U,21)=3 D
  1. . 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),";"),"'."
  1. . W !,?5,"This Credit Method does not allow for Interpretation work.",!
  1. . S RAERR=1
  1. I $P(RACLC0,U,6)'=$P(RADT0,U,2) D
  1. . 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),"'."
  1. . W !?5,"But the exam has an Imaging Type of '"_RAXITYPE,"'."
  1. . S RAERR=2
  1. I RAERR D
  1. . W !!?5,"You may optionally switch your current location to a location that",!?5,"allows either Regular or Interpretation credit. Then that location"
  1. . W !?5,"will be used as the default value to this field.",!
  1. INPUT S DA=RARPT
  1. S DIE="^RARPT("
  1. S DR=86 S:'RAERR DR=DR_"//"_$P(RACCESS(DUZ,"LOC",+RAMLC),U,2)
  1. W ! D ^DIE W !
  1. Q
  1. SIIL() ; Screen Interpreting Imaging Location
  1. ; called by DD(74,86's DIC("S")
  1. ; check file 79.1 img loc's credit method
  1. I $P(^RA(79.1,+Y,0),U,21)=3 Q 0 ;Img Loc's Credit Meth is Tech Only
  1. I '$D(RADFN) Q 1 ; can't continue, thus default to ok
  1. I '$D(RADTI) Q 1 ; can't continue, thus default to ok
  1. ; check file 79.1 img loc against case's imaging location
  1. I $P(^RA(79.1,+Y,0),U,6)'=$P(^RADPT(RADFN,"DT",RADTI,0),U,2) Q 0
  1. ; check file 79.1 img loc's INACTIVE dt against case's exam date
  1. I $P(^RA(79.1,+Y,0),U,19),$G(RADTE)]$P(^RA(79.1,+Y,0),U,19) Q 0
  1. Q 1