Skip to content
Merged
Show file tree
Hide file tree
Changes from 68 commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
55f63d4
WIP new table for AO + CD org links
lukey-luke Mar 21, 2025
e1a69a3
update text above table to match new content
lukey-luke Mar 21, 2025
919d209
add href for first column of table
lukey-luke Mar 21, 2025
912d916
remove old non-table code
lukey-luke Mar 22, 2025
c8453a6
WIP status for my organizations table
lukey-luke Mar 24, 2025
32a5de8
move logic to organization card, inline styles
lukey-luke Mar 26, 2025
046c098
Merge branch 'main' into ls/feature-4567-my-ogranizations
lukey-luke Mar 27, 2025
c20c1c6
Organization list status column updates
lukey-luke Mar 31, 2025
a58ff3a
check in concern file OrganizationUtils
lukey-luke Mar 31, 2025
c110251
color classes for icons
lukey-luke Apr 1, 2025
4e71a1d
WIP bg colors - need to update css classes
lukey-luke Apr 2, 2025
f011356
WIP new table for AO + CD org links
lukey-luke Mar 21, 2025
7a86dee
update text above table to match new content
lukey-luke Mar 21, 2025
83ce139
add href for first column of table
lukey-luke Mar 21, 2025
b570a68
remove old non-table code
lukey-luke Mar 22, 2025
b2bc4f1
WIP status for my organizations table
lukey-luke Mar 24, 2025
dbcd447
move logic to organization card, inline styles
lukey-luke Mar 26, 2025
e154686
Organization list status column updates
lukey-luke Mar 31, 2025
0517294
check in concern file OrganizationUtils
lukey-luke Mar 31, 2025
df9464f
color classes for icons
lukey-luke Apr 1, 2025
962cec9
WIP bg colors - need to update css classes
lukey-luke Apr 2, 2025
9f78ec3
Merge remote-tracking branch 'origin/ls/feature-4567-my-ogranizations…
lukey-luke Apr 2, 2025
6c6e37f
WIP new table for AO + CD org links
lukey-luke Mar 21, 2025
f2d14d6
update text above table to match new content
lukey-luke Mar 21, 2025
70b8237
add href for first column of table
lukey-luke Mar 21, 2025
39c2bdc
remove old non-table code
lukey-luke Mar 22, 2025
d9650df
WIP status for my organizations table
lukey-luke Mar 24, 2025
9107ec3
move logic to organization card, inline styles
lukey-luke Mar 26, 2025
451ffa8
Organization list status column updates
lukey-luke Mar 31, 2025
b61aed8
check in concern file OrganizationUtils
lukey-luke Mar 31, 2025
c041db2
color classes for icons
lukey-luke Apr 1, 2025
88b8d35
WIP bg colors - need to update css classes
lukey-luke Apr 2, 2025
e641f8b
WIP new table for AO + CD org links
lukey-luke Mar 21, 2025
1adb07b
update text above table to match new content
lukey-luke Mar 21, 2025
b6ff5a0
add href for first column of table
lukey-luke Mar 21, 2025
531cb56
remove old non-table code
lukey-luke Mar 22, 2025
cdc4386
WIP status for my organizations table
lukey-luke Mar 24, 2025
141cb6b
move logic to organization card, inline styles
lukey-luke Mar 26, 2025
4b27136
check in concern file OrganizationUtils
lukey-luke Mar 31, 2025
ed860c1
color classes for icons
lukey-luke Apr 1, 2025
1c62247
WIP bg colors - need to update css classes
lukey-luke Apr 2, 2025
4da169e
Merge remote-tracking branch 'origin/ls/feature-4567-my-ogranizations…
lukey-luke Apr 3, 2025
c994527
styles for organization list
lukey-luke Apr 4, 2025
89e0dbf
fix ellipsis. Keep column widths consistent and use ellipsis to cut o…
lukey-luke Apr 4, 2025
37c7f78
add icon for api disabled status
lukey-luke Apr 6, 2025
947bb5c
remove commented out code
lukey-luke Apr 6, 2025
4301ef1
Merge branch 'main' into ls/feature-4567-my-ogranizations
lukey-luke Apr 7, 2025
8662c18
guard for link.user for testing/preview
lukey-luke Apr 7, 2025
88e1e5d
fix rubocop issues
lukey-luke Apr 7, 2025
b8122c5
update link color to match uswds
lukey-luke Apr 8, 2025
149ecef
move column styles to inline per review feedback
lukey-luke Apr 8, 2025
7ee47a9
move to new directory, rename organization_card_component to organiza…
lukey-luke Apr 8, 2025
5536224
use transparent instead of explicit bg color
lukey-luke Apr 8, 2025
bb848b5
use more generalized css classes
lukey-luke Apr 8, 2025
dfbffb2
additional scss updates
lukey-luke Apr 8, 2025
d6221bb
remove obsolete files for card component, now using organization_list…
lukey-luke Apr 9, 2025
9c4e289
remove conditional to always display latest content
lukey-luke Apr 9, 2025
4c27c24
update tests to check for new text content with AO and/or CD message
lukey-luke Apr 9, 2025
739a0c9
add table html to spec file
lukey-luke Apr 9, 2025
4cd6cd9
remove puts statement, remove svg
lukey-luke Apr 9, 2025
e2c7f25
remove unused css class
lukey-luke Apr 9, 2025
06bc055
add guard to only render table when number of org links >= 1
lukey-luke Apr 9, 2025
bcccdf2
consolidate org list preview pages and cover different statuses
lukey-luke Apr 9, 2025
c2a0dc4
fix missing html for testing single row of table rendered
lukey-luke Apr 9, 2025
a8be60c
Merge branch 'main' into ls/feature-4567-my-ogranizations
lukey-luke Apr 9, 2025
125e136
fix rubocop issues
lukey-luke Apr 10, 2025
5c09928
fix localization missing for status on CD views
lukey-luke Apr 10, 2025
01440fe
add caption for sreenreader users
lukey-luke Apr 10, 2025
546ba6c
use .present? for guard to display table
lukey-luke Apr 10, 2025
e167bd6
move no orgs message to else block
lukey-luke Apr 10, 2025
770ade3
update org name to represent status for display purposes
lukey-luke Apr 10, 2025
7ff9216
favor @use over @import syntax
lukey-luke Apr 10, 2025
2ff01d8
axe test accessibility updates
lukey-luke Apr 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions dpc-portal/app/assets/stylesheets/_organizations-list.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
$visited-blue-link-color: #005ea2;

