Skip to content
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

fixes #5824, reorganize and simplify patient portal widget #5825

Merged
merged 7 commits into from
Oct 12, 2022

Conversation

stephenwaite
Copy link
Member

Fixes #5824

Short description of what this resolves:

Changes proposed in this pull request:

$portalStatus = sqlQuery("SELECT allow_patient_portal FROM patient_data WHERE pid = ?", [$pid]);
if ($portalStatus['allow_patient_portal'] == 'YES') {
$return = true;
return $return;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prob can drop the above line


$apiStatus = sqlQuery("SELECT prevent_portal_apps FROM patient_data WHERE pid = ?", [$pid]);
if (strtoupper($apiStatus['prevent_portal_apps'] ?? '') != 'YES') {
$return = true;
return $return;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as above, prob can drop above line

return $return;
}
return $return;
}

function areCredentialsCreated($pid)
{
$retun = false;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mispelled, $return

'portalLoginHref' => $GLOBALS['webroot'] . "/interface/patient_file/summary/create_portallogin.php",
'isApiAllowed' => isApiAllowed($pid),
'areCredentialsCreated' => areCredentialsCreated($pid)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2DV-2

$return = true;
}

return $return ?? null;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could make this just return $return since will always be just true or false and will work downstream like this.
and then could force the type of the returns of these three above functions to always be boolean by putting : bool for example function areCredentialsCreated($pid): bool

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as an aside, I have gotten in the habit of typing function params/returns (especially new functions) mostly because of laziness (figure then i don't need to add any documentation/comments to it :) )

@sjpadgett
Copy link
Member

a screen shot would'd be helpful

@stephenwaite
Copy link
Member Author

thanks for the tips @bradymiller , good call @sjpadgett

everything enabled:
Screenshot from 2022-10-11 22-21-53

portal not enabled in config:
Screenshot from 2022-10-11 22-21-29

portal not enabled and not allowed in choices
Screenshot from 2022-10-11 22-21-09

portal not enabled and not allowed in choices and prevent api turned on:
Screenshot from 2022-10-11 22-20-40

@stephenwaite
Copy link
Member Author

here's another wrinkle:

Screenshot from 2022-10-11 22-30-33

@stephenwaite
Copy link
Member Author

now if can get the user setting to work will be able to hide this :)

@@ -2428,8 +2428,8 @@ function generate_display_field($frow, $currvalue)
$list_id = $frow['list_id'];
$backup_list = isset($frow['list_backup_id']) ? $frow['list_backup_id'] : null;
$show_unchecked_arr = array();
getLayoutProperties($frow['form_id'], $show_unchecked_arr, 'grp_unchecked', "1");
$show_unchecked = strval($show_unchecked_arr['']['grp_unchecked']) == "0" ? false : true;
getLayoutProperties($frow['form_id'] ?? null, $show_unchecked_arr, 'grp_unchecked', "1");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! 😄

@sjpadgett
Copy link
Member

Looks great @stephenwaite thanks!

@bradymiller
Copy link
Member

118382341-53d9d600-b5c2-11eb-8b7e-220bbab8468a

@stephenwaite stephenwaite merged commit fba7a9f into openemr:master Oct 12, 2022
@stephenwaite stephenwaite deleted the iss5824 branch October 12, 2022 19:17
stephenwaite added a commit to stephenwaite/openemr that referenced this pull request Oct 12, 2022
…enemr#5825)

* fixes openemr#5824, reorganize and simplify patient portal widget

* fixes

* better wording, remove needless else

* fix initially collapsed

* ok enough :)

* better name

* use isset() instead
stephenwaite added a commit that referenced this pull request Oct 27, 2022
* Accept assign fix (#5701)

* Update Hcfa1500.php

* Update X125010837P.php

* additional CLM07 fix

* Bug fix (#5695)

* bug fix

* csrf

* modern syntax

* wrap with text() for html xss

* bring in 2023 icd10 (#5762)

* add eRx condition to primary business entity checkbox disable (#5781)

* check for allow portal in choices before displaying create creds (#5790)

* check for allow portal in choices

* styling

* Update X12Partner.class.php (#5793)

* ignore temporary css file for patch (#5814)

* fixes #5824, reorganize and simplify patient portal widget (#5825)

* fixes #5824, reorganize and simplify patient portal widget

* fixes

* better wording, remove needless else

* fix initially collapsed

* ok enough :)

* better name

* use isset() instead

* php8 fixes for batch payments (#5819)

* more php8 fixes for batch payments

* one more int cast

* broken link in search payments

* remove unused script

* merge

* merge

* invoice past encounter button Bug fix #5837 (#5840)

* edit billing note in invoice (#5843)

* fix #5849, handle all zeroes from old form_vitals date field; display date at top of table (#5850)

* handle all zeroes date plus place date at top of table

* misc php8 warning

* remove cmnt

* better conditional

* even better

* fix comment

* remove class from hidden input :)

* php8 fixes for growth chart

* play it again sam

* not needed since fixing in sql upgrade

* merge

* fixes for track anything (#5881)

* fix display and php8

* another null bites the dust

* simplify output and more php8 fixes

* fix for prior merge

Co-authored-by: surfacehazard <github@auldware.com>
Co-authored-by: Simon Quigley <squigley@altispeed.com>
Co-authored-by: Sherwin Gaddis <sherwin@affordablecustomehr.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Display generate credentials for API regardless of allow portal
4 participants