source: WorldVistAEHR/trunk/r/WOMENS_HEALTH-WV/WVBRNOT1.m@ 1361

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

initial load of WorldVistAEHR

File size: 3.2 KB
Line 
1WVBRNOT1 ;HCIOFO/FT,JR IHS/ANMC/MWR - BROWSE NOTIFICATIONS; ;7/30/98 11:05
2 ;;1.0;WOMEN'S HEALTH;;Sep 30, 1998
3 ;;* MICHAEL REMILLARD, DDS * ALASKA NATIVE MEDICAL CENTER *
4 ;; DISPLAY CODE FOR BROWSING NOTIFICATIONS. CALLED BY WVBRNOT.
5 ;
6DISPLAY ;EP
7 ;---> WVCONF=DISPLAY "CONFIDENTIAL PT INFO" BANNER.
8 ;---> WVTITLE=TITLE AT TOP OF DISPLAY HEADER.
9 ;---> WVSUBH=CODE TO EXECUTE FOR SUBHEADER (COLUMN TITLES).
10 ;---> WVCODE=CODE TO EXECUTE AS 3RD PIECE OF DIR(0) (AFTER DIR READ).
11 ;---> WVCRT=1 IF OUTPUT IS TO SCREEN (ALLOWS SELECTIONS TO EDIT).
12 ;---> WVTAB=6 IF OUTPUT IS TO SCREEN, =3 IF OUTPUT IS TO PRINTER.
13 ;---> WVPRMT(1,Q)=PROMPTS FOR DIR.
14 ;---> WVD=0, TELLS DIRPRMT^WVUTL3 TO DISPLAY SELECTION NUMBERS.
15 ;
16 U IO
17 S WVCONF=1
18 S WVTITLE1=$S(WVC=1:"DATE",WVC=2:"PATIENT",WVC=3:"PRIORITY",1:"?")
19 S WVTITLE="* * * NOTIFICATIONS LISTED BY "_WVTITLE1_" * * *"
20 D CENTERT^WVUTL5(.WVTITLE)
21 S WVSUBH="SUBHEAD^WVBRNOT1"
22 S WVCODE="D EDIT^WVBRNOT1,SORT^WVBRNOT,COPYGBL^WVBRNOT"
23 S (WVD,WVPOP,N,Z)=0
24 D TOPHEAD^WVUTL7
25 S WVTAB=$S(WVCRT:6,1:3)
26 ;
27NOMATCH ;EP
28 ;---> QUIT IF NO RECORDS MATCH.
29 I '$D(^TMP("WV",$J,3)) D Q
30 .D HEADER1^WVUTL7
31 .K WVPRMT,WVPRMT1,WVPRMTQ,DIR
32 .W !!?5,"No records match the selected criteria.",!
33 .I WVCRT&('$D(IO("S"))) D DIRZ^WVUTL3 W @IOF
34 .D ^%ZISC S WVPOP=1
35 ;
36DISPLAY1 ;EP
37 ;---> IF A NOTIFICATION IS EDITED ON THE LAST PAGE, GOTO HERE
38 ;---> FROM LINELABEL "END" BELOW.
39 D HEADER1^WVUTL7
40 F S N=$O(^TMP("WV",$J,4,N)) Q:'N!(WVPOP) D
41 .I $Y+6>IOSL D:WVCRT DIRZ^WVUTL3 Q:WVPOP D
42 ..S WVPAGE=WVPAGE+1
43 ..D HEADER1^WVUTL7 S Z=0
44 .S Y=^TMP("WV",$J,4,N),M=N
45 .W !
46 .;---> DON'T WRITE SSN# AND NAME IF IT MATCHES THE PREVIOUS RECORD.
47 .;---> DON'T WRITE BROWSE SELECTION#'S IF IO IS NOT A CRT (BRCRT).
48 .I $P(Y,U)'=Z D
49 ..W ! W:WVCRT $J(N,3),")" ;BROWSE SELECTION#
50 ..W ?WVTAB,$P(Y,U) ;SSN#
51 ..W ?WVTAB+10,$E($P(Y,U,2),1,22)," " ;NAME
52 ..W $$REPEAT^XLFSTR(".",22-$L($P(Y,U,2))) ;CONNECTING DOTS
53 ..W:'WVCRT "..." ;ADD DOTS IF NOT A CRT
54 .I $P(Y,U)=Z D ;IF NEW SSN#...
55 ..W:WVCRT $J(N,3),")" ;BROWSE SELECTION#
56 ..W ?WVTAB,". . . . . . . . . . . . . . . . ." ;CONNECTING DOTS
57 .S Z=$P(Y,U) ;STORE AS PREVIOUS CHRT#
58 .;
59 .W ?40,$$SLDT2^WVUTL5($P(Y,U,3)) ;DATE OF NOTIFICATION
60 .W ?51,$P(Y,U,4) ;ACCESSION#
61 .;W ?64,$E($P(Y,U,5),1,6)
62 .W ?65,$E($P(Y,U,5)) ;STATUS
63 .S X=$P(Y,U,6) ;PRIORITY
64 .W ?70,$S(X=1:"*",1:" ")
65 .W $E($P($P(^DD(790.404,.02,0),X_":",2),";"),1,8) K X
66 I $D(^TMP("WV",$J,3)) I WVCRT&('$D(IO("S"))) D:'WVPOP DIRZ^WVUTL3 W @IOF
67END ;EP
68 D ^%ZISC
69 Q
70 ;
71SUBHEAD ;EP
72 ;---> SUB HEADER FOR NOTIFICATION BROWSE OUTPUT.
73 W !?WVTAB,$$PNLB^WVUTL5()
74 W ?WVTAB+12,"PATIENT",?41,"DATE",?51,"ACC#"
75 W ?63,"STATUS",?71,"PRIORITY",!
76 W $$REPEAT^XLFSTR("-",80)
77 Q
78 ;
79EDIT ;EP
80 ;---> FROM BROWSE, POP IN TO EDIT A SINGLE NOTIFICATION.
81 D SETVARS^WVUTL5
82 S X=+X,DA=$P(^TMP("WV",$J,4,X),U,7)
83 S WVNN=X N X
84 D EDIT2^WVNOTIF(DA)
85 ;---> BACK UP 5 RECORDS AFTER EDIT.
86 S N=$S(WVNN<6:1,1:WVNN-5),Z=0 K WVNN
87 Q
Note: See TracBrowser for help on using the repository browser.