source: FOIAVistA/trunk/r/HOSPITAL_BASED_HOME_CARE-HBH/HBHXMNT2.m@ 811

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

initial load of FOIAVistA 6/30/08 version

File size: 1.9 KB
Line 
1HBHXMNT2 ; VAMC(IRMS)/MJT-HBHC maintenance routine, locates & prints report of records in ^HBHC(631, ^HBHC(632 files with pseudo SSNs, includes: patient name & SSN for pseudo SSN records, calls ^HBHXMNT3 ;9403
2 ;;1.0;HOSPITAL BASED HOME CARE;**2**;NOV 01, 1993
3 S %ZIS="Q",HBHCCC=0 K IOP,ZTIO,ZTSAVE D ^%ZIS G:POP EXIT
4 I $D(IO("Q")) S ZTRTN="DQ^HBHXMNT2",ZTSAVE("HBHC*")="",ZTDESC="HBHC 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) I $P(^DPT(HBHCDPT,0),U,9)'?9N K DD,DO S DIC="^HBHC(634.5,",DIC(0)="MN",(X,DINUM)=HBHCDPT D FILE^DICN
14 I '$D(^HBHC(634.5,"B")) W *7,!!,"No patients found with pseudo SSNs. No resolution required!!" L -^HBHC(634.5,0) D ENDRPT^HBHCUTL1,^%ZISC G EXIT
15 D PRINT,ENDRPT^HBHCUTL1
16 K DD,DIC,DINUM,DO,HBHCCC,HBHCCOLM,HBHCDFN,HBHCDPT,HBHCDPT0,HBHCFILE,HBHCHDR,HBHCHEAD,HBHCPAGE,HBHCTDY,HBHCY,HBHCZ,X
17 D ^HBHXMNT3
18EXIT ; Exit module
19 L -^HBHC(634.5,0)
20 K DD,DIC,DINUM,DO,HBHCCC,HBHCCOLM,HBHCDFN,HBHCDPT,HBHCDPT0,HBHCFILE,HBHCHDR,HBHCHEAD,HBHCPAGE,HBHCTDY,HBHCY,HBHCZ,X
21 Q
22PRINT ; Print report
23 I ($D(ZTRTN)!(HBHCCC=0))&((IOSL-$Y)<5) W @IOF D HDRPAGE^HBHCUTL
24 I (IOSL-$Y)<5 W @IOF D HDRPAGE^HBHCUTL
25 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)
26 Q
Note: See TracBrowser for help on using the repository browser.