.visited\:text-blue{
color: $visited-blue-link-color;

&:visited {
color: $visited-blue-link-color;
}
}

.truncate-text-ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

.table-bg-transparent {
th, td {
background-color: transparent;
}
}
1 change: 1 addition & 0 deletions dpc-portal/app/assets/stylesheets/application.sass.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@
*/
@forward "uswds-theme";
@forward "uswds";
@import "organizations-list";

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<tr>
<th scope="row" style="width: 50%;">
<a class="display-block maxw-full visited:text-blue text-underline truncate-text-ellipsis" href="<%= organization_path(@organization)%>">
<%= @organization.name %>
</a>
</th>
<td style="width: 16.67%;"> <%= @organization.npi %> </td>
<td style="width: 8.33%;">
<% if @link.ao? %>
AO
<% else %>
CD
<% end %>
</td>
<td style="width: 25%;">
<div class="clearfix">
<div class="float-left"><%= render Core::Icon::UswdsComponent.new(@icon, additional_classes: @classes) %></div>
<div class="float-left margin-left-1 margin-top-neg-2px"><%= @status %></div>
</div>
</td>
</tr>
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# frozen_string_literal: true

module Core
module Card
module OrganizationListRow
# Render a USWDS-styled card for an organization.
class OrganizationCardComponent < ViewComponent::Base
class OrganizationListRowComponent < ViewComponent::Base
include OrganizationUtils
with_collection_parameter :link

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,31 @@
<div>
<% if ao? %>
<h1>Welcome to the DPC Portal</h1>
<p>As an Authorized Official (AO), use this portal to manage access to Medicare claims data through the Data at the Point of Care (DPC) application programming interface (API)</p>
<div class="display-flex flex-row flex-justify">
<div class="flex-align-self-center">
<h2 class="margin-bottom-0">My organizations</h2>
</div>
<h1>Welcome to the DPC Portal</h1>
<p>Use this portal to manage your organization's access to Data at the Point of Care (DPC). Depending on your role, you can register your organization, sign terms of service, and complete API configuration.</p>
<div class="display-flex flex-row flex-justify">
<div class="flex-align-self-center">
<h2 class="margin-bottom-0">My organizations</h2>
</div>
<p>These are organizations for which you serve as an AO. Organizations cannot access Medicare claims data without an AO agreement to follow terms of service.</p>
</div>
<p>You’re designated as an Authorized Official (AO) and/or Credential Delegate (CD) of the following organizations. An AO is accountable for organization-level access to the API. The AO can can assign a CD to complete configuration steps on their behalf.</p>

<% if @links.length %>
<table class="usa-table usa-table--borderless organizations-list table-bg-transparent" style="table-layout: fixed; width: 100%;">
<caption class="usa-sr-only">
A list of organizations you are affiliated with, including name, NPI-2, your role, and the status for API access.
</caption>
<thead>
<tr>
<th scope="col" style="width: 50%;">Organization Name</th>
<th scope="col" style="width: 16.67%;">NPI-2</th>
<th scope="col" style="width: 8.33%;">Role</th>
<th scope="col" style="width: 25%;">Status</th>
</tr>
</thead>
<tbody>
<%= render Core::OrganizationListRow::OrganizationListRowComponent.with_collection(@links)%>
</tbody>
</table>
<% end %>
<ul class="usa-card-group">
<%= render Core::Card::OrganizationCardComponent.with_collection(@links)%>
</ul>

