75 lines
3.7 KiB
Mathematica
75 lines
3.7 KiB
Mathematica
LREPIRP8 ;DALOI/CKA - EPI-PRINT VERIFICATION REPORT ; 5/14/03
|
|
;;5.2;LAB SERVICE;**281**;Sep 27, 1994
|
|
;PRINT VERIFICATION REPORT CONTINUED
|
|
;
|
|
;CALLED BY LREPIRP7
|
|
Q
|
|
PPRT1 ;Print pathogens 1,3,4,5,6,8,10,18,19,20,21,22,23
|
|
D HDG^LREPIRP7 W !
|
|
S LRNOPAT="",LRNOPAT=$O(^XTMP("LREPIREP"_LRDATE,LRPATH,LRNOPAT))
|
|
I LRNOPAT="HDG" W !!,"NO PATIENTS REPORTED FOR THE REPORT PERIOD."
|
|
F S LRDFN=$O(^XTMP("LREPIREP"_LRDATE,LRPATH,LRDFN)) Q:'LRDFN D Q:LRQUIT
|
|
.S LRPV1=0,LROBR=0,LROBX=0
|
|
.W !!,"PATIENT NAME LAST 4 DOB SEX PERIOD OF SERVICE"
|
|
.S LRPID=$G(^XTMP("LREPIREP"_LRDATE,LRPATH,LRDFN,"PID"))
|
|
.W !,LRPID
|
|
.F S LRPV1=$O(^XTMP("LREPIREP"_LRDATE,LRPATH,LRDFN,"PV1",LRPV1)) Q:'LRPV1 D Q:LRQUIT
|
|
..S LROBR=0,LROBX=0
|
|
..S LRPV1ND=$G(^XTMP("LREPIREP"_LRDATE,LRPATH,LRDFN,"PV1",LRPV1))
|
|
..W !,$P(LRPV1ND," "),!,$P(LRPV1ND," ",2)
|
|
..I $L($P(LRPV1ND," ",2)) W !
|
|
..F S LROBR=$O(^XTMP("LREPIREP"_LRDATE,LRPATH,LRDFN,"PV1",LRPV1,"OBR",LROBR)) Q:'LROBR D Q:LRQUIT
|
|
...S LROBX=0
|
|
...W !,$G(^XTMP("LREPIREP"_LRDATE,LRPATH,LRDFN,"PV1",LRPV1,"OBR",LROBR))
|
|
...F S LROBX=$O(^XTMP("LREPIREP"_LRDATE,LRPATH,LRDFN,"PV1",LRPV1,"OBR",LROBR,"OBX",LROBX)) Q:'LROBX D Q:LRQUIT
|
|
....W !,$G(^XTMP("LREPIREP"_LRDATE,LRPATH,LRDFN,"PV1",LRPV1,"OBR",LROBR,"OBX",LROBX))
|
|
.I $Y>(IOSL-6) D NPG^LREPIRP7
|
|
Q
|
|
PPRT2 ;Print pathogens 7,9
|
|
D HDG^LREPIRP7 W !
|
|
S LRNOPAT="",LRNOPAT=$O(^XTMP("LREPIREP"_LRDATE,LRPATH,LRNOPAT))
|
|
I LRNOPAT="HDG" W !!,"NO PATIENTS REPORTED FOR THE REPORT PERIOD."
|
|
F S LRDFN=$O(^XTMP("LREPIREP"_LRDATE,LRPATH,LRDFN)) Q:'LRDFN D Q:LRQUIT
|
|
.S LRPV1=0,LROBR=0,LROBX=0
|
|
.S LRPID=$G(^XTMP("LREPIREP"_LRDATE,LRPATH,LRDFN,"PID"))
|
|
.W !,LRPID
|
|
.F S LRPV1=$O(^XTMP("LREPIREP"_LRDATE,LRPATH,LRDFN,"PV1",LRPV1)) Q:'LRPV1 D Q:LRQUIT
|
|
..S LROBR=0,LROBX=0,LRDG1=0
|
|
..W !,$G(^XTMP("LREPIREP"_LRDATE,LRPATH,LRDFN,"PV1",LRPV1))
|
|
..F S LRDG1=$O(^XTMP("LREPIREP"_LRDATE,LRPATH,LRDFN,"PV1",LRPV1,"DG1",LRDG1)) Q:'LRDG1 D Q:LRQUIT
|
|
...W !,$G(^XTMP("LREPIREP"_LRDATE,LRPATH,LRDFN,"PV1",LRPV1,"DG1",LRDG1))
|
|
...F S LROBR=$O(^XTMP("LREPIREP"_LRDATE,LRPATH,LRDFN,"PV1",LRPV1,"OBR",LROBR)) Q:'LROBR D Q:LRQUIT
|
|
....S LROBX=0
|
|
....W !,$G(^XTMP("LREPIREP"_LRDATE,LRPATH,LRDFN,"PV1",LRPV1,"OBR",LROBR))
|
|
....F S LROBX=$O(^XTMP("LREPIREP"_LRDATE,LRPATH,LRDFN,"PV1",LRPV1,"OBR",LROBR,"OBX",LROBX)) Q:'LROBX D Q:LRQUIT
|
|
.....W !,$G(^XTMP("LREPIREP"_LRDATE,LRPATH,LRDFN,"PV1",LRPV1,"OBR",LROBR,"OBX",LROBX))
|
|
..I $Y>(IOSL-6) D NPG^LREPIRP7
|
|
Q
|
|
PPRT3 ;Print pathogens 2,15,16,17
|
|
D HDG^LREPIRP7 W !
|
|
W !!,"Name LAST 4 Accession Date Test Name Test Result"
|
|
W !,"____________________________________________________________________"
|
|
S LRNOPAT="",LRNOPAT=$O(^XTMP("LREPIREP"_LRDATE,LRPATH,LRNOPAT))
|
|
I LRNOPAT="HDG" W !!,"NO PATIENTS REPORTED FOR THE REPORT PERIOD."
|
|
S LRDFN=0,LRNUM=0
|
|
F S LRDFN=$O(^XTMP("LREPIREP"_LRDATE,LRPATH,LRDFN)) Q:'LRDFN D Q:LRQUIT S LRNUM=0
|
|
.F S LRNUM=$O(^XTMP("LREPIREP"_LRDATE,LRPATH,LRDFN,LRNUM)) Q:'LRNUM D Q:LRQUIT
|
|
..W !,^XTMP("LREPIREP"_LRDATE,LRPATH,LRDFN,LRNUM)
|
|
..I $Y>(IOSL-6) D NPG^LREPIRP7
|
|
Q
|
|
PPRT4 ;Print pathogens 11,12,13,14
|
|
D HDG^LREPIRP7 W !
|
|
S LRNOPAT="",LRNOPAT=$O(^XTMP("LREPIREP"_LRDATE,LRPATH,LRNOPAT))
|
|
I LRNOPAT="HDG" W !!,"NO PATIENTS REPORTED FOR THE REPORT PERIOD."
|
|
F S LRDFN=$O(^XTMP("LREPIREP"_LRDATE,LRPATH,LRDFN)) Q:'LRDFN D Q:LRQUIT
|
|
.S LRPV1=0,LRDG1=0
|
|
.S LRPID=$G(^XTMP("LREPIREP"_LRDATE,LRPATH,LRDFN,"PID"))
|
|
.W !,LRPID
|
|
.F S LRPV1=$O(^XTMP("LREPIREP"_LRDATE,LRPATH,LRDFN,"PV1",LRPV1)) Q:'LRPV1 D Q:LRQUIT
|
|
..W !,$G(^XTMP("LREPIREP"_LRDATE,LRPATH,LRDFN,"PV1",LRPV1))
|
|
..S LRDG1=0
|
|
..F S LRDG1=$O(^XTMP("LREPIREP"_LRDATE,LRPATH,LRDFN,"PV1",LRPV1,"DG1",LRDG1)) Q:'LRDG1 D Q:LRQUIT
|
|
...W !,$G(^XTMP("LREPIREP"_LRDATE,LRPATH,LRDFN,"PV1",LRPV1,"DG1",LRDG1))
|
|
.I $Y>(IOSL-6) D NPG^LREPIRP7
|
|
Q
|