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
Ken patient finder and tab settings #3124
Ken patient finder and tab settings #3124
Conversation
…option for second default tab
@bradymiller @sjpadgett Here are some small features that have been requested that I would like to contribute. Thank you! |
interface/main/tabs/main.php
Outdated
app_view_model.application_data.tabs.tabsList()[0].url(<?php echo json_encode("../".$_SESSION['frame1url']); ?>); | ||
app_view_model.application_data.tabs.tabsList()[0].name(<?php echo json_encode($_SESSION['frame1target']); ?>); | ||
// Use session variables and tabStatus object to set up initial/default first tab | ||
app_view_model.application_data.tabs.tabsList.push(new tabStatus("Loading...",<?php echo json_encode("../".$_SESSION['frame1url']); ?>,<?php echo json_encode($_SESSION['frame1target']); ?>,true,true,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.
translate:
app_view_model.application_data.tabs.tabsList.push(new tabStatus(<?php echo xlj("Loading"); ?> + "...",<?php echo json_encode("../".$_SESSION['frame1url']); ?>,<?php echo json_encode($_SESSION['frame1target']); ?>,true,true,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.
Fixed
interface/main/tabs/main.php
Outdated
app_view_model.application_data.tabs.tabsList()[1].url(<?php echo json_encode("../".$_SESSION['frame2url']); ?>); | ||
app_view_model.application_data.tabs.tabsList()[1].name(<?php echo json_encode($_SESSION['frame2target']); ?>); | ||
// Use session variables and tabStatus object to set up initial/default second tab, if none is set in globals, this tab will not be displayed initially | ||
app_view_model.application_data.tabs.tabsList.push(new tabStatus("Loading...",<?php echo json_encode("../".$_SESSION['frame2url']); ?>,<?php echo json_encode($_SESSION['frame2target']); ?>,true,false,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.
translate the Loading like done above
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
sql/5_0_2-to-5_0_3_upgrade.sql
Outdated
@@ -419,4 +419,15 @@ CREATE TABLE `pro_assessments` ( | |||
|
|||
#IfNotRow2D list_options list_id LBF_Validations option_id future_date | |||
INSERT INTO `list_options` (`list_id`,`option_id`,`title`,`notes`, `seq`) VALUES ('LBF_Validations','future_date','Future Date','{\"futureDate\":{\"message\":\"must be future date\"}}','32'); | |||
|
|||
#IfNotRow2D list_options list_id lists option_id Sort_Direction | |||
INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `activity`) VALUES ('lists', 'Sort_Direction', 'Sort Direction', 306, 1, 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.
would make seq 1 here and is_default 0 (since that is what is done on most of the list titles)
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
sql/5_0_2-to-5_0_3_upgrade.sql
Outdated
#EndIf | ||
|
||
#IfNotRow2D list_options list_id Sort_Direction option_id 1 | ||
INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `activity`) VALUES ('Sort_Direction', '1', 'desc', 2, 0, 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.
for the seq on these, start at 10 and increment by 10 (this gives breathing room if wish to add other items in the future). Plus the asc/desc titles seem to be very technical language. Would there be a less technical way to state these options (for folks that may not know was asc/desc mean) (if not, then keep it as is).
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
hi @kchapple , Review complete. If you address these minor issues and it's testing well for you, then will bring it into the codebase. thanks! |
"list_id = 'ptlistcols' AND activity = 1 ORDER BY seq, title"); | ||
while ($row = sqlFetchArray($res)) { | ||
$colname = $row['option_id']; | ||
$colorder = generate_display_field(array('data_type'=>'1','list_id'=>'Sort_Direction'), $row['toggle_setting_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.
Been looking into this. do note that this will translate what is returned, so it could get change to something else :)
Will be better to grab the title directly via a sql query from list_options.
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
Good catch. Thanks!
Ken
… On Mar 10, 2020, at 5:30 PM, Brady Miller ***@***.***> wrote:
@bradymiller commented on this pull request.
In interface/main/finder/dynamic_finder.php:
> "list_id = 'ptlistcols' AND activity = 1 ORDER BY seq, title");
while ($row = sqlFetchArray($res)) {
$colname = $row['option_id'];
+ $colorder = generate_display_field(array('data_type'=>'1','list_id'=>'Sort_Direction'), $row['toggle_setting_1']);
Been looking into this. do note that this will translate what is returned, so it could get change to something else :)
Will be better to grab the title directly via a sql query from list_options.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
hi guys, are we close on bringing this in? |
…slate because it might change the string for 'asc' and 'desc' which would make the datatables sorting malfunction
@sjpadgett I just committed a change so that the system won't translate the sort direction (cause that would break the datatables.) Waiting on our friend travis. |
Thanks for this. I'll be testing along with some other test i'm into now and will let you know. Want to get in so other PR can catch up. |
working well I especially like the none for second tab. |
Sweet, thanks! |
Fixes #
Short description of what this resolves:
This pull request addresses 3 issues:
1- When creating a "Facility" field in the patient demographics layout, and adding it to the patient finder columns, the facility name would not be displayed. This was because there was not a facility type implemented in the options function that generated a plain text field. This was added by using the facility service to map the facility ID to the facility name so it can be displayed.
2- There is currently no way to specify default column ordering (sort direction) on patient list columns. This pull request addresses this issue by adding a list option for Sort_Direction, as well as adding a sort direction column to the Patient List Columns list, so the user can specify the default sort direction (for a date-created for example.) This does not change the default behavior, which is "asc" for all columns.
3- There was not the ability to have None as an option for the second default tab. I added the ability to select "None" in globals settings for the second default tab, and also cleaned up some of the dead code in the tabs view model. This does not change the default behavior.
Changes proposed in this pull request: