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

record sample now populates input with code value #944

Merged
merged 2 commits into from
Dec 8, 2017

Conversation

laclark22
Copy link
Contributor

@laclark22 laclark22 commented Dec 6, 2017

On the record sample form user can now click on a code from the record sample modal that pops up when code set button is clicked and that code will be populated in the input box associated with that value set.

Submitter: Laura Clark

  • This pull request describes why these changes were made.
  • Internal ticket for this PR:
  • Internal ticket links to this PR
  • Code diff has been done and been reviewed
  • Tests are included and test edge cases
  • Tests have been run locally and pass

Reviewer 1: Michael O'Keefe

Name:

  • Code is maintainable and reusable, reuses existing code and infrastructure where appropriate, and accomplishes the task’s purpose
  • The tests appropriately test the new code, including edge cases
  • You have tried to break the code

Reviewer 2:

Name:

  • Code is maintainable and reusable, reuses existing code and infrastructure where appropriate, and accomplishes the task’s purpose
  • The tests appropriately test the new code, including edge cases
  • You have tried to break the code

Copy link

@ljades ljades left a comment

Choose a reason for hiding this comment

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

The code works, just have one comment on one of the variables.

EDIT: Actually, one more thing: when you click on a code when there are multiple options, the modal disappears (as it should), but when there's only one option, it doesn't disappear. It's a strange behavioral inconsistency.

@@ -11,7 +11,7 @@
<% if !hide_patient_calculation? %>
<div id='modify_record'><button class='btn btn-default' type='button' id="modifyrecord">Edit Test</button></div>
<% end %>
<% measures.sort_by(&:cms_int).each.with_index do |measure, measure_index| %>
<% @measures.sort_by(&:cms_int).each do |measure, measure_index| %>
Copy link

Choose a reason for hiding this comment

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

Any reason for the replacing the local variable with an instance variable? (measures to @measures)?

Copy link

@okeefm okeefm left a comment

Choose a reason for hiding this comment

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

Similar to @ljades, I found that clicking on a code when the list only has 1 element doesn't dismiss the modal for some reason.

@laclark22
Copy link
Contributor Author

So weird.. I have a record sample where there is only one element in the list and the modal closes. @ljades and @okeefm can you tell me which measure you guys are seeing this happen with?

@laclark22
Copy link
Contributor Author

Fixed the modal not closing issue @okeefm and @ljades

@laclark22 laclark22 merged commit f87b1dc into master Dec 8, 2017
@laclark22 laclark22 deleted the record_sample_code_populate branch December 8, 2017 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants