Another new feature for v5.0.2(1): Fax with SMS notification module

This is another short feature introduction and explanation in my series on new features usage.
Introduced in the v5.0.2 patch 1 is the option to install a fax/sms module.

New release for v5.0.2 Module version v1.2.0 04/07/2020 for v5.0.3 use Module v2.0.0

Disclaimer:
Despite an opportunity for financial gain to me due to anyone who signs up with a vendor and uses this module, I can assure you that neither myself or OpenEMR receives any monies or other considerations due to a community members use. Members accounts are in no way linked or shared with anyone and are as private as the vendors privacy allows.

Let’s thank some folks
As many may know, we are striving to clean up and modernize OpenEMR(Rember how long we’ve been around) and one key part of this effort, which is generally agreed needed by most, is providing the core functionality so vendors and community members can develop modules or plugins that integrate and are maintained outside of our source master core.
Some of the this core modules support functionality required and used by this module were developed and contributed by myself, Stephen Nielson @adunsulag , Ken Chapple @ken and Robert Down @robert.down . I think I got everyone whose parts i’ve used. As always @brady.miller for his astute conformance audits, review and suggestions. Fax module also serves as guidance and example for potential module contributors.

Special thanks to Sohail Mirza, MD MPH Spine Surgeon at PEERClinic for his sponsorship to complete this feature with Twilio and the integration into OpenEMR project.
Also note Dr. Mirza is sponsoring and spearheading a new feature coming very soon for Patient Reported Outcomes measures (PROs). A less involved description is: OpenEMR will send a FHIR request for a specific questionnaire to the Peer server which will notify patient. Then using Peers mobile application, patient completes questionnaire returning answers to Peer. Once Peer receives answers, an assessment is scored and return to OpenEMR via a Fhir QuestionnaireResponse resource becoming part of patient chart. Now a part of patient chart, the assessment scoring can be used in Clinical Decisions Rules (CDR) or analytics.

Onward
Users have two vendor options, RingCentral or Twilio. Which to use depends on a clinics specialty or whether user may already have one of these accounts so, i’ll leave it to the reader to decide which vendor would be best. Here is a screenshot of interface. This is sent history:

And Uploading documents to fax:

With the clinics Address Book available for contacts:

Currently i’ve included a fax button in two areas of OpenEMR; Patient Documents and Demographic Report(custom report). I’ll just show you Custom Report as patient documents is obvious:

Accounts Setup (Either Vendors):

And Appointment SMS Notifications (This is a test run to show what would be sent on Live run):

Remember, for notifications the Allow SMS and a valid Mobile number must be include in patient chart.

Installing:
So, now you have a general idea concerning this feature and remembering too that this is an introduction and not a detailed how to (This will be available soon as a README in the modules git repository at GitHub - openemr/oe-module-faxsms: Fax and SMS feature for OpenEMR) here are the general steps to install.

  • First and very Important, do not attempt to install until after any production upgrades and the install of patch 1.
  • From a command/terminal prompt inside of your openemr root directory/folder execute
    composer require openemr/oe-module-faxsms:1.2.0 Released on 04/07/202
  • That’s all on command prompt. Now let’s get to familiar ground. Log into OpenEMR
  • Next select from top action bar Modules->Manage Modules and click Unregistered tab in hopes of finding OpenEMR Fax Module listed. Register the module then going back to Registered tab, install and enable the feature.
  • Now goto Globals->Modules Enable Fax SMS Module and select Vendor. Twilio is set as default and it’s a no folks as to doesn’t mean it’s my preferred vendor. :wink:
  • Log out then in.
  • Now select to run the module from Modules->Fax Module. Once done, select from the modules title bar Actions->Account Credentials entering all the appropriate entries for the selected vendor twilio…oops :smirk:.

So let’s conclude with some general pearls/nuggets or obvious points.

  • For either vendor we do not maintain any fax documents on site. All fax info in UI is from metadata from users vendor portal/account which you may access from our modules UI for RingCentral. Not sure why I didn’t include portal access for Twilio.
  • Due to Twilios limited API for fax(they are known best for MMS/SMS which I want to include some their of great features in future), I treated Twilio as a fax machine. They don’t track sender/recipient names. Nor do they provide API for generating cover page and only allow PDF documents for sending fax. For the cover page if enough interest is shown(so far, everybody i’ve spoken with don’t care)
  • RingCentral provides for all of previous mentioned Twilio limitations(if indeed are) but requires prior testing before turnup. Unless OpenEMR/oeFax module is approved for a preferred application status which then gets into looking like OpenEMR is collecting gratuities for use. We don’t want that! I am however, still badgering (I mean politely asking) to authorize OpenEMR so users won’t have to do any pre testing for account turnup. Ho hummm, I can’t force yo yo’s to make good business decisions.
  • Using Twilio I automatically delete any sent or received fax after 48 hours. Any failed fax status, 24 hours.
  • RingCentrals Hipaa feature auto deletes after 90 days I believe so, don’t hold me to that.

I’ll probably add to this but this is all I can think of at the moment. Please ask question if you need clarifications.
For me, I don’t get why fax is still used so much in the healthcare industry and is slowly waning in use, meantime, I hope this module will prove useful for some of you folks.

Next in series will be: How to take Credit Card payments in Patient Portal. Showing also how payments are posted during payment audit by billing.

Thanks
J

2 Likes

Having issue with ** composer require openemr/oe-module-faxsms
Im on windows server
How do I run the install ?

Thank you

