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

Task/wp11 add remove excep button #165

Merged
merged 11 commits into from
Jun 1, 2023
Merged

Conversation

sophia-massie
Copy link
Contributor

Overview

Add/Remove Threshold exceptions with dynamic select and helper txt elements

Related

Changes

  • Broke out scripts into smaller jQuery functions
  • Changed all hardcoded values passed to DB from apcd_database util to lowercase as per discussion with Carrie on DB clean up.
  • Add button markup and logic to add and remove exception blocks and headers
  • Fetches cdl info on:
  1. File change
  2. Add button click
  3. When field selection changes to populate helper text

Testing

  1. Not much to test locally as the updated query only works on QA. Review the code to make sure the view passes the right information to the apcd_database query.
  2. If you want to check to make sure the form didn't break locally, here are the steps:
  3. In exception/views.py, add the following snippet on line 184

cdls = [('CDLME001', 'Data Submitter Code', '100'),
('CDLME004', 'Member\nInsurance/Product\nCategory Code', '90'),
('CDLME005', 'Start Year of\nSubmission ', '100'),
('CDLME006', 'Start Month\nof Submission ', '100'),
('CDLME007', 'Insured Group or Policy Number', '80'),
('CDLME009', 'Medicaid AID Category ', '50'),
('CDLME011', 'Plan Specific Contract Number', '60'),
('CDLME012', 'Subscriber Last Name ', '100'),
('CDLME013', 'Subscriber First Name ', '100'),
('CDLME015', 'Sequence Number ', '100'),
('CDLME017', 'Individual Relationship\nCode', '90'),
('CDLME018', 'Member Gender ', '90'),
('CDLME019', 'Member Date of Birth ', '90'),
('CDLME020', 'Member Last Name ', '100'),
('CDLME021', 'Member First Name ', '100'),
('CDLME023', 'Member Street Address', '60'),
('CDLME024', 'Member City Name ', '60'),
('CDLME025', 'Member State or Province', '80'),
('CDLME026', 'Member ZIP Code ', '80'),
('CDLME036', 'Medical Coverage\nUnder This Plan', '90'),
('CDLME037', 'Pharmacy Coverage\nUnder This Plan', '90'),
('CDLME039', 'Behavioral Health\nCoverage Under This\nPlan', '90'),
('CDLME040', 'Primary Insurance Indicator', '100'),
('CDLME041', 'Coverage Type ', '50'),
('CDLME045', 'Group Name ', '60'),
('CDLME050', 'Plan Effective Date ', '90'),
('CDLME061', 'Carrier Specific Unique\nMember ID', '95'),
('CDLME062', 'Carrier Specific Unique\nSubscriber ID', '95'),
('CDLME064', 'High Deductible Plan Indicator', '50'),
('CDLME899', 'Record Type ', '100')]

  1. Now add the following snippet to the same file on line 38

submitters = [ (2, 'TESTGOLD', 10000001, 'gmunoz1', 'CHCD'), (3, 'TESTGOLD', 10000002, 'gmunoz1', 'CHCD'), (1, 'TESTGOLD', 10000000, 'gmunoz1', 'CHCD') ]

  1. Go to http://localhost:8000/submissions/threshold-exception/
  2. Select a file type
  3. Make sure the Field Code input field has the Names and Codes you put in for the cdl var on line 168 in views.py
  4. Change the File Type field
  5. Check network console to check if AJAX call is working to get the file type. The response should be the CDLs from your view.py file
  6. Change the File Type a second time. The codes should repopulate and the first code in the list should appear in the drop down. The help text should clear.
  7. Try clicking the add button and filling out the block one at a time.
  8. Try clicking the add button several times at once and then changing the field drop downs. This is to make sure the corresponding helper text populates.
  9. Try removing and adding exceptions.
  10. Try filling out exception information and changing the file type at the top. This should clear the help text and reset the drop down options.

These are the corresponding codes for each file type:

  • dc/Dental Claims
  • mc/Medical Claims
  • me/Member Eligibility
  • pc/Pharmacy Claims
  • pv/Provider

UI

Added buttons

Screenshot 2023-05-10 at 5 01 45 PM

Helper text will dynamically update on Threshold Percentage based on Field Code for each exception block.

When one block is showing:

Screenshot 2023-05-10 at 5 02 47 PM

When several blocks are showing:

Screenshot 2023-05-10 at 5 03 41 PM

Screenshot 2023-05-10 at 5 04 11 PM

Copy link
Member

@happycodemonkey happycodemonkey left a comment

Choose a reason for hiding this comment

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

This PR looks good!

@sophia-massie sophia-massie self-assigned this May 30, 2023
requests rather than the DB query
Copy link
Contributor

@edmondsgarrett edmondsgarrett left a comment

Choose a reason for hiding this comment

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

LGTM, form working locally as well. I have one suggestion below, otherwise ready to go!

apcd-cms/src/apps/utils/apcd_database.py Outdated Show resolved Hide resolved
Copy link
Contributor

@fnets fnets left a comment

Choose a reason for hiding this comment

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

LGTM!

@fnets fnets merged commit 0142df5 into main Jun 1, 2023
@fnets fnets deleted the task/WP11-Add-Remove-Excep-Button branch June 1, 2023 19:37
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.

4 participants