Updated Acknowledgments page
[openemr.git] / contrib / forms / well_infant / FormWellInfant.class.php
blob4020fb8c385c3d223ff4699e509cf258b84ca92e
1 <?php
3 require_once(dirname(__FILE__) . "/../../../library/classes/ORDataObject.class.php");
5 /**
6 * class FormWellInfant
8 */
9 class FormWellInfant extends ORDataObject {
11 /**
13 * @access private
16 var $id;
17 var $wt;
18 var $ht;
19 var $hcirc;
20 var $t;
21 var $years;
22 var $months;
23 var $wt_percentile;
24 var $ht_percentile;
25 var $hcirc_percentile;
26 var $head_open_cm;
27 var $history;
28 var $formula_type;
29 var $feeding_oz;
30 var $feeding_24h;
31 var $additional_findings;
32 var $assesment;
33 var $hct;
34 var $lead;
35 var $ppd;
36 var $feeding;
37 var $advice;
38 var $rtc;
40 var $checks;
41 var $checks2;
42 var $checks3;
44 var $tanner_stage_array = array (" ", "I", "II", "III", "IV", "V");
45 /**
46 * Constructor sets all Form attributes to their default value
49 function FormWellInfant($id= "", $_prefix = "") {
50 if (is_numeric($id)) {
51 $this->id = $id;
53 else {
54 $id = "";
57 $this->_table = "form_well_infant";
58 $this->date = date("Y-m-d H:i:s");
59 $this->checks = array();
60 $this->activity = 1;
61 $this->pid = $GLOBALS['pid'];
63 if ($id != "") {
64 $this->populate();
68 function populate() {
69 parent::populate();
71 $sql = "SELECT name from form_well_infant_checks where foreign_id = '" . mysql_real_escape_string($this->id) . "'";
72 $results = sqlQ($sql);
74 while ($row = mysql_fetch_array($results, MYSQL_ASSOC)) {
75 $this->checks[] = $row['name'];
77 $this->checks2 = $this->checks;
78 $this->checks3 = $this->checks;
81 function toString($html = false) {
82 $string .= "\n"
83 ."ID: " . $this->id . "\n";
85 if ($html) {
86 return nl2br($string);
88 else {
89 return $string;
92 function set_id($id) {
93 if (!empty($id) && is_numeric($id)) {
94 $this->id = $id;
97 function get_id() {
98 return $this->id;
100 function set_pid($pid) {
101 if (!empty($pid) && is_numeric($pid)) {
102 $this->pid = $pid;
105 function get_pid() {
106 return $this->pid;
108 function set_activity($tf) {
109 if (!empty($tf) && is_numeric($tf)) {
110 $this->activity = $tf;
113 function get_activity() {
114 return $this->activity;
117 function get_date() {
118 return $this->date;
121 function set_date($string) {
122 $this->date = $string;
125 function get_wt() {
126 return $this->wt;
129 function set_wt($string) {
130 $this->wt = $string;
133 function get_ht() {
134 return $this->ht;
137 function set_ht($string) {
138 $this->ht = $string;
141 function get_hcirc() {
142 return $this->hcirc;
145 function set_hcirc($string) {
146 $this->hcirc = $string;
149 function get_head_open_cm() {
150 return $this->head_open_cm;
153 function set_head_open_cm($string) {
154 $this->head_open_cm = $string;
157 function get_t() {
158 return $this->t;
161 function set_t($string) {
162 $this->t = $string;
165 function get_years() {
166 return $this->years;
169 function set_years($string) {
170 $this->years = $string;
173 function get_months() {
174 return $this->months;
177 function set_months($string) {
178 $this->months = $string;
181 function get_wt_percentile() {
182 return $this->wt_percentile;
185 function set_wt_percentile($string) {
186 $this->wt_percentile = $string;
189 function get_ht_percentile() {
190 return $this->ht_percentile;
193 function set_ht_percentile($string) {
194 $this->ht_percentile = $string;
197 function get_hcirc_percentile() {
198 return $this->hcirc_percentile;
201 function set_hcirc_percentile($string) {
202 $this->hcirc_percentile = $string;
205 function get_history() {
206 return $this->history;
209 function set_history($string) {
210 $this->history = $string;
213 function get_formula_type() {
214 return $this->formula_type;
217 function set_formula_type($string) {
218 $this->formula_type = $string;
221 function get_feeding_oz() {
222 return $this->feeding_oz;
225 function set_feeding_oz($string) {
226 $this->feeding_oz = $string;
229 function get_feeding_24h() {
230 return $this->feeding_24h;
233 function set_feeding_24h($string) {
234 $this->feeding_24h = $string;
237 function get_additional_findings() {
238 return $this->additional_findings;
241 function set_additional_findings($string) {
242 $this->additional_findings = $string;
245 function set_assesment($string) {
246 $this->assesment = $string;
249 function get_assesment() {
250 return $this->assesment;
253 function get_hct() {
254 return $this->hct;
257 function set_hct($string) {
258 $this->hct = $string;
261 function get_lead() {
262 return $this->lead;
265 function set_lead($string) {
266 $this->lead = $string;
269 function get_ppd() {
270 return $this->ppd;
273 function set_ppd($string) {
274 $this->ppd = $string;
277 function get_feeding() {
278 return $this->feeding;
281 function set_feeding($string) {
282 $this->feeding = $string;
285 function get_advice() {
286 return $this->advice;
289 function set_advice($string) {
290 $this->advice = $string;
293 function get_rtc() {
294 return $this->rtc;
297 function set_rtc($string) {
298 $this->rtc = $string;
301 function get_checks() {
302 return $this->checks;
305 function set_checks($check_array) {
306 $this->checks = $check_array;
309 function get_checks2() {
310 return $this->checks2;
313 function set_checks2($check_array) {
314 $this->checks2 = $check_array;
317 function get_checks3() {
318 return $this->checks3;
321 function set_checks3($check_array) {
322 $this->checks3 = $check_array;
325 function persist() {
327 parent::persist();
328 if (is_numeric($this->id) and (!empty($this->checks) || !empty($this->checks2) || !empty($this->checks3))) {
329 $sql = "delete FROM form_well_infant_checks where foreign_id = '" . $this->id . "'";
330 sqlQuery($sql);
332 if (!empty($this->checks)) {
334 foreach ($this->checks as $check) {
335 if (!empty($check)) {
336 $sql = "INSERT INTO form_well_infant_checks set foreign_id='" . mysql_real_escape_string($this->id) . "', name = '" . mysql_real_escape_string($check) . "'";
337 sqlQuery($sql);
338 //echo "$sql<br>";
343 if (!empty($this->checks2)) {
344 foreach ($this->checks2 as $check) {
345 if (!empty($check)) {
346 $sql = "INSERT INTO form_well_infant_checks set foreign_id='" . mysql_real_escape_string($this->id) . "', name = '" . mysql_real_escape_string($check) . "'";
347 sqlQuery($sql);
348 //echo "$sql<br>";
353 if (!empty($this->checks3)) {
354 foreach ($this->checks3 as $check) {
355 if (!empty($check)) {
356 $sql = "INSERT INTO form_well_infant_checks set foreign_id='" . mysql_real_escape_string($this->id) . "', name = '" . mysql_real_escape_string($check) . "'";
357 sqlQuery($sql);
358 //echo "$sql<br>";
366 function _form_layout() {
367 $a = array();
369 //at is array temp
370 //a is array
371 //a_bottom is the textually identified rows of a checkbox group
372 $at = array();
373 $at[1]['appearance_well_nourished_and_developed'] = "Well Nourished and Developed";
374 $a['Gen. Appearance'] = $at;
376 $at = array();
377 $at[1]['head_symmetrical_af'] = "Symmetrical A.F.";
378 $a["Head"] = $at;
380 $at = array();
381 $at[1]['eyes_conjunctiva_sclera_pupils_nl'] = "Conjunctiva, Sclera, Pupils NL";
382 $at[1]['eyes_red_reflexes_present'] = "Red Reflexes Present";
383 $at[1]['eyes_appears_to_see_no_strabismus'] = "Appears to See, No Strabismus";
384 $a["Eyes"] = $at;
386 $at = array();
387 $at[1]['ears_canals_clear_tms_normal'] = "Canals Clear - TMS Normal";
388 $at[1]['ears_appears_to_hear'] = "Appears to Hear";
389 $a["Ears"] = $at;
391 $at = array();
392 $at[1]['nose_passages_patent'] = "Passages Patent";
393 $a["Nose"] = $at;
395 $at = array();
396 $at[1]['mouth_pharynx_normal_color_without_lesions'] = "Normal Color/Without Lesions";
397 $a['Mouth/Pharynx'] = $at;
399 $at = array();
400 $at[1]['teeth_grossly_normal'] = "Grossly Normal";
401 $a["Teeth"] = $at;
403 $at = array();
404 $at[1]['neck_throat_supple_no_masses_palpated'] = "Supple, No Masses, Palpated";
405 $a["Neck"] = $at;
407 $at = array();
408 $at[1]['heart_no_murmurs_regular_rhythm'] = "No Murmurs, Regular Rhythm";
409 $a["Heart"] = $at;
411 $at = array();
412 $at[1]['femoral_pulses_present'] = "Present";
413 $a["Femoral Pulses"] = $at;
415 $at = array();
416 $at[1]['lungs_breath_sounds_normal_bilat'] = "Breath Sounds Normal Bilat";
417 $a["Lungs"] = $at;
419 $at = array();
420 $at[1]['abdomen_soft_no_masses_nl_liver_spleen'] = "Soft. No Masses, NL Liver & Spleen";
421 $a["Abdomen"] = $at;
423 $at = array();
424 $at["Male"]['genital_male_normal_appearance_circ_uncirc'] = "Normal Appearance CIRC UNCIRC";
425 $at["Male"]['genital_male_testes_in_scrotum_rt_lt'] = "Testes in Scrotum RT. LT.";
426 $at["Female"]['genital_female_no_lesions_nl_external_appearance'] = "No Lesions, NL External Appearance";
427 $a["Genital"] = $at;
429 $at = array();
430 $at[1]['hips_good_abduction_no_clicks'] = "Good Abduction, No Clicks";
431 $a["Hips"] = $at;
433 $at = array();
434 $at[1]['extremeties_no_deformaties_full_rom'] = "No Deformaties, Full ROM";
435 $a["Extremeties"] = $at;
437 $at = array();
438 $at[1]['skin_clear_no_significant_lesions'] = "Clear, No Significant Lesions";
439 $a["Skin"] = $at;
441 $at = array();
442 $at[1]['nuerologic_alert_moves_extremeties_well'] = "Alert, Moves Extremeties Well";
443 $a["Nuerologic"] = $at;
445 $at = array();
446 $at[1]['feeding_breast'] = "Breast";
447 $at[1]['feeding_normal_bowel_pattern'] = "Normal Bowel Pattern";
448 $at[1]['feeding_normal_sleep_habits'] = "Normal Sleep Habits";
449 $at[1]['feeding_vit_flouride'] = "VIT./Flouride";
450 $a["Feeding"] = $at;
452 $at = array();
453 $at[1]['advice_accident_poisoning_prev_car_safety'] = "Accident/Poisoning Prev-Car Safety";
454 $a["Advice"] = $at;
457 return $a;
460 function _form_layout2() {
461 $a = array();
463 //at is array temp
464 //a is array
465 //a_bottom is the textually identified rows of a checkbox group
467 $at = array();
468 $at[1]['dpt_1'] = "1";
469 $at[1]['dpt_2'] = "2";
470 $at[1]['dpt_3'] = "3";
471 $at[1]['dpt_4'] = "4";
472 $at[1]['dpt_5'] = "5";
473 $a["DPT"] = $at;
475 $at = array();
476 $at[1]['dt_1'] = "1";
477 $at[1]['dt_2'] = "2";
478 $at[1]['dt_3'] = "3";
479 $at[1]['dt_4'] = "4";
480 $at[1]['dt_5'] = "5";
481 $a["DT"] = $at;
483 $at = array();
484 $at[1]['opv_1'] = "1";
485 $at[1]['opv_2'] = "2";
486 $at[1]['opv_3'] = "3";
487 $at[1]['opv_4'] = "4";
488 $at[1]['opv_5'] = "5";
489 $a["OPV"] = $at;
491 $at = array();
492 $at[1]['hepb_1'] = "1";
493 $at[1]['hepb_2'] = "2";
494 $at[1]['hepb_3'] = "3";
495 $a["HEP. B"] = $at;
497 $at = array();
498 $at[1]['hib_1'] = "1";
499 $at[1]['hib_2'] = "2";
500 $at[1]['hib_3'] = "3";
501 $at[1]['hib_4'] = "4";
502 $at[1]['hib_5'] = "5";
503 $a["HIB"] = $at;
505 $at = array();
506 $at[1]['mmr_1'] = "1";
507 $at[1]['mmr_2'] = "2";
508 $a["MMR"] = $at;
510 $at = array();
511 $at[1]['td_1'] = "1";
512 $at[1]['td_2'] = "2";
513 $a["Td"] = $at;
515 return $a;
519 function _form_layout3() {
520 $a = array();
522 //at is array temp
523 //a is array
524 //a_bottom is the textually identified rows of a checkbox group
526 $at = array();
527 $at['Anticipatory Guidance']['1_month_auto_safety_seat'] = "Auto Safety Seat";
528 $at['Anticipatory Guidance']['1_month_falls_ability_to_roll'] = "Falls - ability to roll";
529 $at['Anticipatory Guidance']['1_month_safety_sheet_given'] = "Safety sheet given";
531 $at['Development']['1_month_hearing'] = "Hearing";
532 $at['Development']['1_month_follows_to_midline'] = "Follows to midline";
533 $at['Development']['1_month_lifts_head_when_prone'] = "Lifts head when prone";
535 $a["1 Month"] = $at;
537 $at = array();
538 $at['Anticipatory Guidance']['2_month_auto_safety_seat'] = "Auto Safety Seat";
539 $at['Anticipatory Guidance']['2_month_burns'] = "Burns (smoke detectors & hot water temp, 120 degrees F)";
540 $at['Anticipatory Guidance']['2_month_immunization_risks'] = "Immunization Risks";
541 $at['Anticipatory Guidance']['2_month_falls'] = "Falls";
543 $at['Development']['2_month_social_responsive_smile'] = "Social (responsive smile)";
544 $at['Development']['2_month_vocalizes'] = "Vocalizes";
545 $at['Development']['2_month_head_raised_to_45_degrees_while_prone'] = "Head raised to 45 degrees while prone";
546 $at['Development']['2_month_grasps'] = "Grasps";
548 $a["2 Months"] = $at;
550 $at = array();
551 $at['Anticipatory Guidance']['4_month_auto_safety_seat'] = "Auto Safety Seat";
552 $at['Anticipatory Guidance']['4_month_choking'] = "Choking - appropriate foods, small objects out of reach";
553 $at['Anticipatory Guidance']['4_month_burns_hot_liquids'] = "Burns - hot liquids";
555 $at['Development']['4_month_sits_with_head_steady'] = "Sits with head steady";
556 $at['Development']['4_month_follows_180_degrees'] = "Follows 180 degrees";
557 $at['Development']['4_months_orients_to_voices'] = "Orients to voices";
558 $at['Development']['4_month_goos'] = "Goos (ohh, ooh, ahh, ahh)";
559 $at['Development']['4_month_laughs'] = "Laughs";
561 $a["4 Months"] = $at;
563 $at = array();
564 $at['Anticipatory Guidance']['6_month_falls_stairs_gates'] = "Falls - stais/gates, walkers, furniture";
565 $at['Anticipatory Guidance']['6_month_burns_hot_liquids'] = "Burns - hot liquids, kitchen safety";
566 $at['Anticipatory Guidance']['6_month_poison'] = "Poison - Poison Center Phone #, Ipecac, Drugs/household";
567 $at['Anticipatory Guidance']['6_month_safety_sheet_given'] = "Safety sheet given";
569 $at['Development']['6_month_orients_to_bell'] = "Orients to bell";
570 $at['Development']['6_month_rolls_over'] = "Rolls Over";
571 $at['Development']['6_month_sits_briefly_leaning_forward'] = "Sits briefly, leaning forward";
572 $at['Development']['6_month_reaches_for_objects'] = "Reaches for objects";
573 $at['Development']['6_month_babbles'] = "Babbles (repetitive strings of consonants, i.e. bababababa)";
575 $a["6 Months"] = $at;
577 $at = array();
578 $at['Anticipatory Guidance']['9_12_month_auto_safety_seat'] = "Auto Safety Seat";
579 $at['Anticipatory Guidance']['9_12_month_poisoning'] = "Poisoning";
580 $at['Anticipatory Guidance']['9_12_month_drowning_water_safety'] = "Drowning/water safety";
581 $at['Anticipatory Guidance']['9_12_month_safety_sheet_given'] = "Safety sheet given";
583 $at['Development']['9_12_month_works_for_toys_out_of_reach'] = "Works for toys out of reach";
584 $at['Development']['9_12_month_peek_a_boo'] = "Peek-a-Boo";
585 $at['Development']['9_12_month_sits_alone'] = "Sits alone";
586 $at['Development']['9_12_month_pull_self_up'] = "Pull self up";
587 $at['Development']['9_12_month_says_mama_dada_baba'] = "Says mama/dada/baba (paired consonants)";
588 $at['Development']['9_12_month_looks_directly_at_ringing_bell'] = "Looks directly at ringing bell";
590 $a["9 to 12 Months"] = $at;
592 $at = array();
593 $at['Anticipatory Guidance']['15_month_falls_climbing'] = "Falls - climbing";
594 $at['Anticipatory Guidance']['15_month_burns_hot_objects_matches'] = "Burns - hot objects, matches";
595 $at['Anticipatory Guidance']['15_month_street_safety'] = "Street Safety";
596 $at['Anticipatory Guidance']['15_month_dental_care'] = "Dental Care, nursing caries";
598 $at['Development']['15_month_neat_pincer_grasp'] = "Neat pincer grasp";
599 $at['Development']['15_month_mama_dada_correct_specific'] = "Mama or dada, correct/ specific";
600 $at['Development']['15_month_walks_alone_well'] = "Walks alone, well";
601 $at['Development']['15_month_stroops_and_recovers'] = "Stroops and recovers";
602 $at['Development']['15_month_indicates_wants'] = "Indicates wants";
603 $at['Development']['15_month_3_word_vocabulary'] = "3 word vocabulary";
605 $a["15 Months"] = $at;
607 $at = array();
608 $at['Anticipatory Guidance']['18_2_month_auto_safety_seat'] = "Auto Safety Seat";
609 $at['Anticipatory Guidance']['18_2_month_poisoning'] = "Poisoning";
610 $at['Anticipatory Guidance']['18_2_month_water_safety_drowning'] = "Water safety/drowning";
611 $at['Anticipatory Guidance']['18_2_month_dental_care'] = "Dental Care, brushing, flouride";
612 $at['Anticipatory Guidance']['18_2_month_falls_play_equip_tricycles'] = "Falls - play equip./tricycles";
613 $at['Anticipatory Guidance']['18_2_month_water_safety_drowning'] = "Water safety/drowning";
614 $at['Anticipatory Guidance']['18_2_month_auto_predestrian'] = "Auto - pedestrian";
615 $at['Anticipatory Guidance']['18_2_month_safety_sheet_given'] = "Safety sheet given";
617 $at['Development (18 months)']['18_2_seven_twenty_word_vocabulary'] = "7-20 words vocabulary";
618 $at['Development (18 months)']['18_2_month_walks_fast'] = "Walks fast";
620 $at['Development (24 months)']['18_2_month_uses_spoon_well'] = "Uses spoon well";
621 $at['Development (24 months)']['18_2_month_helps in house'] = "Helps in house";
622 $at['Development (24 months)']['18_2_month_identifies_one_body_part'] = "Identifies one body part";
623 $at['Development (24 months)']['18_2_month_combines_2_different_words'] = "Combines 2 different words";
624 $at['Development (24 months)']['18_2_month_kicks_a_ball'] = "Kicks a ball";
625 $at['Development (24 months)']['18_2_month_scribbles'] = "Scribbles";
626 $at['Development (24 months)']['18_2_month_tower_of_4_blocks'] = "Tower of 4 blocks";
627 $at['Development (24 months)']['18_2_month_throws_a_ball'] = "Throws a ball";
629 $a["15 Months"] = $at;
631 return $a;
635 } // end of Form