Radio button menu differs from Tree

aperezcrespo wrote on Wednesday, February 18, 2009:

Hi folks
   In the past the items available in the different menu (Traditional, Radio, and Tree) have not always synched up.  For example letters does not show up in the trees menu nor in the radio button.  I have also notice the new chart reports are not in the tree.
Also the superbills report on the reports menu item is not the same as on the popup.  This also does not show up in the trees menu.

I just downloaded and updated my test install with current CVS.
Still the same.  Could we have this in V3?

Thanks

cfapress wrote on Wednesday, February 18, 2009:

This seems like a minor fix. I’ll volunteer to make the necessary corrections and report back to this message thread when done.

Jason

cfapress wrote on Wednesday, February 18, 2009:

Whoa… I just looked at the logic for creating those radio button and tree menus.

Not only is the tree menu created in a completely different fashion than the radio buttons, there is a check to see if the choices are for an athletic_team too. So, this is not a simple fix.

However, I’ll take a stab at it and see how it goes.

Jason

cfapress wrote on Wednesday, February 18, 2009:

AH HA!!!

After more investigation (with no code changes) I have an answer.

All of the features are available in each of the layouts. You just need to follow a different path to get there. For example, to reach the SuperBill screen where you can edit the codes:
  top-menu layout: View a patient, edit an encounter, click on Superbill in the lower right corner
  radio layout: Click on Superbill in the right column
  tree layout: Click on Administration, click on Services

I found similar results for the other comments that ajperezcrespo originally made. So, no code changes are needed here. Just clarification in user documentation.

Jason

aperezcrespo wrote on Wednesday, February 18, 2009:

I looked though again and could not locate the following reports in the Tree menu:

Chart Trk reports (there are two of these)
Letters
Superbill reports (Not Superbill/Services that is for editing CPT/ICD/HCPCS codes)

On the Radio buttons Click on the Reports button missing from the tree are the First one and the last two from that list.

Letters shows up only in the traditional menu.

Services by Category report shows up on the Tree menu but not on the radio button menu.

Thanks

cfapress wrote on Thursday, February 19, 2009:

I couldn’t find the Chart Tracker either. So I’ve added it to the Tree view in Patient/Client -> Visits. Perhaps it should be placed elsewhere?

You can find Letters in the Tree view. After you’ve chosen a client look at the select box in the left-hand navigation in the Popups list box.

The three reports you mentioned (Superbill, Chart Check-in/out Activity, and Charts Checked) have been added to the Tree view under Reports->Visits.

The ‘Services by Category’ was missing in the list of reports for the Radio and Classic navigation so I added it in there.

Thanks for pointing out these discrepancies.
Jason

aperezcrespo wrote on Friday, February 20, 2009:

Rod had already placed Chart Tracker under Misc. in CVS
Thanks for the others
I dont have the Letters option in the popup box under Tree view.  Is there a prerequisite?
However if I switch to classic view it is there.

Any Clue?

Alfonso

cfapress wrote on Friday, February 20, 2009:

Make sure this folder exists:
<oemr>/custom/letter_templates

Also, make sure that it is read/write by the web server process (if you’re using UNIX).

Jason

bradymiller wrote on Friday, February 20, 2009:

Jason,

   Another directory to add to the read/write requirements?

Trying to deal with this issue head on in the installation script, so far I have:
openemr/edi     (billing docs)
openemr/documents     (patinet docs)
openemr/gacl/admin/templates_c      (smarty cache)
openemr/interface/main/calendar/modules/PostCalendar/pntemplates/compiled   (smarty cache)
openemr/interface/main/calendar/modules/PostCalendar/pntemplates/cache   (smarty cache)

Does /custom/letter_templates also fit this category?
Does this directory also need to be created in CVS?

In looking toward future(ie. allowing users to create templates for a variety of things), maybe we should make a directory openemr/templates and require read/write there?  Then can place all user created templates for a variety of things, and avoid creating these directories off the beaten path that require read/write access.

-brady

cfapress wrote on Friday, February 20, 2009:

Hi Brady,

Yes, please add the custom/letter_templates to the collection of folders that need to be created and set to r/w by the web server process.

For the letters, specifically, I’d like to work them into a new database table. It will allow greater control over the letter templates and let different practitioners use their own letter templates.

