source: WorldVistAEHR/trunk/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBTRKRBA.m@ 1464

Last change on this file since 1464 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 1.8 KB
Line 
1IBTRKRBA ;WAS/RFJ - claims tracking - random selection bulletin ; 1 Mar 96
2 ;;Version 2.0 ; INTEGRATED BILLING ;**56**; 21-MAR-94
3 Q
4 ;
5 ;
6ADMTBULL(DFN,IBTRN,DGPMA,IBSPEC) ; -- send admission bulletin for rs
7 ; dfn = patient ien file 2
8 ; ibtrn = claims tracking ien file 356
9 ; dgpma = 0th node from movement file 405
10 ; ibspec = specialty ien file 45.7
11 N %,IBT,SERVICE,SPECALTY,VA,VAERR,Y
12 ;
13 S IBT(1)="The following Patient has been selected as a UR Random Sample case on "
14 S IBT(2)=$$DAT2^IBOUTL($$NOW^XLFDT())_"."
15 S IBT(3)=""
16 ;
17 D PID^VADPT
18 S IBT(4)=" Patient: "_$P(^DPT(DFN,0),"^")_" ("_VA("PID")_")"
19 ;
20 S Y=$P(DGPMA,"^") D DD^%DT
21 S IBT(5)=" Admission Date: "_Y_" ("_$P(DGPMA,"^",14)_")"
22 S IBT(6)=" CT Entry ID: "_$P($G(^IBT(356,+IBTRN,0)),"^")
23 S IBT(7)=""
24 ;
25 S SPECALTY=$P($G(^DIC(45.7,+IBSPEC,0)),"^",2)
26 S IBT(8)=" Specialty: "_$P($G(^DIC(45.7,+IBSPEC,0)),"^")
27 ;
28 S SERVICE=$P($G(^DIC(42.4,+$P($G(^DIC(45.7,+IBSPEC,0)),"^",2),0)),"^",3)
29 S IBT(9)=" Service: "_$$EXPAND^IBTRE(42.4,3,SERVICE)
30 ;
31 S IBT(10)=" Ward Location: "_$S($D(^DIC(42,+$P(DGPMA,"^",6),0)):$P(^(0),"^",1),1:"UNKNOWN")
32 S IBT(11)=" Room-Bed: "_$S($D(^DG(405.4,+$P(DGPMA,"^",7),0)):$P(^(0),"^",1),1:"UNKNOWN")
33 ;
34 S IBT(12)=" Admitting DX: "_$P(DGPMA,"^",10)
35 S IBT(13)=" Type of Admit: "_$S($D(^DG(405.1,+$P(DGPMA,"^",4),0)):$P(^(0),"^",1),1:"")
36 S IBT(14)=" Insured: "_$S($$INSURED^IBCNS1(DFN):"YES",1:"NO")
37 D SEND("UR Random Sample Patient Selection")
38 Q
39 ;
40 ;
41SEND(XMSUB) ; send bulletin with subject XMSUB
42 N %X,XCNP,XMDUZ,XMTEXT,XMY,XMZ
43 S XMDUZ="INTEGRATED BILLING PACKAGE",XMTEXT="IBT("
44 ; if no members in mail group, do not send the message
45 I '$O(^XMB(3.8,+$O(^XMB(3.8,"B","DGPM UR ADMISSION",0)),1,0)) Q
46 S XMY("G.DGPM UR ADMISSION")=""
47 D ^XMD
48 Q
Note: See TracBrowser for help on using the repository browser.