Providers need to be visible at more than one Facility

tmccormi wrote on Wednesday, March 04, 2015:

Anyone have a mod out there that allows providers to have more than one facility? So they show up in the calendar’s facility view for any facility they are allowed to?

Right now if you book an appt for a patient at anything other than the default facility it’s not visible on the calendar at all…

–Tony

sunsetsystems wrote on Wednesday, March 04, 2015:

The users_facility table is supposed to support these relations. Suggest you check the calendar code (and other code) to see if/where it’s referenced. Also there are some global settings about users and facilities.

Rod
http://www.sunsetsystems.com/

tmccormi wrote on Wednesday, March 04, 2015:

Thanks, will do that.
Is there documentation about how that works written by anyone, if not we’ll
do that

Tony


Please be aware that e-mail communication can be intercepted in
transmission or misdirected. Please consider communicating any sensitive
information by telephone. The information contained in this message may be
privileged and confidential. If you are NOT the intended recipient, please
notify the sender immediately with a copy to hipaa-security@mrsb-ltd.com and
destroy this message.

tmccormi wrote on Wednesday, March 04, 2015:

That was a good hint! Needs documentation for sure.

This: Restrict Users to Facilities
Selecting this will restrict non-authorized users to the Schedule Facilities configured for the user in Adminstration->Users.

Does not explain the scope of this feature which, so far, appears to BOTH restrict users to viewing specific facilities in the calendar but ALSO allow a provider to be on more than one facility calendar. Just what I needed.

–Tony

cmswest wrote on Friday, March 06, 2015:

I think there’s an underlying bug here that has been known.

To demonstrate, I added another facility to the 4.2.0 dev demo and have attached screenshots showing how the calendar is defunct when you choose the non-default facility. When you click on a time to schedule an event nothing happens.

fsgl wrote on Friday, March 06, 2015:

Hi Stephen,

Here is your calendar misbehaving thread.

To my knowledge it has never been fixed since it appeared after 4.1.1(12).

cmswest wrote on Friday, March 06, 2015:

thanks fsgl, after debugging a part of this file , i’m going to dive in here to see why the provider info isn’t coming along.

cmswest wrote on Saturday, March 07, 2015:

Eureka. If you’re not restricting users to a facility then you shouldn’t limit the sql select statement based on the default facility defined in the users table.

Just comment out this line.

Here’s the commit.

cmswest wrote on Saturday, March 07, 2015:

Hi Tony, I’m still looking around in the code but I don’t see where anything is ever entered into users_facility. The closest it comes to an insert is here.

bradymiller wrote on Thursday, March 12, 2015:

Hi,
Is this a complete fix (ie. is it ready to go into the official codebase), or does it cause issues elsewhere?
-brady
OpenEMR

cmswest wrote on Friday, March 13, 2015:

i think it’s good to go

restricting users still needs some work, maybe CHEMED meant to use facility_user_ids in the query above this commented line?

not sure of the necessity for both tables

tmccormi wrote on Monday, March 23, 2015:

Brady.
Want me to merge this one?

Tony


Please be aware that e-mail communication can be intercepted in
transmission or misdirected. Please consider communicating any sensitive
information by telephone. The information contained in this message may be
privileged and confidential. If you are NOT the intended recipient, please
notify the sender immediately with a copy to hipaa-security@mrsb-ltd.com and
destroy this message.

fsgl wrote on Monday, March 23, 2015:

Thank you, Stephen.

If you need another nickname, it can be George.

Stephen one, Dragon zip.

I’ll put a postscript in the other thread.

bradymiller wrote on Monday, March 23, 2015:

Hi,

On my quick review, it seems like this fix “breaks” the getProviderInfo() by simply ignoring the $facility parameter. Would it be better to attack the fix where the getProviderInfo() function call is made (let me know if I am missing something, which is possible, since I did just do a quick review).

-brady
OpenEMR

fsgl wrote on Wednesday, June 10, 2015:

As of today 6/10/15, the fix is not yet in the codebase. User must change the code by uncommenting line 255 as suggested by Stephen, see above.

cmswest wrote on Friday, June 12, 2015:

thanks for following up on this fsgl, i feel as wretched as one of the gogans from pete’s dragon for not looking into brady and tony’s suggestion…

fsgl wrote on Friday, June 12, 2015:

Thank you for addressing Brady’s concern.

cmswest wrote on Saturday, June 27, 2015:

here’s another attempt, link to commit

fsgl wrote on Saturday, June 27, 2015:

Thanks, Stephen.

Will keep toes & fingers crossed in hopes of a permanent fix.