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

IBTRKRBA.m

Go to the documentation of this file.
  1. IBTRKRBA ;WAS/RFJ - claims tracking - random selection bulletin ; 1 Mar 96
  1. ;;Version 2.0 ; INTEGRATED BILLING ;**56**; 21-MAR-94
  1. Q
  1. ;
  1. ;
  1. ADMTBULL(DFN,IBTRN,DGPMA,IBSPEC) ; -- send admission bulletin for rs
  1. ; dfn = patient ien file 2
  1. ; ibtrn = claims tracking ien file 356
  1. ; dgpma = 0th node from movement file 405
  1. ; ibspec = specialty ien file 45.7
  1. N %,IBT,SERVICE,SPECALTY,VA,VAERR,Y
  1. ;
  1. S IBT(1)="The following Patient has been selected as a UR Random Sample case on "
  1. S IBT(2)=$$DAT2^IBOUTL($$NOW^XLFDT())_"."
  1. S IBT(3)=""
  1. ;
  1. D PID^VADPT
  1. S IBT(4)=" Patient: "_$P(^DPT(DFN,0),"^")_" ("_VA("PID")_")"
  1. ;
  1. S Y=$P(DGPMA,"^") D DD^%DT
  1. S IBT(5)=" Admission Date: "_Y_" ("_$P(DGPMA,"^",14)_")"
  1. S IBT(6)=" CT Entry ID: "_$P($G(^IBT(356,+IBTRN,0)),"^")
  1. S IBT(7)=""
  1. ;
  1. S SPECALTY=$P($G(^DIC(45.7,+IBSPEC,0)),"^",2)
  1. S IBT(8)=" Specialty: "_$P($G(^DIC(45.7,+IBSPEC,0)),"^")
  1. ;
  1. S SERVICE=$P($G(^DIC(42.4,+$P($G(^DIC(45.7,+IBSPEC,0)),"^",2),0)),"^",3)
  1. S IBT(9)=" Service: "_$$EXPAND^IBTRE(42.4,3,SERVICE)
  1. ;
  1. S IBT(10)=" Ward Location: "_$S($D(^DIC(42,+$P(DGPMA,"^",6),0)):$P(^(0),"^",1),1:"UNKNOWN")
  1. S IBT(11)=" Room-Bed: "_$S($D(^DG(405.4,+$P(DGPMA,"^",7),0)):$P(^(0),"^",1),1:"UNKNOWN")
  1. ;
  1. S IBT(12)=" Admitting DX: "_$P(DGPMA,"^",10)
  1. S IBT(13)=" Type of Admit: "_$S($D(^DG(405.1,+$P(DGPMA,"^",4),0)):$P(^(0),"^",1),1:"")
  1. S IBT(14)=" Insured: "_$S($$INSURED^IBCNS1(DFN):"YES",1:"NO")
  1. D SEND("UR Random Sample Patient Selection")
  1. Q
  1. ;
  1. ;
  1. SEND(XMSUB) ; send bulletin with subject XMSUB
  1. N %X,XCNP,XMDUZ,XMTEXT,XMY,XMZ
  1. S XMDUZ="INTEGRATED BILLING PACKAGE",XMTEXT="IBT("
  1. ; if no members in mail group, do not send the message
  1. I '$O(^XMB(3.8,+$O(^XMB(3.8,"B","DGPM UR ADMISSION",0)),1,0)) Q
  1. S XMY("G.DGPM UR ADMISSION")=""
  1. D ^XMD
  1. Q