One provider, multiple states / licenses

Problem: Provider practices is multiple states and needs an individual license per state.

While this is not really a problem for visits, where this is an issue I see is:

  1. eRX prescribing, provider would need a separate Weno ID (don’t use the other eRX options)
  2. Signing, tag the records in eSign with the license used for auditing purposes… i.e., to show that the visit was performed with a valid license, etc.
  3. Labs … having correct credential in the state to prescribe labs

Solution: I see this as a “simple” solution…

  1. create seperate db table “provider_licenses”
    this table will have: id, state, license number, expiration date, state weno id, user_id (as foreign key)
  2. require user SSN to use as a lookup to pevent searching on like names alone incase a pratice as multiple John Smith’s
  3. allow one provide to schedule patients in their licensed states, but when prescribing, ordering labs, signing charts, logic would check if there are multiple user_ids with same tax id field, then prompt the provider which license to use
  4. for prescribing, I can’t find the code that would show a “state” abbreviation with the name

I’m pretty good with Access DB, just learning mySQL, so this is a whole new world, but that is my thought and would be happy to learn and work with ya’ll to make this happen.

Interim: I’d be happy to create multipkle profiles for each license in the meantime, just need a way to show which state the profile belongs to (yet keeping the Display Name legible for ePrescribing purposes, i.e., no John Doe (State) with Doe (state) as the last name as that might cause confusion for pharmacists.

1 Like

@kevin_ytc

This sounds like a nice project. I can share with you that inside the Weno management console where I enter doctors license information. There is the ability to enter license for different states.

However, I would like use to get together to bring this to life. I like the idea. Let’s do this.

Sherwin,

Is that on the Weno Exchange site? I have my wife’s information there, I’ll have to add her other licenses. Assuming that is correct, do we know how Weno knows which license to transmit?

Here is what I have so far (no data).

table: provider_licenses


And the provider_users field is a foreign key for the user.id table

My thoughts are that there would be a checkbox to turn this feature on in the Settings > Globals.

I’m stumped as to where to put an input field to add new licenses… perhaps in the user information field??

I have an of idea.
Create a new section like this.
image

Or!

I’d think if add license to facility of provider that the state would be covered. I may have missed gist of issue though!

@sjpadgett I thought of suggesting that but there are two things I considered and I am just typing to keep from working.
@kevin_ytc went through all the trouble to create a table in the database. So, he must have something big planned. Also, depending on what he has planned getting those license number back from that box could be a nightmare because there is no way to know which is which.

Only Kevin knows what is coming next. =^)

Well, I played around with multi facility and that was. nightmare, just saying. My thought was tying the provider licenses to the provider, since you could theoretically have a provider in one state with one license yet another provider that practices in two states.

Hence why i was thinking about putting them under the user, and (from my Access way of thinking) as a “subform” under the User Form.

My main concerns are two-fold, unless we can think of others:

  1. when a provider is prescribing Rxs, the correct state’s license number is displayed on the prescription.
  2. showing the provider, when they select “Provider” in the prescription field, which license they can select. I.e., “First Name Last Name | State”

Does that help make sense?

The reason I don;t like the multiple facility is that, to me, its clunky and a waste of resources to have duplicate everything all for a provider license in another state. Second, I created an additional user, and that works to pull provider license information for Prescribing and lab requests, etc. but there is no way to show the provider which “clone” they need to select, unless you remember the order and have one additional state.

My wife has 5 states she can work in, so that gets complex. Hence, why i am trying to help automate the process and make it “cleaner”. (also, I can query the database and remind her when her licenses are expiring instead of a spreadsheet).

I will draw up some concepts of what I am thinking to help explain better with pictures, cause they are worth a thousand words.

In my imagination, if you are using OpenEMR across five states. The table you created would be great. You need an interface to manage the license. That is why I pointed you to create one. Next, you can use the facility to find out what state the patient is being seen. That would allow you to pull the correct license from the license table.

These are all off the top of my head. What do you think? @kevin_ytc

Have you started the code for the license entries? May I suggest building a controller under the /src and call it /src/LicenseController.php. Set the namespace to OpenEMR/LicenseController then set your class

namespace OpenEMR\License;

class LicenseController
{
         //do epic stuff here
}

Then set up your entity and repository. Create a view in twig and you can start entering license for the doctors.

If you would like me to start on this let me know.

This is great! And its all new to me! I’m a very good Access database person, but never joined the big leagues until now.

I understand what you are getting at, but have no idea how to do what you are asking to do… :slight_smile:

The other thing I was thinking, was having the code work by default, ie., using the SSN field as the user foreign key link, so if the controller (I assume) sees two SSN under licenses, then it knows that there are multiple licenses and prompts for input, otherwise it just keeps going? Does that make sense?

Still trying to find time on screen shots… been learning bash programming for my day job!

To work with me on this, install phpstorm.
https://www.open-emr.org/wiki/index.php/OpenEMR_PHPStorm_Setup
I will start a repo for this and post it once I get things going.
I copied your database schema and I am going to create a entity.

Start watching these videos. I know this is the deep end of the pool.
https://symfonycasts.com/tracks/symfony

Here is the repo GitHub - juggernautsei/openemr at provider_licenses

and here is the commit

Ok. Working on it. Its how I’ve learned everything else in life, swimming and drowning at the same time.

Side note: ePrescribe is not working. I have Weno installed and configured and when I go to transmit new Rx and click “Transmit” I get Authentication Error. Like it can’t run the code validate.php. Need to check the logs, but everything is configured correctly.

Here is the error… its a CSRF Token issue.

@kevin_ytc Are you registered with with us? Meaning has you selected on of the packages on this page and submitted funds https://www.open-emr.org/wiki/index.php/OpenEMR_ePrescribe#JSeRx?

JSeRx is not a free service any longer.

Ah no! Let me see if that works.

I fixed the client denied error, FYI. Wrong httpd config.

ok. Submitted payment.

Is there a free alternative to PHPStorm?

There is a community license for those that donate code to the community. You will need to ask @robert.down about that.

A good open source alternative is Visual Studio Code. PHPStorm is a closed source product but as an open source project we do have some free licenses for use. Send me a private message if interested