Ob/Gyn forms contributed by Douglas Crosdale
[openemr.git] / contrib / forms / medical_decision / report.php
blob1d66a5d191c6510451b4c6a57a93c1546b375a76
1 <? function medical_decision_report( $pid, $encounter, $cols, $id) {
2 include_once("../../globals.php");
3 include_once("$srcdir/api.inc");
4 include_once("$srcdir/forms.inc");
5 include_once("$srcdir/calendar.inc");
6 $fres=sqlStatement("select * from patient_data where pid='".$pid."'");
7 if ($fres){
8 $patient = sqlFetchArray($fres);
10 $fres=sqlStatement("select * from form_medical_decision where id='".$id."'");
11 if ($fres){
12 $fdata = sqlFetchArray($fres);
15 <div class="srvChapter">Medical decision making</div>
16 <div style="border: solid 2px black; background-color: white;">
17 <table width="100%" border="0" cellspacing="0" cellpadding="0">
18 <tr>
19 <td align="left" valign="top" class="fibody2"><table width="100%" border="0" cellspacing="0" cellpadding="5">
20 <tr align="left" valign="bottom">
21 <td width="40%" class="fibody2" id="bordR">Patient name: <? echo $patient{'fname'}.' '.$patient{'mname'}.' '.$patient{'lname'}; ?></td>
22 <td width="20%" class="fibody2" id="bordR">Birth date: <? echo $patient{'DOB'}; ?></td>
23 <td width="20%" class="fibody2" id="bordR">ID No: <? echo $patient{'id'}; ?></td>
24 <td width="20%" class="fibody2">date: <? echo date('Y-m-d'); ?></td>
25 </tr>
26 </table> </td>
27 </tr>
28 <tr>
29 <td align="center" valign="middle" class="fibody2"><h2>Amount and complexility of data reviewed </h2></td>
30 </tr>
31 <tr>
32 <td align="left" valign="top">&nbsp;</td>
33 </tr>
34 </table>
35 <table width="100%" border="0" cellspacing="0" cellpadding="2">
36 <tr align="left" valign="top">
37 <td width="29%" class="ficaption3">Tests ordered </td>
38 <td class="ficaption3">review of records </td>
39 </tr>
40 <tr align="left" valign="top">
41 <td class="fibody3"><p>
42 <? echo (($fdata{'test_lab'} == '1')?'<img src="../../pic/mrkcheck.png" width="12" height="11"> ':'<img src="../../pic/mrkempty.png" width="12" height="11"> '); ?>
43 Laboratory</p>
44 <blockquote>
45 <p>
46 <? echo (($fdata{'test_lab_cervical'} == '1')?'<img src="../../pic/mrkcheck.png" width="12" height="11"> ':'<img src="../../pic/mrkempty.png" width="12" height="11"> '); ?>
47 cervical cytology</p>
48 <p>
49 <? echo (($fdata{'test_lab_hpv'} == '1')?'<img src="../../pic/mrkcheck.png" width="12" height="11"> ':'<img src="../../pic/mrkempty.png" width="12" height="11"> '); ?>
50 HPV test</p>
51 <p>
52 <? echo (($fdata{'test_lab_wet_mount'} == '1')?'<img src="../../pic/mrkcheck.png" width="12" height="11"> ':'<img src="../../pic/mrkempty.png" width="12" height="11"> '); ?>
53 wet mount</p>
54 <p>
55 <? echo (($fdata{'test_lab_chlamydia'} == 'checkbox')?'<img src="../../pic/mrkcheck.png" width="12" height="11"> ':'<img src="../../pic/mrkempty.png" width="12" height="11"> '); ?>
56 chlamydia</p>
57 <p>
58 <? echo (($fdata{'test_lab_gonorrhea'} == '1')?'<img src="../../pic/mrkcheck.png" width="12" height="11"> ':'<img src="../../pic/mrkempty.png" width="12" height="11"> '); ?>
59 gonorrhea</p>
60 <p>
61 <? echo (($fdata{'test_lab_other'} == '1')?'<img src="../../pic/mrkcheck.png" width="12" height="11"> ':'<img src="../../pic/mrkempty.png" width="12" height="11"> '); ?>
62 other <span class="ficaption2">
63 <? echo $fdata{'test_lab_other_data'}; ?>
64 </span></p>
65 </blockquote>
66 <p>
67 <? echo (($fdata{'test_rad'} == '1')?'<img src="../../pic/mrkcheck.png" width="12" height="11"> ':'<img src="../../pic/mrkempty.png" width="12" height="11"> '); ?>
68 Radiology / Ultrasound</p>
69 <blockquote>
70 <p>
71 <? echo (($fdata{'test_rad_mammogram'} == '1')?'<img src="../../pic/mrkcheck.png" width="12" height="11"> ':'<img src="../../pic/mrkempty.png" width="12" height="11"> '); ?>
72 mammogram</p>
73 <p>
74 <? echo (($fdata{'test_rad_other'} == 'checkbox')?'<img src="../../pic/mrkcheck.png" width="12" height="11"> ':'<img src="../../pic/mrkempty.png" width="12" height="11"> '); ?>
75 other <span class="ficaption2">
76 <? echo $fdata{'test_rad_other_data'}; ?>
77 </span> </p>
78 </blockquote></td>
79 <td class="fibody3"><p>
80 <? echo (($fdata{'previous_test_results'} == '1')?'<img src="../../pic/mrkcheck.png" width="12" height="11"> ':'<img src="../../pic/mrkempty.png" width="12" height="11"> '); ?>
81 previous test results:</p>
82 <p>
83 <? echo $fdata{'previous_test_results_data'}; ?>
84 </p> <p>
85 <? echo (($fdata{'test_results_discussion'} == '1')?'<img src="../../pic/mrkcheck.png" width="12" height="11"> ':'<img src="../../pic/mrkempty.png" width="12" height="11"> '); ?>
86 discussion of test results with performing physician:</p>
87 <p>
88 <? echo $fdata{'test_results_discussion_data'}; ?>
89 </p> <p>
90 <? echo (($fdata{'old_records_reviewed'} == '1')?'<img src="../../pic/mrkcheck.png" width="12" height="11"> ':'<img src="../../pic/mrkempty.png" width="12" height="11"> '); ?>
91 old records reviewed and summarized:</p>
92 <p>
93 <? echo $fdata{'old_records_reviewed_data'}; ?>
94 </p> <p>
95 <? echo (($fdata{'history_other_source'} == '1')?'<img src="../../pic/mrkcheck.png" width="12" height="11"> ':'<img src="../../pic/mrkempty.png" width="12" height="11"> '); ?>
96 history obtained from other source:</p>
97 <p>
98 <? echo $fdata{'history_other_source_data'}; ?>
99 </p> <p>
100 <? echo (($fdata{'independent_review'} == '1')?'<img src="../../pic/mrkcheck.png" width="12" height="11"> ':'<img src="../../pic/mrkempty.png" width="12" height="11"> '); ?>
101 independent review of image/specimen:</p>
103 <? echo $fdata{'independent_review_data'}; ?>
104 </p></td>
105 </tr>
106 </table>
107 </div>
108 <p align="center">&nbsp;</p>
109 <h2 align="center">Diagnoses / Management option </h2>
110 <div style="border: solid 2px black; background-color: white;">
111 <table width="100%" border="0" cellspacing="0" cellpadding="2">
112 <tr>
113 <td colspan="2" align="left" valign="top" class="fibody2"> <? echo (($fdata{'established_problem'} == '1')?'<img src="../../pic/mrkcheck.png" width="12" height="11"> ':'<img src="../../pic/mrkempty.png" width="12" height="11"> '); ?>
114 Established problem&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
115 <? echo (($fdata{'established_problem'} == '0')?'<img src="../../pic/mrkcheck.png" width="12" height="11"> ':'<img src="../../pic/mrkempty.png" width="12" height="11"> '); ?>
116 New problem </td>
117 </tr>
118 <tr>
119 <td colspan="2" align="left" valign="top" class="ficaption2">Assessment and plan:</td>
120 </tr>
121 <tr>
122 <td colspan="2" align="left" valign="top" class="fibody5"><? echo $fdata{'assessment_and_plan'}; ?></td>
123 </tr>
124 <tr>
125 <td colspan="2" align="left" valign="top" class="fibody2"><p>Risk of complications and/or morbidity/mortality:</p>
126 <blockquote>
128 <? echo (($fdata{'md_risk'} == 'minimal')?'<img src="../../pic/mrkcheck.png" width="12" height="11"> ':'<img src="../../pic/mrkempty.png" width="12" height="11"> '); ?>
129 Minimal (EG, cold, aches and pains, over-the-counter medications)</p>
131 <? echo (($fdata{'md_risk'} == 'low')?'<img src="../../pic/mrkcheck.png" width="12" height="11"> ':'<img src="../../pic/mrkempty.png" width="12" height="11"> '); ?>
132 low (EG, cystitis, vaginitis, prescription renewal, minor surgery without risk factors) </p>
134 <? echo (($fdata{'md_risk'} == 'moderate')?'<img src="../../pic/mrkcheck.png" width="12" height="11"> ':'<img src="../../pic/mrkempty.png" width="12" height="11"> '); ?>
135 moderate (EG, breast mass, irregular bleeding, headaches, minor surgery with risk factors, major surgery without risk factors, new prescription)</p>
137 <? echo (($fdata{'md_risk'} == 'high')?'<img src="../../pic/mrkcheck.png" width="12" height="11"> ':'<img src="../../pic/mrkempty.png" width="12" height="11"> '); ?>
138 high (EG, pelvic pain, rectal bleeding, multiple complaints, major surgery with risk factors, chemotherapy, emergency surgery) </p>
139 </blockquote></td>
140 </tr>
141 <tr>
142 <td colspan="2" align="left" valign="top" class="fibody2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
143 <tr>
144 <td width="20%" rowspan="3" align="left" valign="top" class="ficaption3">Patient counseled about:</td>
145 <td width="15%" align="left" valign="baseline" nowrap class="fibody3"><? echo (($fdata{'pc_smoking'} == '1')?'<img src="../../pic/mrkcheck.png" width="12" height="11"> ':'<img src="../../pic/mrkempty.png" width="12" height="11"> '); ?>
146 smoking cessation </td>
147 <td width="15%" align="left" valign="baseline" nowrap class="fibody3"><? echo (($fdata{'pc_contraception'} == '1')?'<img src="../../pic/mrkcheck.png" width="12" height="11"> ':'<img src="../../pic/mrkempty.png" width="12" height="11"> '); ?>
148 contraception</td>
149 <td width="15%" align="left" valign="bottom" nowrap>&nbsp;</td>
150 <td width="15%" align="left" valign="bottom" nowrap>&nbsp;</td>
151 </tr>
152 <tr>
153 <td align="left" valign="baseline" nowrap class="fibody3"><? echo (($fdata{'pc_weight'} == '1')?'<img src="../../pic/mrkcheck.png" width="12" height="11"> ':'<img src="../../pic/mrkempty.png" width="12" height="11"> '); ?>
154 weight management </td>
155 <td align="left" valign="baseline" nowrap class="fibody3"><? echo (($fdata{'pc_safe_sex'} == '1')?'<img src="../../pic/mrkcheck.png" width="12" height="11"> ':'<img src="../../pic/mrkempty.png" width="12" height="11"> '); ?>
156 safe sex </td>
157 <td align="left" valign="bottom" nowrap>&nbsp;</td>
158 <td align="left" valign="bottom" nowrap>&nbsp;</td>
159 </tr>
160 <tr>
161 <td align="left" valign="baseline" nowrap class="fibody3"><? echo (($fdata{'pc_exercise'} == '1')?'<img src="../../pic/mrkcheck.png" width="12" height="11"> ':'<img src="../../pic/mrkempty.png" width="12" height="11"> '); ?>
162 exercise</td>
163 <td align="left" valign="baseline" nowrap class="fibody3"><? echo (($fdata{'pc_other'} == '1')?'<img src="../../pic/mrkcheck.png" width="12" height="11"> ':'<img src="../../pic/mrkempty.png" width="12" height="11"> '); ?>
164 other</td>
165 <td align="left" valign="bottom" nowrap>&nbsp;</td>
166 <td align="left" valign="bottom" nowrap>&nbsp;</td>
167 </tr>
168 </table></td>
169 </tr>
170 <tr>
171 <td width="50%" align="left" valign="top" class="ficaption2" id="bordR"><? echo (($fdata{'patient_education'} == '1')?'<img src="../../pic/mrkcheck.png" width="12" height="11"> ':'<img src="../../pic/mrkempty.png" width="12" height="11"> '); ?>
172 Patient education materials provided</td>
173 <td width="50%" align="left" valign="top" class="fibody2">&nbsp;</td>
174 </tr>
175 <tr>
176 <td align="left" valign="top" class="fibody2" id="bordR">&nbsp;</td>
177 <td align="left" valign="top" class="fibody2">&nbsp;</td>
178 </tr>
179 <tr>
180 <td align="left" valign="top" class="ficaption2" id="bordR">Minutes counseled:
181 <? echo $fdata{'minutes_counseled'}; ?></td>
182 <td align="left" valign="top" class="ficaption2">Total encounter time:
183 <? echo $fdata{'total_encounter_time'}; ?></td>
184 </tr>
185 <tr valign="bottom">
186 <td height="50" align="left" class="ficaption2" id="bordR">Signature:</td>
187 <td align="left" class="ficaption2">Date: <? echo $fdata['date']; ?></td>
188 </tr>
189 </table>
190 </div>
191 <? } ?>