IBTRKRBA ;WAS/RFJ - claims tracking - random selection bulletin ; 1 Mar 96
;;Version 2.0 ; INTEGRATED BILLING ;**56**; 21-MAR-94
Q
;
;
ADMTBULL(DFN,IBTRN,DGPMA,IBSPEC) ; -- send admission bulletin for rs
; dfn = patient ien file 2
; ibtrn = claims tracking ien file 356
; dgpma = 0th node from movement file 405
; ibspec = specialty ien file 45.7
N %,IBT,SERVICE,SPECALTY,VA,VAERR,Y
;
S IBT(1)="The following Patient has been selected as a UR Random Sample case on "
S IBT(2)=$$DAT2^IBOUTL($$NOW^XLFDT())_"."
S IBT(3)=""
;
D PID^VADPT
S IBT(4)=" Patient: "_$P(^DPT(DFN,0),"^")_" ("_VA("PID")_")"
;
S Y=$P(DGPMA,"^") D DD^%DT
S IBT(5)=" Admission Date: "_Y_" ("_$P(DGPMA,"^",14)_")"
S IBT(6)=" CT Entry ID: "_$P($G(^IBT(356,+IBTRN,0)),"^")
S IBT(7)=""
;
S SPECALTY=$P($G(^DIC(45.7,+IBSPEC,0)),"^",2)
S IBT(8)=" Specialty: "_$P($G(^DIC(45.7,+IBSPEC,0)),"^")
;
S SERVICE=$P($G(^DIC(42.4,+$P($G(^DIC(45.7,+IBSPEC,0)),"^",2),0)),"^",3)
S IBT(9)=" Service: "_$$EXPAND^IBTRE(42.4,3,SERVICE)
;
S IBT(10)=" Ward Location: "_$S($D(^DIC(42,+$P(DGPMA,"^",6),0)):$P(^(0),"^",1),1:"UNKNOWN")
S IBT(11)=" Room-Bed: "_$S($D(^DG(405.4,+$P(DGPMA,"^",7),0)):$P(^(0),"^",1),1:"UNKNOWN")
;
S IBT(12)=" Admitting DX: "_$P(DGPMA,"^",10)
S IBT(13)=" Type of Admit: "_$S($D(^DG(405.1,+$P(DGPMA,"^",4),0)):$P(^(0),"^",1),1:"")
S IBT(14)=" Insured: "_$S($$INSURED^IBCNS1(DFN):"YES",1:"NO")
D SEND("UR Random Sample Patient Selection")
Q
;
;
SEND(XMSUB) ; send bulletin with subject XMSUB
N %X,XCNP,XMDUZ,XMTEXT,XMY,XMZ
S XMDUZ="INTEGRATED BILLING PACKAGE",XMTEXT="IBT("
; if no members in mail group, do not send the message
I '$O(^XMB(3.8,+$O(^XMB(3.8,"B","DGPM UR ADMISSION",0)),1,0)) Q
S XMY("G.DGPM UR ADMISSION")=""
D ^XMD
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIBTRKRBA 1855 printed Nov 22, 2024@17:38:46 Page 2
IBTRKRBA ;WAS/RFJ - claims tracking - random selection bulletin ; 1 Mar 96
+1 ;;Version 2.0 ; INTEGRATED BILLING ;**56**; 21-MAR-94
+2 QUIT
+3 ;
+4 ;
ADMTBULL(DFN,IBTRN,DGPMA,IBSPEC) ; -- send admission bulletin for rs
+1 ; dfn = patient ien file 2
+2 ; ibtrn = claims tracking ien file 356
+3 ; dgpma = 0th node from movement file 405
+4 ; ibspec = specialty ien file 45.7
+5 NEW %,IBT,SERVICE,SPECALTY,VA,VAERR,Y
+6 ;
+7 SET IBT(1)="The following Patient has been selected as a UR Random Sample case on "
+8 SET IBT(2)=$$DAT2^IBOUTL($$NOW^XLFDT())_"."
+9 SET IBT(3)=""
+10 ;
+11 DO PID^VADPT
+12 SET IBT(4)=" Patient: "_$PIECE(^DPT(DFN,0),"^")_" ("_VA("PID")_")"
+13 ;
+14 SET Y=$PIECE(DGPMA,"^")
DO DD^%DT
+15 SET IBT(5)=" Admission Date: "_Y_" ("_$PIECE(DGPMA,"^",14)_")"
+16 SET IBT(6)=" CT Entry ID: "_$PIECE($GET(^IBT(356,+IBTRN,0)),"^")
+17 SET IBT(7)=""
+18 ;
+19 SET SPECALTY=$PIECE($GET(^DIC(45.7,+IBSPEC,0)),"^",2)
+20 SET IBT(8)=" Specialty: "_$PIECE($GET(^DIC(45.7,+IBSPEC,0)),"^")
+21 ;
+22 SET SERVICE=$PIECE($GET(^DIC(42.4,+$PIECE($GET(^DIC(45.7,+IBSPEC,0)),"^",2),0)),"^",3)
+23 SET IBT(9)=" Service: "_$$EXPAND^IBTRE(42.4,3,SERVICE)
+24 ;
+25 SET IBT(10)=" Ward Location: "_$SELECT($DATA(^DIC(42,+$PIECE(DGPMA,"^",6),0)):$PIECE(^(0),"^",1),1:"UNKNOWN")
+26 SET IBT(11)=" Room-Bed: "_$SELECT($DATA(^DG(405.4,+$PIECE(DGPMA,"^",7),0)):$PIECE(^(0),"^",1),1:"UNKNOWN")
+27 ;
+28 SET IBT(12)=" Admitting DX: "_$PIECE(DGPMA,"^",10)
+29 SET IBT(13)=" Type of Admit: "_$SELECT($DATA(^DG(405.1,+$PIECE(DGPMA,"^",4),0)):$PIECE(^(0),"^",1),1:"")
+30 SET IBT(14)=" Insured: "_$SELECT($$INSURED^IBCNS1(DFN):"YES",1:"NO")
+31 DO SEND("UR Random Sample Patient Selection")
+32 QUIT
+33 ;
+34 ;
SEND(XMSUB) ; send bulletin with subject XMSUB
+1 NEW %X,XCNP,XMDUZ,XMTEXT,XMY,XMZ
+2 SET XMDUZ="INTEGRATED BILLING PACKAGE"
SET XMTEXT="IBT("
+3 ; if no members in mail group, do not send the message
+4 IF '$ORDER(^XMB(3.8,+$ORDER(^XMB(3.8,"B","DGPM UR ADMISSION",0)),1,0))
QUIT
+5 SET XMY("G.DGPM UR ADMISSION")=""
+6 DO ^XMD
+7 QUIT