diff --git a/apcd-cms/src/apps/admin_regis_table/templates/view_registration_modal.html b/apcd-cms/src/apps/admin_regis_table/templates/view_registration_modal.html index e4ca8e7c..30ba464e 100644 --- a/apcd-cms/src/apps/admin_regis_table/templates/view_registration_modal.html +++ b/apcd-cms/src/apps/admin_regis_table/templates/view_registration_modal.html @@ -48,6 +48,17 @@
Entity {{forloop.counter}}
{{entity.license}}
NAIC Company Code
{{entity.naic}}
+
Type of Plan
+
+
+
Types of Plans
+ {% for plan_type, plan_type_selected in entity.plans_type.items %} + {% if plan_type_selected %} +
{{plan_type}}
+ {% endif %} + {% endfor %} +
+
File Submission
diff --git a/apcd-cms/src/apps/admin_regis_table/views.py b/apcd-cms/src/apps/admin_regis_table/views.py index a7a4821c..7a5d35ff 100644 --- a/apcd-cms/src/apps/admin_regis_table/views.py +++ b/apcd-cms/src/apps/admin_regis_table/views.py @@ -111,12 +111,17 @@ def _set_entities(reg_ent): 'no_covered': reg_ent[6], 'ent_name': reg_ent[7], 'fein': reg_ent[8] if reg_ent[8] else None, + 'plans_type': { + "Commercial": reg_ent[9], + "Medicare": reg_ent[10], + "Medicaid": reg_ent[11], + }, 'files_type': { - "Eligibility/Enrollment": reg_ent[9], - "Provider": reg_ent[10], - "Medical": reg_ent[11], - "Pharmacy": reg_ent[12], - "Dental": reg_ent[13] + "Eligibility/Enrollment": reg_ent[12], + "Provider": reg_ent[13], + "Medical": reg_ent[14], + "Pharmacy": reg_ent[15], + "Dental": reg_ent[16] } } def _set_contacts(reg_cont): diff --git a/apcd-cms/src/apps/registrations/static/registrations/css/submission_form.css b/apcd-cms/src/apps/registrations/static/registrations/css/submission_form.css index e2b63d2c..46c95214 100644 --- a/apcd-cms/src/apps/registrations/static/registrations/css/submission_form.css +++ b/apcd-cms/src/apps/registrations/static/registrations/css/submission_form.css @@ -25,7 +25,7 @@ input[name^="contact_phone"] { /* Field Layouts */ /* To make (radio/check)box sets take up less vertical space */ -#types_of_files, #submission_method, #on-behalf-of { +#types_of_files, #types_of_plans, #submission_method, #on-behalf-of { display: flex; flex-wrap: wrap; column-gap: 1em; diff --git a/apcd-cms/src/apps/registrations/templates/submission_form/registration_form_body.html b/apcd-cms/src/apps/registrations/templates/submission_form/registration_form_body.html index 60d592f3..6a652d2b 100644 --- a/apcd-cms/src/apps/registrations/templates/submission_form/registration_form_body.html +++ b/apcd-cms/src/apps/registrations/templates/submission_form/registration_form_body.html @@ -332,6 +332,31 @@
Entity {{ ent_no }}
+
Type of Plan
+
+ +
+ +
+ + +
    + {% for plan_type, plan_type_selected in entity.plans_type.items %} +
  • + +
  • + {% endfor %} +
+
File Submission
+
Type of Plan
+
+ +
+ +
+ + +
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
+
+
File Submission
+
Type of Plan
+
+ +
+ +
+ + +
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
+
File Submission
`; - const inputs = Array.from( - document.querySelectorAll(` - input[name=fein_${entities}{% if r %}_{{r.reg_id}}{% endif %}], - input[name=license_number_${entities}{% if r %}_{{r.reg_id}}{% endif %}], - input[name=naic_company_code_${entities}{% if r %}_{{r.reg_id}}{% endif %}] - `) - ); - entityIdGroupValidation(entities, reg_id); // add entity id validation for new entities on form + entityIdGroupValidation(entities, reg_id); // add entity input validation for new entities on form + entityPlanTypeValidation(entities, reg_id); const addEntityNameInput = document.querySelectorAll(`input[name=entity_name_${entities}{% if r %}_{{r.reg_id}}{% endif %}]`); noEmptyInputs(addEntityNameInput); diff --git a/apcd-cms/src/apps/utils/apcd_database.py b/apcd-cms/src/apps/utils/apcd_database.py index 2cd1c1bd..d1a8f0eb 100644 --- a/apcd-cms/src/apps/utils/apcd_database.py +++ b/apcd-cms/src/apps/utils/apcd_database.py @@ -294,6 +294,9 @@ def get_registration_entities(reg_id=None): registration_entities.total_covered_lives, registration_entities.entity_name, registration_entities.fein, + registration_entities.plan_coml, + registration_entities.plan_mdcr, + registration_entities.plan_mdcd, registration_entities.file_me, registration_entities.file_pv, registration_entities.file_mc, @@ -331,6 +334,9 @@ def create_registration_entity(form, reg_id, iteration, from_update_reg=None): _set_int(form['total_covered_lives_{}'.format(str_end)]), _clean_value(form['entity_name_{}'.format(str_end)]), _clean_value(form['fein_{}'.format(str_end)]), + True if 'types_of_plans_commercial_{}'.format(str_end) in form else False, + True if 'types_of_plans_medicare_{}'.format(str_end) in form else False, + True if 'types_of_plans_medicaid_{}'.format(str_end) in form else False, True, True if 'types_of_files_provider_{}'.format(str_end) in form else False, True if 'types_of_files_medical_{}'.format(str_end) in form else False, @@ -347,12 +353,15 @@ def create_registration_entity(form, reg_id, iteration, from_update_reg=None): total_covered_lives, entity_name, fein, + plan_coml, + plan_mdcr, + plan_mdcd, file_me, file_pv, file_mc, file_pc, file_dc - ) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)""" + ) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)""" conn = psycopg2.connect( host=APCD_DB['host'], @@ -397,6 +406,9 @@ def update_registration_entity(form, reg_id, iteration, no_entities): _set_int(form['total_covered_lives_{}'.format(str_end)]), _clean_value(form['entity_name_{}'.format(str_end)]), _clean_value(form['fein_{}'.format(str_end)]), + True if 'types_of_plans_commercial_{}'.format(str_end) in form else False, + True if 'types_of_plans_medicare_{}'.format(str_end) in form else False, + True if 'types_of_plans_medicaid_{}'.format(str_end) in form else False, True if 'types_of_files_provider_{}'.format(str_end) in form else False, True if 'types_of_files_medical_{}'.format(str_end) in form else False, True if 'types_of_files_pharmacy_{}'.format(str_end) in form else False, @@ -421,6 +433,9 @@ def update_registration_entity(form, reg_id, iteration, no_entities): total_covered_lives = %s, entity_name = %s, fein = %s, + plan_coml = %s, + plan_mdcr = %s, + plan_mdcd = %s, file_pv = %s, file_mc = %s, file_pc = %s,