Skip to content

Commit

Permalink
task/WP-89: Registration form UTH feedback (#152)
Browse files Browse the repository at this point in the history
* Add registration id to success message for registration form

* Reg form changes: org type dropdown now passes correct org code back to db, removed submission type from form (and every other use of this field from views, forms, db util functions), and removed min/max length and pattern restrictions on entity license and NAIC codes

* Move file type selection to entities on reg form

* Database updates for moving file types to entities

* Change list registrations table & modal to show file types moved to entities
  • Loading branch information
edmondsgarrett committed May 8, 2023
1 parent db34b1b commit cac9083
Show file tree
Hide file tree
Showing 9 changed files with 279 additions and 313 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,6 @@
.registration-table td:nth-of-type(1):before { content: "Business Name"; }
.registration-table td:nth-of-type(2):before { content: "Type"; }
.registration-table td:nth-of-type(3):before { content: "Location"; }
.registration-table td:nth-of-type(4):before { content: "Submission"; }
.registration-table td:nth-of-type(5):before { content: "Registration Status"; }
.registration-table td:nth-of-type(6):before { content: "Files to Submit"; }
.registration-table td:nth-of-type(7):before { content: "Actions"; }
.registration-table td:nth-of-type(4):before { content: "Registration Status"; }
.registration-table td:nth-of-type(5):before { content: "Actions"; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,29 +36,13 @@ <h1>List Registrations</h1>
{% for r in page %}
<tr>
<td>{{r.biz_name}}</td>
<td>
{% if r.type == 'Pbm'%}
Pharmacy Benefit Manager (PBM)
{% else %}
{{r.type}}
{% endif %}
</td>
<td>{{r.type}}</td>
<td>{{r.location}}</td>
<td>{{r.sub_method}}</td>
<td>{{r.reg_status}}</td>
<td>
<ul class='no-bullets'>
{% for file_type in r.files_type %}
{% if file_type != None %}
<li>{{file_type}}</li>
{% endif %}
{% endfor %}
</ul>
</td>
<td>
{% include "view_registration_modal.html" %}
{% include "edit_registration_modal.html" %}
{% include "create_submitter_modal.html" %}<br />
{% include "create_submitter_modal.html" %}
<select id='actionsDropdown_{{r.reg_id}}' class='status-filter' onchange="openAction('{{r.reg_id}}')">
<option value="">Select Action</option>
<option value="viewRegistration">View Record</option>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,6 @@ <h4>Organization</h4>
</dl>
</dd>
<hr>
<h4>File Submission</h4>
<dd>
<dl class="c-data-list--is-vert c-data-list--is-wide">
<dt class="c-data-list__key">Types of Files</dt>
{% for file_type, file_type_selected in r.view_modal_content.files_type.items %}
{% if file_type_selected %}
<dd class="c-data-list__value">{{file_type}}</dd>
{% endif %}
{% endfor %}
<dt class="c-data-list__key">Submission Method</dt>
<dd class="c-data-list__value">{{r.view_modal_content.sub_method}}</dd>
</dl>
</dd>
<hr>
<h4>Entity/Entities Being Registered</h4>
<dd>
{% for entity in r.view_modal_content.entities%}
Expand All @@ -62,6 +48,18 @@ <h5>Entity {{forloop.counter}}</h5>
<dd class="c-data-list__value">{{entity.license}}</dd>
<dt class="c-data-list__key">NAIC Company Code</dt>
<dd class="c-data-list__value">{{entity.naic}}</dd>
<h6>File Submission</h6>
<dd>
<dl class="c-data-list--is-vert c-data-list--is-wide">
<dt class="c-data-list__key">Types of Files</dt>
{% for file_type, file_type_selected in entity.files_type.items %}
{% if file_type_selected %}
<dd class="c-data-list__value">{{file_type}}</dd>
{% endif %}
{% endfor %}
</dl>
</dd>

<h6>Coverage Estimates <small>(Inclusive of all claims as of December 31 of previous year.)</small></h6>
<dt class="c-data-list__key">Total Covered Lives</dt>
<dd class="c-data-list__value">{{entity.no_covered}}</dd>
Expand Down
73 changes: 30 additions & 43 deletions apcd-cms/src/apps/admin_regis_table/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,25 +83,22 @@ def get_context_data(self, registrations_content, registrations_entities, regist
context = super(RegistrationsTable, self).get_context_data(*args, **kwargs)

def _set_registration(reg, reg_ents, reg_conts):
org_types = {
'carrier': 'Insurance Carrier',
'tpa_aso': 'Plan Administrator¹ (TPA/ASO)',
'pbm': 'Pharmacy Benefit Manager (PBM)'
}
return {
'biz_name': reg[13],
'type': reg[12].title() if reg[12] else None,
'biz_name': reg[7],
'type': org_types[reg[6]] if (reg[6] and reg[6] in org_types.keys()) else None,
'location': '{city}, {state}'.format
(
city=reg[15],
state=reg[16]
city=reg[9],
state=reg[10]
),
'files_type': [
"Medical" if reg[6] else None,
"Provider" if reg[5] else None,
"Eligibility/Enrollment" if reg[4] else None,
"Pharmacy" if reg[7] else None,
"Dental" if reg[8] else None
],
'sub_method': reg[10],
'reg_status': reg[11].title(),
'reg_status': reg[5].title(),
'reg_id': reg[0],
'view_modal_content': _set_modal_content(reg, reg_ents, reg_conts)
'view_modal_content': _set_modal_content(reg, reg_ents, reg_conts, org_types)
}
def _set_entities(reg_ent):
return {
Expand All @@ -112,7 +109,14 @@ def _set_entities(reg_ent):
'naic': reg_ent[5] if reg_ent[5] else None,
'no_covered': reg_ent[6],
'ent_name': reg_ent[7],
'fein': reg_ent[8] if reg_ent[8] else None
'fein': reg_ent[8] if reg_ent[8] else None,
'files_type': {
"Eligibility/Enrollment": reg_ent[9],
"Provider": reg_ent[10],
"Medical": reg_ent[11],
"Pharmacy": reg_ent[12],
"Dental": reg_ent[13]
}
}
def _set_contacts(reg_cont):

Expand All @@ -137,32 +141,20 @@ def format_phone_number(num):
'role': reg_cont[3],
'name': reg_cont[4],
'phone': format_phone_number(reg_cont[5]),
'email': reg_cont[6]
'email': reg_cont[6],
}
def _set_modal_content(reg, reg_ent, reg_cont):
def _set_modal_content(reg, reg_ent, reg_cont, org_types):
return {
'biz_name': reg[13],
'type': reg[12].title() if reg[12] else None,
'city': reg[15],
'state': reg[16],
'address': reg[14],
'zip': reg[17],
'files_type': {
"Eligibility/Enrollment": reg[4],
"Provider": reg[5],
"Medical": reg[6],
"Pharmacy": reg[7],
"Dental": reg[8]
},
'for_self': reg[9],
'sub_method': reg[10],
'biz_name': reg[7],
'type': org_types[reg[6]] if (reg[6] and reg[6] in org_types.keys()) else None,
'city': reg[9],
'state': reg[10],
'address': reg[8],
'zip': reg[11],
'for_self': reg[4],
'entities': [_set_entities(ent) for ent in reg_ent],
'contacts': [_set_contacts(cont) for cont in reg_cont],
'org_types': {
'Insurance Carrier': 'Insurance Carrier',
'Plan Administrator': 'Plan Administrator¹ (TPA/ASO)',
'Pbm': 'Pharmacy Benefit Manager (PBM)'
},
'org_types': org_types,
'us_state_list': [
'AL - Alabama',
'AK - Alaska',
Expand Down Expand Up @@ -220,14 +212,9 @@ def _set_modal_content(reg, reg_ent, reg_cont):
'WI - Wisconsin',
'WY - Wyoming'
],
'sub_methods': {
'sftp': 'SFTP',
'https': 'HTTPS',
'usb': 'Encrypted USB Drive'
}
}

context['header'] = ['Business Name', 'Type', 'Location', 'Submission Method', 'Registration Status', 'Files to Submit', 'Actions']
context['header'] = ['Business Name', 'Type', 'Location', 'Registration Status', 'Actions']
context['filter_options'] = ['All', 'Received', 'Processing', 'Complete']
registration_table_entries = []
for registration in registrations_content:
Expand Down
Loading

0 comments on commit cac9083

Please sign in to comment.