1 | HBHCRP3 ; LR VAMC(IRMS)/MJT-HBHC report on file 632, individual patient visit data by date range, includes all fields, calls DX^HBHCUTL3, DX80^HBHCUTL3, CPT^HBHCUTL3 ; Jan 2000
|
---|
2 | ;;1.0;HOSPITAL BASED HOME CARE;**6,8,15,16,14,22**;NOV 01, 1993;Build 2
|
---|
3 | PROMPT ; Prompt user for patient name
|
---|
4 | K DIC S DIC="^DPT(",DIC(0)="AEMQ",HBHCCC=0 D ^DIC
|
---|
5 | G:Y=-1 EXIT
|
---|
6 | S HBHCDPT=+Y
|
---|
7 | I '$D(^HBHC(632,"B",HBHCDPT)) W *7,!!,"This patient has no visits on file.",!! H 3 G PROMPT
|
---|
8 | D START^HBHCUTL
|
---|
9 | G:(HBHCBEG1=-1)!(HBHCEND1=-1) EXIT
|
---|
10 | S %ZIS="Q",HBHCCC=0 K IOP,ZTIO,ZTSAVE D ^%ZIS G:POP EXIT
|
---|
11 | I $D(IO("Q")) S ZTRTN="DQ^HBHCRP3",ZTDESC="HBPC Patient Visit Data Report",ZTSAVE("HBHC*")="" D ^%ZTLOAD G EXIT
|
---|
12 | DQ ; De-queue
|
---|
13 | U IO
|
---|
14 | S $P(HBHCY,"-",81)="",$P(HBHCZ,"=",81)="",$P(HBHCSP2," ",3)="",HBHCMSG="(continued from previous page...)"
|
---|
15 | S HBHCDPT0=^DPT(HBHCDPT,0),HBHCINFO=$P(HBHCDPT0,U)_HBHCSP2_$E($P(HBHCDPT0,U,9),6,9)
|
---|
16 | S HBHCHEAD="Patient: "_HBHCINFO_" Visit Data",HBHCCOLM=(80-(30+$L(HBHCHEAD))\2) S:HBHCCOLM'>0 HBHCCOLM=1
|
---|
17 | D:IO'=IO(0)!($D(IO("S"))) HDRRANGE^HBHCUTL
|
---|
18 | I '$D(IO("S")),IO=IO(0) S HBHCCC=HBHCCC+1 D HDRRANGE^HBHCUTL
|
---|
19 | LOOP ; Loop thru ^HBHC(632) "B" cross-ref to build report
|
---|
20 | S HBHCDFN="" F S HBHCDFN=$O(^HBHC(632,"B",HBHCDPT,HBHCDFN)) Q:HBHCDFN="" S HBHCNOD0=^HBHC(632,HBHCDFN,0) D:$P(HBHCNOD0,U,7)="" PROCESS
|
---|
21 | D ENDRPT^HBHCUTL1
|
---|
22 | EXIT ; Exit module
|
---|
23 | D ^%ZISC
|
---|
24 | K DIC,HBHCBEG1,HBHCBEG2,HBHCCC,HBHCCOLM,HBHCCPT,HBHCCPTA,HBHCDFN,HBHCDPT,HBHCDPT0,HBHCEND1,HBHCEND2,HBHCHEAD,HBHCI,HBHCINFO,HBHCJ,HBHCMSG,HBHCNOD0,HBHCPAGE,HBHCPRV,HBHCSP2,HBHCTDY,HBHCY,HBHCZ,X,Y
|
---|
25 | Q
|
---|
26 | PROCESS ; Process record
|
---|
27 | Q:($E($P(HBHCNOD0,U,2),1,7)<HBHCBEG1)!($E($P(HBHCNOD0,U,2),1,7)>HBHCEND1)
|
---|
28 | I ($D(ZTRTN)!(HBHCCC=0))&((IOSL-$Y)<8) W @IOF D HDRRANGE^HBHCUTL
|
---|
29 | S HBHCPRV=$S($P(HBHCNOD0,U,4)]"":$E($P(^VA(200,$P(^HBHC(631.4,$P(HBHCNOD0,U,4),0),U,2),0),U),1,23),1:"")
|
---|
30 | D WRITE,DX^HBHCUTL3,DX80^HBHCUTL3,CPT^HBHCUTL3,CPT80
|
---|
31 | Q
|
---|
32 | WRITE ; Write record info
|
---|
33 | W !,"Visit Date: ",$S($P(HBHCNOD0,U,2)]"":$E($P(HBHCNOD0,U,2),4,5)_"-"_$E($P(HBHCNOD0,U,2),6,7)_"-"_(1700+$E($P(HBHCNOD0,U,2),1,3)),1:""),?27,"Prov No.: ",$P(^HBHC(631.4,$P(HBHCNOD0,U,4),0),U),?45,"Prov Name: ",HBHCPRV
|
---|
34 | Q
|
---|
35 | CPT80 ; Print CPT info in 80 column format
|
---|
36 | S HBHCI=0 F S HBHCI=$O(HBHCCPTA(HBHCI)) Q:HBHCI'>0 D:(IOSL-$Y)<8 HDRCONT W !,"CPT Code: ",?13,HBHCCPTA(HBHCI) S HBHCJ=0 F S HBHCJ=$O(HBHCCPTA(HBHCI,HBHCJ)) Q:HBHCJ'>0 W !," Modifier: - ",HBHCCPTA(HBHCI,HBHCJ)
|
---|
37 | W !,HBHCY
|
---|
38 | Q
|
---|
39 | HDRCONT ; Print header info when record continued to new page
|
---|
40 | W @IOF D HDRRANGE^HBHCUTL W !,HBHCMSG,!
|
---|
41 | Q
|
---|