From 1dbddc183d7aad9cdc32119787eb20b52f5a8976 Mon Sep 17 00:00:00 2001 From: edmondsgarrett <43251554+edmondsgarrett@users.noreply.github.com> Date: Fri, 17 Nov 2023 14:44:49 -0600 Subject: [PATCH] task/WP-391: Entities feedback UTH (#253) * Add a 10-character limit for license and NAIC fields on entities * Add helper text on Medicaid plan type option * Write NAIC and license codes to DB as str to retain any leading zeroes * Update regex on license + NAIC fields to allow leading zeroes but not just zeroes * Add to submitter listing table's class name to pick up appropriate labels from reg table stylesheet --- .../registration_form_body.html | 28 ++++++++++++------- .../registration_form_scripts.html | 11 +++++--- .../list_submitter_registrations.html | 2 +- apcd-cms/src/apps/utils/apcd_database.py | 8 +++--- 4 files changed, 30 insertions(+), 19 deletions(-) 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 4f0221e4..b783a440 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 @@ -314,14 +314,13 @@
Entity {{ ent_no }}
@@ -335,14 +334,13 @@
Entity {{ ent_no }}
@@ -370,7 +368,13 @@
Type of Plan
name="types_of_plans_{{ plan_type|lower }}_{{ent_no}}_{{r.reg_id}}" id="types_of_plans_{{ plan_type|lower }}_{{ent_no}}_{{r.reg_id}}" {% if plan_type_selected %}checked{% endif %} - />{{ plan_type }} + {{ plan_type }} + {% if plan_type == 'Medicaid' %} + (for state use only) + {% endif %} + + {% endfor %} @@ -565,7 +569,7 @@

class="integerfield" id="license_number_1" inputmode="numeric" - pattern="^[1-9]+[0-9]*$" + pattern="^(?!0+$)[0-9]{1,10}$" required /> @@ -585,7 +589,7 @@

class="integerfield" id="naic_company_code_1" inputmode="numeric" - pattern="^[1-9]+[0-9]*$" + pattern="^(?!0+$)[0-9]{1,10}$" required /> @@ -632,7 +636,11 @@

Type of Plan
name="types_of_plans_medicaid_1" id="types_of_plans_medicaid_1" required - />Medicaid + Medicaid + (for state use only) + + diff --git a/apcd-cms/src/apps/registrations/templates/submission_form/registration_form_scripts.html b/apcd-cms/src/apps/registrations/templates/submission_form/registration_form_scripts.html index 4c6edc17..533c2268 100644 --- a/apcd-cms/src/apps/registrations/templates/submission_form/registration_form_scripts.html +++ b/apcd-cms/src/apps/registrations/templates/submission_form/registration_form_scripts.html @@ -160,7 +160,7 @@ class="integerfield" id="license_number_${entities}${reg_id_substr}" inputmode="numeric" - pattern="^[1-9]+[0-9]*$" + pattern="^(?!0+$)[0-9]{1,10}$" required />
@@ -177,7 +177,7 @@ class="integerfield" id="naic_company_code_${entities}${reg_id_substr}" inputmode="numeric" - pattern="^[1-9]+[0-9]*$" + pattern="^(?!0+$)[0-9]{1,10}$" required />
@@ -223,8 +223,11 @@
Type of Plan
name="types_of_plans_medicaid_${entities}${reg_id_substr}" id="types_of_plans_medicaid_${entities}${reg_id_substr}" required - />Medicaid + > + Medicaid + (for state use only) + +
diff --git a/apcd-cms/src/apps/submitter_renewals_listing/templates/list_submitter_registrations.html b/apcd-cms/src/apps/submitter_renewals_listing/templates/list_submitter_registrations.html index 1621c62d..04bd3595 100644 --- a/apcd-cms/src/apps/submitter_renewals_listing/templates/list_submitter_registrations.html +++ b/apcd-cms/src/apps/submitter_renewals_listing/templates/list_submitter_registrations.html @@ -33,7 +33,7 @@

Registration Information

{% endif %}
- +
{% for k in header %} diff --git a/apcd-cms/src/apps/utils/apcd_database.py b/apcd-cms/src/apps/utils/apcd_database.py index 11294251..2d06a7ff 100644 --- a/apcd-cms/src/apps/utils/apcd_database.py +++ b/apcd-cms/src/apps/utils/apcd_database.py @@ -352,8 +352,8 @@ def create_registration_entity(form, reg_id, iteration, from_update_reg=None, ol reg_id, float(form['total_claims_value_{}'.format(str_end)]), _set_int(form['claims_encounters_volume_{}'.format(str_end)]), - _set_int(form['license_number_{}'.format(str_end)]), - _set_int(form['naic_company_code_{}'.format(str_end)]), + form['license_number_{}'.format(str_end)], + form['naic_company_code_{}'.format(str_end)], _set_int(form['total_covered_lives_{}'.format(str_end)]), _clean_value(form['entity_name_{}'.format(str_end)]), _clean_value(form['fein_{}'.format(str_end)]), @@ -424,8 +424,8 @@ def update_registration_entity(form, reg_id, iteration, no_entities): values = ( float(form['total_claims_value_{}'.format(str_end)]), _set_int(form['claims_encounters_volume_{}'.format(str_end)]), - _set_int(form['license_number_{}'.format(str_end)]), - _set_int(form['naic_company_code_{}'.format(str_end)]), + form['license_number_{}'.format(str_end)], + form['naic_company_code_{}'.format(str_end)], _set_int(form['total_covered_lives_{}'.format(str_end)]), _clean_value(form['entity_name_{}'.format(str_end)]), _clean_value(form['fein_{}'.format(str_end)]),