Interim autoloaded library/classes via composer classmap, take 4. (#422)
[openemr.git] / contrib / forms / review_of_systems / FormReviewOfSystems.class.php
blob7bfa1d30deb0f3824a9125dc2b17e515beaa1333
1 <?php
6 /**
7 * class Prosthesis
9 */
10 class FormReviewOfSystems extends ORDataObject {
12 /**
14 * @access public
17 /**
19 * @access private
22 var $id;
23 var $date;
24 var $pid;
25 var $activity;
26 var $date_tetnus_shot;
27 var $date_pneumonia_shot;
28 var $date_flu_shot;
29 var $date_pap_smear;
30 var $date_mammogram;
31 var $date_bone_density_scan;
32 var $abnormal_pap_smear;
33 var $abnormal_mammogram;
34 var $date_last_psa;
35 var $packs_per_day;
36 var $years_smoked;
37 var $alcohol_per_week;
38 var $recreational_drugs;
39 var $checks;
42 /**
43 * Constructor sets all Form attributes to their default value
46 function FormReviewOfSystems($id= "", $_prefix = "") {
47 if (is_numeric($id)) {
48 $this->id = $id;
50 else {
51 $id = "";
53 $this->_table = "form_review_of_systems";
54 $this->date = date("Y-m-d H:i:s");
55 $this->activity = 1;
56 $this->pid = $GLOBALS['pid'];
57 if ($id != "") {
58 $this->populate();
62 function toString($html = false) {
63 $string .= "\n"
64 ."ID: " . $this->id . "\n";
66 if ($html) {
67 return nl2br($string);
69 else {
70 return $string;
74 function populate() {
75 parent::populate();
77 $sql = "SELECT name from form_review_of_systems_checks where foreign_id = '" . add_escape_custom($this->id) . "'";
78 $results = sqlQ($sql);
80 while ($row = sqlFetchArray($results)) {
81 $this->checks[] = $row['name'];
86 function persist() {
87 parent::persist();
88 if (is_numeric($this->id) and !empty($this->checks)) {
89 $sql = "delete FROM form_review_of_systems_checks where foreign_id = '" . $this->id . "'";
90 sqlQuery($sql);
91 foreach ($this->checks as $check) {
92 if (!empty($check)) {
93 $sql = "INSERT INTO form_review_of_systems_checks set foreign_id='" . add_escape_custom($this->id) . "', name = '" . add_escape_custom($check) . "'";
94 sqlQuery($sql);
95 //echo "$sql<br>";
102 function set_id($id) {
103 if (!empty($id) && is_numeric($id)) {
104 $this->id = $id;
107 function get_id() {
108 return $this->id;
110 function set_pid($pid) {
111 if (!empty($pid) && is_numeric($pid)) {
112 $this->pid = $pid;
115 function get_pid() {
116 return $this->pid;
118 function set_activity($tf) {
119 if (!empty($tf) && is_numeric($tf)) {
120 $this->activity = $tf;
123 function get_activity() {
124 return $this->activity;
127 function set_date_tetnus_shot($string) {
128 $this->date_tetnus_shot = $string;
130 function get_date_tetnus_shot() {
131 return $this->date_tetnus_shot;
134 function set_date_pneumonia_shot($string) {
135 $this->date_pneumonia_shot = $string;
137 function get_date_pneumonia_shot() {
138 return $this->date_pneumonia_shot;
141 function set_date_flu_shot($string) {
142 $this->date_flu_shot = $string;
144 function get_date_flu_shot() {
145 return $this->date_flu_shot;
148 function set_date_pap_smear($string) {
149 $this->date_pap_smear = $string;
151 function get_date_pap_smear() {
152 return $this->date_pap_smear;
155 function set_date_mammogram($string) {
156 $this->date_mammogram = $string;
158 function get_date_mammogram() {
159 return $this->date_mammogram;
162 function set_date_bone_density_scan($string) {
163 $this->date_bone_density_scan = $string;
165 function get_date_bone_density_scan() {
166 return $this->date_bone_density_scan;
169 function set_abnormal_pap_smear($string) {
170 $this->abnormal_pap_smear = $string;
172 function get_abnormal_pap_smear() {
173 return $this->abnormal_pap_smear;
176 function set_abnormal_mammogram($string) {
177 $this->abnormal_mammogram = $string;
179 function get_abnormal_mammogram() {
180 return $this->abnormal_mammogram;
183 function set_date_last_psa($string) {
184 $this->date_last_psa = $string;
186 function get_date_last_psa() {
187 return $this->date_last_psa;
190 function set_packs_per_day($string) {
191 $this->packs_per_day = $string;
193 function get_packs_per_day() {
194 return $this->packs_per_day;
197 function set_years_smoked($string) {
198 $this->years_smoked = $string;
200 function get_years_smoked() {
201 return $this->years_smoked;
204 function set_alcohol_per_week($string) {
205 $this->alcohol_per_week = $string;
207 function get_alcohol_per_week() {
208 return $this->alcohol_per_week;
211 function set_recreational_drugs($string) {
212 $this->recreational_drugs = $string;
214 function get_recreational_drugs() {
215 return $this->recreational_drugs;
218 function set_checks($check_array) {
219 $this->checks = $check_array;
222 function get_checks() {
223 return $this->checks;
227 function _form_layout() {
228 $a = array();
230 //at is array temp
231 //a is array
232 //a_bottom is the textually identified rows of a checkbox group
234 $at[1]['constitutional_fever'] = "Fever";
235 $at[1]['constitutional_chills'] = "Chills";
236 $at[1]['constitutional_fatigue'] = "Fatigue";
237 $at[1]['constitutional_weakness'] = "Weakness";
239 $at[2]['constitutional_night_sweats'] = "Night Sweats";
240 $at[2]['constitutional__unexplained_weight_loss'] = "Unexplained Weight Loss";
241 $at[2]['constitutional_unexplained_weight_gain'] = "Unexplained Weight Gain";
243 $a['Constitutional'] = $at;
245 $at = array();
246 $a_bottom = array();
247 $at[1]['heent_changes_in_vision'] = "Changes in Vision";
248 $at[1]['heent_light_sensitivity'] = "Light Sensitivity";
249 $at[1]['heent_changes_in_hearing'] = "Changes in Hearing";
250 $at[1]['heent_ringing_in_ears'] = "Ringing in Ears";
252 $at[2]['heent_frequent_nose_bleeds'] = "Frequent Nose Bleeds";
253 $at[2]['heent_pain_with_swallowing'] = "Pain with Swallowing";
254 $at[2]['heent_difficulty_swallowing'] = "Difficulty Swallowing";
256 $a['HEENT'] = $at;
258 $at = array();
259 $a_bottom = array();
260 $at[1]['endocrine_frequent_thirst'] = "Frequent Thirst";
261 $at[1]['endocrine_frequent_urination'] = "Frequent Urination";
262 $at[1]['endocrine_heat_intolerance'] = "Heat Intolerance";
263 $at[1]['endocrine_brittle_hair'] = "Brittle Hair";
265 $a['Enodcrine'] = $at;
267 $at = array();
268 $a_bottom = array();
269 $at[1]['respiratory_shortness_of_breath'] = "Shortness Of Breath";
270 $at[1]['respiratory_difficulty_breathing'] = "Difficulty Breathing";
271 $at[1]['respiratory_wheezing'] = "Wheezing";
272 $at[1]['respiratory_coughing_up_blood'] = "Coughing up Blood";
274 $a['Respiratory'] = $at;
276 $at = array();
277 $a_bottom = array();
278 $at[1]['cv_chest_pain'] = "Chest Pain";
279 $at[1]['cv_palpitations'] = "Palpitations";
280 $at[1]['cv_shortness_of_breath_with_exertion'] = "Shortness of Breath with Exertion";
281 $at[1]['cv_swelling_in_ankles'] = "Swelling in Ankles";
283 $a['CV'] = $at;
285 $at = array();
286 $a_bottom = array();
287 $at[1]['gi_frequent_heartburn'] = "Frequent Heartburn";
288 $at[1]['gi_vomiting'] = "Vomiting";
289 $at[1]['gi_diarrhea'] = "Diarrhea";
290 $at[1]['gi_constipation'] = "Constipation";
292 $at[2]['gi_unusually_dark_stools'] = "Unusually Dark Stools";
293 $at[2]['gi_vomiting_blood'] = "Vomiting Blood";
295 $a['GI'] = $at;
297 $at = array();
298 $a_bottom = array();
299 $at[1]['gu_pain_with_urination'] = "Pain with Urination";
300 $at[1]['gu_difficulty_urinating'] = "Difficulty Urinating";
301 $at[1]['gu_frequent_nightime_urination'] = "Frequent Nightime Urination";
303 $at["Women"]['gu_women_pelvic_pain'] = "Pelvic Pain";
304 $at["Women"]['gu_women_leaking_of_urine'] = "Leaking of Urine";
305 $at["Women"]['gu_women_nipple_discharge'] = "Nipple Discharge";
306 $at["Women"]['gu_women_breast_pain'] = "Breast Pain";
308 $at["Men"]['gu_men_difficulty_attaining_erection'] = "Difficulty Attaining Erection";
309 $at["Men"]['gu_men_testicular_pain'] = "Testicular Pain";
311 $a['GU'] = $at;
313 $at = array();
314 $a_bottom = array();
315 $at[1]['musculoskeletal_pain_in_joints'] = "Pain in Joints";
316 $at[1]['musculoskeletal_swollen_joints'] = "Swollen Joints";
317 $at[1]['musculoskeletal_muscle_pain'] = "Muscle Pain";
319 $a['Musculoskeletal'] = $at;
321 $at = array();
322 $a_bottom = array();
323 $at[1]['skin_rash'] = "Rash";
324 $at[1]['skin_hives'] = "Hives";
325 $at[1]['skin_changing_moles'] = "Changing Moles";
326 $at[1]['skin_sores_wont_heal'] = "Sores that Won't Heal";
328 $a['Skin'] = $at;
330 $at = array();
331 $a_bottom = array();
332 $at[1]['neurological_seizures'] = "Seizures";
333 $at[1]['neurological_loss_of_conciousness'] = "Loss of Conciousness";
334 $at[1]['neurological_speech_difficulty'] = "Speech Difficulty";
335 $at[1]['neurological_memory_loss'] = "Memory Loss";
337 $at[2]['neurological_numbness'] = "Numbness";
338 $at[2]['neurological_confusion'] = "Confusion";
340 $a['Neurological'] = $at;
342 $at = array();
343 $a_bottom = array();
344 $at[1]['hematologic_easy_bruising'] = "Easy Bruising";
345 $at[1]['hematologic_bleeding_gums'] = "Bleeding Gums";
347 $a['Hematologic'] = $at;
349 $at = array();
350 $a_bottom = array();
351 $at["When sexually active,<br> are you active with:"]['sexually_active_men'] = "Men";
352 $at["When sexually active,<br> are you active with:"]['sexually_active_women'] = "Women";
353 $at["When sexually active,<br> are you active with:"]['sexually_active_both'] = "Both";
355 $a['General'] = $at;
357 return $a;
361 } // end of Form