-
-
Notifications
You must be signed in to change notification settings - Fork 2.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
fixes #5824, reorganize and simplify patient portal widget #5825
Conversation
$portalStatus = sqlQuery("SELECT allow_patient_portal FROM patient_data WHERE pid = ?", [$pid]); | ||
if ($portalStatus['allow_patient_portal'] == 'YES') { | ||
$return = true; | ||
return $return; |
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.
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; |
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.
as above, prob can drop above line
return $return; | ||
} | ||
return $return; | ||
} | ||
|
||
function areCredentialsCreated($pid) | ||
{ | ||
$retun = false; |
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.
mispelled, $return
'portalLoginHref' => $GLOBALS['webroot'] . "/interface/patient_file/summary/create_portallogin.php", | ||
'isApiAllowed' => isApiAllowed($pid), | ||
'areCredentialsCreated' => areCredentialsCreated($pid) |
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.
$return = true; | ||
} | ||
|
||
return $return ?? null; |
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.
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
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.
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 :) )
a screen shot would'd be helpful |
thanks for the tips @bradymiller , good call @sjpadgett portal not enabled and not allowed in choices portal not enabled and not allowed in choices and prevent api turned on: |
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"); |
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.
Thank you! 😄
Looks great @stephenwaite thanks! |
…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
* 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>
Fixes #5824
Short description of what this resolves:
Changes proposed in this pull request: