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."'");
8 $patient = sqlFetchArray($fres);
10 $fres=sqlStatement("select * from form_medical_decision where id='".$id."'");
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">
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
>
29 <td align
="center" valign
="middle" class="fibody2"><h2
>Amount
and complexility of data reviewed
</h2
></td
>
32 <td align
="left" valign
="top"> 
;</td
>
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
>
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"> '); ?
>
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"> '); ?
>
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"> '); ?
>
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"> '); ?
>
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"> '); ?
>
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"> '); ?
>
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'}; ?
>
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
>
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"> '); ?
>
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'}; ?
>
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
>
83 <?
echo $fdata{'previous_test_results_data'}; ?
>
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
>
88 <?
echo $fdata{'test_results_discussion_data'}; ?
>
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
>
93 <?
echo $fdata{'old_records_reviewed_data'}; ?
>
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
>
98 <?
echo $fdata{'history_other_source_data'}; ?
>
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'}; ?
>
108 <p align
="center"> 
;</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">
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
 
; 
; 
; 
; 
;
115 <?
echo (($fdata{'established_problem'} == '0')?
'<img src="../../pic/mrkcheck.png" width="12" height="11"> ':'<img src="../../pic/mrkempty.png" width="12" height="11"> '); ?
>
119 <td colspan
="2" align
="left" valign
="top" class="ficaption2">Assessment
and plan
:</td
>
122 <td colspan
="2" align
="left" valign
="top" class="fibody5"><?
echo $fdata{'assessment_and_plan'}; ?
></td
>
125 <td colspan
="2" align
="left" valign
="top" class="fibody2"><p
>Risk of complications
and/or morbidity
/mortality
:</p
>
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
>
142 <td colspan
="2" align
="left" valign
="top" class="fibody2"><table width
="100%" border
="0" cellspacing
="0" cellpadding
="0">
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"> '); ?
>
149 <td width
="15%" align
="left" valign
="bottom" nowrap
> 
;</td
>
150 <td width
="15%" align
="left" valign
="bottom" nowrap
> 
;</td
>
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"> '); ?
>
157 <td align
="left" valign
="bottom" nowrap
> 
;</td
>
158 <td align
="left" valign
="bottom" nowrap
> 
;</td
>
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"> '); ?
>
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"> '); ?
>
165 <td align
="left" valign
="bottom" nowrap
> 
;</td
>
166 <td align
="left" valign
="bottom" nowrap
> 
;</td
>
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"> 
;</td
>
176 <td align
="left" valign
="top" class="fibody2" id
="bordR"> 
;</td
>
177 <td align
="left" valign
="top" class="fibody2"> 
;</td
>
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
>
186 <td height
="50" align
="left" class="ficaption2" id
="bordR">Signature
:</td
>
187 <td align
="left" class="ficaption2">Date
: <?
echo $fdata['date']; ?
></td
>