-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Openemr fix telehealth signup locale #6413
Openemr fix telehealth signup locale #6413
Conversation
Added a check for the locale settings which should be setup to avoid clinic problems. Added instructions that the user needs to log out and log back in after saving the telehealth settings.
Include instructions and the subscription id for the user to use when they signup for the credentials. Add a copy button and switch the alert of the subscription id to actually show up in a success message info box. Before the change the user had limited understanding on how to proceed to the next steps in the configuration system.
To make the signup process easier for users, we break the signup into three steps with instructions. We also add saving the paypal subscription id so we can check if the paypal process has already completed and been signed up. We show progress to the user as they signup.
Fixed the paypal key coming back from Sherwin to be the right key value. Fixed the conditions on the subscription id.
use Comlink\OpenEMR\Modules\TeleHealthModule\Bootstrap; | ||
use Comlink\OpenEMR\Modules\TeleHealthModule\TelehealthGlobalConfig; | ||
|
||
$kernel = $GLOBALS['kernel']; | ||
$bootstrap = new Bootstrap($kernel->getEventDispatcher(), $kernel); | ||
$globalConfig = $bootstrap->getGlobalConfig(); | ||
$subscriptionId = $globalConfig->getGlobalSetting(TelehealthGlobalConfig::COMLINK_TELEHEALTH_PAYMENT_SUBSCRIPTION_ID) ?? ''; | ||
$isCoreConfigured = $globalConfig->isTelehealthCoreSettingsConfigured() === true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice.
// timezone is not set in the $GLOBALS array oddly, not sure why, check against the database | ||
$record = QueryUtils::fetchRecords("SELECT gl_name, gl_index, gl_value FROM globals WHERE gl_name=?", [self::LOCALE_TIMEZONE]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I've seen this and meant to track it down.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know where it's occurring, just thought that might have been intentional. Didn't want to change anything in the globals though so close to the wire here so I just check against globals.
$items[TelehealthGlobalConfig::COMLINK_VIDEO_REGISTRATION_API] = $credentials['registrationUri']; | ||
$items[TelehealthGlobalConfig::COMLINK_VIDEO_TELEHEALTH_API] = $credentials['videoApiUri']; | ||
$items[TelehealthGlobalConfig::COMLINK_VIDEO_API_USER_ID] = $credentials['ctsiOrgUid']; | ||
$items[TelehealthGlobalConfig::COMLINK_VIDEO_API_USER_PASSWORD] = $cryptoGen->encryptStandard(trim($credentials['ctsiOrgPwd'])); | ||
$items[TelehealthGlobalConfig::COMLINK_VIDEO_TELEHEALTH_CMS_ID] = $credentials['ctsiOrgId']; | ||
$items[TelehealthGlobalConfig::COMLINK_TELEHEALTH_PAYMENT_SUBSCRIPTION_ID] = $credentials['paypal_subscription_id'] ?? null; | ||
// Save to globals table. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recommend these default to empty string if undefined so exception won't get thrown by sequel engine for writing null values to this table.
Or put a null key/value check in foreach.
Sorry I missed that in my commits.
I'm testing this on my test jig for pass through of new array key from server.
Will let ya know
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
@sjpadgett if this is working well, we can bring this in and I'll submit a PR for 7.0.1 |
My change to sign up application was just one line to the src/Action/Credentials/RequestCredentialAction.php on Sherwins git project. I also fix autocomplete to be off in credentials twig.
So with this PR and bypassing the paypal api request in my test jig it works. Go ahead and bring in if you're ready |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job especially I like the copy/paste you added.
* Add save and locale telehealth check instructions Added a check for the locale settings which should be setup to avoid clinic problems. Added instructions that the user needs to log out and log back in after saving the telehealth settings. * Fix psr problems. * Fix telehealth subscription signup. Include instructions and the subscription id for the user to use when they signup for the credentials. Add a copy button and switch the alert of the subscription id to actually show up in a success message info box. Before the change the user had limited understanding on how to proceed to the next steps in the configuration system. * Improve signup verbiage, add subscription id To make the signup process easier for users, we break the signup into three steps with instructions. We also add saving the paypal subscription id so we can check if the paypal process has already completed and been signed up. We show progress to the user as they signup. * Fix if conditions, paypal key Fixed the paypal key coming back from Sherwin to be the right key value. Fixed the conditions on the subscription id. * Include the free verbiage in the description. * Updated telehealth plan for 14 day free trial. * Defaulting values to avoid sql error.
* Add save and locale telehealth check instructions Added a check for the locale settings which should be setup to avoid clinic problems. Added instructions that the user needs to log out and log back in after saving the telehealth settings. * Fix psr problems. * Fix telehealth subscription signup. Include instructions and the subscription id for the user to use when they signup for the credentials. Add a copy button and switch the alert of the subscription id to actually show up in a success message info box. Before the change the user had limited understanding on how to proceed to the next steps in the configuration system. * Improve signup verbiage, add subscription id To make the signup process easier for users, we break the signup into three steps with instructions. We also add saving the paypal subscription id so we can check if the paypal process has already completed and been signed up. We show progress to the user as they signup. * Fix if conditions, paypal key Fixed the paypal key coming back from Sherwin to be the right key value. Fixed the conditions on the subscription id. * Include the free verbiage in the description. * Updated telehealth plan for 14 day free trial. * Defaulting values to avoid sql error.
Fixed up the verbiage and some problems with the telehealth live payment signup process. It was popping up an alert box with the paypal subscriber id and expected the patient to copy and remember that value for signup. This is most likely what was causing the multiple signup problems that users of the module were dealing with.
Broke the signup into three steps and provide progress status to the users as they signup. Better instructions on how to move to the next step are included in each process.