IBTRKR0 ;ALB/AAS - CLAIMS TRACKING - RANDOM SELECTION BULLETIN ; 13-AUG-93
;;Version 2.0 ; INTEGRATED BILLING ;**23**; 21-MAR-94
;
BULL ; -- send bulletin
;
S XMSUB="UR Random Sample Patient Selection"
S IBT(1)="The following Patient has been selected as a UR Random Sample case on "
S IBT(1.1)=$$DAT2^IBOUTL($$NOW^XLFDT())_"."
S IBT(1.2)=""
S IBT(2)=" Patient: "_$P(^DPT(DFN,0),"^")
D PID^VADPT
S IBT(3)=" Pt. ID: "_VA("PID")
S IBT(4)=" Admission Date: "_$P(VAIN(7),"^",2)_" ("_VAIN(1)_")"
S IBT(4.1)=" CT Entry ID: "_$P($G(^IBT(356,+IBTRN,0)),"^")
;
S IBT(4.5)=""
S IBT(5)=" Specialty: "_$P(VAIN(3),"^",2)
S SVC=$P($G(^DIC(42.4,+$P($G(^DIC(45.7,+VAIN(3),0)),"^",2),0)),"^",3)
S IBT(6)=" Service: "_$$EXPAND^IBTRE(42.4,3,SVC)
;
S IBT(7)=""
S IBT(9)=" Ward Location: "_$S($D(^DIC(42,+$P(DGPMA,"^",6),0)):$P(^(0),"^",1),1:"UNKNOWN")
S IBT(10)=" Room-Bed: "_$S($D(^DG(405.4,+$P(DGPMA,"^",7),0)):$P(^(0),"^",1),1:"UNKNOWN")
;
S IBT(11)=" Admitting DX: "_$P(DGPMA,"^",10)
S IBT(12)=" Type of Admit: "_$S($D(^DG(405.1,+$P(DGPMA,"^",4),0)):$P(^(0),"^",1),1:"")
S IBT(13)=""
S IBT(14)=" Insured: "_$S($$INSURED^IBCNS1(DFN):"YES",1:"NO")
D SEND
BULLQ Q
;
SEND S XMDUZ="INTEGRATED BILLING PACKAGE",XMTEXT="IBT("
K XMY S XMN=0
S DGPMX=$O(^XMB(3.8,"B","DGPM UR ADMISSION",0)) I '$O(^XMB(3.8,+DGPMX,1,0)) G SENDQ ; if no mailgroup members, quit
S XMY("G.DGPM UR ADMISSION")="" ; pass mailgroup
D ^XMD
SENDQ K X,Y,IBI,IBT,IBGRP,XMDUZ,XMTEXT,XMY,XMSUB,DGPMX
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIBTRKR0 1566 printed Nov 22, 2024@17:38:38 Page 2
IBTRKR0 ;ALB/AAS - CLAIMS TRACKING - RANDOM SELECTION BULLETIN ; 13-AUG-93
+1 ;;Version 2.0 ; INTEGRATED BILLING ;**23**; 21-MAR-94
+2 ;
BULL ; -- send bulletin
+1 ;
+2 SET XMSUB="UR Random Sample Patient Selection"
+3 SET IBT(1)="The following Patient has been selected as a UR Random Sample case on "
+4 SET IBT(1.1)=$$DAT2^IBOUTL($$NOW^XLFDT())_"."
+5 SET IBT(1.2)=""
+6 SET IBT(2)=" Patient: "_$PIECE(^DPT(DFN,0),"^")
+7 DO PID^VADPT
+8 SET IBT(3)=" Pt. ID: "_VA("PID")
+9 SET IBT(4)=" Admission Date: "_$PIECE(VAIN(7),"^",2)_" ("_VAIN(1)_")"
+10 SET IBT(4.1)=" CT Entry ID: "_$PIECE($GET(^IBT(356,+IBTRN,0)),"^")
+11 ;
+12 SET IBT(4.5)=""
+13 SET IBT(5)=" Specialty: "_$PIECE(VAIN(3),"^",2)
+14 SET SVC=$PIECE($GET(^DIC(42.4,+$PIECE($GET(^DIC(45.7,+VAIN(3),0)),"^",2),0)),"^",3)
+15 SET IBT(6)=" Service: "_$$EXPAND^IBTRE(42.4,3,SVC)
+16 ;
+17 SET IBT(7)=""
+18 SET IBT(9)=" Ward Location: "_$SELECT($DATA(^DIC(42,+$PIECE(DGPMA,"^",6),0)):$PIECE(^(0),"^",1),1:"UNKNOWN")
+19 SET IBT(10)=" Room-Bed: "_$SELECT($DATA(^DG(405.4,+$PIECE(DGPMA,"^",7),0)):$PIECE(^(0),"^",1),1:"UNKNOWN")
+20 ;
+21 SET IBT(11)=" Admitting DX: "_$PIECE(DGPMA,"^",10)
+22 SET IBT(12)=" Type of Admit: "_$SELECT($DATA(^DG(405.1,+$PIECE(DGPMA,"^",4),0)):$PIECE(^(0),"^",1),1:"")
+23 SET IBT(13)=""
+24 SET IBT(14)=" Insured: "_$SELECT($$INSURED^IBCNS1(DFN):"YES",1:"NO")
+25 DO SEND
BULLQ QUIT
+1 ;
SEND SET XMDUZ="INTEGRATED BILLING PACKAGE"
SET XMTEXT="IBT("
+1 KILL XMY
SET XMN=0
+2 ; if no mailgroup members, quit
SET DGPMX=$ORDER(^XMB(3.8,"B","DGPM UR ADMISSION",0))
IF '$ORDER(^XMB(3.8,+DGPMX,1,0))
GOTO SENDQ
+3 ; pass mailgroup
SET XMY("G.DGPM UR ADMISSION")=""
+4 DO ^XMD
SENDQ KILL X,Y,IBI,IBT,IBGRP,XMDUZ,XMTEXT,XMY,XMSUB,DGPMX
+1 QUIT