Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: WVLABLG1

WVLABLG1.m

Go to the documentation of this file.
WVLABLG1 ;HCIOFO/FT IHS/ANMC/MWR - DISPLAY LAB LOG; ;9/29/98  12:37
 ;;1.0;WOMEN'S HEALTH;;Sep 30, 1998
 ;;* MICHAEL REMILLARD, DDS * ALASKA NATIVE MEDICAL CENTER *
 ;;  DISPLAY CODE FOR LAB LOG.  CALLED BY WVLABLG.
 ;
DISPLAY ;EP
 ;---> WVCONF=DISPLAY "CONFIDENTIAL PT INFO" BANNER.
 ;---> WVTITLE=TITLE AT TOP OF DISPLAY HEADER.
 ;---> WVSUBH=CODE TO EXECUTE FOR SUBHEADER (COLUMN TITLES).
 ;---> WVCODE=CODE TO EXECUTE AS 3RD PIECE OF DIR(0) (AFTER DIR READ).
 ;---> WVCRT=1 IF OUTPUT IS TO SCREEN (ALLOWS SELECTIONS TO EDIT).
 ;---> WVPRMT(1,Q)=PROMPTS FOR DIR.
 ;
 N WVTITLE,WVTITLE1,N,Y S:WVB WVCONF=1
 U IO
 D
 .I 'WVB S WVTITLE1="TOTALS" Q
 .I WVC=1 S WVTITLE1="LISTED BY ACCESSION#" Q
 .I WVC=2 S WVTITLE1="LISTED BY PATIENT" Q
 .S WVTITLE="UNKNOWN REPORT"
 S WVTITLE="* * *  WOMEN'S HEALTH: LAB LOG "_WVTITLE1_"  * * *"
 D CENTERT^WVUTL5(.WVTITLE)
 S WVSUBH="SUBHEAD^WVLABLG1"
 D TOPHEAD^WVUTL7
 S (WVPOP,N)=0
NOMATCH ;EP
 ;---> QUIT IF NO RECORDS MATCH.
 I '$D(^TMP("WV",$J,1)) D  Q
 .D HEADER3^WVUTL7
 .W !!?5,"No records match the selected criteria.",!
 .I WVCRT&('$D(IO("S"))) D DIRZ^WVUTL3 W @IOF
 .D ^%ZISC S WVPOP=1
 ;
 D:WVB DISPLAY1
 I WVPOP D
 .W !?5,"Because you have entered ^, the remainder of the individual"
 .W !?5,"procedures will not be displayed.  The totals that follow,"
 .W !?5,"however, are accurate for the selected date range."
 I 'WVB K WVSUBH D HEADER3^WVUTL7
 D TOTALS,END
 Q
 ;
 ;
DISPLAY1 ;EP
 D HEADER3^WVUTL7
 F  S N=$O(^TMP("WV",$J,2,N)) Q:'N!(WVPOP)  D
 .I $Y+6>IOSL D:WVCRT DIRZ^WVUTL3 Q:WVPOP  D
 ..S WVPAGE=WVPAGE+1
 ..D HEADER3^WVUTL7
 .S Y=^TMP("WV",$J,2,N),M=N
 .W !,$$SLDT2^WVUTL5($P(Y,U,3))
 .W ?9,$P(Y,U,4)
 .W ?21,$E($P(Y,U,2),1,18)
 .W ?41,$P(Y,U)
 .W ?53,$E($P(Y,U,8),1,10)
 .W ?65,$E($P(Y,U,9),1,14)
 .W !?9,"Date of ",$E($P(Y,U,5),1,23),": ",$P(Y,U,7)
 .W ?53,"Entered by: ",$E($P(Y,U,10),1,14)
 .W !?43,"Res/Diag: ",?53,$E($P(Y,U,12),1,26)
 .W !,WVLINE
 Q
 ;
TOTALS ;EP
 N N,R S (N,R)=0
 I $Y+6>IOSL D:WVCRT DIRZ^WVUTL3 Q:WVPOP  D
 .S WVPAGE=WVPAGE+1 K WVSUBH
 .D HEADER3^WVUTL7
 ;
 F  S N=$O(^TMP("WV",$J,2,N)) Q:'N  D
 .S M=N S:($P(^TMP("WV",$J,2,N),U,12)="NOT ENTERED") R=R+1
 W !?4,"*"
 W ?10,"TOTAL PROCEDURES: ",M,?37,"PROCEDURES WITHOUT RESULTS: ",R
 W ?75,"*"
 W !,WVLINE
 Q
 ;
END ;EP
 I WVCRT&('$D(IO("S")))&('WVPOP) D DIRZ^WVUTL3
 D ^%ZISC
 Q
 ;
SUBHEAD ;EP
 ;---> SUB HEADER FOR PROCEDURE BROWSE OUTPUT.
 W !,"DATE",?9,"ACCESSION#",?21,"PATIENT"
 W ?41,$$PNLB^WVUTL5(),?53,"LOCATION",?65,"PROVIDER",!
 W $$REPEAT^XLFSTR("=",80)
 Q