Issue Types

cpolyv01 wrote on Tuesday, February 25, 2014:

Hello,

I created a new issue type and modify a little bit the add-edit-issue.php. I want the new text area that I inserted to be shown only to the new issue type. I try the if statement, but it didn’t work.

<?php if ($ISSUE_TYPES['Testing']) { ?>
 <tr id='row_comments'>
  <td valign='top' nowrap><b><?php echo xlt('Circumstances'); ?>:</b></td>
  <td>
   <textarea name='form_Circumstances' rows='4' cols='40' wrap='virtual' style='width:100%'><?php echo text($irow['Circumstances']) ?></textarea>
  </td>
 </tr>
<?php } ?>

I tried it to the row of the table.

mdsupport wrote on Tuesday, February 25, 2014:

I try the if statement, but it didn’t work.

The text-area does not show up or does it show up all the time?

Assuming there is other code that takes care of storing the new text to a new field in the database.

cpolyv01 wrote on Tuesday, February 25, 2014:

It shows up all the time, I tried to confine it to be shown only in my own issue type. Yes I already took care saving and database. I followed the whole structure of that file. When I tried to insert the code elsewhere I got blank page…

mdsupport wrote on Wednesday, February 26, 2014:

Your if condition will always be true. You should compare to current fissure type.

cpolyv01 wrote on Wednesday, February 26, 2014:

I found my mistake! Thank you very much, I couldn’t see where the problem was.
It was just this modification:

if ($thistype == "testing") {

The other thing that I notice is that now it doesn’t appear when I save it, because I check the url and the $thistype is not shown.

openemr/interface/patient_file/summary/add_edit_issue.php?issue=9&thistype=

cpolyv01 wrote on Tuesday, March 04, 2014:

Do you know which part of the code is for the url
openemr/interface/patient_file/summary/add_edit_issue.php?issue=9&thistype

because I notice that it doesn’t call the type of the issue and with the changes that I made, it is necessary, because it doesn’t appear the text area that I added.

Thank you in advance

visolveemr wrote on Wednesday, March 05, 2014:

Hi cpolyv01,

Assuming that you are trying to edit the saved issue from patient dashboard section, you need to edit the code ‘$(".statrow").click(function() { dopclick(this.id,0); });’ and its related functionality in the file ‘/interface/patient_file/summary/stats_full.php’. This code provides the url to enable editing of a saved issue.

Thanks
OpenEMR Customization/Support provider,
ViSolve Inc
services@visolve.com

cpolyv01 wrote on Wednesday, March 05, 2014:

Hello ViSolve,

That is exactly what I was looking for. Does this function read from database? I notice it reads the id as it is in the database, but when I try to get this to read the type, ex. medical_problem, I fail. I try several ways, actually I change the line

    dlgopen('add_edit_issue.php?issue=' + encodeURIComponent(id) + '&thistype=' + encodeURIComponent(category), '_blank', 550, 400);

to this

    dlgopen('add_edit_issue.php?issue=' + encodeURIComponent(id) + '&thistype=' + encodeURIComponent(type), '_blank', 550, 400);

Adding before tag the line

 $type = empty($_REQUEST['type']) ? '' : $_REQUEST['type'];

visolveemr wrote on Thursday, March 06, 2014:

Hi cpolyv01,

The value id is passed dynamically when a saved issue of a patient is clicked. Similarly for the function dopclick() you need to pass the value for ‘category’ dynamically through the code ‘$(".statrow").click(function() { dopclick(this.id,0); });’ to receive it under the url parameter ‘thistype’.

Thanks
OpenEMR Customization/Support provider,
ViSolve Inc
services@visolve.com

cpolyv01 wrote on Friday, March 07, 2014:

Hello,

I tried to pass the value dynamically, as id, meaning I wrote

‘$(".statrow").click(function() { dopclick(this.id,this.category); });’

but when I try to click to edit the saved issue the link doesn’t work, because the value category when is empty is undefined. Is there a way to retrieve its value from database where id = this.id?

$category = empty($_REQUEST[‘category’]) ? ‘’ : $_REQUEST[‘category’];

cpolyv01 wrote on Wednesday, March 12, 2014:

Hello again,

How is the value id passed dynamically? From which file? I was thinking that is in that file that I should make changes also.

Thank you in advance