source: WorldVistAEHR/trunk/r/WOMENS_HEALTH-WV/WVPROF1.m@ 1800

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

initial load of WorldVistAEHR

File size: 2.6 KB
RevLine 
[613]1WVPROF1 ;HCIOFO/FT,JR IHS/ANMC/MWR - DISPLAY PATIENT PROFILE; ;7/30/98 11:39
2 ;;1.0;WOMEN'S HEALTH;;Sep 30, 1998
3 ;;* MICHAEL REMILLARD, DDS * ALASKA NATIVE MEDICAL CENTER *
4 ;; SETUP AND EDIT CODE FOR DISPLAYING PATIENT PROFILE.
5 ;; CALLED BY WVPROF.
6 ;
7 D DISPLAY Q:WVPOP
8 D ^WVPROF3
9 Q
10 ;
11 ;
12DISPLAY ;EP
13 ;---> WVCONF=DISPLAY "CONFIDENTIAL PATIENT INFO" BANNER.
14 ;---> WVTITLE=TITLE AT TOP OF DISPLAY HEADER.
15 ;---> WVCHAGE=DISPLAY CHART AND AGE IN HEADER.
16 ;---> WVSUBH=CODE TO EXECUTE FOR SUBHEADER (COLUMN TITLES).
17 ;---> WVCODE=CODE TO EXECUTE AS 3RD PIECE OF DIR(0) (AFTER DIR READ).
18 ;---> WVCRT=1 IF OUTPUT IS TO SCREEN (ALLOWS SELECTIONS TO EDIT).
19 ;---> WVTAB=6 IF OUTPUT IS TO SCREEN, =3 IF OUTPUT IS TO PRINTER.
20 ;---> WVPRMT(1,Q)=PROMPTS FOR DIR.
21 ;
22 U IO
23 I '$D(WVDFN)!('$D(WVNAME))!('$D(WVCHRT)) D Q
24 .W !!,"INSUFFICIENT PATIENT INFORMATION.",!!
25 .D DIRZ^WVUTL3 S WVPOP=1
26 ;
27 S WVCONF=1,WVCHAGE=1
28 S WVTITLE="* * * Patient Profile * * *" D CENTERT^WVUTL5(.WVTITLE)
29 S WVCODE="Q:'$D(^TMP(""WV"",$J,2,+X)) "
30 S WVCODE=WVCODE_"D EDIT^WVPROF1 N X D SORT^WVPROF2,COPYGBL^WVPROF"
31 ;---> IF PROFILE IS BEING ACCESSED BY A USER FROM OUTSIDE OF THE
32 ;---> PACKAGE (NOT WOMEN'S HEALTH STAFF), THEN OFFER DISPLAY/PRINT
33 ;---> OF PROCEDURE; DO NOT OFFER EDIT OF PROCEDURE.
34 D:$G(WVPUSER)
35 .S WVCODE="D PRINTPCD^WVPROF1"
36 S (WVACCP,N,WVPOP,Z)=0
37 D TOPHEAD^WVUTL7
38 S WVTAB=$S(WVCRT:6,1:3)
39 Q
40 ;
41 ;
42EDIT ;EP
43 ;---> FROM BROWSE, WVPOP IN TO EDIT A SINGLE PROCEDURE.
44 ;---> NOTE: PIECE 10 OF EACH TMP NODE IS THE IEN FOR THAT ENTRY
45 ;---> IN ITS RESPECTIVE FILE (PROCDURE FILE OR NOTIFICATION FILE).
46 D SETVARS^WVUTL5
47 S X=+X,DA=$P(^TMP("WV",$J,2,X),U,10)
48 S WVNN=X N X D
49 .I $P(^TMP("WV",$J,2,WVNN),U)=1 D Q
50 ..D EDIT2^WVPROC1(DA,.WVPOP) Q:WVPOP
51 .I $P(^TMP("WV",$J,2,WVNN),U)=2 D EDIT2^WVNOTIF(DA) Q
52 .W !!?3,*7,"This is neither a PROCEDURE nor a NOTIFICATION. "
53 .W "It cannot be edited here."
54 .D DIRZ^WVUTL3 Q
55 ;---> BACK UP 5 RECORDS AFTER EDIT.
56 S N=$S(WVNN<6:1,1:WVNN-5),Z=0 K WVNN
57 Q
58 ;
59 ;
60PRINTPCD ;EP
61 ;---> FROM BROWSE, PRINT THIS PROCEDURE.
62 ;---> NOTE: PIECE 10 OF EACH TMP NODE IS THE IEN FOR THAT ENTRY
63 ;---> IN ITS RESPECTIVE FILE (PROCDURE FILE OR NOTIFICATION FILE).
64 D SETVARS^WVUTL5
65 S X=+X,DA=$P(^TMP("WV",$J,2,X),U,10)
66 S WVN=X N X D
67 .I $P(^TMP("WV",$J,2,WVN),U)=1 D TOP^WVPRPCD(DA) Q
68 .W !!?3,*7,"This is not a PROCEDURE. "
69 .D DIRZ^WVUTL3 Q
70 ;---> BACK UP 5 RECORDS AFTER EDIT.
71 S N=$S(WVN<6:1,1:WVN-5),Z=0 K WVN
72 Q
73 ;
74 ;
75SUBHEAD ;EP
76 ;---> SUB HEADER FOR BRIEF DISPLAY OF PROCEDURES ONLY.
77 W !?WVTAB,"DATE",?16,"PROCEDURE",?27,"RESULTS/DIAGNOSIS",?71,"STATUS",!
78 W ?WVTAB,"--------",?16,"---------",?27,"----------------------------"
79 W ?71,"------"
80 Q
Note: See TracBrowser for help on using the repository browser.