source: FOIAVistA/trunk/r/HOSPITAL_BASED_HOME_CARE-HBH/HBHCRP14.m@ 1783

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

initial load of FOIAVistA 6/30/08 version

File size: 1.8 KB
Line 
1HBHCRP14 ; VAMC(IRMS)/MJT-HBHC report locates records in ^HBHC(631, ^HBHC(632 files with pseudo SSNs, populates ^HBHC(634.5 (pseudo SSN error(s)) file, report includes: patient name & SSN for pseudo SSN records ;9403
2 ;;1.0;HOSPITAL BASED HOME CARE;**2,5,6**;NOV 1, 1993
3 S %ZIS="Q",HBHCCC=0 K IOP,ZTIO,ZTSAVE D ^%ZIS G:POP EXIT
4 I $D(IO("Q")) S ZTRTN="DQ^HBHCRP14",ZTSAVE("HBHC*")="",ZTDESC="HBPC Pseudo SSN Report" D ^%ZTLOAD G EXIT
5DQ ; De-queue
6 U IO
7 L +^HBHC(634.5,0):0 I '$T W *7,!!,"Another user has the pseudo SSN file locked.",!! H 3 G EXIT
8 K ^HBHC(634.5) S ^HBHC(634.5,0)="HBHC PSEUDO SSN ERROR(S)^634.5P^"
9 ; Max length for HBHCHEAD = 50
10 S $P(HBHCY,"-",81)="",HBHCPAGE=0,HBHCHEAD="Pseudo SSN",HBHCHDR="W ""Patient Name"",?40,""SSN""",HBHCCOLM=(80-(30+$L(HBHCHEAD))\2) S:HBHCCOLM'>0 HBHCCOLM=1 D TODAY^HBHCUTL
11 D:IO'=IO(0)!($D(IO("S"))) HDRPAGE^HBHCUTL
12 I '$D(IO("S")),(IO=IO(0)) S HBHCCC=HBHCCC+1 W @IOF D HDRPAGE^HBHCUTL
13 F HBHCFILE=631,632 S HBHCDFN=0 F S HBHCDFN=$O(^HBHC(HBHCFILE,HBHCDFN)) Q:HBHCDFN'>0 S HBHCDPT=$P(^HBHC(HBHCFILE,HBHCDFN,0),U) D:$P(^DPT(HBHCDPT,0),U,9)'?9N FILE
14 D PRINT,ENDRPT^HBHCUTL1
15EXIT ; Exit module
16 L -^HBHC(634.5,0)
17 D ^%ZISC
18 K DD,DIC,DINUM,DO,HBHCCC,HBHCCOLM,HBHCDFN,HBHCDPT,HBHCDPT0,HBHCFILE,HBHCHDR,HBHCHEAD,HBHCPAGE,HBHCTDY,HBHCY,HBHCZ,X
19 Q
20FILE ; File entry
21 ; Quit if cancelled appointment
22 Q:((HBHCFILE=632)&($P(^HBHC(HBHCFILE,HBHCDFN,0),U,7)]""))
23 K DD,DO S DIC="^HBHC(634.5,",DIC(0)="MN",(X,DINUM)=HBHCDPT D FILE^DICN
24 Q
25PRINT ; Print report
26 I ($D(ZTRTN)!(HBHCCC=0))&((IOSL-$Y)<5) W @IOF D HDRPAGE^HBHCUTL
27 I (IOSL-$Y)<5 W @IOF D HDRPAGE^HBHCUTL
28 S HBHCDFN=0 F S HBHCDFN=$O(^HBHC(634.5,HBHCDFN)) Q:HBHCDFN'>0 S HBHCDPT0=^DPT(HBHCDFN,0) W !,$P(HBHCDPT0,U),?40,$E($P(HBHCDPT0,U,9),1,3)_"-"_$E($P(HBHCDPT0,U,9),4,5)_"-"_$E($P(HBHCDPT0,U,9),6,10)
29 Q
Note: See TracBrowser for help on using the repository browser.