3 require_once(dirname(__FILE__
) . "/../../../library/classes/ORDataObject.class.php");
11 class FormReviewOfSystems
extends ORDataObject
{
27 var $date_tetnus_shot;
28 var $date_pneumonia_shot;
32 var $date_bone_density_scan;
33 var $abnormal_pap_smear;
34 var $abnormal_mammogram;
38 var $alcohol_per_week;
39 var $recreational_drugs;
44 * Constructor sets all Form attributes to their default value
47 function FormReviewOfSystems($id= "", $_prefix = "") {
48 if (is_numeric($id)) {
54 $this->_table
= "form_review_of_systems";
55 $this->date
= date("Y-m-d H:i:s");
57 $this->pid
= $GLOBALS['pid'];
63 function toString($html = false) {
65 ."ID: " . $this->id
. "\n";
68 return nl2br($string);
78 $sql = "SELECT name from form_review_of_systems_checks where foreign_id = '" . add_escape_custom($this->id
) . "'";
79 $results = sqlQ($sql);
81 while ($row = mysql_fetch_array($results, MYSQL_ASSOC
)) {
82 $this->checks
[] = $row['name'];
89 if (is_numeric($this->id
) and !empty($this->checks
)) {
90 $sql = "delete FROM form_review_of_systems_checks where foreign_id = '" . $this->id
. "'";
92 foreach ($this->checks
as $check) {
94 $sql = "INSERT INTO form_review_of_systems_checks set foreign_id='" . add_escape_custom($this->id
) . "', name = '" . add_escape_custom($check) . "'";
103 function set_id($id) {
104 if (!empty($id) && is_numeric($id)) {
111 function set_pid($pid) {
112 if (!empty($pid) && is_numeric($pid)) {
119 function set_activity($tf) {
120 if (!empty($tf) && is_numeric($tf)) {
121 $this->activity
= $tf;
124 function get_activity() {
125 return $this->activity
;
128 function set_date_tetnus_shot($string) {
129 $this->date_tetnus_shot
= $string;
131 function get_date_tetnus_shot() {
132 return $this->date_tetnus_shot
;
135 function set_date_pneumonia_shot($string) {
136 $this->date_pneumonia_shot
= $string;
138 function get_date_pneumonia_shot() {
139 return $this->date_pneumonia_shot
;
142 function set_date_flu_shot($string) {
143 $this->date_flu_shot
= $string;
145 function get_date_flu_shot() {
146 return $this->date_flu_shot
;
149 function set_date_pap_smear($string) {
150 $this->date_pap_smear
= $string;
152 function get_date_pap_smear() {
153 return $this->date_pap_smear
;
156 function set_date_mammogram($string) {
157 $this->date_mammogram
= $string;
159 function get_date_mammogram() {
160 return $this->date_mammogram
;
163 function set_date_bone_density_scan($string) {
164 $this->date_bone_density_scan
= $string;
166 function get_date_bone_density_scan() {
167 return $this->date_bone_density_scan
;
170 function set_abnormal_pap_smear($string) {
171 $this->abnormal_pap_smear
= $string;
173 function get_abnormal_pap_smear() {
174 return $this->abnormal_pap_smear
;
177 function set_abnormal_mammogram($string) {
178 $this->abnormal_mammogram
= $string;
180 function get_abnormal_mammogram() {
181 return $this->abnormal_mammogram
;
184 function set_date_last_psa($string) {
185 $this->date_last_psa
= $string;
187 function get_date_last_psa() {
188 return $this->date_last_psa
;
191 function set_packs_per_day($string) {
192 $this->packs_per_day
= $string;
194 function get_packs_per_day() {
195 return $this->packs_per_day
;
198 function set_years_smoked($string) {
199 $this->years_smoked
= $string;
201 function get_years_smoked() {
202 return $this->years_smoked
;
205 function set_alcohol_per_week($string) {
206 $this->alcohol_per_week
= $string;
208 function get_alcohol_per_week() {
209 return $this->alcohol_per_week
;
212 function set_recreational_drugs($string) {
213 $this->recreational_drugs
= $string;
215 function get_recreational_drugs() {
216 return $this->recreational_drugs
;
219 function set_checks($check_array) {
220 $this->checks
= $check_array;
223 function get_checks() {
224 return $this->checks
;
228 function _form_layout() {
233 //a_bottom is the textually identified rows of a checkbox group
235 $at[1]['constitutional_fever'] = "Fever";
236 $at[1]['constitutional_chills'] = "Chills";
237 $at[1]['constitutional_fatigue'] = "Fatigue";
238 $at[1]['constitutional_weakness'] = "Weakness";
240 $at[2]['constitutional_night_sweats'] = "Night Sweats";
241 $at[2]['constitutional__unexplained_weight_loss'] = "Unexplained Weight Loss";
242 $at[2]['constitutional_unexplained_weight_gain'] = "Unexplained Weight Gain";
244 $a['Constitutional'] = $at;
248 $at[1]['heent_changes_in_vision'] = "Changes in Vision";
249 $at[1]['heent_light_sensitivity'] = "Light Sensitivity";
250 $at[1]['heent_changes_in_hearing'] = "Changes in Hearing";
251 $at[1]['heent_ringing_in_ears'] = "Ringing in Ears";
253 $at[2]['heent_frequent_nose_bleeds'] = "Frequent Nose Bleeds";
254 $at[2]['heent_pain_with_swallowing'] = "Pain with Swallowing";
255 $at[2]['heent_difficulty_swallowing'] = "Difficulty Swallowing";
261 $at[1]['endocrine_frequent_thirst'] = "Frequent Thirst";
262 $at[1]['endocrine_frequent_urination'] = "Frequent Urination";
263 $at[1]['endocrine_heat_intolerance'] = "Heat Intolerance";
264 $at[1]['endocrine_brittle_hair'] = "Brittle Hair";
266 $a['Enodcrine'] = $at;
270 $at[1]['respiratory_shortness_of_breath'] = "Shortness Of Breath";
271 $at[1]['respiratory_difficulty_breathing'] = "Difficulty Breathing";
272 $at[1]['respiratory_wheezing'] = "Wheezing";
273 $at[1]['respiratory_coughing_up_blood'] = "Coughing up Blood";
275 $a['Respiratory'] = $at;
279 $at[1]['cv_chest_pain'] = "Chest Pain";
280 $at[1]['cv_palpitations'] = "Palpitations";
281 $at[1]['cv_shortness_of_breath_with_exertion'] = "Shortness of Breath with Exertion";
282 $at[1]['cv_swelling_in_ankles'] = "Swelling in Ankles";
288 $at[1]['gi_frequent_heartburn'] = "Frequent Heartburn";
289 $at[1]['gi_vomiting'] = "Vomiting";
290 $at[1]['gi_diarrhea'] = "Diarrhea";
291 $at[1]['gi_constipation'] = "Constipation";
293 $at[2]['gi_unusually_dark_stools'] = "Unusually Dark Stools";
294 $at[2]['gi_vomiting_blood'] = "Vomiting Blood";
300 $at[1]['gu_pain_with_urination'] = "Pain with Urination";
301 $at[1]['gu_difficulty_urinating'] = "Difficulty Urinating";
302 $at[1]['gu_frequent_nightime_urination'] = "Frequent Nightime Urination";
304 $at["Women"]['gu_women_pelvic_pain'] = "Pelvic Pain";
305 $at["Women"]['gu_women_leaking_of_urine'] = "Leaking of Urine";
306 $at["Women"]['gu_women_nipple_discharge'] = "Nipple Discharge";
307 $at["Women"]['gu_women_breast_pain'] = "Breast Pain";
309 $at["Men"]['gu_men_difficulty_attaining_erection'] = "Difficulty Attaining Erection";
310 $at["Men"]['gu_men_testicular_pain'] = "Testicular Pain";
316 $at[1]['musculoskeletal_pain_in_joints'] = "Pain in Joints";
317 $at[1]['musculoskeletal_swollen_joints'] = "Swollen Joints";
318 $at[1]['musculoskeletal_muscle_pain'] = "Muscle Pain";
320 $a['Musculoskeletal'] = $at;
324 $at[1]['skin_rash'] = "Rash";
325 $at[1]['skin_hives'] = "Hives";
326 $at[1]['skin_changing_moles'] = "Changing Moles";
327 $at[1]['skin_sores_wont_heal'] = "Sores that Won't Heal";
333 $at[1]['neurological_seizures'] = "Seizures";
334 $at[1]['neurological_loss_of_conciousness'] = "Loss of Conciousness";
335 $at[1]['neurological_speech_difficulty'] = "Speech Difficulty";
336 $at[1]['neurological_memory_loss'] = "Memory Loss";
338 $at[2]['neurological_numbness'] = "Numbness";
339 $at[2]['neurological_confusion'] = "Confusion";
341 $a['Neurological'] = $at;
345 $at[1]['hematologic_easy_bruising'] = "Easy Bruising";
346 $at[1]['hematologic_bleeding_gums'] = "Bleeding Gums";
348 $a['Hematologic'] = $at;
352 $at["When sexually active,<br> are you active with:"]['sexually_active_men'] = "Men";
353 $at["When sexually active,<br> are you active with:"]['sexually_active_women'] = "Women";
354 $at["When sexually active,<br> are you active with:"]['sexually_active_both'] = "Both";