forked from openemr/openemr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
FormReviewOfSystems.class.php
364 lines (293 loc) · 9.4 KB
/
FormReviewOfSystems.class.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
<?php
require_once(dirname(__FILE__) . "/../../../library/classes/ORDataObject.class.php");
/**
* class Prosthesis
*
*/
class FormReviewOfSystems extends ORDataObject {
/**
*
* @access public
*/
/**
*
* @access private
*/
var $id;
var $date;
var $pid;
var $activity;
var $date_tetnus_shot;
var $date_pneumonia_shot;
var $date_flu_shot;
var $date_pap_smear;
var $date_mammogram;
var $date_bone_density_scan;
var $abnormal_pap_smear;
var $abnormal_mammogram;
var $date_last_psa;
var $packs_per_day;
var $years_smoked;
var $alcohol_per_week;
var $recreational_drugs;
var $checks;
/**
* Constructor sets all Form attributes to their default value
*/
function FormReviewOfSystems($id= "", $_prefix = "") {
if (is_numeric($id)) {
$this->id = $id;
}
else {
$id = "";
}
$this->_table = "form_review_of_systems";
$this->date = date("Y-m-d H:i:s");
$this->activity = 1;
$this->pid = $GLOBALS['pid'];
if ($id != "") {
$this->populate();
}
}
function toString($html = false) {
$string .= "\n"
."ID: " . $this->id . "\n";
if ($html) {
return nl2br($string);
}
else {
return $string;
}
}
function populate() {
parent::populate();
$sql = "SELECT name from form_review_of_systems_checks where foreign_id = '" . add_escape_custom($this->id) . "'";
$results = sqlQ($sql);
while ($row = mysql_fetch_array($results, MYSQL_ASSOC)) {
$this->checks[] = $row['name'];
}
}
function persist() {
parent::persist();
if (is_numeric($this->id) and !empty($this->checks)) {
$sql = "delete FROM form_review_of_systems_checks where foreign_id = '" . $this->id . "'";
sqlQuery($sql);
foreach ($this->checks as $check) {
if (!empty($check)) {
$sql = "INSERT INTO form_review_of_systems_checks set foreign_id='" . add_escape_custom($this->id) . "', name = '" . add_escape_custom($check) . "'";
sqlQuery($sql);
//echo "$sql<br>";
}
}
}
}
function set_id($id) {
if (!empty($id) && is_numeric($id)) {
$this->id = $id;
}
}
function get_id() {
return $this->id;
}
function set_pid($pid) {
if (!empty($pid) && is_numeric($pid)) {
$this->pid = $pid;
}
}
function get_pid() {
return $this->pid;
}
function set_activity($tf) {
if (!empty($tf) && is_numeric($tf)) {
$this->activity = $tf;
}
}
function get_activity() {
return $this->activity;
}
function set_date_tetnus_shot($string) {
$this->date_tetnus_shot = $string;
}
function get_date_tetnus_shot() {
return $this->date_tetnus_shot;
}
function set_date_pneumonia_shot($string) {
$this->date_pneumonia_shot = $string;
}
function get_date_pneumonia_shot() {
return $this->date_pneumonia_shot;
}
function set_date_flu_shot($string) {
$this->date_flu_shot = $string;
}
function get_date_flu_shot() {
return $this->date_flu_shot;
}
function set_date_pap_smear($string) {
$this->date_pap_smear = $string;
}
function get_date_pap_smear() {
return $this->date_pap_smear;
}
function set_date_mammogram($string) {
$this->date_mammogram = $string;
}
function get_date_mammogram() {
return $this->date_mammogram;
}
function set_date_bone_density_scan($string) {
$this->date_bone_density_scan = $string;
}
function get_date_bone_density_scan() {
return $this->date_bone_density_scan;
}
function set_abnormal_pap_smear($string) {
$this->abnormal_pap_smear = $string;
}
function get_abnormal_pap_smear() {
return $this->abnormal_pap_smear;
}
function set_abnormal_mammogram($string) {
$this->abnormal_mammogram = $string;
}
function get_abnormal_mammogram() {
return $this->abnormal_mammogram;
}
function set_date_last_psa($string) {
$this->date_last_psa = $string;
}
function get_date_last_psa() {
return $this->date_last_psa;
}
function set_packs_per_day($string) {
$this->packs_per_day = $string;
}
function get_packs_per_day() {
return $this->packs_per_day;
}
function set_years_smoked($string) {
$this->years_smoked = $string;
}
function get_years_smoked() {
return $this->years_smoked;
}
function set_alcohol_per_week($string) {
$this->alcohol_per_week = $string;
}
function get_alcohol_per_week() {
return $this->alcohol_per_week;
}
function set_recreational_drugs($string) {
$this->recreational_drugs = $string;
}
function get_recreational_drugs() {
return $this->recreational_drugs;
}
function set_checks($check_array) {
$this->checks = $check_array;
}
function get_checks() {
return $this->checks;
}
function _form_layout() {
$a = array();
//at is array temp
//a is array
//a_bottom is the textually identified rows of a checkbox group
$at[1]['constitutional_fever'] = "Fever";
$at[1]['constitutional_chills'] = "Chills";
$at[1]['constitutional_fatigue'] = "Fatigue";
$at[1]['constitutional_weakness'] = "Weakness";
$at[2]['constitutional_night_sweats'] = "Night Sweats";
$at[2]['constitutional__unexplained_weight_loss'] = "Unexplained Weight Loss";
$at[2]['constitutional_unexplained_weight_gain'] = "Unexplained Weight Gain";
$a['Constitutional'] = $at;
$at = array();
$a_bottom = array();
$at[1]['heent_changes_in_vision'] = "Changes in Vision";
$at[1]['heent_light_sensitivity'] = "Light Sensitivity";
$at[1]['heent_changes_in_hearing'] = "Changes in Hearing";
$at[1]['heent_ringing_in_ears'] = "Ringing in Ears";
$at[2]['heent_frequent_nose_bleeds'] = "Frequent Nose Bleeds";
$at[2]['heent_pain_with_swallowing'] = "Pain with Swallowing";
$at[2]['heent_difficulty_swallowing'] = "Difficulty Swallowing";
$a['HEENT'] = $at;
$at = array();
$a_bottom = array();
$at[1]['endocrine_frequent_thirst'] = "Frequent Thirst";
$at[1]['endocrine_frequent_urination'] = "Frequent Urination";
$at[1]['endocrine_heat_intolerance'] = "Heat Intolerance";
$at[1]['endocrine_brittle_hair'] = "Brittle Hair";
$a['Enodcrine'] = $at;
$at = array();
$a_bottom = array();
$at[1]['respiratory_shortness_of_breath'] = "Shortness Of Breath";
$at[1]['respiratory_difficulty_breathing'] = "Difficulty Breathing";
$at[1]['respiratory_wheezing'] = "Wheezing";
$at[1]['respiratory_coughing_up_blood'] = "Coughing up Blood";
$a['Respiratory'] = $at;
$at = array();
$a_bottom = array();
$at[1]['cv_chest_pain'] = "Chest Pain";
$at[1]['cv_palpitations'] = "Palpitations";
$at[1]['cv_shortness_of_breath_with_exertion'] = "Shortness of Breath with Exertion";
$at[1]['cv_swelling_in_ankles'] = "Swelling in Ankles";
$a['CV'] = $at;
$at = array();
$a_bottom = array();
$at[1]['gi_frequent_heartburn'] = "Frequent Heartburn";
$at[1]['gi_vomiting'] = "Vomiting";
$at[1]['gi_diarrhea'] = "Diarrhea";
$at[1]['gi_constipation'] = "Constipation";
$at[2]['gi_unusually_dark_stools'] = "Unusually Dark Stools";
$at[2]['gi_vomiting_blood'] = "Vomiting Blood";
$a['GI'] = $at;
$at = array();
$a_bottom = array();
$at[1]['gu_pain_with_urination'] = "Pain with Urination";
$at[1]['gu_difficulty_urinating'] = "Difficulty Urinating";
$at[1]['gu_frequent_nightime_urination'] = "Frequent Nightime Urination";
$at["Women"]['gu_women_pelvic_pain'] = "Pelvic Pain";
$at["Women"]['gu_women_leaking_of_urine'] = "Leaking of Urine";
$at["Women"]['gu_women_nipple_discharge'] = "Nipple Discharge";
$at["Women"]['gu_women_breast_pain'] = "Breast Pain";
$at["Men"]['gu_men_difficulty_attaining_erection'] = "Difficulty Attaining Erection";
$at["Men"]['gu_men_testicular_pain'] = "Testicular Pain";
$a['GU'] = $at;
$at = array();
$a_bottom = array();
$at[1]['musculoskeletal_pain_in_joints'] = "Pain in Joints";
$at[1]['musculoskeletal_swollen_joints'] = "Swollen Joints";
$at[1]['musculoskeletal_muscle_pain'] = "Muscle Pain";
$a['Musculoskeletal'] = $at;
$at = array();
$a_bottom = array();
$at[1]['skin_rash'] = "Rash";
$at[1]['skin_hives'] = "Hives";
$at[1]['skin_changing_moles'] = "Changing Moles";
$at[1]['skin_sores_wont_heal'] = "Sores that Won't Heal";
$a['Skin'] = $at;
$at = array();
$a_bottom = array();
$at[1]['neurological_seizures'] = "Seizures";
$at[1]['neurological_loss_of_conciousness'] = "Loss of Conciousness";
$at[1]['neurological_speech_difficulty'] = "Speech Difficulty";
$at[1]['neurological_memory_loss'] = "Memory Loss";
$at[2]['neurological_numbness'] = "Numbness";
$at[2]['neurological_confusion'] = "Confusion";
$a['Neurological'] = $at;
$at = array();
$a_bottom = array();
$at[1]['hematologic_easy_bruising'] = "Easy Bruising";
$at[1]['hematologic_bleeding_gums'] = "Bleeding Gums";
$a['Hematologic'] = $at;
$at = array();
$a_bottom = array();
$at["When sexually active,<br> are you active with:"]['sexually_active_men'] = "Men";
$at["When sexually active,<br> are you active with:"]['sexually_active_women'] = "Women";
$at["When sexually active,<br> are you active with:"]['sexually_active_both'] = "Both";
$a['General'] = $at;
return $a;
}
} // end of Form
?>