source: WorldVistAEHR/trunk/r/HOSPITAL_BASED_HOME_CARE-HBH/HBHCR19B.m@ 1211

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

initial load of WorldVistAEHR

File size: 1.6 KB
Line 
1HBHCR19B ;LR VAMC(IRMS)/MJT- HBHC rpt, called by HBHCR19A, entry points: INITIAL, PRTLOOP, EXIT ; Aug 2000
2 ;;1.0;HOSPITAL BASED HOME CARE;**8,14,22**;NOV 01, 1993;Build 2
3INITIAL ; Initialize variables
4 K ^TMP("HBHC",$J)
5 S $P(HBHCSP2," ",3)="",(HBHCCNT,HBHCTOT)=0,$P(HBHCY,"-",81)="",HBHCHEAD="ICD9 Code/Diagnosis Text by Date Range",HBHCHDR="W !,""Patient Name"",?27,""Last Four"",?41,""ICD9 Code/Diagnosis Text"""
6 S HBHCCOLM=(80-(20+$L(HBHCHEAD))\2) S:HBHCCOLM'>0 HBHCCOLM=1
7 Q
8PRTLOOP ; Print loop
9 S HBHCCAT=""
10 F S HBHCCAT=$O(^TMP("HBHC",$J,HBHCCAT)) Q:HBHCCAT="" D SUBTOT S HBHCNAME="" F S HBHCNAME=$O(^TMP("HBHC",$J,HBHCCAT,HBHCNAME)) Q:HBHCNAME="" S HBHCLST4="" F S HBHCLST4=$O(^TMP("HBHC",$J,HBHCCAT,HBHCNAME,HBHCLST4)) Q:HBHCLST4="" D PRTLOOP2
11 D SUBTOT
12 Q
13SUBTOT ; Print subtotal from previous category
14 I HBHCCNT>0 W !!,"Category: "_HBHC_" Count: ",HBHCCNT,!,HBHCY S HBHCTOT=HBHCTOT+HBHCCNT
15 S HBHC=HBHCCAT,HBHCCNT=0
16 Q
17PRTLOOP2 ; Print loop 2, PRTLOOP continued
18 S HBHCDX="" F S HBHCDX=$O(^TMP("HBHC",$J,HBHCCAT,HBHCNAME,HBHCLST4,HBHCDX)) Q:HBHCDX="" D PRINT
19 Q
20PRINT ; Print report
21 I ($D(ZTRTN)!(HBHCCC=0))&((IOSL-$Y)<8) W @IOF D HDRRANGE^HBHCUTL
22 S HBHCTMP=^TMP("HBHC",$J,HBHCCAT,HBHCNAME,HBHCLST4,HBHCDX)
23 W !,HBHCNAME,?27,$E(HBHCLST4,8,11),?41,HBHCDX
24 S HBHCCNT=HBHCCNT+1
25 Q
26EXIT ; Exit module
27 D ^%ZISC
28 K HBHC,HBHCAPDT,HBHCBEG1,HBHCBEG2,HBHCCAT,HBHCCATB,HBHCCATE,HBHCCC,HBHCCNT,HBHCCOLM,HBHCDFN,HBHCDPT0,HBHCDX,HBHCEND1,HBHCEND2,HBHCFLAG,HBHCHDR,HBHCHEAD,HBHCI,HBHCICDP,HBHCLST4,HBHCNAME,HBHCNOD0,HBHCPAGE,HBHCSP2,HBHCTDY,HBHCTMP
29 K HBHCTOT,HBHCY,HBHCZ,X,X1,X2,Y,^TMP("HBHC",$J),^TMP($J)
30 Q
Note: See TracBrowser for help on using the repository browser.