source: WorldVistAEHR/trunk/r/WOMENS_HEALTH-WV/WVPROF.m@ 1716

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

initial load of WorldVistAEHR

File size: 3.2 KB
Line 
1WVPROF ;HCIOFO/FT,JR IHS/ANMC/MWR - DISPLAY PATIENT PROFILE; ;7/30/98 11:38
2 ;;1.0;WOMEN'S HEALTH;;Sep 30, 1998
3 ;;* MICHAEL REMILLARD, DDS * ALASKA NATIVE MEDICAL CENTER *
4 ;; CALL ED BY OPTION: "WV PATIENT PROFILE" TO DISPLAY PROFILE.
5 ;
6 ;---> *NOTE: TO ASK DATE RANGE, UNCOMMENT ALL LINES WITH "XDATES",
7 ;---> AND IN HEADER2^WVUTL7.
8 ;
9 ;---> VARIABLES:
10 ;---> WVDFN: DFN OF SELECTED PATIENT
11 ;---> DATES: WVBEGDT=BEGINNING DATE, WVENDDT=ENDING DATE
12 ;---> USE NODES 1 & 2 IN ^TMP GLOBAL.
13 ;
14 D SETVARS^WVUTL5
15 S:'$D(WVERRORS) WVERRORS=1
16 F D RUN Q:WVPOP
17 D EXIT
18 Q
19 ;
20RUN ;EP
21 D TITLE^WVUTL5("PATIENT PROFILE")
22 D PATIENT Q:WVPOP
23 D BRIEF Q:WVPOP
24 D DEVICE Q:WVPOP
25 D SORT^WVPROF2
26 D COPYGBL
27 D ^WVPROF1 S WVPOP=0
28 K WVD,WVSUBH
29 Q
30 ;
31EXIT ;EP
32 D KILLALL^WVUTL8
33 Q
34 ;
35 ;
36PATIENT ;EP
37 ;---> SELECT PATIENT (RETURN WVDFN).
38 W !!," Select the patient whose Profile you wish to display."
39 D PATLKUP^WVUTL8(.Y) S:Y<0 WVPOP=1
40 ;---> USE NEXT LINE IF I WANT TO ADD CAPABILITY OF ADDING NEW PATIENT.
41 ;D PATLKUP^WVUTL8(.Y,$S($G(WVPUSER):"",1:"ADD")) S:Y<0 WVPOP=1
42 S WVDFN=+Y
43 Q
44 ;
45DATES ;EP
46 ;---> ASK DATE RANGE. RETURN DATES IN WVBEGDT AND WVENDDT.
47 ;---> IF LOOKING AT ONLY ONE PATIENT, SET DEFAULT BEGIN DATE=T-5YEARS.
48 ;S WVBEGDT=2500101,WVENDDT=DT ;---> XDATES-CAN USE THIS INSTEAD.
49 ;S WVBEGDF="T-60M",WVENDDF="T" ;---> XDATES
50 ;D ASKDATES^WVUTL3(.WVBEGDT,.WVENDDT,.WVPOP,"T-365","T") ;---> XDATES
51 Q
52 ;
53BRIEF ;EP
54 ;---> BRIEF OR DETAILED LISTING OF PROCEDURES (BRIEF DOES NOT LIST
55 ;---> NOTIFICATIONS AND PROVIDERS).
56 N DIR,DIRUT,Y
57 W !!?3,"List Patient Profile in BRIEF or DETAILED format?"
58 S DIR("A")=" Select BRIEF or DETAILED: ",DIR("B")="BRIEF"
59 S DIR(0)="SAM^b:BRIEF;d:DETAILED" D HELP1
60 D ^DIR
61 I Y=-1!($D(DIRUT)) S WVPOP=1 Q
62 ;---> IF ALL DETAILED, S WVD=1; FOR BRIEF WVD=0
63 S WVD=$S(Y="d":1,1:0)
64 Q
65 ;
66DEVICE ;EP
67 ;---> GET DEVICE AND POSSIBLY QUEUE TO TASKMAN.
68 S ZTRTN="DEQUEUE^WVPROF"
69 F WVSV="D","DFN","BEGDT","ENDDT","ERRORS" D
70 .I $D(@("WV"_WVSV)) S ZTSAVE("WV"_WVSV)=""
71 D ZIS^WVUTL2(.WVPOP,1,"HOME")
72 Q
73 ;
74COPYGBL ;EP
75 ;---> COPY ^TMP("WV",$J,1 TO ^TMP("WV",$J,2 TO MAKE IT FLAT.
76 N I,M,N,P,Q
77 S N=0,I=0
78 F S N=$O(^TMP("WV",$J,1,N)) Q:N="" D
79 .S M=0
80 .F S M=$O(^TMP("WV",$J,1,N,M)) Q:M="" D
81 ..S P=0
82 ..F S P=$O(^TMP("WV",$J,1,N,M,P)) Q:P="" D
83 ...S Q=0
84 ...F S Q=$O(^TMP("WV",$J,1,N,M,P,Q)) Q:Q="" D
85 ....S I=I+1,^TMP("WV",$J,2,I)=^TMP("WV",$J,1,N,M,P,Q)
86 Q
87 ;
88 ;
89DEQUEUE ;EP
90 ;---> EP FOR TASKMAN QUEUE OF PRINTOUT.
91 D SETVARS^WVUTL5,SORT^WVPROF2,COPYGBL,^WVPROF1,EXIT
92 Q
93 ;
94HELP1 ;EP
95 ;;Enter "D" for a "Detailed" listing of the patient's Procedures,
96 ;;Notifications, PAP Regimen and Pregnancy changes.
97 ;;Enter "B" for a "Brief" listing of the patient's Procedures only.
98 S WVTAB=5,WVLINL="HELP1" D HELPTX
99 Q
100 ;
101HELPTX ;EP
102 ;---> CREATES DIR ARRAY FOR DIR. REQUIRED VARIABLES: WVTAB,WVLINL.
103 N I,T,X S T=$$REPEAT^XLFSTR(" ",WVTAB)
104 F I=1:1 S X=$T(@WVLINL+I) Q:X'[";;" S DIR("?",I)=T_$P(X,";;",2)
105 S DIR("?")=DIR("?",I-1) K DIR("?",I-1)
106 Q
107 ;
108 ;
109USER ;EP
110 ;---> CALLED BY OPTION: "WV PATIENT PROFILE USER"
111 ;---> FOR USER TO VIEW PROFILE AND PRINT PROCEDURES, BUT NO EDIT.
112 S WVPUSER=1
113 D WVPROF K WVPUSER
114 Q
115 ;
116ERRORS ;EP
117 ;---> CALLED BY OPTION: "WV PATIENT PROFILE W/ERRORS"
118 ;---> ENTER HERE TO INCLUDE ERRONEOUS ENTRIES.
119 S WVERRORS=0 G WVPROF
120 Q
Note: See TracBrowser for help on using the repository browser.