Adding a new section to the Issues module

suavelogica wrote on Wednesday, June 19, 2013:

Hello everyone! I need to add a new section to the Issues Module called “Treatment Plan”. I have already located the PHP file (in /openemr/interface/patient_file/summary/add_edit_issue.php) that needs to be updated, but I do not know what to do to add the new section. How would I go about doing this and which table in the database needs the new field added. For a little more background on what I’m up to, please see this thread- https://sourceforge.net/p/openemr/discussion/202504/thread/472a2af2/

Thanks!

yehster wrote on Wednesday, June 19, 2013:

OpenEMR uses the table ‘lists’ for issues. If you search add_edit_issue.php for the sqlStatement function you should be able to find where it generates the queries.

visolveemr wrote on Thursday, June 20, 2013:

Hi,

A new section to the Issues Module can be added in the table “issue_types”. For example if you need to add “Treatment Plan” section to the issue module, insert to the table as follows:

insert into issue_types values(‘default’,‘treatment_plan’,‘Treatment Plans’,‘Treatment Plan’,‘T’,0,1,60,1);

This will in turn add a new section “Treatment Plan” in Type field of “issue Screen”. You can select that and add treatment plans and save in the issue screen.This will also be available in the patient demographics screen as other issue types.

Hope This Helps.

Thanks
ViSolve
services@visolve.com

bradymiller wrote on Monday, June 24, 2013:

Hi,

Two things on the “issue_types” table:

  1. It is in the development version (not 4.1.1).
  2. The “gui” to do above’s Visolve steps within OpenEMR can be found here:
    Administration->Lists->Issue Types

-brady
OpenEMR

suavelogica wrote on Thursday, June 27, 2013:

Thank you all for your input on the problem. I have been away for a few days and am just now seeing the recommendations. Since I am not using the developer version, I am finding that there is a table called issue_encounter . Is this the table I need to add the Treatment Plan to or is this not possible in the non-developer version of OpenEMR as per Brady’s comments?

visolveemr wrote on Thursday, June 27, 2013:

Hello Mike,

No, You can add that in your version too. In development version you will have a GUI to add it easily.
But here you have to manually add “Treatment Plan” to the table “issue_types”.

The Insert Command to add is given in our above post. Just execute it in your OpenEMR database.

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

bradymiller wrote on Thursday, June 27, 2013:

Hi,

There’s no issue_types table in 4.1.1. Can add “Treatment Plan” to the following “configuration” file in 4.1.1:
openemr/library/lists.inc
(in the Default section)

What the development version (future 4.1.2 release) did is migrate this into the database. So can modify it within OpenEMR and the Issue Type configuration settings will then be maintained during version upgrades.

-brady
OpenEMR

suavelogica wrote on Thursday, June 27, 2013:

Thank you, Brady! This was exactly what I needed to get the Treatment Plan added to the Issues screen. It works like a champ & I thank you very much for the help!

Here is what I added-
‘treatment_plan’ => array(xl(‘Treatment Plan’),xl(‘Treatment’) ,xl(‘T’),0,1),

suavelogica wrote on Saturday, June 29, 2013:

UPDATE- So, I was checking out how the Treatment Plan I added to the Issues section is working and noticed that when I select a patient, the summary screen does not display the Medical Problems or Treatment Plan list items, even though there is data entered in each of these lists. It simply shows “None” for the Medical Problems & Treatment Plan. When I click “Edit” I can see the Treatment Plan Items & Medical Problems I have entered. Again, in the lists.inc file I added the following line below the Medical Problems line-

‘treatment_plan’ => array(xl(‘Treatment Plan’),xl(‘Treatment’) ,xl(‘T’),0,1),

Any ideas why this could be occurring?

Thanks!

suavelogica wrote on Saturday, June 29, 2013:

I figured it out! I noticed that the Treatment plan had its’ list items marked as inactive, so once I removed the completion date they appeared on the patient summary. Sorry for the newbie oversight on my part.