In our Agency we have over 15 nurses spread across 18+ different sites. They ought to be using standard forms and templates but they are not. And since they’re not all in the same school districts they never will be able to use the same templates. bummer.

Anyway… for the v3.0 release just include the custom/letter_templates folder.

And let’s consider how we could use a ‘templates’ database table going forward instead of relying on filesystem folders. The same goes for files attached to patients. The info can be stored in MySQL as a BLOB datatype:
http://dev.mysql.com/doc/refman/5.0/en/blob.html

Jason

bradymiller wrote on Friday, February 20, 2009:

hey,

Would it be ok if I add the custom/letter_templates directory to CVS with a dummy file in it (README file).  We’ve already done this so users don’t need to make the other directories.  This way, we’ve eliminated the step of users needing to create a bunch of random directories on installation.

-Brady

markleeds wrote on Saturday, February 21, 2009:

Brady, I think that sounds like a good idea.  Didn’t the cache and compile directories exist for a while and now they are gone and we have to create them?

bradymiller wrote on Saturday, February 21, 2009:

Jason and Mark,

  CVS prunes away any empty directories, so the best way to avoid missing directories is by placing dummy files in them so they aren’t pruned away.  (for 3.0 there will be no missing directories; ie user will not need to add the cache and compile anymore)

  This letters thing is sketchy, no clue how it really works. The insert special fields doesn’t seem to do anything, and i get blank screen when ‘generate letter’ despite having ps2pdf.  To avoid the empty/missing  directory issues we need to get a file in the custom/letter_templates directory.  I can’t place a dummy file in the directory, since it’s automatically read as a template.  The best thing to do is to put a sample template in there. Jason, can you email me a simple sample template document for that directory.  Then I’ll create the directory in cvs and add it to the install script (the install script forces user to create proper permissions before installing openemr)

-brady

bradymiller wrote on Saturday, February 21, 2009:

Jason,
Committed the custom/templates directory and put a dummy sample template in it. The letters popup now shows up on the openemr cvs demo:
http://opensourceemr.com:2089/openemr

Of course when I try to ‘generate’ a letter the php error log of the openemr cvs demo:
http://opensourceemr.com:2089/log/logPhp.txt

gives following error:
PHP Fatal error:  Using $this when not in object context in /var/www/html/openemr/interface/patient_file/letter.php on line 32, referer: http://opensourceemr.com:2089/openemr/interface/patient_file/letter.php

cfapress wrote on Monday, February 23, 2009:

Hi Brady,

That error was coming in because of some cut-and-paste junk. There’s still more junk in there but I’m going for expedience here. I’ve updated the CVS code so do a fresh check-out and the letter.php should generate a PDF.

Jason

aperezcrespo wrote on Tuesday, February 24, 2009:

Hi folks
  I updated and tried it.  PDF get generated just fine but all it has is the  sample text.  The Insert Special fields doesn’t seem to do much.  Or is there something I’m not doing right?

Thanks

cfapress wrote on Tuesday, February 24, 2009:

The letter’s screen will need documentation.

Basically, you can choose an existing template, which pre-loads the message body for you, or you can type a new letter. The message body is meant to contain text and special-fields encoded with curly braces. You can insert the custom fields in the message body wherever the cursor is located. When the PDF is generated it replaces the special fields with the proper text. If the proper text happens to be blank then you’ll only see a blank where the special field used to be.

The special fields are just wierd. I didn’t bother with them other than to make sure they get replaced properly. I didn’t examine the reason behind why those fields are available and others are not. We can get in to that discussion after v3.0 rolls out.

Try the letter page again and see what you can do. If the insert-special-fields list box is not working then I’ve got to fix some javascript. I’ve tested it with Firefox 2.0 and IE 7.0 and it worked just fine. IE 6.0 might have trouble.

Jason

bradymiller wrote on Tuesday, February 24, 2009:

Hey,

I can now generate the pdf fine.

But there’s a problem with the Insert special field. It works on IE7, but does not work on Firefox 3.  In Firefox 3 no error is reported; it just doesn’t do anything.

-brady

aperezcrespo wrote on Tuesday, February 24, 2009:

Hey…you are right…

I can even create new templates (make sure www has rights to the template directory).

omo66 wrote on Wednesday, February 25, 2009:

Thank you Jason,
Inserting at cursor position and drop menu are not working with Firefox 3.04 but
it worked only with IE7.
is this fixable?