Skip to content

Commit f9cbc70

Browse files
committed
Add IPS actions and FHIR summary support checks
1 parent 489e36e commit f9cbc70

8 files changed

Lines changed: 776 additions & 22 deletions

src/app/benefits-demo/benefits-demo.component.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,12 @@ <h2>
7777
</span>
7878
<span class="backend-status-inline">
7979
@if (isFhirMode()) {
80-
<span class="backend-chip">FHIR mode</span>
80+
<span
81+
class="backend-chip"
82+
[matTooltip]="currentFhirServer"
83+
matTooltipPosition="above">
84+
FHIR mode
85+
</span>
8186
<button
8287
mat-icon-button
8388
type="button"

src/app/benefits-demo/benefits-demo.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ export class BenefitsDemoComponent implements OnInit, OnDestroy {
283283
}
284284

285285
isPatientTotalLoading(): boolean {
286-
return this.isFhirMode() && this.patientPagination.total === null;
286+
return this.isFhirMode() && this.patientPagination.loading && this.patientPagination.total === null;
287287
}
288288

289289
private async runRemotePatientSearch(term: string, requestId: number): Promise<void> {

src/app/benefits-demo/fhir-data/fhir-data.component.css

Lines changed: 71 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,38 @@
8787
background: #e9f2ff;
8888
}
8989

90+
.resource-item-ips {
91+
background: linear-gradient(180deg, #f7fbff 0%, #edf6ff 100%);
92+
box-shadow: inset 0 0 0 1px #d7e7fb;
93+
}
94+
95+
.resource-item-ips:hover {
96+
background: linear-gradient(180deg, #f2f8ff 0%, #e6f2ff 100%);
97+
}
98+
9099
.resource-item-label {
91100
font-size: 0.8rem;
92101
color: #253648;
93102
font-weight: 500;
94103
white-space: nowrap;
95104
overflow: hidden;
96105
text-overflow: ellipsis;
106+
display: inline-flex;
107+
align-items: center;
108+
gap: 6px;
109+
}
110+
111+
.resource-item-badge {
112+
display: inline-flex;
113+
align-items: center;
114+
padding: 1px 6px;
115+
border-radius: 999px;
116+
background: #d7ecff;
117+
color: #15558b;
118+
font-size: 0.66rem;
119+
font-weight: 700;
120+
letter-spacing: 0.03em;
121+
text-transform: uppercase;
97122
}
98123

99124
.resource-item-subtitle {
@@ -115,12 +140,57 @@
115140
margin-top: 10px;
116141
padding-top: 10px;
117142
border-top: 1px solid #e5edf7;
143+
display: flex;
144+
flex-direction: column;
145+
gap: 8px;
146+
}
147+
148+
.browser-action-label {
149+
display: flex;
150+
align-items: center;
151+
justify-content: center;
152+
gap: 8px;
153+
width: 100%;
154+
text-align: center;
118155
}
119156

157+
.ips-summary-button,
120158
.delete-all-events-button {
121159
width: 100%;
122160
justify-content: center;
123-
gap: 6px;
161+
}
162+
163+
.action-button-tooltip-wrapper {
164+
display: block;
165+
width: 100%;
166+
}
167+
168+
.ips-summary-button .mdc-button__label,
169+
.delete-all-events-button .mdc-button__label {
170+
display: inline-flex;
171+
align-items: center;
172+
justify-content: center;
173+
width: 100%;
174+
}
175+
176+
.browser-action-label mat-icon {
177+
flex: 0 0 auto;
178+
}
179+
180+
.fhir-action-spinner {
181+
width: 16px;
182+
height: 16px;
183+
border-radius: 50%;
184+
border: 2px solid rgba(90, 102, 115, 0.24);
185+
border-top-color: #7b8794;
186+
animation: fhir-action-spin 0.85s linear infinite;
187+
flex: 0 0 auto;
188+
}
189+
190+
@keyframes fhir-action-spin {
191+
to {
192+
transform: rotate(360deg);
193+
}
124194
}
125195

126196
.resource-viewer {

src/app/benefits-demo/fhir-data/fhir-data.component.html

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,12 @@
2222
class="resource-item"
2323
*ngFor="let item of group.items"
2424
[class.active]="isSelected(item)"
25+
[class.resource-item-ips]="isIpsSummaryItem(item)"
2526
(click)="selectItem(item)">
26-
<span class="resource-item-label">{{ item.label }}</span>
27+
<span class="resource-item-label">
28+
{{ item.label }}
29+
<span *ngIf="isIpsSummaryItem(item)" class="resource-item-badge">IPS</span>
30+
</span>
2731
<span class="resource-item-subtitle">{{ item.subtitle }}</span>
2832
</button>
2933
</div>
@@ -35,11 +39,52 @@
3539
</ng-container>
3640

3741
<div class="browser-actions">
42+
<button
43+
mat-stroked-button
44+
color="primary"
45+
(click)="requestLocalIps()"
46+
[disabled]="isLocalIpsActionDisabled()"
47+
[matTooltip]="getLocalIpsButtonTooltip()"
48+
class="ips-summary-button">
49+
<span class="browser-action-label">
50+
@if (isGeneratingLocalIps) {
51+
<span class="inline-button-spinner fhir-action-spinner" aria-hidden="true"></span>
52+
} @else {
53+
<mat-icon>description</mat-icon>
54+
}
55+
<span>{{ isGeneratingLocalIps ? 'Generating local IPS...' : 'Generate Local IPS' }}</span>
56+
</span>
57+
</button>
58+
<span
59+
class="action-button-tooltip-wrapper"
60+
[matTooltip]="getServerIpsButtonTooltip()">
61+
<button
62+
mat-stroked-button
63+
color="accent"
64+
(click)="requestServerIpsSummary()"
65+
[disabled]="isServerIpsActionDisabled()"
66+
class="ips-summary-button">
67+
<span class="browser-action-label">
68+
@if (isLoadingServerSummary || (isFhirMode() && isCheckingIpsSupport)) {
69+
<span class="inline-button-spinner fhir-action-spinner" aria-hidden="true"></span>
70+
} @else {
71+
<mat-icon>cloud_sync</mat-icon>
72+
}
73+
<span>{{
74+
isLoadingServerSummary
75+
? 'Requesting IPS from Server...'
76+
: (isFhirMode() && isCheckingIpsSupport)
77+
? 'Checking IPS support...'
78+
: 'Request IPS Generation to Server'
79+
}}</span>
80+
</span>
81+
</button>
82+
</span>
3883
<button
3984
mat-stroked-button
4085
color="warn"
4186
(click)="requestDeleteAllEvents()"
42-
[disabled]="isDeletingEvents"
87+
[disabled]="isDeletingEvents || isGeneratingLocalIps || isLoadingServerSummary"
4388
title="Delete all clinical events for this patient"
4489
class="delete-all-events-button">
4590
<mat-icon>delete_sweep</mat-icon>

0 commit comments

Comments
 (0)