<%=raw "<p>You don't have any organizations to show.</p>" if @links.blank? %>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,19 @@ module Organization
class OrganizationListComponentPreview < ViewComponent::Preview
OrgStruct = Struct.new(:name, :npi, :api_id)

def multiple_orgs_ao
links = []
3.times do |i|
org = ProviderOrganization.new(name: "Test Organization #{i}", npi: "#{i}111111111", id: i,
terms_of_service_accepted_at: 2.days.ago)
links << AoOrgLink.new(provider_organization: org)
end
render(Page::Organization::OrganizationListComponent.new(ao_or_cd: :ao, links:))
end

def multiple_orgs
links = []
3.times do |i|
org = ProviderOrganization.new(name: "Test Organization #{i}", npi: "#{i}111111111", id: i,
terms_of_service_accepted_at: 2.days.ago)
links << CdOrgLink.new(provider_organization: org)
end
render(Page::Organization::OrganizationListComponent.new(ao_or_cd: :cd, links:))
org = ProviderOrganization.new(name: 'Test Organization 0 - needs ToS', npi: '0111111111', id: 0,
terms_of_service_accepted_at: nil)
links << AoOrgLink.new(provider_organization: org)
org = ProviderOrganization.new(name: 'Test Organization 1 - configuration needed', npi: '1111111111', id: 1,
terms_of_service_accepted_at: 2.days.ago)
links << CdOrgLink.new(provider_organization: org)
org = ProviderOrganization.new(name: 'Test Organization 2 - configuration needed', npi: '2111111111', id: 2,
terms_of_service_accepted_at: 2.days.ago, config_complete: true)
links << AoOrgLink.new(provider_organization: org)

render(Page::Organization::OrganizationListComponent.new(ao_or_cd: :ao, links:))
end

def one_org
Expand Down
17 changes: 10 additions & 7 deletions dpc-portal/app/concerns/organization_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@ module OrganizationUtils
included do
def org_status(organization, link)
message_prefix = link.is_a?(AoOrgLink) ? 'verification' : 'cd_access'
if organization.rejected?
['lock', %i[text-gray-50], t("#{message_prefix}.#{organization.verification_reason}_status")]
elsif !link.verification_status?
['lock', %i[text-gray-50], t("verification.#{link.verification_reason}_status")]
elsif organization.terms_of_service_accepted_at.blank?
['warning', %i[text-gold], t("#{message_prefix}.tos_not_signed")]

if organization.terms_of_service_accepted_at.blank?
['warning', %i[text-gold], t("#{message_prefix}.sign_tos")]
elsif organization.rejected?
['lock', %i[text-gray-50], t("#{message_prefix}.access_denied")]
elsif link.user && !link.user.can_access?(organization)
['link_off', %i[text-gray-50], t("#{message_prefix}.api_disabled")]
elsif !organization.config_complete
['warning', %i[text-gold], t("#{message_prefix}.configuration_needed")]
else
['verified', %i[text-accent-cool], t("#{message_prefix}.manage_org")]
['check', %i[text-green], t("#{message_prefix}.configuration_complete")]
end
end
end
Expand Down
4 changes: 4 additions & 0 deletions dpc-portal/app/models/ao_org_link.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,8 @@ class AoOrgLink < ApplicationRecord
belongs_to :user, required: true
belongs_to :provider_organization, required: true
belongs_to :invitation, required: false

def ao?
true
end
end
4 changes: 4 additions & 0 deletions dpc-portal/app/models/cd_org_link.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,8 @@ def show_attributes
def verification_status?
disabled_at.blank?
end

def ao?
false
end
end
10 changes: 10 additions & 0 deletions dpc-portal/config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,23 @@ en:
server_error_text: We're experiencing a temporary outage due to an external system error. Please try again later.
manage_org: Manage your organization.
tos_not_signed: You must sign DPC Terms of Service.
sign_tos: Sign terms of service
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like changing the key broke the accessibility tests, which should only fail on the fact that many pages do not meet accessibility. Please change back to tos_not_signed or update spec/system/accessibility_spec.rb
You can run the accessibility tests with make ci-portal-accessibility
I think you will need to find another way to make the "mixed ao cd" test in the accessibility tests to pass as well...

configuration_needed: Configuration needed
configuration_complete: Configuration complete
api_disabled: API disabled
access_denied: Access denied
cd_access:
no_approved_enrollment_status: This organization is not currently approved by Medicare.
no_approved_enrollment_text: This organization must have an approved enrollment status with Medicare to access beneficiary claims data.
org_med_sanctions_status: This organization is in the Medicare Exclusions Database.
org_med_sanctions_text: This organization is listed as an excluded entity by the Office of Inspector General (OIG), which prohibits it from accessing beneficiary claims data.
manage_org: Manage credentials.
tos_not_signed: DPC Terms of Service not yet signed.
sign_tos: Sign terms of service
configuration_needed: Configuration needed
configuration_complete: Configuration complete
api_disabled: API disabled
access_denied: Access denied
errors:
attributes:
base:
Expand Down
Loading
Loading