Updated translation table after fixing script in previous commit
[openemr.git] / contrib / forms / adult_progress_note / FormAdultProgressNote.class.php
blob6fe9a6b2e38cded7f28dcd786209bd046d35bd37
1 <?php
3 require_once(dirname(__FILE__) . "/../../../library/classes/ORDataObject.class.php");
5 /**
6 * class FormAdultProgressNote
8 */
9 class FormAdultProgressNote extends ORDataObject {
11 /**
13 * @access private
16 var $id;
17 var $med_allergies;
18 var $wt;
19 var $ht;
20 var $t;
21 var $current_meds;
22 var $bp;
23 var $hr;
24 var $rr;
25 var $cc1;
26 var $cc2;
27 var $hpi;
28 var $assesment;
30 /**
31 * Constructor sets all Form attributes to their default value
34 function FormAdultProgressNote($id= "", $_prefix = "") {
35 if (is_numeric($id)) {
36 $this->id = $id;
38 else {
39 $id = "";
42 $this->_table = "form_adult_progress_note";
43 $this->date = date("Y-m-d H:i:s");
44 $this->checks = array();
45 $this->checks2 = array();
46 $this->activity = 1;
47 $this->pid = $GLOBALS['pid'];
49 if ($id != "") {
50 $this->populate();
54 function populate() {
55 parent::populate();
57 $sql = "SELECT name from form_adult_progress_note_checks where foreign_id = '" . mysql_real_escape_string($this->id) . "'";
58 $results = sqlQ($sql);
60 while ($row = mysql_fetch_array($results, MYSQL_ASSOC)) {
61 $this->checks[] = $row['name'];
63 $this->checks2 = $this->checks;
66 function toString($html = false) {
67 $string .= "\n"
68 ."ID: " . $this->id . "\n";
70 if ($html) {
71 return nl2br($string);
73 else {
74 return $string;
77 function set_id($id) {
78 if (!empty($id) && is_numeric($id)) {
79 $this->id = $id;
82 function get_id() {
83 return $this->id;
85 function set_pid($pid) {
86 if (!empty($pid) && is_numeric($pid)) {
87 $this->pid = $pid;
90 function get_pid() {
91 return $this->pid;
93 function set_activity($tf) {
94 if (!empty($tf) && is_numeric($tf)) {
95 $this->activity = $tf;
98 function get_activity() {
99 return $this->activity;
102 function get_date() {
103 return $this->date;
106 function set_date($string) {
107 $this->date = $string;
110 function set_med_allergies($string) {
111 $this->med_allergies = $string;
114 function get_med_allergies() {
115 return $this->med_allergies;
118 function set_wt($string) {
119 $this->wt = $string;
122 function get_wt() {
123 return $this->wt;
126 function set_ht($string) {
127 $this->ht = $string;
130 function get_ht() {
131 return $this->ht;
134 function set_t($string) {
135 $this->t = $string;
138 function get_t() {
139 return $this->t;
142 function set_current_meds($string) {
143 $this->current_meds = $string;
146 function get_current_meds() {
147 return $this->current_meds;
150 function set_bp($string) {
151 $this->bp = $string;
154 function get_bp() {
155 return $this->bp;
158 function set_hr($string) {
159 $this->hr = $string;
162 function get_hr() {
163 return $this->hr;
166 function set_rr($string) {
167 $this->rr = $string;
170 function get_rr() {
171 return $this->rr;
174 function set_cc1($string) {
175 $this->cc1 = $string;
178 function get_cc1() {
179 return $this->cc1;
182 function set_cc2($string) {
183 $this->cc2 = $string;
186 function get_cc2() {
187 return $this->cc2;
190 function set_hpi($string) {
191 $this->hpi = $string;
194 function get_hpi() {
195 return $this->hpi;
198 function set_assesment($string) {
199 $this->assesment = $string;
202 function get_assesment() {
203 return $this->assesment;
206 function get_checks() {
207 return $this->checks;
210 function set_checks($check_array) {
211 $this->checks = $check_array;
214 function get_checks2() {
215 return $this->checks2;
218 function set_checks2($check_array) {
219 $this->checks2 = $check_array;
222 function persist() {
224 parent::persist();
225 if (is_numeric($this->id) and !empty($this->checks)) {
226 $sql = "delete FROM form_adult_progress_note_checks where foreign_id = '" . $this->id . "'";
227 sqlQuery($sql);
228 foreach ($this->checks as $check) {
229 if (!empty($check)) {
230 $sql = "INSERT INTO form_adult_progress_note_checks set foreign_id='" . mysql_real_escape_string($this->id) . "', name = '" . mysql_real_escape_string($check) . "'";
231 sqlQuery($sql);
232 //echo "$sql<br>";
235 foreach ($this->checks2 as $check) {
236 if (!empty($check)) {
237 $sql = "INSERT INTO form_adult_progress_note_checks set foreign_id='" . mysql_real_escape_string($this->id) . "', name = '" . mysql_real_escape_string($check) . "'";
238 sqlQuery($sql);
239 //echo "$sql<br>";
246 function _form_layout() {
247 $a = array();
249 //at is array temp
250 //a is array
251 //a_bottom is the textually identified rows of a checkbox group
253 //$at["General"]['general_not_examined'] = "Not Examined";
254 $at["General"]['general_wnl'] = "WNL";
255 $at["General"]['general_abnormal'] = "Abnormal";
257 //$at["HEENT"]['heent_not_examined'] = "Not Examined";
258 $at["HEENT"]['heent_wnl'] = "WNL";
259 $at["HEENT"]['heent_abnormal'] = "Abnormal";
261 //$at["Heart"]['heart_not_examined'] = "Not Examined";
262 $at["Heart"]['heart_wnl'] = "WNL";
263 $at["Heart"]['heart_abnormal'] = "Abnormal";
265 //$at["Lungs"]['lungs_not_examined'] = "Not Examined";
266 $at["Lungs"]['lungs_wnl'] = "WNL";
267 $at["Lungs"]['lungs_abnormal'] = "Abnormal";
269 //$at["Back"]['back_not_examined'] = "Not Examined";
270 $at["Back"]['back_wnl'] = "WNL";
271 $at["Back"]['back_abnormal'] = "Abnormal";
273 //$at["Breast"]['breast_not_examined'] = "Not Examined";
274 $at["Breast"]['breast_wnl'] = "WNL";
275 $at["Breast"]['breast_abnormal'] = "Abnormal";
277 //$at["ABD"]['abd_not_examined'] = "Not Examined";
278 $at["ABD"]['abd_wnl'] = "WNL";
279 $at["ABD"]['abd_abnormal'] = "Abnormal";
281 //$at["Genital/URO"]['genital_uro_not_examined'] = "Not Examined";
282 $at["Genital/URO"]['genital_uro_wnl'] = "WNL";
283 $at["Genital/URO"]['genital_uro_abnormal'] = "Abnormal";
285 //$at["Rectal"]['rectal_not_examined'] = "Not Examined";
286 $at["Rectal"]['rectal_wnl'] = "WNL";
287 $at["Rectal"]['rectal_abnormal'] = "Abnormal";
289 //$at["Extremeties"]['extremeties_not_examined'] = "Not Examined";
290 $at["Extremeties"]['extremeties_wnl'] = "WNL";
291 $at["Extremeties"]['extremeties_abnormal'] = "Abnormal";
293 //$at["Skin"]['skin_not_examined'] = "Not Examined";
294 $at["Skin"]['skin_wnl'] = "WNL";
295 $at["Skin"]['skin_abnormal'] = "Abnormal";
297 //$at["Neuro"]['neuro_not_examined'] = "Not Examined";
298 $at["Neuro"]['neuro_wnl'] = "WNL";
299 $at["Neuro"]['neuro_abnormal'] = "Abnormal";
301 $a['Physical Exam'] = $at;
303 return $a;
306 function _form_layout2() {
307 $a = array();
309 //at is array temp
310 //a is array
311 //a_bottom is the textually identified rows of a checkbox group
313 $at[1]['education_discussed'] = "Patient Education Discussed";
315 $at[2]['education_obesity'] = "Obesity";
316 $at[2]['education_diabetes'] = "Diabetes";
317 $at[2]['education_family_planning'] = "Family Planning";
319 $at[3]['education_diet'] = "Diet";
320 $at[3]['education_std_s'] = "STD's";
321 $at[3]['education_prenatal_care'] = "Prenatal Care";
323 $at[4]['education_exercise'] = "Exercise";
324 $at[4]['education_pid_s'] = "PID's";
325 $at[4]['education_self_breast_exam'] = "Self Breast Exam";
327 $at[5]['education_smoking'] = "Smoking";
328 $at[5]['education_htn'] = "HTN";
329 $at[5]['education_immunization'] = "Immunization";
331 $at[6]['education_cholesterol'] = "Cholesterol";
332 $at[6]['education_meds'] = "Meds";
333 $at[6]['education_pediatric_topics'] = "Pediatric Topics";
335 $a['Patient Education'] = $at;
338 return $a;
342 } // end of Form