TACC / Core-CMS-Custom

Customized Core CMS code and builds
5 stars 0 forks source link

task/WP-11-Add/Remove Threshold Except #156

Closed sophia-massie closed 1 year ago

sophia-massie commented 1 year ago

Overview

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

Related

Changes

  1. File change
  2. Add button click
  3. When field selection changes to populate helper text

Testing

  1. In exception/views.py, add the following snippet on line 175
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:

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