1 | IBTRKRBD ;WAS/RFJ - claims tracking - deleted admission bulletin ; 1 Mar 96
|
---|
2 | ;;Version 2.0 ; INTEGRATED BILLING ;**56**; 21-MAR-94
|
---|
3 | ;
|
---|
4 | DELBULL(DFN,IBTRN,DGPMA,IBSPEC) ; -- send deleted admission bulletin
|
---|
5 | ; dfn = patient ien file 2
|
---|
6 | ; ibtrn = claims tracking ien file 356
|
---|
7 | ; dgpma = 0th node from movement file 405
|
---|
8 | ; ibspec = specialty ien file 45.7
|
---|
9 | N %,DA,FILE,HDRFLAG,IBT,IBTDATE,LINE,SERVICE,SPECALTY,VA,VAERR,Y
|
---|
10 | S IBT(1)="The following claims tracking patient's admission has been deleted from the"
|
---|
11 | S IBT(2)="movement file (405). The patient's entry in the claims tracking file (356)"
|
---|
12 | S IBT(3)="has been set to inactive. If the same patient is admitted to the hospital"
|
---|
13 | S IBT(4)="with an admission date 5 days before or after the original admission date"
|
---|
14 | S IBT(5)="the patient's entry in the claims tracking file (356) will be reactivated."
|
---|
15 | S IBT(6)=""
|
---|
16 | ;
|
---|
17 | D PID^VADPT
|
---|
18 | S IBT(7)=" Patient: "_$P(^DPT(DFN,0),"^")_" ("_VA("PID")_")"
|
---|
19 | S IBT(8)=" Claims Tracking Entry: "_IBTRN
|
---|
20 | S IBT(9)=" Claims Tracking ID: "_$P($G(^IBT(356,+IBTRN,0)),"^")
|
---|
21 | ;
|
---|
22 | S Y=$P(DGPMA,"^") D DD^%DT
|
---|
23 | S IBT(10)="Original Admission Date: "_Y_" ("_$P(DGPMA,"^",14)_")"
|
---|
24 | S IBT(11)=""
|
---|
25 | ;
|
---|
26 | S IBT(12)=" =============== ADMISSION DATA ==============="
|
---|
27 | S SPECALTY=$P($G(^DIC(45.7,+IBSPEC,0)),"^",2)
|
---|
28 | S IBT(13)=" Specialty: "_$P($G(^DIC(45.7,+IBSPEC,0)),"^")
|
---|
29 | ;
|
---|
30 | S SERVICE=$P($G(^DIC(42.4,+$P($G(^DIC(45.7,+IBSPEC,0)),"^",2),0)),"^",3)
|
---|
31 | S IBT(14)=" Service: "_$$EXPAND^IBTRE(42.4,3,SERVICE)
|
---|
32 | S IBT(15)=" Ward Location: "_$S($D(^DIC(42,+$P(DGPMA,"^",6),0)):$P(^(0),"^",1),1:"UNKNOWN")
|
---|
33 | S IBT(16)=" Room-Bed: "_$S($D(^DG(405.4,+$P(DGPMA,"^",7),0)):$P(^(0),"^",1),1:"UNKNOWN")
|
---|
34 | S IBT(17)=" Admitting DX: "_$P(DGPMA,"^",10)
|
---|
35 | S IBT(18)=" Type of Admit: "_$S($D(^DG(405.1,+$P(DGPMA,"^",4),0)):$P(^(0),"^",1),1:"")
|
---|
36 | S IBT(19)=" Insured: "_$S($$INSURED^IBCNS1(DFN):"YES",1:"NO")
|
---|
37 | ;
|
---|
38 | S LINE=19
|
---|
39 | ;
|
---|
40 | F FILE=356.1,356.2 S (DA,HDRFLAG)=0 F S DA=$O(^IBT(FILE,"C",+IBTRN,DA)) Q:'DA D BUILD
|
---|
41 | ;
|
---|
42 | F FILE=356.9,356.91,356.94 S (DA,HDRFLAG)=0 F S DA=$O(^IBT(FILE,"C",+$P(DGPMA,"^",14),DA)) Q:'DA D BUILD
|
---|
43 | ;
|
---|
44 | S FILE=356.93,(IBTDATE,HDRFLAG)=0 F S IBTDATE=$O(^IBT(FILE,"AMVD",+$P(DGPMA,"^",14),IBTDATE)) Q:'IBTDATE S DA=0 F S DA=$O(^IBT(FILE,"AMVD",+$P(DGPMA,"^",14),IBTDATE,DA)) Q:'DA D BUILD
|
---|
45 | ;
|
---|
46 | ; send the bulletin
|
---|
47 | D SEND^IBTRKRBA("UR Claims Tracking Admission Deleted")
|
---|
48 | Q
|
---|
49 | ;
|
---|
50 | ;
|
---|
51 | BUILD ; build data for file and entry
|
---|
52 | N FIELD,HDRDATA,IBDATA
|
---|
53 | D INQUIRE^IBTRKRU(FILE,DA)
|
---|
54 | I '$D(IBDATA) Q
|
---|
55 | ;
|
---|
56 | ; store file name in msg (once for each file)
|
---|
57 | I 'HDRFLAG S HDRFLAG=1 D FILE^DID(FILE,"","NAME","HDRDATA"),SET(" "),SET(" =============== "_$G(HDRDATA("NAME"))_" DATA (FILE "_FILE_") ===============")
|
---|
58 | ;
|
---|
59 | D SET($J("ENTRY NUMBER",35)_": "_DA)
|
---|
60 | ;
|
---|
61 | ; do not show adm. movement field (pts to deleted 405 entry)
|
---|
62 | S FIELD="" F S FIELD=$O(IBDATA(FILE,DA_",",FIELD)) Q:FIELD="" I FIELD'="ADMISSION MOVEMENT",IBDATA(FILE,DA_",",FIELD)'="" D SET($J(FIELD,35)_": "_IBDATA(FILE,DA_",",FIELD))
|
---|
63 | D SET(" ")
|
---|
64 | Q
|
---|
65 | ;
|
---|
66 | ;
|
---|
67 | SET(MSG) ; set message text
|
---|
68 | S LINE=LINE+1,IBT(LINE)=MSG
|
---|
69 | Q
|
---|