External links in OpenEMR

jboyd13 wrote on Saturday, November 26, 2016:

Hello,

I like the feature of accessing external links on the Patient Education page. I would like to add more sites to that feature. I tried to add them in the code, but just got a blank screen. Can someone offer some advice in this area?

Is there a way to add external links or other miscellaneous features to OpenEMR? There is a great free and open statin shared decision aid that I would like to link to OpenEMR. Here is a link to the tool if anyone is interested in using it and don’t already know about it: statindecisionaid.mayoclinic.org/index.php/statin/

Thanks,

Joyce

bradymiller wrote on Saturday, November 26, 2016:

Hi Joyce,

Are you able to post your coding attempts on github or here on the forum?

This is where you should add the new sites:

Literally anything can be done with OpenEMR(the huge advantage of open source giving ability to modify the code :slight_smile: ). As an aside, here’s a turorial to set up an OpenEMR github repo (using a repo can be very helpful to keep things organized if you customize OpenEMR’s code):
http://www.open-emr.org/wiki/index.php/Git_for_dummies

-brady
OpenEMR

jboyd13 wrote on Saturday, November 26, 2016:

Hi Brady,

Thank you. I will review the tutorial. I don’t know php or CSS and have tried reviewing the Joy of and for Dummies books. But can’t focus on it due to other projects due for my courses. I plan to focus on it over our break which starts in a couple of weeks. I think your sites will be helpful. I modified the php file on my install. I think I deleted the code I modified when it didn’t work. It was at least a month ago and I’ve done several things since then. I would love to learn how to create more customization and import forms for some of the screens they plan to do in the clinic.

I’m trying to connect the dots on when an Assessment or prescription are charted and how it gets to Issues and Prescriptions screens. That is if I create and assessment or prescription field in a layout form or CAMOS. I tried to figure out Nation Notes to try to use it but found it confusing. Like I said I may have better luck if I can just focus on my OpenEMR work now that I’ve played around with it. I did figure out how to import forms from one DB (my development install on my Mac) to another development install (on a Linux web server). I tried to follow the directions and the video but it didn’t work out the same.

Probably gave more info than necessary. I sent you an email about possible funding sources for CDS. Are you still interested?

Thanks again,

Joyce

jboyd13 wrote on Saturday, November 26, 2016:

Hi again Brady,

The commented lines are what I added to the code in my Mac’s install. I’m not sure what I did wrong. Neither Cornerstones4Care or Google links worked. When I select Patient Education on OpenEMR, the pane was blank.

// Reference website links
$websites = array(
‘Medline’ => ‘http://vsearch.nlm.nih.gov/vivisimo/cgi-bin/query-meta?v%3Aproject=medlineplus&query=[%]&x=12&y=15’,
‘eMedicine’ => ‘http://search.medscape.com/reference-search?newSearchHeader=1&queryText=[%]’,
‘WebMD’ => ‘http://www.webmd.com/search/search_results/default.aspx?query=[%]&sourceType=undefined’,
// J Boyd add CornerStones4care
// ‘Cornerstones4Care’ => ‘https://www.novomedlink.com/search.html?q=%3F&aavo=2705962389758039978
// ‘Cornerstones4Care’ => ‘https://www.cornerstones4care.com/
// ‘Google’ => ‘http://www.google.com
);

Thanks,

Joyce

jboyd13 wrote on Saturday, November 26, 2016:

Hi Brady,

this is a screenshot of Patient Education when the comment // are removed from the Google line.

bradymiller wrote on Sunday, November 27, 2016:

Hi Joyce,

The white screen of death. When this happens, recommend checking your php error log. Your php error log will show that you have parsing errors (a couple backtick instead of apostrophes, several missing commas, and also missing bracket around the %). This should work:

// Reference website links
$websites = array(
'Medline' => 'http://vsearch.nlm.nih.gov/vivisimo/cgi-bin/query-meta?v%3Aproject=medlineplus&query=[%]&x=12&y=15',
'eMedicine' => 'http://search.medscape.com/reference-search?newSearchHeader=1&queryText=[%]',
'WebMD' => 'http://www.webmd.com/search/search_results/default.aspx?query=[%]&sourceType=undefined',
'Cornerstones4Care' => 'https://www.novomedlink.com/search.html?q=[%]&aavo=2705962389758039978',
'Cornerstones4Care' => 'https://www.cornerstones4care.com/',
'Google' => 'http://www.google.com'
);

Let us know how that works. Note what you are doing is a great way to learn php and coding (just keep taking stabs at things) and the community is always glad to help and provide guidance. A skill that will be very helpful is getting in the habit to check out the php error log, which will help you fix white screens of death and other errors.

-brady
OpenEMR

bradymiller wrote on Sunday, November 27, 2016:

btw,
Also looking into the CDS (AHRQ and PCORI) funding opportunities (thanks for the message on that).
-brady

jboyd13 wrote on Monday, November 28, 2016:

Brady,

Thank you. That worked! I did check the error log but couldn’t find the line that had the mistake. I think it was the apostrophe. I was trying to make a single quote. That’s how it comes out on the Mac. If I don’t want to search but I just want to open a web page, can I take out the search part without causing harm? Going to try and see what happens… :smiley:

Thanks,

Joyce

bradymiller wrote on Tuesday, November 29, 2016:

Hi Joyce,

lol. I’ve only seen that quote/tick come from Mac’s; not even an option on a pc keyboard. It has driven a mac developer to despair(ok, Ray, I am exaggerating a bit :slight_smile: ) and have been referrred to as evil quotes :slight_smile:

You can definitely take the search term out. The error log can get filled with a bunch of other stuff. If you check it right after the error or white screen of death happens, it should be the last line in the log.

For learning purposes, note that block of code is an (associative) array:

And the (associative) array is used here to output the selector field to html for the user:

-brady
OpenEMR