3 * This file presents the PMSFH control panel.
4 * It uses ajax/javascript to add, delete or edit an issue.
6 * Originally culled from /interface/patient_file/summary and adapted...
8 * Copyright (C) 2005-2011 Rod Roark <rod@sunsetsystems.com>
9 * Copyright (C) 2015-6 Ray Magauran <magauran@MedFetch.com>
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
17 * @author Rod Roark <rod@sunsetsystems.com>
18 * @author Ray Magauran <magauran@MedFetch.com>
19 * @link http://www.open-emr.org
22 //SANITIZE ALL ESCAPES
23 $sanitize_all_escapes=true;
24 //STOP FAKE REGISTER GLOBALS
25 $fake_register_globals=false;
26 $form_folder= "eye_mag";
27 require_once('../../globals.php');
28 require_once($GLOBALS['srcdir'].'/lists.inc');
29 require_once($GLOBALS['srcdir'].'/patient.inc');
30 require_once($GLOBALS['srcdir'].'/acl.inc');
31 require_once($GLOBALS['srcdir'].'/sql.inc');
32 require_once($GLOBALS['srcdir'].'/options.inc.php');
33 require_once($GLOBALS['fileroot'].'/custom/code_types.inc.php');
34 require_once($GLOBALS['srcdir'].'/csv_like_join.php');
35 require_once($GLOBALS['srcdir'].'/htmlspecialchars.inc.php');
36 require_once($GLOBALS['srcdir'].'/formdata.inc.php');
37 require_once($GLOBALS['srcdir'].'/log.inc');
38 require_once("../../forms/".$form_folder."/php/".$form_folder."_functions.php");
40 $pid = 0 +
(empty($_REQUEST['pid']) ?
$pid : $_REQUEST['pid']);
43 // A nonempty thisenc means we are to link the issue to the encounter.
44 // ie. we are going to use this as a billing issue?
45 // The Coding Engine does not look at encounters and issue linkage, yet. It could and perhaps should.
46 $encounter = 0 +
(empty($_REQUEST['encounter']) ?
$_SESSION['encounter'] : $_REQUEST['encounter']);
48 $issue = $_REQUEST['issue'];
49 $deletion = $_REQUEST['deletion'];
50 $form_save = $_REQUEST['form_save'];
51 if (!$pid) $pid = $_SESSION['pid'];
52 $form_id = $_REQUEST['form_id'];
53 $form_type = $_REQUEST['form_type'];
54 $uniqueID = $_REQUEST['uniqueID'];
56 if ($issue && !acl_check('patients','med','','write') ) die(xlt("Edit is not authorized!"));
57 if ( !acl_check('patients','med','',array('write','addonly') )) die(xlt("Add is not authorized!"));
58 $PMSFH = build_PMSFH($pid);
59 $patient = getPatientData($pid, "*");
60 $providerID = findProvider($pid,$encounter);
61 if (!$_SESSION['providerID'] && $providerID) ($_SESSION['providerID'] = $providerID);
65 $irow = sqlQuery("SELECT * FROM lists WHERE id = ?",array($issue));
66 } else if ($thistype) {
67 $irow['type'] = $thistype;
68 $irow['subtype'] = $subtype;
70 if (!empty($irow['type'])) {
71 foreach ($ISSUE_TYPES as $key => $value) {
72 if ($key == $irow['type']) break;
76 $given="ROSGENERAL,ROSHEENT,ROSCV,ROSPULM,ROSGI,ROSGU,ROSDERM,ROSNEURO,ROSPSYCH,ROSMUSCULO,ROSIMMUNO,ROSENDOCRINE";
77 $query="SELECT $given from form_eye_mag where id=? and pid=?";
78 $rres = sqlQuery($query,array($form_id,$pid));
79 foreach (explode(',',$given) as $item) {
80 $
$item = $rres[$item];
85 <title
><?php
echo xlt('Add New Issue'); ?
></title
>
86 <script language
="JavaScript">
87 <?php
require_once("$srcdir/restoreSession.php"); ?
>
89 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot']; ?>/interface/main/tabs/js/include_opener.js"></script
>
91 <meta name
="viewport" content
="width=device-width, initial-scale=1" />
92 <style type
="text/css">@import
url(<?php
echo $GLOBALS['webroot']; ?
>/library
/dynarch_calendar
.css
);</style
>
93 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot']; ?>/library/dynarch_calendar.js"></script
>
94 <?php
require_once($GLOBALS['srcdir'].'/dynarch_calendar_en.inc.php'); ?
>
95 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot']; ?>/library/dynarch_calendar_setup.js"></script
>
97 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot']; ?>/library/textformat.js"></script
>
98 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot']; ?>/library/dialog.js"></script
>
100 <script language
="JavaScript">
101 var mypcc
= '<?php echo $GLOBALS['phone_country_code
'] ?>';
102 var aitypes
= new Array(); // issue type attributes
103 var aopts
= new Array(); // Option objects
105 //This builds the litle quick pick list in this section.
106 // If the provider has more 2 items already defined in the last month, they are collated
107 // and ranked by frequency, sort alphabetically and <=10 are listed.
108 // If not, we use the defaults from list_options/
111 foreach ($PMSFH[0] as $key => $value) {
112 echo " aopts['" . attr($key) . "'] = [];\n";
114 echo " aitypes['" . attr($key). "'] = '0';\n";
115 if ($key =="PMH") { // "0" = medical_problem_issue_list leave out Dental "4"
116 $qry = sqlStatement("SELECT title, title as option_id, diagnosis as codes, count(title) AS freq FROM `lists` WHERE `type` LIKE ? and
117 subtype = '' and pid in (select pid from form_encounter where provider_id =?
118 and date BETWEEN NOW() - INTERVAL 30 DAY AND NOW()) GROUP BY title order by freq desc limit 10", array("medical_problem",$_SESSION['providerID']));
120 if (sqlNumRows($qry) < '4') { //if they are just starting out, use the list_options for all
121 $qry = sqlStatement("SELECT * FROM list_options WHERE list_id = ? and subtype not like 'eye'",array("medical_problem_issue_list"));
123 } elseif ($key =="Medication") {
124 $qry = sqlStatement("SELECT title, title as option_id, diagnosis as codes, count(title) AS freq FROM `lists` WHERE `type` LIKE ? and
125 subtype = '' and pid in (select pid from form_encounter where provider_id =?
126 and date BETWEEN NOW() - INTERVAL 30 DAY AND NOW()) GROUP BY title order by freq desc limit 10", array("medication",$_SESSION['providerID']));
127 if (sqlNumRows($qry) < '4') { //if they are just starting out, use the list_options for all
128 $qry = sqlStatement("SELECT * FROM list_options WHERE list_id = ? and subtype not like 'eye'",array("medication_issue_list"));
130 } elseif ($key =="Surgery") {
131 $qry = sqlStatement("SELECT title, title as option_id, diagnosis as codes, count(title) AS freq FROM `lists` WHERE `type` LIKE ? and
132 subtype = '' and pid in (select pid from form_encounter where provider_id =?
133 and date BETWEEN NOW() - INTERVAL 30 DAY AND NOW()) GROUP BY title order by freq desc limit 10", array("surgery",$_SESSION['providerID']));
134 if (sqlNumRows($qry) < '4') { //if they are just starting out, use the list_options for all
135 $qry = sqlStatement("SELECT * FROM list_options WHERE list_id = ? and subtype not like 'eye'",array("surgery_issue_list"));
137 } elseif ($key =="Allergy") {
138 $qry = sqlStatement("SELECT title, title as option_id, diagnosis as codes, count(title) AS freq FROM `lists` WHERE `type` LIKE ? and
139 subtype = '' and pid in (select pid from form_encounter where provider_id =?
140 and date BETWEEN NOW() - INTERVAL 30 DAY AND NOW()) GROUP BY title order by freq desc limit 10", array("allergy",$_SESSION['providerID']));
141 if (sqlNumRows($qry) < '4') { //if they are just starting out, use the list_options for all
142 $qry = sqlStatement("SELECT * FROM list_options WHERE list_id = ? and subtype not like 'eye'",array("allergy_issue_list"));
144 } elseif ($key == "POH") { // POH medical group
145 $query = "SELECT title, title as option_id, diagnosis as codes, count(title) AS freq FROM `lists` WHERE `type` LIKE 'medical_problem' and subtype = 'eye' and pid in (select pid from form_encounter where provider_id =? and date BETWEEN NOW() - INTERVAL 30 DAY AND NOW()) GROUP BY title order by freq desc limit 10";
146 $qry = sqlStatement($query,array($_SESSION['providerID']));
147 if (sqlNumRows($qry) < '4') { //if they are just starting out, use the list_options for all
148 $qry = sqlStatement("SELECT * FROM list_options WHERE list_id = 'medical_problem_issue_list' and subtype = 'eye'");
150 } elseif ($key == "POS") { // POS surgery group
151 $query = "SELECT title, title as option_id, diagnosis as codes, count(title) AS freq FROM `lists` WHERE `type` LIKE 'surgery' and subtype = 'eye' and pid in (select pid from form_encounter where provider_id =? and date BETWEEN NOW() - INTERVAL 30 DAY AND NOW()) GROUP BY title order by freq desc limit 10";
152 $qry = sqlStatement($query,array($_SESSION['providerID']));
153 if (sqlNumRows($qry) < '4') { //if they are just starting out, use the list_options for all
154 $qry = sqlStatement("SELECT * FROM list_options WHERE list_id = 'surgery_issue_list' and subtype = 'eye'");
156 } elseif ($key == "FH") {
159 } elseif ($key == "SOCH") {
162 } elseif ($key == "ROS") {
166 if ($local =="1") { // leave FH/SocHx/ROS for later - done below separately
167 while($res = sqlFetchArray($qry)){ //Should we take the top 10 and display alphabetically?
168 echo " aopts['" .attr($key). "'][aopts['" .attr($key). "'].length] = new Option('".attr(trim($res['option_id']))."', '".attr(xl_list_label(trim($res['title'])))."', false, false);\n";
170 echo " aopts['" .attr($key). "'][aopts['" .attr($key). "'].length-1].setAttribute('data-code','".attr(trim($res['codes']))."');\n";
179 <?php
require($GLOBALS['srcdir'] . "/restoreSession.php"); ?
>
181 function newtype(index
) {
182 var f
= document
.forms
[0];
183 var theopts
= f
.form_titles
.options
;
187 for (i
= 0; i
< aopts
[index
].length
; ++i
) {
188 theopts
[i
] = aopts
[index
][i
];
192 f
.form_type
.value
= index
;
193 f
.form_occur
.options
[0].selected
= true;
195 document
.getElementById('row_quick_picks' ).style
.display
= i ?
'' : 'none'; //select list of things
196 document
.getElementById('row_title' ).style
.display
= '';
197 document
.getElementById('row_diagnosis' ).style
.display
= 'none';
198 document
.getElementById('row_begindate' ).style
.display
= 'none';
199 document
.getElementById('row_enddate' ).style
.display
= 'none';
200 document
.getElementById('row_reaction' ).style
.display
= 'none';
201 document
.getElementById('row_referredby' ).style
.display
= 'none';
202 document
.getElementById('row_classification' ).style
.display
= 'none';
203 document
.getElementById('row_occurrence' ).style
.display
= 'none';
204 document
.getElementById('row_comments' ).style
.display
= 'none';
205 document
.getElementById('row_outcome' ).style
.display
= 'none';
206 document
.getElementById('row_destination' ).style
.display
= 'none';
207 document
.getElementById('row_social' ).style
.display
= 'none';
208 document
.getElementById('row_FH' ).style
.display
= 'none';
209 document
.getElementById('row_ROS' ).style
.display
= 'none';
210 document
.getElementById('row_PLACEHOLDER' ).style
.display
= 'none';
211 document
.getElementById('cancel_button' ).style
.display
= 'none';
212 document
.getElementById('row_eye_med' ).style
.display
= 'none';
215 if (index
== 'PMH') {
216 document
.getElementById('title_diagnosis' ).textContent
="<?php echo xlt('PMH Dx').":"; ?>";
217 document
.getElementById('row_diagnosis' ).style
.display
= '';
218 document
.getElementById('row_begindate' ).style
.display
= '';
219 document
.getElementById('row_enddate' ).style
.display
= '';
220 document
.getElementById('row_occurrence' ).style
.display
= '';
221 f
.form_occur
.options
[2].selected
= true;
222 document
.getElementById('row_comments' ).style
.display
= '';
224 } else if (index
== 'Allergy') {
225 document
.getElementById('title_diagnosis' ).textContent
="<?php echo xlt('Allergic to').":"; ?>";
226 document
.getElementById('row_reaction' ).style
.display
= '';
227 document
.getElementById('row_begindate' ).style
.display
= '';
228 document
.getElementById('row_comments' ).style
.display
= '';
230 } else if (index
== 'Medication') {
231 document
.getElementById('title_diagnosis' ).textContent
="<?php echo xlt('Medication').":"; ?>";
232 document
.getElementById('row_begindate' ).style
.display
= '';
233 document
.getElementById('row_enddate' ).style
.display
= '';
234 document
.getElementById('row_comments' ).style
.display
= '';
235 document
.getElementById('row_eye_med' ).style
.display
= '';
237 //change Onset to started
238 //change resolved to Completed
239 document
.getElementById('onset' ).textContent
= "<?php echo xlt('Start').':'; ?>";
240 document
.getElementById('resolved' ).textContent
= "<?php echo xlt('Finish').':'; ?>";
242 } else if ((index
== 'Surgery')||
(index
=='POS')) {
243 document
.getElementById('title_diagnosis' ).textContent
="<?php echo xlt('Procedure').':'; ?>";
244 document
.getElementById('row_diagnosis' ).style
.display
= '';
246 document
.getElementById('row_begindate' ).style
.display
= '';
247 document
.getElementById('row_referredby' ).style
.display
= '';
248 document
.getElementById('form_referredby' ).title
="<?php echo xla('Name of the Surgeon'); ?>";
249 document
.getElementById('by_whom' ).textContent
= "<?php echo xlt('Surgeon').':'; ?>";
250 document
.getElementById('onset' ).textContent
= "<?php echo xlt('Date').':'; ?>";
251 document
.getElementById('row_outcome' ).style
.display
= '';
252 document
.getElementById('row_comments' ).style
.display
= '';
254 } else if (index
== 4) { //Dental so skip it
255 } else if (index
== 'POH') {
256 document
.getElementById('title_diagnosis' ).textContent
="<?php echo xlt('Eye Dx{{eye diagnosis}}').":"; ?>";
257 document
.getElementById('row_diagnosis' ).style
.display
= '';
258 document
.getElementById('row_begindate' ).style
.display
= '';
259 document
.getElementById('row_referredby' ).style
.display
= '';
260 document
.getElementById('by_whom' ).textContent
="<?php echo xlt('Collaborator').":"; ?>";
261 document
.getElementById('form_referredby' ).title
="<?php echo xla('Co-managing/referring provider'); ?>";
262 document
.getElementById('onset' ).textContent
= "<?php echo xlt('Date').":"; ?>";
263 document
.getElementById('row_comments' ).style
.display
= '';
265 } else if (index
== 'FH') {
266 document
.getElementById('row_title' ).style
.display
= 'none';
267 document
.getElementById('row_FH' ).style
.display
= '';
269 } else if (index
== 'SOCH') {
270 document
.getElementById('row_title' ).style
.display
= 'none';
271 document
.getElementById('row_social' ).style
.display
= '';
272 document
.getElementById('cancel_button' ).style
.display
= '';
274 } else if (index
== 'ROS') {
275 document
.getElementById('row_title' ).style
.display
= 'none';
276 document
.getElementById('row_ROS' ).style
.display
= '';
279 document
.getElementById('title_diagnosis' ).textContent
="<?php echo xlt('Eye Dx{{eye diagnosis}}').":"; ?>";
280 document
.getElementById('row_diagnosis' ).style
.display
= '';
281 document
.getElementById('row_begindate' ).style
.display
= '';
282 document
.getElementById('row_referredby' ).style
.display
= '';
283 document
.getElementById('form_referredby' ).title
="<?php echo xla('Referring provider'); ?>";
284 document
.getElementById('by_whom' ).textContent
="<?php echo xlt('Collaborator').":"; ?>";
285 document
.getElementById('onset' ).textContent
= "<?php echo xlt('Date').":"; ?>";
286 document
.getElementById('row_comments' ).style
.display
= '';
287 document
.getElementById('row_PLACEHOLDER' ).style
.display
= '';
291 // If a clickoption title is selected, copy it to the title field.
292 // We also want to copy any other fields present in obj.PMSFH_options
293 // We need to build this object first. The base install options will need ICD-10 codes attached
294 // to make this work.
295 // f.form_title.diagnosis = f.form_titles.options[f.form_titles.selectedIndex].text;
296 function set_text() {
297 var f
= document
.forms
[0];
298 f
.form_title
.value
= f
.form_titles
.options
[f
.form_titles
.selectedIndex
].text
;
299 f
.form_diagnosis
.value
= f
.form_titles
.options
[f
.form_titles
.selectedIndex
].getAttribute('data-code');
300 f
.form_titles
.selectedIndex
= -1;
303 function refreshIssue() { parent
.refresh_page(); }
304 function submit_this_form() {
305 var url
= "../../forms/eye_mag/save.php?PMSFH_save=1&mode=update&form_save=1";
306 var formData
= $
("form#theform").serialize();
307 var f
= document
.forms
[0];
308 top
.restoreSession();
310 type
: 'POST', // define the type of HTTP verb we want to use (POST for our form)
311 url
: url
, // the url where we want to POST
312 data
: formData
// our data object
313 }).done(function(result
){
314 f
.form_title
.value
= '';
315 f
.form_diagnosis
.value
= '';
316 f
.form_begin
.value
='';
317 f
.form_end
.value
='';
318 f
.form_referredby
.value
='';
319 f
.form_reaction
.value
='';
320 f
.form_classification
.value
='';
321 f
.form_comments
.value
='';
322 f
.form_outcome
.value
='';
323 f
.form_destination
.value
='';
325 parent
.populate_form(result
);
328 // Process click on Delete link.
329 function deleteme() {
330 var url
= "../../forms/eye_mag/save.php?PMSFH_save=1&mode=update&form_save=1";
331 var f
= document
.forms
[0];
332 top
.restoreSession();
336 pid
: <?php
echo attr($pid); ?
>,
337 issue
: f
.issue
.value
,
342 }).done(function (result
){
343 // CLEAR THE FORM TOO...
344 f
.form_title
.value
= '';
345 f
.form_diagnosis
.value
= '';
346 f
.form_begin
.value
='';
347 f
.form_end
.value
='';
348 f
.form_referredby
.value
='';
349 f
.form_reaction
.value
='';
350 f
.form_classification
.value
='';
351 f
.form_comments
.value
='';
352 f
.form_occur
.options
[0].selected
= true;
353 f
.form_outcome
.value
='';
354 f
.form_destination
.value
='';
356 parent
.populate_form(result
);
359 function imdeleted() { closeme(); }
361 negate_radio('radio_tobacco');
362 var f
= document
.forms
[0];
364 // f.radio_tobacco.value = '';
365 f
.form_diagnosis
.value
= '';
366 f
.form_begin
.value
='';
367 f
.form_end
.value
='';
368 f
.form_referredby
.value
='';
369 f
.form_reaction
.value
='';
370 f
.form_classification
.value
='';
371 f
.form_comments
.value
='';
372 f
.form_outcome
.value
='';
373 f
.form_destination
.value
='';
376 // Called when the Active checkbox is clicked. For consistency we
377 // use the existence of an end date to indicate inactivity, even
378 // though the simple verion of the form does not show an end date.
379 function resolvedClicked(cb
) {
380 var f
= document
.forms
[0];
382 f
.form_end
.value
= '';
383 f
.delete_button
.classList
.remove("nodisplay");
385 var today
= new Date();
386 f
.form_end
.value
= '' +
(today
.getYear() +
1900) +
'-' +
387 (today
.getMonth() +
1) +
'-' + today
.getDate();
388 f
.delete_button
.classList
.add("nodisplay");
391 // Called when resolved outcome is chosen and the end date is entered.
392 function outcomeClicked(cb
) {
393 var f
= document
.forms
[0];
394 if (cb
.value
== '1'){
395 var today
= new Date();
396 f
.form_end
.value
= '' +
(today
.getYear() +
1900) +
'-' +
397 ("0" +
(today
.getMonth() +
1)).slice(-2) +
'-' +
("0" + today
.getDate()).slice(-2);
400 // This is for callback by the find-code popup.
401 // Appends to or erases the current list of diagnoses.
402 function set_related(codetype
, code
, selector
, codedesc
) {
403 var f
= document
.forms
[0];
404 var s
= f
.form_diagnosis
.value
;
405 var title
= f
.form_title
.value
;
407 if (s
.length
> 0) s +
= ';';
408 s +
= codetype +
':' + code
;
412 f
.form_diagnosis
.value
= s
;
413 if(title
== '') f
.form_title
.value
= codedesc
;
416 // This invokes the find-code popup.
417 function sel_diagnosis() {
418 var f
= document
.forms
[0];
419 term
= f
.form_title
.value
;
421 if(($irow['type'] == 'PMH') ||
($irow['type'] == 'POH'))
424 dlgopen('../../patient_file/encounter/find_code_popup.php?codetype=<?php echo attr(collect_codetypes("medical_problem","csv")) ?>&search_term='+term
, '_blank', 500, 400);
429 dlgopen('../../patient_file/encounter/find_code_popup.php?codetype=<?php echo attr(collect_codetypes("diagnosis","csv")) ?>&search_term='+term
, '_blank', 500, 400);
436 // Check for errors when the form is submitted.
437 function validate() {
438 var f
= document
.forms
[0];
439 if(f
.form_begin
.value
> f
.form_end
.value
&& (f
.form_end
.value
)) {
440 alert("<?php echo addslashes(xl('Please Enter End Date greater than Begin Date!')); ?>");
443 if (f
.form_type
.value
!= 'ROS' && f
.form_type
.value
!= 'FH' && f
.form_type
.value
!='SOCH') {
444 if (! f
.form_title
.value
) {
445 alert("<?php echo addslashes(xl('Please enter a title!')); ?>");
452 // Supports customizable forms (currently just for IPPF).
453 function divclick(cb
, divid
) {
454 var divstyle
= document
.getElementById(divid
).style
;
456 divstyle
.display
= 'block';
458 divstyle
.display
= 'none';
461 //function for selecting the smoking status in drop down list based on the selection in radio button.
462 function smoking_statusClicked(cb
) {
463 if (cb
.value
== 'currenttobacco')
465 document
.getElementById('form_tobacco').selectedIndex
= 1;
467 else if (cb
.value
== 'nevertobacco')
469 document
.getElementById('form_tobacco').selectedIndex
= 4;
471 else if (cb
.value
== 'quittobacco')
473 document
.getElementById('form_tobacco').selectedIndex
= 3;
475 else if (cb
.value
== 'not_applicabletobacco')
477 document
.getElementById('form_tobacco').selectedIndex
= 6;
479 radioChange(document
.getElementById('form_tobacco').value
); }
480 //function for selecting the smoking status in radio button based on the selection of drop down list.
481 function radioChange(rbutton
){
482 if (rbutton
== 1 || rbutton
== 2 || rbutton
== 15 || rbutton
== 16)
484 document
.getElementById('radio_tobacco[current]').checked
= true;
486 else if (rbutton
== 3)
488 document
.getElementById('radio_tobacco[quit]').checked
= true;
490 else if (rbutton
== 4)
492 document
.getElementById('radio_tobacco[never]').checked
= true;
494 else if (rbutton
== 5 || rbutton
== 9)
496 document
.getElementById('radio_tobacco[not_applicable]').checked
= true;
498 else if (rbutton
== '')
500 var radList
= document
.getElementsByName('radio_tobacco');
501 for (var i
= 0; i
< radList
.length
; i++
) {
502 if(radList
[i
].checked
) radList
[i
].checked
= false;
505 //Added on 5-jun-2k14 (regarding 'Smoking Status - display SNOMED code description')
507 if(code_options_js
[rbutton
]!="")
508 $
("#smoke_code").html(" ( "+code_options_js
[rbutton
]+
" )");
510 $
("#smoke_code").html("");
513 $
("#smoke_code").html("");
516 function setSelectBoxByText(eid
, etxt
) {
517 var eid
= document
.getElementById(eid
);
518 for (var i
= 0; i
< eid
.options
.length
; ++i
) {
519 if (eid
.options
[i
].text
=== etxt
)
520 eid
.options
[i
].selected
= true;
523 function clear_option(section
) {
524 //click the field, erase the Negative radio and input Y
525 var f
= document
.forms
[0];
526 var name
= 'radio_'+section
.name
;
527 var radio
= document
.getElementById(name
);
528 radio
.checked
= false;
529 if (section
.value
==''){
533 function negate_radio(section
) {
534 if (section
.checked
==true){
535 var rfield
= section
.name
.match(/radio_(.*)/);
536 document
.getElementById(rfield
[1]).value
='';
538 //Added on 5-jun-2k14 (regarding 'Smoking Status - display SNOMED code description')
539 var code_options_js
= Array();
542 $smoke_codes = getSmokeCodes();
544 foreach ($smoke_codes as $val => $code) {
545 echo "code_options_js"."['" . attr($val) . "']='" . attr($code) . "';\n";
550 <!-- Add Font stuff
for the look
and feel
. -->
552 <link rel
="stylesheet" href
="../../forms/<?php echo $form_folder; ?>/css/style.css" type
="text/css">
553 <link rel
="stylesheet" href
="<?php echo $GLOBALS['css_header']; ?>" type
="text/css">
554 <link rel
="stylesheet" href
="<?php echo $css_header;?>" type
="text/css">
556 <link rel
="stylesheet" href
="<?php echo $GLOBALS['assets_static_relative'] ?>/jquery-ui-1-11-4/themes/excite-bike/jquery-ui.css">
557 <link rel
="stylesheet" href
="<?php echo $GLOBALS['assets_static_relative'] ?>/pure-0-5-0/pure-min.css">
558 <link rel
="stylesheet" href
="<?php echo $GLOBALS['assets_static_relative'] ?>/bootstrap-3-3-4/dist/css/bootstrap.min.css">
559 <link rel
="stylesheet" href
="<?php echo $GLOBALS['assets_static_relative'] ?>/qtip2-2-2-1/jquery.qtip.min.css" />
560 <link rel
="stylesheet" href
="<?php echo $GLOBALS['assets_static_relative'] ?>/font-awesome-4-6-3/css/font-awesome.min.css">
562 td
, select
, textarea
, input
{
563 font
-family
: Fontawesome
, Arial
, Helvetica
, sans
-serif
;
567 input
[type
="text"],textarea
{
569 background
-color
: cornsilk
!important
;
571 display
: inline
-block
;
572 border
: 1px solid
#CCC !important;
573 box
-shadow
: 0px
1px
3px
#DDD inset !important;
575 margin
:3px
3px
3px
5px
;
576 box
-sizing
: border
-box
;
583 border
-color
: #0000ff;
587 .ROS_class input
[type
="text"] {
598 background
-color
: cornsilk
!important
;
600 border
: 1px solid
#CCC !important;
601 box
-shadow
: 0px
1px
3px
#DDD inset !important;
603 margin
:1px
3px
1px
5px
;
604 box
-sizing
: border
-box
;
609 <link rel
="shortcut icon" href
="<?php echo $GLOBALS['webroot']; ?>/sites/default/favicon.ico" />
610 <script src
="<?php echo $GLOBALS['assets_static_relative'] ?>/jquery-min-1-11-1/index.js"></script
>
611 <script src
="<?php echo $GLOBALS['assets_static_relative'] ?>/bootstrap-3-3-4/dist/js/bootstrap.min.js"></script
>
612 <script src
="<?php echo $GLOBALS['assets_static_relative'] ?>/jquery-ui-1-11-4/jquery-ui.min.js"></script
>
613 <script type
="text/javascript" src
="<?php echo $GLOBALS['webroot']; ?>/interface/forms/<?php echo $form_folder; ?>/js/eye_base.php?enc=<?php echo attr($encounter); ?>&providerID=<?php echo attr($providerID); ?>"></script
>
619 <div id
="page" style
="text-align: justify; text-justify: newspaper;">
620 <form method
='POST' name
='theform' id
='theform'
621 action
='a_issue.php?pid=<?php echo attr($pid); ?>&encounter=<?php echo attr($encounter); ?>'
622 onsubmit
='return validate();'
624 <input type
="hidden" name
="form_id" id
="form_id" value
= "<?php echo attr($form_id); ?>">
625 <input type
="hidden" name
="issue" id
="issue" value
= "<?php echo attr($issue); ?>">
626 <input type
="hidden" name
="uniqueID" id
="uniqueID" value
= "<?php echo attr($uniqueID); ?>">
630 global $counter_header;
633 foreach ($PMSFH[0] as $key => $value) {
635 if ($key == "POH") { $checked = " checked='checked' "; }
636 $key_short_title = $key;
637 if ($key == "Medication") {$key_short_title = "Meds"; $title = "Medications"; }
638 if ($key == "Problem") {$key_short_title = "PMH"; $title = "Past Medical History"; }
639 if ($key == "Surgery") {$key_short_title = "Surg"; $title = "Surgery History"; }
640 if ($key == "SOCH") {$key_short_title = "Soc"; $title = "Social History"; }
641 $HELLO[attr($key)] = '<input type="radio" name="form_type" id="PMSFH_'.attr($key).'" value="'.attr($key).'" '.$checked.' onclick="top.restoreSession();newtype(\''.attr($key).'\');" /><span>'.
642 '<label class="input-helper input-helper--checkbox" for="PMSFH_'.attr($key).'" title="'.xla($title).'">' . xlt($key_short_title) . '</label></span> ';
644 //put them in the desired display order
645 echo $HELLO['POH'].$HELLO['POS'].$HELLO['PMH'].$HELLO['Medication'].$HELLO['Surgery'].$HELLO['Allergy'].$HELLO['FH'].$HELLO['SOCH'].$HELLO['ROS'];
648 <div
class="borderShadow" style
="text-align:left;margin-top:7px;width:95%;">
649 <table border
='0' width
='95%'>
650 <tr id
='row_quick_picks'>
651 <td valign
='top' nowrap
> 
;</td
>
652 <td valign
='top' colspan
="2">
653 <select name
='form_titles' size
='5' onchange
='top.restoreSession();set_text();'>
659 <td valign
='top' class="right" id
='title_diagnosis' nowrap style
="font-weight:bold;vertical-align:middle;"><?php
echo xlt('Title'); ?
>:</td
>
661 <input type
='text' size
='40' name
='form_title' id
='form_title' value
='<?php echo attr($irow['title
']) ?>' />
664 <tr id
="row_diagnosis">
665 <td valign
='top' class="right" nowrap style
="font-weight:bold;vertical-align:middle;"><b
><?php
echo xlt('Code'); ?
>:</b
></td
>
667 <input type
='text' size
='50' name
='form_diagnosis' id
='form_diagnosis'
668 value
='<?php echo attr($irow['diagnosis
']) ?>' onclick
='top.restoreSession();sel_diagnosis();'
669 title
='<?php echo xla('Click to select
or change diagnoses
'); ?>' />
672 <tr id
='row_begindate'>
673 <td nowrap
class="right"><b id
="onset"><?php
echo xlt('Onset'); ?
>:</b
></td
>
675 <input type
='text' size
='10' name
='form_begin' id
='form_begin'
676 value
='<?php echo attr($irow['begdate
']) ?>'¸Â
678 onkeyup
='datekeyup(this,mypcc)' onblur
='dateblur(this,mypcc)'
679 title
='<?php echo xla('yyyy
-mm
-dd date of onset
, surgery
or start of medication
'); ?>' />
680 <img src
='<?php echo $GLOBALS['webroot
']; ?>/interface/pic/show_calendar.gif' align
='absbottom' width
='15' height
='15'
681 id
='img_begin' border
='0' alt
='[?]' style
='cursor:pointer'
682 title
='<?php echo xla('Click here to choose a date
'); ?>' />
684 <td id
='row_enddate' nowrap
><input type
='checkbox' name
='form_active' id
='form_active' value
='1' <?php
echo attr($irow['enddate']) ?
"checked" : ""; ?
>
685 onclick
='top.restoreSession();resolvedClicked(this);'
686 title
='<?php echo xla('Indicates
if this issue is currently active
'); ?>' />
687 <b id
="resolved"><?php
echo xlt('Resolved'); ?
>:</b
> 
;<input type
='text' size
='10' name
='form_end' id
='form_end'
689 value
='<?php echo attr($irow['enddate
']) ?>'
690 onkeyup
='datekeyup(this,mypcc)' onblur
='dateblur(this,mypcc)'
691 title
='<?php echo xla('yyyy
-mm
-dd date of recovery
or end of medication
'); ?>' />
692 <img src
='<?php echo $GLOBALS['webroot
']; ?>/interface/pic/show_calendar.gif' align
='absbottom' width
='15' height
='15'
693 id
='img_end' border
='0' alt
='[?]' style
='cursor:pointer'
694 title
='<?php echo xla('Click here to choose a date
'); ?>' />
698 <tr id
='row_occurrence'>
699 <td valign
='top' class="right" nowrap
><b
><?php
echo xlt('Course'); ?
>:</b
></td
>
702 // Modified 6/2009 by BM to incorporate the occurrence items into the list_options listings
703 generate_form_field(array('data_type'=>1,'field_id'=>'occur','list_id'=>'occurrence','empty_title'=>'SKIP'), $irow['occurrence']);
704 ?
><a href
="<?php echo $GLOBALS['webroot']; ?>/interface/super/edit_list.php?list_id=occurrence" target
="RTop"
705 title
="<?php echo xla('Click here to Edit the Course/Occurrence List'); ?>" style
="color:black;"><i
class="fa fa-pencil fa-fw"></i
></a
>
709 <tr id
='row_classification'>
710 <td valign
='top' class="right" nowrap
><b
><?php
echo xlt('Classification'); ?
>:</b
></td
>
712 <select name
='form_classification' id
='form_classification'>
714 foreach ($ISSUE_CLASSIFICATIONS as $key => $value) {
715 echo " <option value='".attr($key)."'";
716 if ($key == $irow['classification']) echo " selected";
717 echo ">".text($value)."\n";
723 <tr id
='row_reaction'>
724 <td valign
='top' class="right" nowrap
><b
><?php
echo xlt('Reaction'); ?
>:</b
></td
>
726 <input type
='text' size
='40' name
='form_reaction' id
='form_reaction' value
='<?php echo attr($irow['reaction
']) ?>'
727 title
='<?php echo xla('Allergy Reaction
'); ?>' />
730 <tr id
='row_referredby'>
731 <td
class="right" nowrap
><b id
="by_whom"><?php
echo xlt('Referred by'); ?
>:</b
></td
>
733 <input type
='text' size
='40' name
='form_referredby' id
='form_referredby' value
='<?php echo attr($irow['referredby
']) ?>'
734 title
='<?php echo xla('Referring physician
and practice
'); ?>' />
737 <tr id
='row_eye_med'>
738 <td
class="right" nowrap
><b id
="by_whom"><?php
echo xlt('Eye Med'); ?
>:</b
></td
>
739 <td colspan
="3"><?php
echo $irow['subtype']; ?
>
740 <input type
='checkbox' name
='form_eye_subtype' id
='form_eye_subtype' value
='1'
741 <?php
if ($irow['subtype'] =='eye') echo "checked"; ?
> style
="margin:3px 3px 3px 5px;"
742 title
='<?php echo xla('Indicates
if this issue is an ophthalmic
-specific medication
'); ?>' />
746 <tr id
='row_comments'>
747 <td valign
='top' class="right" nowrap
><b
><?php
echo xlt('Comments'); ?
>:</b
></td
>
749 <textarea name
='form_comments' id
='form_comments' cols
='40' wrap
='virtual'><?php
echo text($irow['comments']) ?
></textarea
>
752 <tr id
="row_outcome">
753 <td valign
='top' class="right" nowrap
><b
><?php
echo xlt('Outcome'); ?
>:</b
></td
>
756 echo generate_select_list('form_outcome', 'outcome', $irow['outcome'], '', '', '', 'outcomeClicked(this);');
760 <tr id
="row_destination">
761 <td valign
='top' class="right" nowrap
><b
><?php
echo xlt('Destination'); ?
>:</b
></td
>
764 <input type
='text' size
='40' name
='form_destination' value
='<?php echo attr($irow['destination
']) ?>'
765 title
='GP, Secondary care specialist, etc.' />
766 <?php
} else { // leave this here for now, please -- Rod ?>
767 <?php
echo rbinput('form_destination', '1', 'GP' , 'destination') ?
> 
;
768 <?php
echo rbinput('form_destination', '2', 'Secondary care spec', 'destination') ?
> 
;
769 <?php
echo rbinput('form_destination', '3', 'GP via physio' , 'destination') ?
> 
;
770 <?php
echo rbinput('form_destination', '4', 'GP via podiatry' , 'destination') ?
>
775 <table id
="row_social" width
="100%">
778 $dateStart=$_POST['dateState'];
779 $dateEnd=$_POST['dateEnd'];
780 if ($dateStart && $dateEnd) {
781 $result1 = sqlQuery("select $given from history_data where pid = ? and date >= ? and date <= ? order by date DESC limit 0,1", array($pid,$dateStart,$dateEnd) );
783 else if ($dateStart && !$dateEnd) {
784 $result1 = sqlQuery("select $given from history_data where pid = ? and date >= ? order by date DESC limit 0,1", array($pid,$dateStart) );
786 else if (!$dateStart && $dateEnd) {
787 $result1 = sqlQuery("select $given from history_data where pid = ? and date <= ? order by date DESC limit 0,1", array($pid,$dateEnd) );
790 $result1 = sqlQuery("select $given from history_data where pid=? order by date DESC limit 0,1", array($pid) );
793 $group_fields_query = sqlStatement("SELECT * FROM layout_options " .
794 "WHERE form_id = 'HIS' AND group_name = '4Lifestyle' AND uor > 0 " .
796 while ($group_fields = sqlFetchArray($group_fields_query)) {
797 $titlecols = $group_fields['titlecols'];
798 $datacols = $group_fields['datacols'];
799 $data_type = $group_fields['data_type'];
800 $field_id = $group_fields['field_id'];
801 $list_id = $group_fields['list_id'];
803 if (isset($result1[$field_id])) $currvalue = $result1[$field_id];
804 if ($data_type == 28 ||
$data_type == 32) {
805 $tmp = explode('|', $currvalue);
806 switch(count($tmp)) {
808 $result2[$field_id]['resnote'] = $tmp[0];
809 $result2[$field_id]['restype'] = $tmp[1];
810 $result2[$field_id]['resdate'] = $tmp[2];
811 $result2[$field_id]['reslist'] = $tmp[3];
814 $result2[$field_id]['resnote'] = $tmp[0];
815 $result2[$field_id]['restype'] = $tmp[1];
816 $result2[$field_id]['resdate'] = $tmp[2];
819 $result2[$field_id]['resnote'] = $tmp[0];
820 $result2[$field_id]['restype'] = $tmp[1];
821 $result2[$field_id]['resdate'] = "";
824 $result2[$field_id]['resnote'] = $tmp[0];
825 $result2[$field_id]['resdate'] = $result2[$field_id]['restype'] = "";
828 $result2[$field_id]['restype'] = $result2[$field_id]['resdate'] = $result2[$field_id]['resnote'] = "";
831 $fldlength = empty($frow['fld_length']) ?
20 : $frow['fld_length'];
832 $fldlength = htmlspecialchars( $fldlength, ENT_QUOTES
);
833 $result2[$field_id]['resnote'] = htmlspecialchars( $result2[$field_id]['resnote'], ENT_QUOTES
);
834 $result2[$field_id]['resdate'] = htmlspecialchars( $result2[$field_id]['resdate'], ENT_QUOTES
);
835 } else if ($data_type == 2) {
836 $result2[$field_id]['resnote'] = nl2br(htmlspecialchars($currvalue,ENT_NOQUOTES
));
844 .data input
[type
="text"] {
854 <td
class="right" nowrap
><?php
echo xlt('Marital'); ?
>:</td
>
855 <td colspan
="3"><input type
="text" style
="width:75px;" name
="marital_status" id
="marital_status" value
="<?php echo attr($patient['status']); ?>">
856  
;<?php
echo xlt('Occupation'); ?
>: 
;<input type
="text" style
="width:175px;" name
="occupation" id
="occupation" value
="<?php echo attr($patient['occupation']); ?>"></td
>
861 <select name
="form_tobacco" id
="form_tobacco" onchange
="radioChange(this.options[this.selectedIndex].value)" title
="<?php xla('Tobacco use'); ?>">
862 <option value
="" <?php
if ($result2['tobacco']['reslist'] =='') echo "selected"; ?
>><?php
echo xlt('Unassigned'); ?
></option
>
863 <option value
="1" <?php
if ($result2['tobacco']['reslist'] =='1') echo "selected"; ?
>><?php
echo xlt('Current every day smoker'); ?
></option
>
864 <option value
="2" <?php
if ($result2['tobacco']['reslist'] =='2') echo "selected"; ?
>><?php
echo xlt('Current some day smoker<'); ?
>/option
>
865 <option value
="3" <?php
if ($result2['tobacco']['reslist'] =='3') echo "selected"; ?
>><?php
echo xlt('Former smoker'); ?
></option
>
866 <option value
="4" <?php
if ($result2['tobacco']['reslist'] =='4') echo "selected"; ?
>><?php
echo xlt('Never smoker'); ?
></option
>
867 <option value
="5" <?php
if ($result2['tobacco']['reslist'] =='5') echo "selected"; ?
>><?php
echo xlt('Smoker, current status unknown'); ?
></option
>
868 <option value
="9" <?php
if ($result2['tobacco']['reslist'] =='9') echo "selected"; ?
>><?php
echo xlt('Unknown if ever smoked'); ?
></option
>
869 <option value
="15" <?php
if ($result2['tobacco']['reslist'] =='15') echo "selected"; ?
>><?php
echo xlt('Heavy tobacco smoker'); ?
></option
>
870 <option value
="16" <?php
if ($result2['tobacco']['reslist'] =='16') echo "selected"; ?
>><?php
echo xlt('Light tobacco smoker'); ?
></option
>
873 <td nowrap
><span style
="text-decoration:underline;padding-right:3px;">Never
</span
></td
>
875 <span style
="text-decoration:underline;"><?php
echo xlt('N/A{{not applicable}}'); ?
></span
></td
>
879 <td
class="right" nowrap
><?php
echo xlt('Tobacco'); ?
>:</td
>
880 <td
class="text data" colspan
="4">
881 <table cellpadding
="0" cellspacing
="0">
883 <td
><input type
="text" name
="form_text_tobacco" id
="form_box" size
="20" value
="<?php echo attr($PMSFH[0]['SOCH']['tobacco']['resnote']); ?>"> 
;</td
>
884 <td
class="bold"> 
; 
;</td
>
886 <input type
="radio" name
="radio_tobacco" id
="radio_tobacco[current]" value
="currenttobacco" onclick
="smoking_statusClicked(this)" <?php
if ($result2['tobacco']['restype'] =='currenttobacco') echo "checked"; ?
>><?php
echo xlt('Current'); ?
> 
;</td
>
887 <td
class="text"><input type
="radio" name
="radio_tobacco" id
="radio_tobacco[quit]" value
="quittobacco" onclick
="smoking_statusClicked(this)" <?php
if ($result2['tobacco']['restype'] =='quittobacco') echo "checked"; ?
>><?php
echo xlt('Quit'); ?
> 
;</td
>
888 <td
class="text" onclick
='top.restoreSession();resolvedClicked(this);'>
889 <input type
="text" size
="6"
890 name
="date_tobacco" id
="date_tobacco"
891 value
="<?php echo attr($result2['tobacco']['resdate']); ?>"
892 title
="<?php echo xla('Tobacco use'); ?>"
893 onkeyup
="datekeyup(this,mypcc)"
894 onblur
="dateblur(this,mypcc)"><img src
="<?php echo $GLOBALS['webroot']; ?>/interface/pic/show_calendar.gif" align
="absbottom"
895 width
="15" height
="15"
897 border
="0" alt
="[?]" style
="cursor:pointer"
898 title
="<?php echo xla('Click here to choose a date'); ?>"> 
;
901 <input type
="radio" name
="radio_tobacco" id
="radio_tobacco[never]" value
="nevertobacco" onclick
="smoking_statusClicked(this)" <?php
if ($result2['tobacco']['restype'] =='nevertobacco') echo "checked"; ?
>><?php
echo xlt('Never'); ?
> 
;
903 <td
><input name
="radio_tobacco" type
="radio" id
="radio_tobacco[not_applicable]" <?php
if ($PMSFH[0]['SOCH']['tobacco']['restype'] =='not_applicable') echo "checked"; ?
> value
="not_applicabletobacco">
904 <label
class="fa fa-history input-helper nodisplay" for="radio_tobacco[not_applicable]"></label
>
912 <td
class="right" nowrap
><?php
echo xlt('Coffee'); ?
>:</td
>
913 <td
class="text data" colspan
="4">
914 <table cellpadding
="0" cellspacing
="0">
917 <td
><input type
="text" name
="form_coffee" id
="form_box" size
="20" value
="<?php echo attr($result2['coffee']['resnote']); ?>"> 
;</td
>
918 <td
class="bold"> 
; 
;</td
>
919 <td
class="text"><input type
="radio" name
="radio_coffee" id
="radio_coffee[current]" value
="currentcoffee" <?php
if ($PMSFH[0]['SOCH']['coffee']['restype'] =='currentcoffee') echo "checked"; ?
>><?php
echo xlt('Current'); ?
> 
;</td
>
920 <td
class="text"><input type
="radio" name
="radio_coffee" id
="radio_coffee[quit]" value
="quitcoffee" <?php
if ($PMSFH[0]['SOCH']['coffee']['restype'] =='quitcoffee') echo "checked"; ?
>><?php
echo xlt('Quit'); ?
> 
;</td
>
921 <td
class="text"><input type
="text" size
="6" name
="date_coffee" id
="date_coffee" value
="" title
="<?php echo xla('Caffeine consumption'); ?>" onkeyup
="datekeyup(this,mypcc)" onblur
="dateblur(this,mypcc)"><img src
="<?php echo $GLOBALS['webroot']; ?>/interface/pic/show_calendar.gif" align
="absbottom" width
="15" height
="15" id
="img_coffee" border
="0" alt
="[?]" style
="cursor:pointer" title
="<?php echo xla('Click here to choose a date'); ?>"> 
;</td
>
922 <td
class="text"><input type
="radio" name
="radio_coffee" id
="radio_coffee[never]" value
="nevercoffee" <?php
if ($PMSFH[0]['SOCH']['coffee']['restype'] =='nevercoffee') echo "checked"; ?
>><?php
echo xlt('Never'); ?
> 
;</td
>
923 <td
><input name
="radio_coffee" type
="radio" id
="radio_coffee[not_applicable]" <?php
if ($PMSFH[0]['SOCH']['coffee']['restype'] =='not_applicable') echo "checked"; ?
> value
="not_applicablecoffee">
924 <label
class="fa fa-history input-helper nodisplay" for="radio_coffee[not_applicable]"></label
>
933 <td
class="right" nowrap
><?php
echo xlt('Alcohol'); ?
>:</td
>
934 <td
class="text data" colspan
="4">
935 <table cellpadding
="0" cellspacing
="0">
937 <tr
><td
><input type
="text" name
="form_alcohol" id
="form_box" size
="20" value
="<?php echo attr($result2['alcohol']['resnote']); ?>"> 
;</td
><td
class="bold"> 
; 
;</td
><td
class="text"><input type
="radio" name
="radio_alcohol" id
="radio_alcohol[current]" value
="currentalcohol" <?php
if ($PMSFH[0]['SOCH']['alcohol']['restype'] =='currentalcohol') echo "checked"; ?
>><?php
echo xlt('Current'); ?
> 
;</td
>
938 <td
class="text"><input type
="radio" name
="radio_alcohol" id
="radio_alcohol[quit]" value
="quitalcohol" <?php
if ($PMSFH[0]['SOCH']['alcohol']['restype'] =='quitalcohol') echo "checked"; ?
>><?php
echo xlt('Quit'); ?
> 
;</td
>
939 <td
class="text"><input type
="text" size
="6" name
="date_alcohol" id
="date_alcohol" value
="" title
="<?php echo xla('Alcohol consumption'); ?>" onkeyup
="datekeyup(this,mypcc)" onblur
="dateblur(this,mypcc)"><img src
="<?php echo $GLOBALS['webroot']; ?>/interface/pic/show_calendar.gif" align
="absbottom" width
="15" height
="15" id
="img_alcohol" border
="0" alt
="[?]" style
="cursor:pointer" title
="<?php echo attr('Click here to choose a date'); ?>"> 
;</td
>
940 <td
class="text"><input type
="radio" name
="radio_alcohol" id
="radio_alcohol[never]" value
="neveralcohol" <?php
if ($PMSFH[0]['SOCH']['alcohol']['restype'] =='neveralcohol') echo "checked"; ?
>><?php
echo xlt('Never'); ?
> 
;</td
>
941 <td
><input name
="radio_alcohol" type
="radio" id
="radio_alcohol[not_applicable]" value
="not_applicablealcohol" <?php
if ($PMSFH[0]['SOCH']['alcohol']['restype'] =='not_applicable') echo "checked"; ?
>>
942 <label
class="fa fa-history input-helper nodisplay" for="radio_alcohol[not_applicable]"></label
>
952 <td
class="right" nowrap
><?php
echo xlt('Drugs'); ?
>:</td
>
953 <td
class="text data" colspan
="4">
954 <table cellpadding
="0" cellspacing
="0">
957 <td
><input type
="text" name
="form_recreational_drugs" id
="form_box" size
="20" value
="<?php echo attr($result2['recreational_drugs']['resnote']); ?>"> 
;</td
><td
class="bold"> 
; 
;</td
>
958 <td
class="text"><input type
="radio" name
="radio_recreational_drugs" id
="radio_recreational_drugs[current]" value
="currentrecreational_drugs" <?php
if ($PMSFH[0]['SOCH']['recreational_drugs']['restype'] =='currentrecreational_drugs') echo "checked"; ?
>><?php
echo xlt('Current'); ?
> 
;</td
>
959 <td
class="text"><input type
="radio" name
="radio_recreational_drugs" id
="radio_recreational_drugs[quit]" value
="quitrecreational_drugs" <?php
if ($PMSFH[0]['SOCH']['recreational_drugs']['restype'] =='quitrecreational_drugs') echo "checked"; ?
>><?php
echo xlt('Quit'); ?
> 
;</td
>
960 <td
class="text"><input type
="text" size
="6" name
="date_recreational_drugs" id
="date_recreational_drugs" value
="" title
="<?php echo xla('Recreational drug use'); ?>" onkeyup
="datekeyup(this,mypcc)" onblur
="dateblur(this,mypcc)"><img src
="<?php echo $GLOBALS['webroot']; ?>/interface/pic/show_calendar.gif" align
="absbottom" width
="15" height
="15" id
="img_recreational_drugs" border
="0" alt
="[?]" style
="cursor:pointer" title
="<?php echo xla('Click here to choose a date'); ?>"> 
;</td
>
961 <td
class="text"><input type
="radio" name
="radio_recreational_drugs" id
="radio_recreational_drugs[never]" value
="neverrecreational_drugs" <?php
if ($PMSFH[0]['SOCH']['recreational_drugs']['restype'] =='neverrecreational_drugs') echo "checked"; ?
>><?php
echo xlt('Never'); ?
> 
;</td
>
962 <td
><input name
="radio_recreational_drugs" type
="radio" id
="radio_recreational_drugs[not_applicable]" <?php
if ($PMSFH[0]['SOCH']['recreational_drugs']['restype'] =='not_applicable') echo "checked"; ?
> value
="not_applicablerecreational_drugs">
963 <label
class="fa fa-history input-helper nodisplay" for="radio_recreational_drugs[not_applicable]"></label
>
971 <tr
class="nodisplay" >
972 <td
class="right" nowrap
><?php
echo xlt('Counseling'); ?
>:</td
>
973 <td
class="text data" colspan
="4">
974 <table cellpadding
="0" cellspacing
="0"><tbody
><tr
><td
><input type
="text" name
="form_counseling" id
="form_box" size
="20" value
="<?php echo attr($result2['counseling']['resnote']); ?>"> 
;</td
><td
class="bold"> 
; 
;</td
><td
class="text"><input type
="radio" name
="radio_counseling" id
="radio_counseling[current]" value
="currentcounseling" <?php
if ($PMSFH[0]['SOCH']['counseling']['restype'] =='currentcounseling') echo "checked"; ?
>><?php
echo xlt('Current'); ?
> 
;</td
>
975 <td
class="text"><input type
="radio" name
="radio_counseling" id
="radio_counseling[quit]" value
="quitcounseling" <?php
if ($PMSFH[0]['SOCH']['counseling']['restype'] =='quitcounseling') echo "checked"; ?
>><?php
echo xlt('Quit'); ?
> 
;</td
>
976 <td
class="text"><input type
="text" size
="6" name
="date_counseling" id
="date_counseling" value
="" title
="<?php echo xla('Counseling activities') ?>" onkeyup
="datekeyup(this,mypcc)" onblur
="dateblur(this,mypcc)"><img src
="<?php echo $GLOBALS['webroot']; ?>/interface/pic/show_calendar.gif" align
="absbottom" width
="15" height
="15" id
="img_counseling" border
="0" alt
="[?]" style
="cursor:pointer" title
="<?php echo xla('Click here to choose a date'); ?>"> 
;</td
>
977 <td
class="text"><input type
="radio" name
="radio_counseling" id
="radio_counseling[never]" value
="nevercounseling" <?php
if ($PMSFH[0]['SOCH']['counseling']['restype'] =='nevercounseling') echo "checked"; ?
>><?php
echo xlt('Never'); ?
> 
;</td
>
978 <td
><input name
="radio_counseling" type
="radio" id
="radio_counseling[not_applicable]" value
="not_applicablecounseling" <?php
if ($PMSFH[0]['SOCH']['counseling']['restype'] =='not_applicable') echo "checked"; ?
>>
979 <label
class="fa fa-history input-helper nodisplay" for="radio_counseling[not_applicable]"></label
>
981 </tr
></tbody
></table
></td
></tr
>
984 <td
class="right" nowrap
>
985 <?php
echo xlt('Exercise'); ?
>:</td
>
986 <td
class="text data" colspan
="4">
987 <table cellpadding
="0" cellspacing
="0">
988 <tbody
><tr
><td
><input type
="text" name
="form_exercise_patterns" id
="form_box" size
="20" value
="<?php echo attr($result2['exercise_patterns']['resnote']); ?>"> 
;</td
><td
class="bold"> 
; 
;</td
><td
class="text"><input type
="radio" name
="radio_exercise_patterns" id
="radio_exercise_patterns[current]" value
="currentexercise_patterns" <?php
if ($PMSFH[0]['SOCH']['exercise_patterns']['restype'] =='currentexercise_patterns') echo "checked"; ?
>><?php
echo xlt('Current'); ?
> 
;</td
>
989 <td
class="text"><input type
="radio" name
="radio_exercise_patterns" id
="radio_exercise_patterns[quit]" value
="quitexercise_patterns" <?php
if ($PMSFH[0]['SOCH']['exercise_patterns']['restype'] =='quitexercise_patterns') echo "checked"; ?
>><?php
echo xlt('Quit') ?
> 
;</td
>
990 <td
class="text"><input type
="text" name
="date_exercise_patterns" id
="date_exercise_patterns" value
="" title
="<?php echo xla('Exercise patterns') ?>" onkeyup
="datekeyup(this,mypcc)" onblur
="dateblur(this,mypcc)"><img src
="<?php echo $GLOBALS['webroot']; ?>/interface/pic/show_calendar.gif" align
="absbottom" width
="15" height
="15" id
="img_exercise_patterns" border
="0" alt
="[?]" style
="cursor:pointer" title
="<?php echo xla('Click here to choose a date'); ?>"> 
;</td
>
991 <td
class="text"><input type
="radio" name
="radio_exercise_patterns" id
="radio_exercise_patterns[never]" value
="neverexercise_patterns"<?php
if ($PMSFH[0]['SOCH']['exercise_patterns']['restype'] =='neverexercise_patterns') echo "checked"; ?
>><?php
echo xlt('Never') ?
> 
;</td
>
992 <td
><input name
="radio_exercise_patterns" type
="radio" id
="radio_exercise_patterns[not_applicable]" <?php
if ($PMSFH[0]['SOCH']['exercise_patterns']['restype'] =='not_applicable') echo "checked"; ?
> value
="not_applicableexercise_patterns"><label
class="fa fa-history input-helper nodisplay" for="radio_exercise_patterns[not_applicable]"></label
>
1000 <tr
class="nodisplay">
1001 <td
class="right" nowrap
><?php
echo xlt('Hazardous Activities'); ?
>:</td
>
1002 <td
class="text data" colspan
="4">
1003 <table cellpadding
="0" cellspacing
="0">
1004 <tbody
><tr
><td
><input type
="text" name
="form_hazardous_activities" id
="form_box" size
="20" value
="<?php echo attr($result2['hazardous_activities']['resnote']); ?>"> 
;</td
><td
class="bold"> 
; 
;</td
><td
class="text"><input type
="radio" name
="radio_hazardous_activities" id
="radio_hazardous_activities[current]" value
="currenthazardous_activities" <?php
if ($PMSFH[0]['SOCH']['hazardous_activities']['restype'] =='currenthazardous_activities') echo "checked"; ?
>><?php
echo xlt('Current'); ?
> 
;</td
>
1005 <td
class="text"><input type
="radio" name
="radio_hazardous_activities" id
="radio_hazardous_activities[quit]" value
="quithazardous_activities" <?php
if ($PMSFH[0]['SOCH']['hazardous_activities']['restype'] =='quithazardous_activities') echo "checked"; ?
>><?php
echo xlt('Quit') ?
> 
;</td
>
1006 <td
class="text"><input type
="text" name
="date_hazardous_activities" id
="date_hazardous_activities" value
="" title
="<?php echo xla('Hazardous activities') ?>" onkeyup
="datekeyup(this,mypcc)" onblur
="dateblur(this,mypcc)"><img src
="<?php echo $GLOBALS['webroot']; ?>/interface/pic/show_calendar.gif" align
="absbottom" width
="15" height
="15" id
="img_hazardous_activities" border
="0" alt
="[?]" style
="cursor:pointer" title
="<?php echo xla('Click here to choose a date'); ?>"> 
;</td
>
1007 <td
class="text"><input type
="radio" name
="radio_hazardous_activities" id
="radio_hazardous_activities[never]" value
="neverhazardous_activities" <?php
if ($PMSFH[0]['SOCH']['hazardous_activities']['restype'] =='neverhazardous_activities') echo "checked"; ?
>><?php
echo xlt('Never') ?
> 
;</td
>
1008 <td
><input name
="radio_hazardous_activities" type
="radio" id
="radio_hazardous_activities[not_applicable]" <?php
if ($PMSFH[0]['SOCH']['hazardous_activities']['restype'] =='not_applicable') echo "checked"; ?
> value
="not_applicablehazardous_activities" onclick
="hazardous_activities_statusClicked(this)"><label
class="fa fa-history input-helper nodisplay" for="radio_hazardous_activities[not_applicable]"></label
>
1017 <td
class="right" nowrap
><?php
echo xlt('Sleep'); ?
>:</td
>
1018 <td
class="text data" colspan
="4">
1019 <table cellpadding
="0" cellspacing
="0">
1021 <tr
><td
><input type
="text" name
="form_sleep_patterns" id
="form_box" size
="20" title
="<?php echo xla('Sleep patterns'); ?>" value
="<?php echo attr($result2['sleep_patterns']['resnote']); ?>"></td
>
1022 <td
class="left" nowrap
><?php
echo xlt('Seatbelt'); ?
>:
1024 <td
><input type
="text" name
="form_seatbelt_use" id
="form_box" size
="20" title
="<?php echo xla('Seatbelt use'); ?>" value
="<?php echo attr($result2['seatbelt_use']['resnote']); ?>">
1033 <table id
="row_FH" name
="row_FH" width
="90%">
1035 <td
class="right" nowrap
><?php
echo xlt('Glaucoma'); ?
>:</td
>
1036 <td
class="text data"><input type
="radio" onclick
='negate_radio(this);' id
="radio_usertext11" name
="radio_usertext11" <?php
if (!$result1['usertext11']) echo "checked='checked'"; ?
>>
1037 <input type
="text" name
="usertext11" id
="usertext11" onclick
='clear_option(this)' value
="<?php echo attr($result1['usertext11']); ?>"></td
>
1038 <td
class="right" nowrap
><?php
echo xlt('Cataract'); ?
>:</td
>
1039 <td
class="text data"><input type
="radio" onclick
='negate_radio(this);' id
="radio_usertext12" name
="radio_usertext12" <?php
if (!$result1['usertext12']) echo "checked='checked'"; ?
>>
1040 <input type
="text" name
="usertext12" id
="usertext12" onclick
='clear_option(this)' value
="<?php echo attr($result1['usertext12']); ?>"></td
>
1043 <td
class="right" nowrap
><?php
echo xlt('AMD{{age related macular degeneration}}'); ?
>:</td
>
1044 <td
class="text data"><input type
="radio" onclick
='negate_radio(this);' id
="radio_usertext13" name
="radio_usertext13" <?php
if (!$result1['usertext13']) echo "checked='checked'"; ?
>>
1045 <input type
="text" name
="usertext13" id
="usertext13" onclick
='clear_option(this)' value
="<?php echo attr($result1['usertext13']); ?>"></td
>
1046 <td
class="right" nowrap
><?php
echo xlt('RD{{retinal detachment}}'); ?
>:</td
>
1047 <td
class="text data"><input type
="radio" onclick
='negate_radio(this);' id
="radio_usertext14" name
="radio_usertext14" <?php
if (!$result1['usertext14']) echo "checked='checked'"; ?
>>
1048 <input type
="text" name
="usertext14" id
="usertext14" onclick
='clear_option(this)' value
="<?php echo attr($result1['usertext14']); ?>"></td
>
1051 <td
class="right" nowrap
><?php
echo xlt('Blindness'); ?
>:</td
>
1052 <td
class="text data"><input type
="radio" onclick
='negate_radio(this);' id
="radio_usertext15" name
="radio_usertext15" <?php
if (!$result1['usertext15']) echo "checked='checked'"; ?
>>
1053 <input type
="text" name
="usertext15" id
="usertext15" onclick
='clear_option(this)' value
="<?php echo attr($result1['usertext15']); ?>"></td
>
1054 <td
class="right" nowrap
><?php
echo xlt('Amblyopia'); ?
>:</td
>
1055 <td
class="text data"><input type
="radio" onclick
='negate_radio(this);' id
="radio_usertext16" name
="radio_usertext16" <?php
if (!$result1['usertext16']) echo "checked='checked'"; ?
>>
1056 <input type
="text" name
="usertext16" id
="usertext16" onclick
='clear_option(this)' value
="<?php echo attr($result1['usertext16']); ?>"></td
>
1059 <td
class="right" nowrap
><?php
echo xlt('Strabismus'); ?
>:</td
>
1060 <td
class="text data"><input type
="radio" onclick
='negate_radio(this);' id
="radio_usertext17" name
="radio_usertext17" <?php
if (!$result1['usertext17']) echo "checked='checked'"; ?
>>
1061 <input type
="text" name
="usertext17" id
="usertext17" onclick
='clear_option(this)' value
="<?php echo attr($result1['usertext17']); ?>"></td
>
1062 <td
class="right" nowrap
><?php
echo xlt('Epilepsy'); ?
>:</td
>
1063 <td
class="text data">
1064 <input type
="radio" onclick
='negate_radio(this);' id
="radio_relatives_epilepsy" name
="radio_relatives_epilepsy" <?php
if (!$result1['relatives_epilepsy']) echo "checked='checked'"; ?
>>
1065 <input type
="text" name
="relatives_epilepsy" id
="relatives_epilepsy" onclick
='clear_option(this)' value
="<?php echo attr($result1['relatives_epilepsy']); ?>"></td
>
1068 <td
class="right" nowrap
><?php
echo xlt('Cancer'); ?
>:</td
>
1069 <td
class="text data">
1070 <input type
="radio" onclick
='negate_radio(this);' id
="radio_relatives_cancer" name
="radio_relatives_cancer" <?php
if (!$result1['relatives_cancer']) echo "checked='checked'"; ?
>>
1071 <input type
="text" name
="relatives_cancer" id
="relatives_cancer" onclick
='clear_option(this)' value
="<?php echo attr($result1['relatives_cancer']); ?>"></td
>
1072 <td
class="right" nowrap
><?php
echo xlt('Diabetes'); ?
>:</td
>
1073 <td
class="text data">
1074 <input type
="radio" onclick
='negate_radio(this);' id
="radio_relatives_diabetes" name
="radio_relatives_diabetes" <?php
if (!$result1['relatives_diabetes']) echo "checked='checked'"; ?
>>
1075 <input type
="text" name
="relatives_diabetes" id
="relatives_diabetes" onclick
='clear_option(this)' value
="<?php echo attr($result1['relatives_diabetes']); ?>"></td
>
1078 <td
class="right" nowrap
><?php
echo xlt('HTN{{hypertension}}'); ?
>:</td
>
1079 <td
class="text data">
1080 <input type
="radio" onclick
='negate_radio(this);' id
="radio_relatives_high_blood_pressure" name
="radio_relatives_high_blood_pressure" <?php
if (!$result1['relatives_high_blood_pressure']) echo "checked='checked'"; ?
>>
1081 <input type
="text" name
="relatives_high_blood_pressure" id
="relatives_high_blood_pressure" onclick
='clear_option(this)' value
="<?php echo attr($result1['relatives_high_blood_pressure']); ?>"></td
>
1082 <td
class="right" nowrap
><?php
echo xlt('Cardiac'); ?
>:</td
>
1083 <td
class="text data">
1084 <input type
="radio" onclick
='negate_radio(this);' id
="radio_relatives_heart_problems" name
="radio_relatives_heart_problems" <?php
if (!$result1['relatives_heart_problems']) echo "checked='checked'"; ?
>>
1085 <input type
="text" name
="relatives_heart_problems" id
="relatives_heart_problems" onclick
='clear_option(this)' value
="<?php echo attr($result1['relatives_heart_problems']); ?>"></td
>
1088 <td
class="right" nowrap
><?php
echo xlt('Stroke'); ?
>:</td
>
1089 <td
class="text data">
1090 <input type
="radio" onclick
='negate_radio(this);' id
="radio_relatives_stroke" name
="radio_relatives_stroke" <?php
if (!$result1['relatives_stroke']) echo "checked='checked'"; ?
>>
1091 <input type
="text" name
="relatives_stroke" id
="relatives_stroke" onclick
='clear_option(this)' value
="<?php echo attr($result1['relatives_stroke']); ?>"></td
>
1092 <td
class="right" nowrap
><?php
echo xlt('Other'); ?
>:</td
>
1093 <td
class="text data"><input type
="radio" onclick
='negate_radio(this);' id
="radio_usertext18" name
="radio_usertext18" <?php
if (!$result1['usertext18']) echo "checked='checked'"; ?
>>
1094 <input type
="text" name
="usertext18" id
="usertext18" onclick
='clear_option(this)' value
="<?php echo attr($result1['usertext18']); ?>"></td
>
1097 <table id
="row_ROS" name
="row_ROS" class="ROS_class">
1106 <span
class="underline"><?php
echo xlt('Neg{{negative}}'); ?
></span
><span
class="underline" style
="margin:30px;"><?php
echo xlt('Positive'); ?
></span
>
1109 <td
><span
class="underline"><?php
echo xlt('Neg{{negative}}'); ?
></span
><span
class="underline" style
="margin:30px;"><?php
echo xlt('Positive'); ?
></span
>
1113 <td
class="right" nowrap
><label
for="ROSGENERAL" class="input-helper input-helper--checkbox"><?php
echo xlt('General'); ?
>:</label
></td
>
1115 <input type
="radio" onclick
='negate_radio(this);' id
="radio_ROSGENERAL" name
="radio_ROSGENERAL" <?php
if (!$ROSGENERAL) echo "checked='checked'"; ?
>>
1116 <input type
="text" name
="ROSGENERAL" id
="ROSGENERAL" onclick
='clear_option(this)' value
="<?php echo attr($ROSGENERAL); ?>"></td
>
1117 <td
class="right" nowrap
><label
for="ROSGENERAL" class="input-helper input-helper--checkbox"><?php
echo xlt('HEENT'); ?
>:</td
>
1119 <input type
="radio" onclick
='negate_radio(this);' id
="radio_ROSHEENT" name
="radio_ROSHEENT"<?php
if (!$ROSHEENT) echo "checked='checked'"; ?
>>
1120 <input type
="text" name
="ROSHEENT" id
="ROSHEENT" onclick
='clear_option(this)' value
="<?php echo attr($ROSHEENT); ?>"></td
>
1123 <td
class="right" nowrap
><label
for="ROSGENERAL" class="input-helper input-helper--checkbox"><?php
echo xlt('CV{{cardiovascular}}'); ?
>:</td
>
1125 <input type
="radio" onclick
='negate_radio(this);' id
="radio_ROSCV" name
="radio_ROSCV"<?php
if (!$ROSCV) echo "checked='checked'"; ?
>>
1126 <input type
="text" name
="ROSCV" id
="ROSCV" onclick
='clear_option(this)' value
="<?php echo attr($ROSCV); ?>"></td
>
1127 <td
class="right" nowrap
><label
for="ROSGENERAL" class="input-helper input-helper--checkbox"><?php
echo xlt('Pulmonary'); ?
>:</td
>
1129 <input type
="radio" onclick
='negate_radio(this);' id
="radio_ROSPULM" name
="radio_ROSPULM"<?php
if (!$ROSPULM) echo "checked='checked'"; ?
>>
1130 <input type
="text" name
="ROSPULM" id
="ROSPULM" onclick
='clear_option(this)' value
="<?php echo attr($ROSPULM); ?>"></td
>
1133 <td
class="right" nowrap
><label
for="ROSGENERAL" class="input-helper input-helper--checkbox"><?php
echo xlt('GI{{gastroenterology}}'); ?
>:</td
>
1135 <input type
="radio" onclick
='negate_radio(this);' id
="radio_ROSGI" name
="radio_ROSGI"<?php
if (!$ROSGI) echo "checked='checked'"; ?
>>
1136 <input type
="text" name
="ROSGI" id
="ROSGI" onclick
='clear_option(this)' value
="<?php echo attr($ROSGI); ?>"></td
>
1137 <td
class="right" nowrap
><label
for="ROSGENERAL" class="input-helper input-helper--checkbox"><?php
echo xlt('GU{{genitourinary}}'); ?
>:</td
>
1139 <input type
="radio" onclick
='negate_radio(this);' id
="radio_ROSGU" name
="radio_ROSGU"<?php
if (!$ROSGU) echo "checked='checked'"; ?
>>
1140 <input type
="text" name
="ROSGU" id
="ROSGU" onclick
='clear_option(this)' value
="<?php echo attr($ROSGU); ?>"></td
>
1143 <td
class="right" nowrap
><label
for="ROSGENERAL" class="input-helper input-helper--checkbox"><?php
echo xlt('Derm{{dematologic}}'); ?
>:</td
>
1145 <input type
="radio" onclick
='negate_radio(this);' id
="radio_ROSDERM" name
="radio_ROSDERM"<?php
if (!$ROSDERM) echo "checked='checked'"; ?
>>
1146 <input type
="text" name
="ROSDERM" id
="ROSDERM" onclick
='clear_option(this)' value
="<?php echo attr($ROSDERM); ?>"></td
>
1147 <td
class="right" nowrap
><label
for="ROSGENERAL" class="input-helper input-helper--checkbox"><?php
echo xlt('Neuro{{neurologic}}'); ?
>:</td
>
1149 <input type
="radio" onclick
='negate_radio(this);' id
="radio_ROSNEURO" name
="radio_ROSNEURO"<?php
if (!$ROSNEURO) echo "checked='checked'"; ?
>>
1150 <input type
="text" name
="ROSNEURO" id
="ROSNEURO" onclick
='clear_option(this)' value
="<?php echo attr($ROSNEURO); ?>"></td
>
1153 <td
class="right" nowrap
><label
for="ROSGENERAL" class="input-helper input-helper--checkbox"><?php
echo xlt('Psych{{psychiatric}}'); ?
>:</td
>
1155 <input type
="radio" onclick
='negate_radio(this);' id
="radio_ROSPSYCH" name
="radio_ROSPSYCH"<?php
if (!$ROSPSYCH) echo "checked='checked'"; ?
>>
1156 <input type
="text" name
="ROSPSYCH" id
="ROSPSYCH" onclick
='clear_option(this)' value
="<?php echo attr($ROSPSYCH); ?>"></td
>
1157 <td
class="right" nowrap
><label
for="ROSGENERAL" class="input-helper input-helper--checkbox"><?php
echo xlt('Musculo{{musculoskeletal}}'); ?
>:</td
>
1159 <input type
="radio" onclick
='negate_radio(this);' id
="radio_ROSMUSCULO" name
="radio_ROSMUSCULO"<?php
if (!$ROSMUSCULO) echo "checked='checked'"; ?
>>
1160 <input type
="text" name
="ROSMUSCULO" id
="ROSMUSCULO" onclick
='clear_option(this)' value
="<?php echo attr($ROSMUSCULO); ?>"></td
>
1163 <td
class="right" nowrap
><label
for="ROSGENERAL" class="input-helper input-helper--checkbox"><?php
echo xlt('Immuno{{immunologic}}'); ?
>:</td
>
1165 <input type
="radio" onclick
='negate_radio(this);' id
="radio_ROSIMMUNO" name
="radio_ROSIMMUNO"<?php
if (!$ROSIMMUNO) echo "checked='checked'"; ?
>>
1166 <input type
="text" name
="ROSIMMUNO" id
="ROSIMMUNO" onclick
='clear_option(this)' value
="<?php echo attr($ROSIMMUNO); ?>"></td
>
1167 <td
class="right" nowrap
><label
for="ROSGENERAL" class="input-helper input-helper--checkbox"><?php
echo xlt('Endocrine'); ?
>:</td
>
1169 <input type
="radio" onclick
='negate_radio(this);' id
="radio_ROSENDOCRINE" name
="radio_ROSENDOCRINE"<?php
if (!$ROSENDOCRINE) echo "checked='checked'"; ?
>>
1170 <input type
="text" name
="ROSENDOCRINE" id
="ROSENDOCRINE" onclick
='clear_option(this)' value
="<?php echo attr($ROSENDOCRINE); ?>"></td
>
1174 <table id
="row_PLACEHOLDER" name
="row_PLACEHOLDER" width
="90%">
1182 <p style
="margin-top:10px;">
1183 <input type
="hidden" type
="text" id
="issue_js" name
="issue_js" value
="test">
1184 <input type
="hidden" type
="text" id
="pid" name
="pid" value
="<?php echo $pid; ?>">
1185 <input type
='button' id
='form_save' name
='form_save'
1186 class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
1187 onclick
='top.restoreSession();submit_this_form();' value
='<?php echo xla('Save
'); ?>' />
1189 $display_delete = "nodisplay";
1192 <input type
='button' name
='delete_button' id
='delete_button'
1193 class="<?php echo $display_delete; ?> ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
1194 onclick
='top.restoreSession();deleteme();' value
='<?php echo xla('Delete
'); ?>' />
1196 <input type
='button' name
='cancel_button' id
='cancel_button'
1197 class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
1198 value
='<?php echo xla('Cancel
'); ?>' onclick
='clearme();' />
1203 <script language
='JavaScript'>
1204 newtype('<?php if (!$form_index) { echo "POH"; } else { echo $type_index; } ?>');
1205 Calendar
.setup({inputField
:"form_begin", ifFormat
:"%Y-%m-%d", button
:"img_begin"});
1206 Calendar
.setup({inputField
:"form_end", ifFormat
:"%Y-%m-%d", button
:"img_end"});
1208 $has_cal ="tobacco,coffee,alcohol,recreational_drugs,exercise_patterns";
1209 foreach (explode(',',$has_cal) as $item) {
1210 echo 'Calendar.setup({inputField:"date_'.$item.'", ifFormat:"%Y-%m-%d", button:"img_'.$item.'"});';
1213 $
(document
).ready(function() {
1216 my
: 'top Right', // Position my top left...
1217 at
: 'bottom Left', // at the bottom right of...
1218 target
: 'mouse' // my target
1221 $
("input,textarea,text").css("background-color","#FFF8DC");