3 require_once(dirname(__FILE__
) . "/../../../library/classes/ORDataObject.class.php");
9 class FormWellChild
extends ORDataObject
{
27 var $school_development;
28 var $additional_findings;
54 var $tanner_stage_array = array (" ", "I", "II", "III", "IV", "V");
56 * Constructor sets all Form attributes to their default value
59 function FormWellChild($id= "", $_prefix = "") {
60 if (is_numeric($id)) {
67 $this->_table
= "form_well_child";
68 $this->date
= date("Y-m-d H:i:s");
69 $this->checks
= array();
71 $this->pid
= $GLOBALS['pid'];
81 $sql = "SELECT name from form_well_child_checks where foreign_id = '" . mysql_real_escape_string($this->id
) . "'";
82 $results = sqlQ($sql);
84 while ($row = mysql_fetch_array($results, MYSQL_ASSOC
)) {
85 $this->checks
[] = $row['name'];
87 $this->checks2
= $this->checks
;
88 $this->checks3
= $this->checks
;
91 function toString($html = false) {
93 ."ID: " . $this->id
. "\n";
96 return nl2br($string);
102 function set_id($id) {
103 if (!empty($id) && is_numeric($id)) {
110 function set_pid($pid) {
111 if (!empty($pid) && is_numeric($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 get_date() {
131 function set_date($string) {
132 $this->date
= $string;
139 function set_wt($string) {
147 function set_ht($string) {
155 function set_bp($string) {
163 function set_t($string) {
167 function get_years() {
171 function set_years($string) {
172 $this->years
= $string;
175 function get_months() {
176 return $this->months
;
179 function set_months($string) {
180 $this->months
= $string;
183 function get_wt_percentile() {
184 return $this->wt_percentile
;
187 function set_wt_percentile($string) {
188 $this->wt_percentile
= $string;
191 function get_ht_percentile() {
192 return $this->ht_percentile
;
195 function set_ht_percentile($string) {
196 $this->ht_percentile
= $string;
199 function get_history() {
200 return $this->history
;
203 function set_history($string) {
204 $this->history
= $string;
207 function get_breast_tanner() {
208 return $this->breast_tanner
;
211 function set_breast_tanner($string) {
212 $this->breast_tanner
= $string;
215 function get_male_tanner() {
216 return $this->male_tanner
;
219 function set_male_tanner($string) {
220 $this->male_tanner
= $string;
223 function get_female_tanner() {
224 return $this->female_tanner
;
227 function set_female_tanner($string) {
228 $this->female_tanner
= $string;
231 function get_drug_allergy() {
232 return $this->drug_allergy
;
235 function set_drug_allergy($string) {
236 $this->drug_allergy
= $string;
239 function get_school_development() {
240 return $this->school_development
;
243 function set_school_development($string) {
244 $this->school_development
= $string;
247 function get_additional_findings() {
248 return $this->additional_findings
;
251 function set_additional_findings($string) {
252 $this->additional_findings
= $string;
255 function set_assesment($string) {
256 $this->assesment
= $string;
259 function get_assesment() {
260 return $this->assesment
;
263 function get_ua_dip() {
264 return $this->ua_dip
;
267 function set_ua_dip($string) {
268 $this->ua_dip
= $string;
275 function set_hct($string) {
276 $this->hct
= $string;
279 function get_lead() {
283 function set_lead($string) {
284 $this->lead
= $string;
291 function set_ppd($string) {
292 $this->ppd
= $string;
299 function set_rx($string) {
307 function set_rtc($string) {
308 $this->rtc
= $string;
311 function get_ou_corrected() {
312 return $this->ou_corrected
;
315 function set_ou_corrected($string) {
316 $this->ou_corrected
= $string;
319 function get_ou_uncorrected() {
320 return $this->ou_uncorrected
;
323 function set_ou_uncorrected($string) {
324 $this->ou_uncorrected
= $string;
327 function get_od_corrected() {
328 return $this->od_corrected
;
331 function set_od_corrected($string) {
332 $this->od_corrected
= $string;
335 function get_od_uncorrected() {
336 return $this->od_uncorrected
;
339 function set_od_uncorrected($string) {
340 $this->od_uncorrected
= $string;
343 function get_os_corrected() {
344 return $this->os_corrected
;
347 function set_os_corrected($string) {
348 $this->os_corrected
= $string;
351 function get_os_uncorrected() {
352 return $this->os_uncorrected
;
355 function set_os_uncorrected($string) {
356 $this->os_uncorrected
= $string;
359 function get_right_ear_1000() {
360 return $this->right_ear_1000
;
363 function set_right_ear_1000($string) {
364 $this->right_ear_1000
= $string;
367 function get_right_ear_2000() {
368 return $this->right_ear_2000
;
371 function set_right_ear_2000($string) {
372 $this->right_ear_2000
= $string;
375 function get_right_ear_4000() {
376 return $this->right_ear_4000
;
379 function set_right_ear_4000($string) {
380 $this->right_ear_4000
= $string;
383 function get_left_ear_1000() {
384 return $this->left_ear_1000
;
387 function set_left_ear_1000($string) {
388 $this->left_ear_1000
= $string;
391 function get_left_ear_2000() {
392 return $this->left_ear_2000
;
395 function set_left_ear_2000($string) {
396 $this->left_ear_2000
= $string;
399 function get_left_ear_4000() {
400 return $this->left_ear_4000
;
403 function set_left_ear_4000($string) {
404 $this->left_ear_4000
= $string;
407 function get_checks() {
408 return $this->checks
;
411 function set_checks($check_array) {
412 $this->checks
= $check_array;
415 function get_checks2() {
416 return $this->checks2
;
419 function set_checks2($check_array) {
420 $this->checks2
= $check_array;
423 function get_checks3() {
424 return $this->checks3
;
427 function set_checks3($check_array) {
428 $this->checks3
= $check_array;
434 if (is_numeric($this->id
) and (!empty($this->checks
) ||
!empty($this->checks2
) ||
!empty($this->checks3
))) {
435 $sql = "delete FROM form_well_child_checks where foreign_id = '" . $this->id
. "'";
438 if (!empty($this->checks
)) {
440 foreach ($this->checks
as $check) {
441 if (!empty($check)) {
442 $sql = "INSERT INTO form_well_child_checks set foreign_id='" . mysql_real_escape_string($this->id
) . "', name = '" . mysql_real_escape_string($check) . "'";
449 if (!empty($this->checks2
)) {
450 foreach ($this->checks2
as $check) {
451 if (!empty($check)) {
452 $sql = "INSERT INTO form_well_child_checks set foreign_id='" . mysql_real_escape_string($this->id
) . "', name = '" . mysql_real_escape_string($check) . "'";
459 if (!empty($this->checks3
)) {
460 foreach ($this->checks3
as $check) {
461 if (!empty($check)) {
462 $sql = "INSERT INTO form_well_child_checks set foreign_id='" . mysql_real_escape_string($this->id
) . "', name = '" . mysql_real_escape_string($check) . "'";
472 function _form_layout() {
477 //a_bottom is the textually identified rows of a checkbox group
479 $at[1]['appearance_well_nourished_and_developed'] = "Well Nourished and Developed";
480 $a['Gen. Appearance'] = $at;
483 $at[1]['head_no_lesions'] = "No Lesions";
487 $at[1]['eyes_perl_conjunctiva_sclera_clear'] = "Perl, Conjunctiva & Sclera Clear";
488 $at[1]['eyes_vision_grossly_normal'] = "Vision Grossly Normal";
492 $at[1]['ears_ext_canals_clear_tms_normal'] = "EXT. Canals Clear - TMS Normal";
493 $at[1]['ears_hearing_grossly_normal'] = "Hearing Grossly Normal";
497 $at[1]['nose_passages_patent'] = "Passages Patent";
501 $at[1]['mouth_throat_passages_clear_mm_pink_no_lesions'] = "Passages Clear, MM Pink. No Lesions";
502 $a['Mouth/Throat'] = $at;
505 $at[1]['teeth_grossly_normal'] = "Grossly Normal";
509 $at[1]['neck_throat_supple_no_masses_thyroid_normal'] = "Supple, No Masses, Thyroid Normal";
513 $at[1]['chest_symmetrical'] = "Symmetrical";
517 $at[1]['breast_no_masses'] = "No Masses";
518 $a["Breast:(FEMALE)"] = $at;
521 $at[1]['lungs_clear_to_auscultation_bilat'] = "Clear to Auscultation Bilat";
525 $at[1]['heart_reg_rhythm_no_organic_murmurs'] = "Reg. Rhythm, No Organic Murmurs";
529 $at[1]['abdomen_soft_no_masses_liver_spleen_normal'] = "Soft. No Masses, Liver & Spleen NL";
533 $at[1]['femoral_pulses_normal'] = "Normal";
534 $a["Femoral Pulses"] = $at;
537 $at[1]['genitalia_grossly_normal'] = "Grossly Normal";
538 $at["Male"]['genitalia_male_circ_uncirc_testes_scrotum_rt_lt'] = "CIRC UNCIRC Testes in Scrotum RT LT";
539 $at["Female"] = null;
540 $a["Genitalia"] = $at;
543 $at[1]['extremeties_full_rom_no_deformaties_lesions'] = "Full ROM, No Deformaties or Lesions";
544 $a["Extremeties"] = $at;
547 $at[1]['lymph_not_enlarged'] = "Not Enlarged";
548 $a["Lymph Nodes"] = $at;
551 $at[1]['back_no_scoliosis'] = "No Scoliosis";
555 $at[1]['skin_clear_no_significant_lesions'] = "Clear, No Significant Lesions";
559 $at[1]['nuerologic_alert_no_gross_sens_motor_deficit'] = "Alert, No Gross Ses/Motor Deficit";
560 $a["Nuerologic"] = $at;
563 $at[1]['advice_nutrition'] = "Nutrition";
564 $at[1]['advice_dental_care'] = "Dental Care";
565 $at[1]['advice_accident_prev_auto_safety'] = "Accident Prev./Auto Safety";
566 $at[1]['advice_sexuality_birth_control'] = "Sexuality/Birth Control";
573 function _form_layout2() {
578 //a_bottom is the textually identified rows of a checkbox group
581 $at[1]['dpt_1'] = "1";
582 $at[1]['dpt_2'] = "2";
583 $at[1]['dpt_3'] = "3";
584 $at[1]['dpt_4'] = "4";
585 $at[1]['dpt_5'] = "5";
589 $at[1]['dt_1'] = "1";
590 $at[1]['dt_2'] = "2";
591 $at[1]['dt_3'] = "3";
592 $at[1]['dt_4'] = "4";
593 $at[1]['dt_5'] = "5";
597 $at[1]['opv_1'] = "1";
598 $at[1]['opv_2'] = "2";
599 $at[1]['opv_3'] = "3";
600 $at[1]['opv_4'] = "4";
601 $at[1]['opv_5'] = "5";
605 $at[1]['hepb_1'] = "1";
606 $at[1]['hepb_2'] = "2";
607 $at[1]['hepb_3'] = "3";
611 $at[1]['hib_1'] = "1";
612 $at[1]['hib_2'] = "2";
613 $at[1]['hib_3'] = "3";
614 $at[1]['hib_4'] = "4";
615 $at[1]['hib_5'] = "5";
619 $at[1]['mmr_1'] = "1";
620 $at[1]['mmr_2'] = "2";
624 $at[1]['td_1'] = "1";
625 $at[1]['td_2'] = "2";
632 function _form_layout3() {
637 //a_bottom is the textually identified rows of a checkbox group
640 $at[1]['3_4_years_car_safety'] = "Car Safety";
641 $at[1]['3_4_years_truck_safety'] = "Truck Safety";
642 $at[1]['3_4_years_ipecac'] = "Ipecac";
643 $at[1]['3_4_years_poison_control_number'] = "Poison Control Number";
644 $at[1]['3_4_years_swimming_pool_safety'] = "Swimming Pool Safety";
645 $at[1]['3_4_years_pediatric_cpr'] = "Pediatric CPR";
646 $a["3 To 4 Years"] = $at;
649 $at[1]['5_10_years_car_safety'] = "Car Safety";
650 $at[1]['5_10_years_truck_safety'] = "Truck Safety";
651 $at[1]['5_10_years_swimming_pool_safety'] = "Swimming Pool Safety";
652 $at[1]['5_10_years_pediatric_cpr'] = "Pediatric CPR";
653 $at[1]['5_10_years_bike_skateboard_safety'] = "Bike / Skateboard Safety";
654 $at[1]['5_10_years_stranger_safety'] = "Stranger Safety";
655 $at[1]['5_10_years_substance_abuse'] = "Substance Abuse";
657 $a["5 To 10 Years"] = $at;
660 $at[1]['10_15_years_car_safety'] = "Car Safety";
661 $at[1]['10_15_years_truck_safety'] = "Truck Safety";
662 $at[1]['10_15_years_substance_abuse'] = "Substance Abuse";
663 $at[1]['10_15_years_safe_sex'] = "Safe Sex";
664 $at[1]['10_15_years_bike_skateboard_safety'] = "Bike / Skateboard Safety";
665 $at[1]['10_15_years_swimming_pool_safety'] = "Swimming Pool Safety";
666 $at[1]['10_15_years_cpr'] = "CPR";
667 $a["10 To 15 Years"] = $at;
670 $at[1]['15_20_years_car_safety'] = "Car Safety";
671 $at[1]['15_20_years_truck_safety'] = "Truck Safety";
672 $at[1]['15_20_years_substance_abuse'] = "Substance Abuse";
673 $at[1]['15_20_years_safe_sex'] = "Safe Sex";
674 $at[1]['15_20_years_cpr'] = "CPR";
675 $a["15 To 20 Years"] = $at;