Help on CDR object purpose/ function

harleytuck wrote on Friday, January 27, 2017:

Hi Folks-
In Admin/ Rules; I’m making a new rule so in the Rules Detail, the Target/ Action group, in the 'edit Actions ’ dialog:
Can anybody tell me what the ‘link’ and ‘message’ text areas do?
Where does the link get used; where does the message show up?

harleytuck wrote on Friday, January 27, 2017:

here’s a pic:

Thanks!

  • HT

bradymiller wrote on Saturday, January 28, 2017:

Hi Harley,

‘Link’ should link the reminder label in the Clinical Reminder widget to whatever the link. Can use an external link(with http/https) or internal link. Check out this code to get an idea how it works:


(note this won’t work if set to use custom input, since the link is instead used to go the gui to enter in the data)

‘Message’ was supposed to be used to set a custom message for each action when sending patient reminders(per the comment in the sql field). However, it appears I did not actually incorporate its use into patient reminders when building the CDR engine. So, to put it simply, it does nothing at this time :slight_smile:

-brady
OpenEMR

harleytuck wrote on Monday, January 30, 2017:

Hi Brady-
Thanks for the tips- that’s going to be fun playing with!

  • HT

harleytuck wrote on Monday, January 30, 2017:

It works fine w/ an internet url but when I tried to get a local url to a file it insists on prepending the top level dir where I put this openemr, /var/www/html/openemr50/

The requested URL /openemr50/ /file:///home/gwydion/Documents/EduMats/ICD10-updates.txt was not found on this server.

I tried adding the ‘file’ option to the line that parses the prefix
if($url_prefix == ‘https’ || $url_prefix == ‘http’ || $url_prefix == ‘file’ ){

but it still comes up 
The requested URL /openemr50/file:///home/gwydion/Documents/EduMats/ICD10-updates.txt was not found on this server.

What'd be cool is to put a file picker dialog to find local urls so the user wouldn't have to jump through hoops in non-standard installs.  Maybe some day I'll do that.  In the meantime it can serve as a 2nd internet refeence.
  • HT

cmswest wrote on Tuesday, January 31, 2017:

a work around:

place the local file in http://localhost/openemr/sites/default/documents/filename

using the http://localhost prevents the browser from running into cross site/origin security issues i believe

harleytuck wrote on Thursday, February 02, 2017:

Hi Stephen-

Hey-- that’s pretty cool.

When I upload a file to the facility’s ‘Miscellaneous/New Documents’ module it shows the path to where the file ends up. In my case I uloaded a pdf to the Advance Directives. (One might want to create a special document category, if this functionality is going to be used.)

Then in that CDR’s Action link txt area I put the path, subtly modified from what you said:" /sites/default/documents/00/3623/[filename]"

In the CR widget, the CDR name will now be blue and when you click on it, the pdf viewer pops up with the file in it.

But only if ‘custom input’= NO; if YES it shows the input popup. So it can’t be used on a rule that does need custom input.

And it still doesn’t work with an internet URL, http OR https.

Thinking in terms of being used in a Dr’s office, some sort of IT knowledge would be needed to set it up (the path stuff, don’t you know), but this could be very useful with a custom special- purpose rule.

  • HT