I’m no expert John, but what I did on my linux installation was:

  1. copy the “oe-module-faxsms-master” folder I downloaded from the github repository to the …openemr/ folder (I renamed it “oe-module-fasxsms” and had to maintain permission settings during the copy).

  2. open a terminal at the …/openemr/ location and ran “composer require openemr/oe-module-faxsms”

  3. this highlighted the fact that I didn’t have composer installed, so I went ahead and installed it.

  4. ran “composer require openemr/oe-module-faxsms” again, and that seemed successful based on the output I got.

  5. logged back into openemr and went to manage modules to activate/install the module

  6. went to admin>modules and made sure the setting was set to twilio (b/c that’s what I want to use)

  7. went to modules>fax module to try to set up the settings correctly, and that is where I’m currently stuck.

This seems like a great module for making SMS reminders easier to implement.

I checked the README at the github page, but it doesn’t look like there’s any new info there, so I’m hoping to get some help here.

I am on a linux machine and I’m stuck at entering the account credentials. The problem is that when I get everything input into the account credentials popup, I am unable to save the information. I hit the “Save” button and nothing happens. Have tried Chromium and Firefox browsers with no luck.

Also I’m not 100% sure on what information is supposed to go in each box for Twilio integration.

“Username, Phone or Account Sid*”: is this Twilio login Username? Or Twilio Sid?
Are “Phone Number or Extension” and “SMS Number” the same thing?
Is “Client ID*” the Twilio Sid?
Is “Client Secret*” the Twilio Auth Token?

Any help would be appreciated, as I am an amatuer.

I had been using Twilio for SMS reminders with my pre 5.02 installation by way of the information in the OpenEMR wiki, but when I upgraded it got erased, so I wanted to try this module since it seemed like an improvement.

Thanks!

Sounds like credentials encryption is wayward.
Goto sites/default/documents/logs_and_misc/_cache/_credentials_twilio.php and delete if there. Reenter from UI and should save okay.

Remember also to setup your webhook in your twilio account for receiving faxes. Not important for SMS. Something like:
https://domain/openemr/interface/modules/custom_modules/oe-module-faxsms/faxserver/receivedFax?site=default
Under your accounts phone number configuration (A FAX COMES IN webhook).

There is not a need to copy module to dir tree. Just run
composer require openemr/oe-module-faxsms
Doc may be confusing with the prepend **. A no no.

Thanks for the reply Jerry.

I deleted the _credentials_twilio.php file but it didn’t change the behavior I explained.

To be clear, it’s not just that it doesn’t save the information. Clicking on the “save” button doesn’t do anything, i.e. it doesn’t close the dialog box or cause any response. It’s like the save button is broken or something.

Thanks for the help.

Goto Globals->Logging-User Debugging Options and turn on All. Log out then in and try. See if any errors.
Or check your browser console errors or php error log. Above will display most errors to display however.

I wasn’t sure where to read the log after turning on all user debugging options, but I did pull up the console in Chromium and find the errors in the attacked image. The last error pictured is what happens when I click the “save” button.

Seems like I’m missing something?

error

No clue. First when you turned on Logging user debug you should see errors from your display if you logged out then back in.
Second either permission error or module structure corrupt. Recm delete oe-module-faxsms subdirectory then if possible edit database table modules and delete the faxsms module entry.
do composer require module install again. Also you need to be running SSL(https) especially for fax but maybe not so much for SMS but still need certificates for production.

Is this only available in the 5.0.2 version? I have the 5.0.1 version and don’t see the options

hi @harmone75, yes, only 5.0.2

I deleted the oe-module-faxsms folder from /var/www/openemr/interface/modules/custom_modules/

I also deleted the database entry for it.

After reinstalling I get the same thing.

I have no idea what I’m talking about, but the error in the image I posted above seems to indicate that it’s looking for “saveSetup” in …/oe-module-faxsms/

I don’t have any file in there called saveSetup. Should there be? I don’t see it in the repository either.

Any helpful ideas are appreciated.

@Tony
It just hit me. saveSetup is a REST API call. This means you probably don’t have RewriteEngine installed and/or turned on in apache.

@sjpadgett
Thanks for the feedback.
Unfortunately the computer told me that it was already enabled, so it wasn’t as easy as I was hoping.

I’ll continue to poke around and see if I can figure anything out.

If you think of anything else it might be, I would appreciate it.

EDIT: the .htaccess file seems to be involved as far as I can tell. I see there’s one in your module’s files. There’s not an additional .htaccess file I need somewhere else, or some change I need to make to the existing one, is there?

Aha!

I put this:

<Directory /var/www/openemr>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted

in /etc/apache2/sites-available/000-default.conf

And it allowed me to save the credentials. And the errors didn’t show up in the browser console.

No idea what I’m doing. Does that seems like a valid solution? Is there any problem with do that?

Thanks!

1 Like

Hi,
Because the module is installed doesn’t necessarily mean the engine is turned on. Still .htaccess should turn on.
You can try to remove the line in htaccess
SetEnvIf Authorization “(.*)” HTTP_AUTHORIZATION=$1

I assumed you followed the OpenEMR install/setup guide ie step 6: https://www.open-emr.org/wiki/index.php/OpenEMR_5.0.2_Linux_Installation

I will read through that since it sounds like I missed something.

My apologies if this entire problem was due to my oversight in the initial setup.

No worries, i’d end up helping someone else in future.

@sjpadgett
Looks like I’ve got it working. Thanks for this module. It makes SMS reminders much easier, and it’s great to be able to see the log of remiders sent.

One last thing I’m not 100% clear on: will the module run the job of sending reminders automatically on some schedule? Or do I need to manually send the messages via Actions–>Send SMS Reminders?

Thanks!