Skip to content

Commit

Permalink
task/WP-391: Entities feedback UTH (#253)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
edmondsgarrett authored Nov 17, 2023
1 parent fdbb909 commit 1dbddc1
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -314,14 +314,13 @@ <h5 id="entity_header_{{ent_no}}_{{r.reg_id}}">Entity {{ ent_no }}</h5>
<label for="license_number_{{ent_no}}_{{r.reg_id}}"> License Number </label>

<input
type="number"
type="text"
name="license_number_{{ent_no}}_{{r.reg_id}}"
placeholder="1234567890"
class="integerfield"
id="license_number_{{ent_no}}_{{r.reg_id}}"
inputmode="numeric"
min="0"
max="2147483648"
pattern="^(?!0+$)[0-9]{1,10}$"
{% if entity.license %} value="{{ entity.license }}" {% endif %}
/>

Expand All @@ -335,14 +334,13 @@ <h5 id="entity_header_{{ent_no}}_{{r.reg_id}}">Entity {{ ent_no }}</h5>
<label for="naic_company_code_{{ent_no}}_{{r.reg_id}}"> NAIC<sup>3</sup> Company Code </label>

<input
type="number"
type="text"
name="naic_company_code_{{ent_no}}_{{r.reg_id}}"
placeholder="12345"
class="integerfield"
id="naic_company_code_{{ent_no}}_{{r.reg_id}}"
inputmode="numeric"
min="0"
max="2147483648"
pattern="^(?!0+$)[0-9]{1,10}$"
{% if entity.naic %} value="{{ entity.naic }}" {% endif %}
/>

Expand Down Expand Up @@ -370,7 +368,13 @@ <h6>Type of Plan</h6>
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 }}</label
/><span>
{{ plan_type }}
{% if plan_type == 'Medicaid' %}
<small>(for state use only)</small>
{% endif %}
</span>
</label
>
</li>
{% endfor %}
Expand Down Expand Up @@ -565,7 +569,7 @@ <h4>
class="integerfield"
id="license_number_1"
inputmode="numeric"
pattern="^[1-9]+[0-9]*$"
pattern="^(?!0+$)[0-9]{1,10}$"
required
/>

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

Expand Down Expand Up @@ -632,7 +636,11 @@ <h6>Type of Plan</h6>
name="types_of_plans_medicaid_1"
id="types_of_plans_medicaid_1"
required
/>Medicaid</label
/>
<span>Medicaid
<small>(for state use only)</small>
</span>
</label
>
</li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
/>
<div id="help-text-license_number_${entities}" class="help-text">
Expand All @@ -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
/>
<div id="help-text-naic_company_code_${entities}" class="help-text">
Expand Down Expand Up @@ -223,8 +223,11 @@ <h6>Type of Plan</h6>
name="types_of_plans_medicaid_${entities}${reg_id_substr}"
id="types_of_plans_medicaid_${entities}${reg_id_substr}"
required
/>Medicaid</label
>
>
<span>Medicaid
<small>(for state use only)</small>
</span>
</label>
</li>
</ul>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ <h1>Registration Information</h1>
{% endif %}
</div>
</div>
<table id="submittersTable" class="submitters-table">
<table id="submittersTable" class="registration-table submitters-table">
<thead>
<tr>
{% for k in header %}
Expand Down
8 changes: 4 additions & 4 deletions apcd-cms/src/apps/utils/apcd_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)]),
Expand Down Expand Up @@ -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)]),
Expand Down

0 comments on commit 1dbddc1

Please sign in to comment.