source: WorldVistAEHR/trunk/r/WOMENS_HEALTH-WV/WVPATP.m@ 1608

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

initial load of WorldVistAEHR

File size: 3.9 KB
Line 
1WVPATP ;HCIOFO/FT,JR-Print WH Patient Case Data ;4/2/01 09:24
2 ;;1.0;WOMEN'S HEALTH;**10,14**;Sep 30, 1998
3 ;; Original routine created by IHS/ANMC/MWR
4 ;;* MICHAEL REMILLARD, DDS * ALASKA NATIVE MEDICAL CENTER *
5 ;; PRINT A PATIENT'S CASE DATA.
6 ;
7BEGIN ;EP
8 ;---> LOOP TO PRINT PATIENTS' CASE DATA.
9 ;---> NOT CURRENTLY CALLED BY ANY OPTION.
10 D SETVARS^WVUTL5 S WVPOP=0
11 F D Q:$G(Y)<0
12 .D TITLE^WVUTL5("PRINT A PATIENT'S CASE DATA")
13 .D PATLKUP^WVUTL8(.Y) Q:Y<0 S WVDFN=+Y
14 .D DEVICE
15 .I WVPOP S Y=-1 Q
16 .D DATA(WVDFN)
17 D EXIT
18 Q
19 ;
20PRTCASE(WVDFN) ;EP
21 ;---> PRINT CASE DATA ON ONE PATIENT.
22 ;---> CALLED FROM ^WVPATE (EDIT PATIENT CASE DATA).
23 I '$G(WVDFN) D D DIRZ^WVUTL3 Q
24 .W !?5,"WVDFN not passed. Please contact your site manager."
25 D DEVICE Q:WVPOP
26 D DATA(WVDFN)
27 Q
28 ;
29DEVICE ;EP
30 ;---> GET DEVICE AND POSSIBLY QUEUE TO TASKMAN.
31 S ZTRTN="DEQUEUE^WVPATP"
32 F WVSV="DFN" D
33 .I $D(@("WV"_WVSV)) S ZTSAVE("WV"_WVSV)=""
34 D ZIS^WVUTL2(.WVPOP,1)
35 Q
36 ;
37DEQUEUE ;EP
38 ;---> TASKED PRINTOUT OF PATIENT CASE DATA.
39 D DATA(WVDFN)
40 D EXIT
41 Q
42 ;
43DATA(WVDFN) ;EP
44 ;---> SORT PROCEDURE TYPE FILE POINTERS.
45 N A,WVNODE,WVTMP,I,N
46 D PATVARS^WVUTL3(WVDFN)
47 ;---> LOOP THROUGH WV PROCEDURE FILE.
48 S I=0
49 S A=WVNAMAGE
50 S WVNODE="Patient Name: "_A_$$S(38-$L(A))_$$PNLAB^WVUTL5()_WVCHRT
51 D NODE
52 S A=$$STREET^WVUTL1(WVDFN)
53 S WVNODE=$$S(6)_"Street: "_A_$$S(31-$L(A))
54 S WVNODE=WVNODE_"Patient Phone: "_$$HPHONE^WVUTL1(WVDFN)
55 D NODE
56 S A=$$CTYSTZ^WVUTL1(WVDFN)
57 S WVNODE=$$S(2)_"Cty/St/Zip: "_A_$$S(33-$L(A))
58 S WVNODE=WVNODE_"Pr Provider: "_$E($$PROVI^WVUTL1A(WVDFN),1,20)
59 D NODE
60 S WVNODE=" Elig Code: "_$P($$ELIG^WVUTL9(WVDFN),U,2)
61 S WVNODE=WVNODE_$$S(51-$L(WVNODE))_"Veteran: "_$$VET^WVUTL1A(WVDFN)
62 D NODE
63 S WVNODE=" " D NODE
64 S A=$E(WVCMGR,1,28)
65 S WVNODE=$$S(10)_"Case Manager: "_A_$$S(29-$L(A))
66 S WVNODE=WVNODE_"Inactive Date: "_$$SLDT2^WVUTL5($$INACT^WVUTL1(WVDFN))
67 D NODE
68 S WVNODE=$$S(8)_"Breast Tx Need: "_WVBNEED
69 D NODE
70 S A="" I WVDFN>0 S A=$P($G(^WV(790,WVDFN,0)),U,25),A=$S(A'="":A,1:"NOT ENTERED") S:A>0 A=$$INSTTX^WVUTL6(A)
71 S WVNODE=$$S(7)_"Breast Facility: "_A
72 D NODE
73 S WVNODE=$$S(6)_"Cervical Tx Need: "_WVCNEED
74 D NODE
75 S A="" I WVDFN>0 S A=$P($G(^WV(790,WVDFN,0)),U,26) S A=$S(A'="":A,1:"NOT ENTERED") S:A>0 A=$$INSTTX^WVUTL6(A)
76 S WVNODE=$$S(5)_"Cervical Facility: "_A
77 D NODE
78 S WVNODE=$$S(11)_"PAP Regimen: "_WVPAPRG
79 D NODE S WVNODE=" " D NODE
80 S WVNODE=$$S(0)_"Family Hx of Breast CA: "_$$FAMHX^WVUTL1(WVDFN)
81 D NODE
82 S A=$$EDC^WVUTL1(WVDFN)
83 I A="",$P(^WV(790,WVDFN,0),U,13)=0 S A="NO"
84 S WVNODE=$$S(3)_"Currently Pregnant: "_A_$$S(32-$L(A))
85 S WVNODE=WVNODE_"DES Daughter: "_$$DES^WVUTL1(WVDFN)
86 D NODE
87 S A=$$MST^WVUTL1A(WVDFN)
88 S WVNODE=$$S(19)_"MST: "_A
89 D NODE
90 S A=$$CST^WVUTL1A(WVDFN)
91 S WVNODE=$$S(19)_"CST: "_A
92 D NODE
93 S A=$$ENRLDT^WVUTL1(WVDFN)
94 S WVNODE=$$S(1)_"Date of 1st Encounter: "_A_$$S(29-$L(A))
95 S WVNODE=WVNODE_"Referral Source: "_$$REFS^WVUTL1(WVDFN)
96 D NODE S WVNODE=" " D NODE
97 S WVNODE=$$S(25)_"---- Text of NOTES ----"
98 D NODE S WVNODE=" " D NODE
99 S N=0
100 F S N=$O(^WV(790,WVDFN,1,N)) Q:'N D
101 .S WVNODE=^WV(790,WVDFN,1,N,0) D NODE
102 S WVNODE=" " D NODE
103 S WVNODE=$$S(20)_"----- End of Patient Printout -----" D NODE
104 D DISPLAY
105 Q
106 ;
107NODE ;EP
108 ;---> SET NODE.
109 S I=I+1,WVTMP("WV",$J,I,0)=WVNODE
110 Q
111 ;
112S(S) ;EP
113 ;---> SPACES.
114 Q $$S^WVUTL7($G(S))
115 ;
116DISPLAY ;EP
117 U IO
118 D TOPHEAD^WVUTL7
119 S WVTITLE1="* * * WOMEN'S HEALTH: PATIENT CASE DATA PRINTOUT * * *"
120 D CENTERT^WVUTL5(.WVTITLE1)
121 ;
122 S (WVPOP,N,Z)=0
123 W:WVCRT @IOF D HEADER
124 F S N=$O(WVTMP("WV",$J,N)) Q:'N!(WVPOP) D
125 .I $Y+5>IOSL D:WVCRT DIRZ^WVUTL3 Q:WVPOP D HEADER
126 .W !,WVTMP("WV",$J,N,0)
127 I WVCRT&('WVPOP) W !! D DIRZ^WVUTL3
128 D ^%ZISC
129 K WVTMP("WV",$J)
130 Q
131 ;
132HEADER ;EP
133 W:WVPAGE>1!WVCRT @IOF,!
134 W WVCONFF W:'WVCRT !,WVTIMLN
135 W !!,WVTITLE1,?70,"page: ",WVPAGE
136 W !,$$RUNDT^WVUTL1A("C")
137 W !,WVLINE S WVPAGE=WVPAGE+1
138 ;W !!,"Patient Name: ",WVNAMAGE,?53,$$PNLAB^WVUTL5(),WVCHRT
139 Q
140 ;
141EXIT ;EP
142 D KILLALL^WVUTL8
143 Q
Note: See TracBrowser for help on using the repository browser.