sos-portal-components-react 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +4 -0
- package/dist/EncounterJourneyPanel.d.ts +34 -0
- package/dist/EncounterJourneyPanel.d.ts.map +1 -0
- package/dist/EncounterJourneyPanel.js +81 -0
- package/dist/EncounterJourneyPanel.js.map +1 -0
- package/dist/EncounterTransferConsole.d.ts +101 -0
- package/dist/EncounterTransferConsole.d.ts.map +1 -0
- package/dist/EncounterTransferConsole.js +78 -0
- package/dist/EncounterTransferConsole.js.map +1 -0
- package/dist/encounter-journey.css +91 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/package.json +14 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## Unreleased
|
|
4
|
+
|
|
5
|
+
## 0.3.3 - 2026-11-11
|
|
6
|
+
|
|
7
|
+
- Add controlled, host-authorized Encounter journey and transfer components, including persisted response validation and read-only Personal presentation. Retain the UHC transfer console through a compatibility wrapper.
|
|
8
|
+
- Recover the shared person/animal clinical-section, permission and US Core STU6 contract; distinguish existing views from the pending complete example lifecycle.
|
|
9
|
+
|
|
3
10
|
## 0.3.2 - 2026-11-10
|
|
4
11
|
|
|
5
12
|
- Add controlled `SubjectCardLocatorFields` for card-number or DID/QR entry.
|
package/README.md
CHANGED
|
@@ -87,6 +87,8 @@ This is the current runtime inventory, not completion of the whole catalogue:
|
|
|
87
87
|
|
|
88
88
|
| Export | Owner / responsibility |
|
|
89
89
|
| --- | --- |
|
|
90
|
+
| `EncounterJourneyPanel` | Controlled create/status/transfer and read-only saved journey; BFF callbacks own authority and persistence. |
|
|
91
|
+
| `EncounterTransferConsole` | Shared transfer presentation; UHC retains a deprecated compatibility wrapper. |
|
|
90
92
|
| `SubjectConversationChat` | SOS projection of authorized subject Communications into the neutral Antifraud conversation renderer. |
|
|
91
93
|
| `createLiveKitRealtimeCallClient` | Host-configured RTC client adapter; the BFF retains authorization, credentials and Communication persistence. |
|
|
92
94
|
| `useRealtimeCallSessionLifecycle` | Shared persisted-end observation and profile-owned session cleanup for Personal and Professional, including React Strict Mode replay. |
|
|
@@ -227,3 +229,5 @@ group adapter.
|
|
|
227
229
|
genuinely reusable.
|
|
228
230
|
6. Remove compatibility implementations only in a later breaking release.
|
|
229
231
|
|
|
232
|
+
|
|
233
|
+
See [clinical sections, permissions and US Core contract](docs/03-CLINICAL_SECTIONS_AND_US_CORE_CONTRACT.md) for the recovered person/animal mappings and pending full example lifecycle.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type PortalEncounterJourneyView, type PortalEncounterMutationResult, type PortalEncounterRequest } from 'sos-data-utils-ts/portal-encounter-journey';
|
|
2
|
+
import { type EncounterTransferConsoleCopy } from './EncounterTransferConsole.js';
|
|
3
|
+
export declare const ENCOUNTER_TRANSFER_COPY_EN: EncounterTransferConsoleCopy;
|
|
4
|
+
export type EncounterJourneyCopy = Readonly<{
|
|
5
|
+
title: string;
|
|
6
|
+
empty: string;
|
|
7
|
+
service: string;
|
|
8
|
+
create: string;
|
|
9
|
+
encounter: string;
|
|
10
|
+
destination: string;
|
|
11
|
+
transfer: string;
|
|
12
|
+
history: string;
|
|
13
|
+
refresh: string;
|
|
14
|
+
retry: string;
|
|
15
|
+
confirmed: string;
|
|
16
|
+
start: string;
|
|
17
|
+
resume: string;
|
|
18
|
+
hold: string;
|
|
19
|
+
complete: string;
|
|
20
|
+
discharge: string;
|
|
21
|
+
cancel: string;
|
|
22
|
+
discontinue: string;
|
|
23
|
+
transferCopy: EncounterTransferConsoleCopy;
|
|
24
|
+
}>;
|
|
25
|
+
export declare const ENCOUNTER_JOURNEY_COPY_EN: EncounterJourneyCopy;
|
|
26
|
+
/** One renderer and one intent contract. The host chooses the authorized provider and returns its actual readback. */
|
|
27
|
+
export declare function EncounterJourneyPanel({ subjectLabel, view, onCommand, onRefresh, copy }: Readonly<{
|
|
28
|
+
subjectLabel: string;
|
|
29
|
+
view: PortalEncounterJourneyView;
|
|
30
|
+
onCommand?: (command: PortalEncounterRequest) => Promise<PortalEncounterMutationResult>;
|
|
31
|
+
onRefresh?: () => Promise<void>;
|
|
32
|
+
copy?: EncounterJourneyCopy;
|
|
33
|
+
}>): import("react").JSX.Element;
|
|
34
|
+
//# sourceMappingURL=EncounterJourneyPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EncounterJourneyPanel.d.ts","sourceRoot":"","sources":["../src/EncounterJourneyPanel.tsx"],"names":[],"mappings":"AACA,OAAO,EAAoD,KAAK,0BAA0B,EAAC,KAAK,6BAA6B,EAAC,KAAK,sBAAsB,EAAC,MAAM,4CAA4C,CAAA;AAE5M,OAAO,EAA0B,KAAK,4BAA4B,EAAyD,MAAM,+BAA+B,CAAA;AAEhK,eAAO,MAAM,0BAA0B,EAAC,4BASvC,CAAA;AACD,MAAM,MAAM,oBAAoB,GAAC,QAAQ,CAAC;IACxC,KAAK,EAAC,MAAM,CAAC;IAAA,KAAK,EAAC,MAAM,CAAC;IAAA,OAAO,EAAC,MAAM,CAAC;IAAA,MAAM,EAAC,MAAM,CAAC;IAAA,SAAS,EAAC,MAAM,CAAC;IAAA,WAAW,EAAC,MAAM,CAAC;IAAA,QAAQ,EAAC,MAAM,CAAC;IAAA,OAAO,EAAC,MAAM,CAAC;IAAA,OAAO,EAAC,MAAM,CAAC;IAAA,KAAK,EAAC,MAAM,CAAC;IAAA,SAAS,EAAC,MAAM,CAAA;IACtK,KAAK,EAAC,MAAM,CAAC;IAAA,MAAM,EAAC,MAAM,CAAC;IAAA,IAAI,EAAC,MAAM,CAAC;IAAA,QAAQ,EAAC,MAAM,CAAC;IAAA,SAAS,EAAC,MAAM,CAAC;IAAA,MAAM,EAAC,MAAM,CAAC;IAAA,WAAW,EAAC,MAAM,CAAC;IAAA,YAAY,EAAC,4BAA4B,CAAA;CACnJ,CAAC,CAAA;AACF,eAAO,MAAM,yBAAyB,EAAC,oBAA4kB,CAAA;AAEnnB,sHAAsH;AACtH,wBAAgB,qBAAqB,CAAC,EAAC,YAAY,EAAC,IAAI,EAAC,SAAS,EAAC,SAAS,EAAC,IAA8B,EAAC,EAAC,QAAQ,CAAC;IACpH,YAAY,EAAC,MAAM,CAAC;IAAA,IAAI,EAAC,0BAA0B,CAAC;IAAA,SAAS,CAAC,EAAC,CAAC,OAAO,EAAC,sBAAsB,KAAG,OAAO,CAAC,6BAA6B,CAAC,CAAA;IACvI,SAAS,CAAC,EAAC,MAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAAA,IAAI,CAAC,EAAC,oBAAoB,CAAA;CACxD,CAAC,+BA4DD"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useRef, useState } from 'react';
|
|
3
|
+
import { EncounterStatusR5 as S, portalEncounterNextStatuses } from 'sos-data-utils-ts/portal-encounter-journey';
|
|
4
|
+
import { EncounterClaim as E, EncounterHistoryClaim as H } from 'fhir-data-utils-ts/claims';
|
|
5
|
+
import { EncounterTransferConsole } from './EncounterTransferConsole.js';
|
|
6
|
+
export const ENCOUNTER_TRANSFER_COPY_EN = {
|
|
7
|
+
patientSearchTitle: 'Find a patient', scanQr: 'Scan QR', patientId: 'Card identifier', search: 'Find card', journeyTitle: 'Service stages',
|
|
8
|
+
sourceTitle: 'Current service', destinationTitle: 'Destination service', returning: 'Patient will return', returningHint: 'Keep the current service on hold.',
|
|
9
|
+
notReturning: 'Patient will not return', notReturningHint: 'Complete the current service.', transferTo: 'Transfer to', reviewChanges: 'Review changes', applyTransfer: 'Confirm transfer',
|
|
10
|
+
emergencyActions: 'Emergency contacts', call: 'Call', videoCall: 'Video call', sendMessage: 'Send message', text: 'Text', audio: 'Audio', messageLabel: 'Message', attach: 'Attach', pdf: 'PDF', fhirBundle: 'FHIR Bundle', calendar: 'Calendar', send: 'Send',
|
|
11
|
+
resourceSummary: 'Transfer changes', sourceUpdate: 'Update source', sourceHistory: 'Record source history', destinationUpdate: 'Update destination', destinationHistory: 'Record destination history', indexProjection: 'Project continuity',
|
|
12
|
+
demoWarning: 'Synthetic Demo data', helpTitle: 'What happens to the previous service?', helpBody: 'A temporary move keeps it on hold. A definitive move completes it. The destination starts only after the transfer is confirmed.',
|
|
13
|
+
transferReady: 'Transfer confirmed', messageReady: 'Message prepared', callReady: 'Call prepared', videoReady: 'Video call prepared', patientReady: 'Card found', reviewReady: 'Review prepared', attachmentReady: 'Attachment selected', technicalDetails: 'Technical details',
|
|
14
|
+
encounterIdentifier: 'Encounter identifier', transferPending: 'Transfer is not confirmed. Retry the same change.', retryTransfer: 'Retry transfer', transferRejected: 'The transfer was rejected.',
|
|
15
|
+
};
|
|
16
|
+
export const ENCOUNTER_JOURNEY_COPY_EN = { title: 'Encounter journey', empty: 'No encounters have been recorded for this card.', service: 'Service', create: 'Create encounter', encounter: 'Encounter', destination: 'Destination service', transfer: 'Transfer to another service', history: 'Encounter history', refresh: 'Refresh journey', retry: 'Retry last change', confirmed: 'Change confirmed', start: 'Start encounter', resume: 'Resume encounter', hold: 'Pause encounter', complete: 'Complete encounter', discharge: 'Clinical discharge', cancel: 'Cancel encounter', discontinue: 'Discontinue encounter', transferCopy: ENCOUNTER_TRANSFER_COPY_EN };
|
|
17
|
+
/** One renderer and one intent contract. The host chooses the authorized provider and returns its actual readback. */
|
|
18
|
+
export function EncounterJourneyPanel({ subjectLabel, view, onCommand, onRefresh, copy = ENCOUNTER_JOURNEY_COPY_EN }) {
|
|
19
|
+
const [selectedReference, setSelectedReference] = useState(''), [serviceReference, setServiceReference] = useState('');
|
|
20
|
+
const [destinationReference, setDestinationReference] = useState(''), [transferOpen, setTransferOpen] = useState(false);
|
|
21
|
+
const [busy, setBusy] = useState(false), [error, setError] = useState(''), [notice, setNotice] = useState('');
|
|
22
|
+
const retry = useRef(null);
|
|
23
|
+
const selected = view.encounters.find(row => row.entry.reference === selectedReference)
|
|
24
|
+
?? view.encounters.find(row => row.entry.claims[E.Status] === S.InProgress) ?? view.encounters[0];
|
|
25
|
+
const canManage = Boolean(view.canManage && onCommand), blocked = busy || Boolean(error && retry.current);
|
|
26
|
+
const service = view.services.find(item => item.reference === serviceReference) ?? view.services[0];
|
|
27
|
+
const destinations = view.services.filter(item => item.organizationReference === selected?.entry.claims[E.ServiceProvider] && item.reference !== selected.entry.claims[E.ServiceType]);
|
|
28
|
+
const destination = destinations.find(item => item.reference === destinationReference) ?? destinations[0];
|
|
29
|
+
const stages = view.encounters.map(row => ({ identifier: row.entry.reference,
|
|
30
|
+
serviceLabel: view.services.find(item => item.reference === row.entry.claims[E.ServiceType])?.label || row.entry.claims[E.ServiceType] || 'Encounter',
|
|
31
|
+
arrivedAt: row.entry.claims[E.ActualPeriodStart] || row.entry.claims[E.PeriodStart] || '', status: row.entry.claims[E.Status],
|
|
32
|
+
}));
|
|
33
|
+
const statuses = selected?.allowedStatuses ?? portalEncounterNextStatuses(selected?.entry.claims[E.Status] || '');
|
|
34
|
+
const statusLabel = (status) => status === S.InProgress ? (selected?.entry.claims[E.Status] === S.OnHold ? copy.resume : copy.start) : status === S.OnHold ? copy.hold : status === S.Completed ? copy.complete : status === S.Discharged ? copy.discharge : status === S.Cancelled ? copy.cancel : copy.discontinue;
|
|
35
|
+
async function execute(command) {
|
|
36
|
+
if (!canManage || !onCommand)
|
|
37
|
+
throw new Error('encounter_write_unavailable');
|
|
38
|
+
retry.current = command;
|
|
39
|
+
setBusy(true);
|
|
40
|
+
setError('');
|
|
41
|
+
setNotice('');
|
|
42
|
+
try {
|
|
43
|
+
const result = await onCommand(command);
|
|
44
|
+
if (result.journey.subjectIdentifier !== view.subjectIdentifier || !result.affectedEncounterReferences.length
|
|
45
|
+
|| result.affectedEncounterReferences.some(reference => !result.journey.encounters.some(row => row.entry.reference === reference)))
|
|
46
|
+
throw new Error('encounter_readback_missing');
|
|
47
|
+
if (command.action === 'status' && !result.journey.encounters.some(row => row.entry.reference === command.encounterReference && row.entry.claims[E.Status] === command.status))
|
|
48
|
+
throw new Error('encounter_readback_mismatch');
|
|
49
|
+
if (command.action === 'transfer' && (!result.journey.encounters.some(row => row.entry.reference === command.encounterReference && row.entry.claims[E.Status] === command.sourceOutcome)
|
|
50
|
+
|| !result.journey.encounters.some(row => row.entry.reference !== command.encounterReference && row.entry.claims[E.ServiceType] === command.destinationServiceReference && row.entry.claims[E.Status] === S.InProgress)))
|
|
51
|
+
throw new Error('encounter_readback_mismatch');
|
|
52
|
+
if (command.action === 'create' && !result.journey.encounters.some(row => result.affectedEncounterReferences.includes(row.entry.reference) && row.entry.claims[E.Status] === S.Planned))
|
|
53
|
+
throw new Error('encounter_readback_mismatch');
|
|
54
|
+
retry.current = null;
|
|
55
|
+
setTransferOpen(false);
|
|
56
|
+
setNotice(copy.confirmed);
|
|
57
|
+
}
|
|
58
|
+
catch (reason) {
|
|
59
|
+
setError(reason instanceof Error ? reason.message : 'Encounter change failed');
|
|
60
|
+
throw reason;
|
|
61
|
+
}
|
|
62
|
+
finally {
|
|
63
|
+
setBusy(false);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
async function transfer(outcome) {
|
|
67
|
+
if (!selected || !destination)
|
|
68
|
+
return { state: 'rejected' };
|
|
69
|
+
const pending = retry.current;
|
|
70
|
+
const command = pending?.action === 'transfer' ? pending : { action: 'transfer', operationId: crypto.randomUUID(), encounterReference: selected.entry.reference, expectedRevision: selected.revision, destinationServiceReference: destination.reference, sourceOutcome: outcome };
|
|
71
|
+
try {
|
|
72
|
+
await execute(command);
|
|
73
|
+
return { state: 'confirmed' };
|
|
74
|
+
}
|
|
75
|
+
catch {
|
|
76
|
+
return { state: 'retryable' };
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return _jsxs("section", { className: "sos-encounter-journey", role: "region", "aria-label": copy.title, children: [_jsxs("header", { children: [_jsxs("div", { children: [_jsx("h2", { children: copy.title }), _jsx("p", { children: subjectLabel })] }), onRefresh && _jsx("button", { type: "button", disabled: busy, onClick: () => void onRefresh().then(() => { retry.current = null; setError(''); setNotice(''); }).catch(reason => setError(String(reason))), children: copy.refresh })] }), canManage && service && _jsxs("form", { onSubmit: event => { event.preventDefault(); void execute({ action: 'create', operationId: crypto.randomUUID(), serviceReference: service.reference }).catch(() => { }); }, children: [_jsxs("label", { children: [copy.service, _jsx("select", { "aria-label": copy.service, value: service.reference, disabled: blocked, onChange: event => setServiceReference(event.target.value), children: view.services.map(item => _jsx("option", { value: item.reference, children: item.label }, item.reference)) })] }), _jsx("button", { type: "submit", disabled: blocked, children: copy.create })] }), !view.encounters.length ? _jsx("p", { children: copy.empty }) : _jsxs(_Fragment, { children: [canManage && selected && _jsxs("div", { className: "sos-encounter-actions", children: [_jsxs("label", { children: [copy.encounter, _jsx("select", { "aria-label": copy.encounter, value: selected.entry.reference, disabled: blocked, onChange: event => { setSelectedReference(event.target.value); setTransferOpen(false); }, children: stages.map(item => _jsxs("option", { value: item.identifier, children: [item.serviceLabel, " \u00B7 ", item.status] }, item.identifier)) })] }), statuses.map(status => _jsx("button", { type: "button", disabled: blocked, onClick: () => void execute({ action: 'status', operationId: crypto.randomUUID(), encounterReference: selected.entry.reference, expectedRevision: selected.revision, status }).catch(() => { }), children: statusLabel(status) }, status)), destinations.length > 0 && selected.entry.claims[E.Status] === S.InProgress && _jsx("button", { type: "button", disabled: blocked, onClick: () => setTransferOpen(value => !value), children: copy.transfer })] }), canManage && transferOpen && destination && _jsxs("label", { children: [copy.destination, _jsx("select", { "aria-label": copy.destination, disabled: blocked, value: destination.reference, onChange: event => setDestinationReference(event.target.value), children: destinations.map(item => _jsx("option", { value: item.reference, children: item.label }, item.reference)) })] }), _jsx(EncounterTransferConsole, { copy: copy.transferCopy, patientDisplay: subjectLabel, encounters: stages, sourceEncounterId: transferOpen ? selected?.entry.reference || '' : '', destinationEncounterId: "", contacts: [], readOnly: !canManage || !transferOpen, ...(transferOpen && destination ? { destinationPreview: { serviceLabel: destination.label } } : {}), ...(canManage && transferOpen ? { onApplyTransfer: transfer } : {}) }, transferOpen ? 'edit' : 'read')] }), view.history.length > 0 && _jsxs("details", { children: [_jsx("summary", { children: copy.history }), _jsx("ol", { children: view.history.map(row => _jsxs("li", { "data-encounter-history": row.entry.claims[H.Encounter], children: [_jsx("time", { children: row.entry.claims[H.ActualPeriodStart] }), " \u00B7 ", row.entry.claims[H.Status], " \u00B7 ", view.services.find(service => service.reference === row.entry.claims[H.ServiceType])?.label || row.entry.claims[H.ServiceType]] }, row.entry.reference)) })] }), error && _jsx("p", { role: "alert", children: error }), canManage && error && retry.current && _jsx("button", { type: "button", disabled: busy, onClick: () => void execute(retry.current).catch(() => { }), children: copy.retry }), notice && _jsx("p", { role: "status", children: notice })] });
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=EncounterJourneyPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EncounterJourneyPanel.js","sourceRoot":"","sources":["../src/EncounterJourneyPanel.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,MAAM,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAA;AACrC,OAAO,EAAC,iBAAiB,IAAI,CAAC,EAAC,2BAA2B,EAAgG,MAAM,4CAA4C,CAAA;AAC5M,OAAO,EAAC,cAAc,IAAI,CAAC,EAAC,qBAAqB,IAAI,CAAC,EAAC,MAAM,2BAA2B,CAAA;AACxF,OAAO,EAAC,wBAAwB,EAA2F,MAAM,+BAA+B,CAAA;AAEhK,MAAM,CAAC,MAAM,0BAA0B,GAA8B;IACnE,kBAAkB,EAAC,gBAAgB,EAAC,MAAM,EAAC,SAAS,EAAC,SAAS,EAAC,iBAAiB,EAAC,MAAM,EAAC,WAAW,EAAC,YAAY,EAAC,gBAAg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MAAM,CAAC,CAAC,CAAC,iBAAiB,CAAC,GAAQ,cAAI,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,cAAK,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAA,EAAE,CAAA,OAAO,CAAC,SAAS,KAAG,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,EAAE,KAAK,IAAE,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,KAA3R,GAAG,CAAC,KAAK,CAAC,SAAS,CAA8Q,CAAC,GAAM,IAAU,EACvZ,KAAK,IAAE,YAAG,IAAI,EAAC,OAAO,YAAE,KAAK,GAAK,EAClC,SAAS,IAAE,KAAK,IAAE,KAAK,CAAC,OAAO,IAAE,iBAAQ,IAAI,EAAC,QAAQ,EAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,GAAE,EAAE,CAAA,KAAK,OAAO,CAAC,KAAK,CAAC,OAAQ,CAAC,CAAC,KAAK,CAAC,GAAE,EAAE,GAAC,CAAC,CAAC,YAAG,IAAI,CAAC,KAAK,GAAU,EACrJ,MAAM,IAAE,YAAG,IAAI,EAAC,QAAQ,YAAE,MAAM,GAAK,IAC9B,CAAA;AACZ,CAAC"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import type { PortalEncounterRequest, PortalEncounterSourceOutcome } from 'sos-data-utils-ts/portal-encounter-journey';
|
|
2
|
+
export type EncounterTransferStatus = `${Extract<PortalEncounterRequest, {
|
|
3
|
+
action: 'status';
|
|
4
|
+
}>['status']}`;
|
|
5
|
+
export type EncounterSourceOutcome = PortalEncounterSourceOutcome | `${PortalEncounterSourceOutcome}`;
|
|
6
|
+
export type EncounterTransferStage = Readonly<{
|
|
7
|
+
identifier: string;
|
|
8
|
+
/** Human-readable provider business identifier; never replaces the FHIR resource id. */
|
|
9
|
+
displayIdentifier?: string;
|
|
10
|
+
serviceLabel: string;
|
|
11
|
+
locationLabel?: string;
|
|
12
|
+
arrivedAt: string;
|
|
13
|
+
status: EncounterTransferStatus;
|
|
14
|
+
}>;
|
|
15
|
+
export type EmergencyContactAction = Readonly<{
|
|
16
|
+
identifier: string;
|
|
17
|
+
name: string;
|
|
18
|
+
relationship: string;
|
|
19
|
+
phone?: string;
|
|
20
|
+
}>;
|
|
21
|
+
export type EncounterTransferConsoleCopy = Readonly<{
|
|
22
|
+
patientSearchTitle: string;
|
|
23
|
+
scanQr: string;
|
|
24
|
+
patientId: string;
|
|
25
|
+
search: string;
|
|
26
|
+
journeyTitle: string;
|
|
27
|
+
sourceTitle: string;
|
|
28
|
+
destinationTitle: string;
|
|
29
|
+
returning: string;
|
|
30
|
+
returningHint: string;
|
|
31
|
+
notReturning: string;
|
|
32
|
+
notReturningHint: string;
|
|
33
|
+
transferTo: string;
|
|
34
|
+
reviewChanges: string;
|
|
35
|
+
applyTransfer: string;
|
|
36
|
+
emergencyActions: string;
|
|
37
|
+
call: string;
|
|
38
|
+
videoCall: string;
|
|
39
|
+
sendMessage: string;
|
|
40
|
+
text: string;
|
|
41
|
+
audio: string;
|
|
42
|
+
messageLabel: string;
|
|
43
|
+
attach: string;
|
|
44
|
+
pdf: string;
|
|
45
|
+
fhirBundle: string;
|
|
46
|
+
calendar: string;
|
|
47
|
+
send: string;
|
|
48
|
+
resourceSummary: string;
|
|
49
|
+
sourceUpdate: string;
|
|
50
|
+
sourceHistory: string;
|
|
51
|
+
destinationUpdate: string;
|
|
52
|
+
destinationHistory: string;
|
|
53
|
+
indexProjection: string;
|
|
54
|
+
demoWarning: string;
|
|
55
|
+
helpTitle: string;
|
|
56
|
+
helpBody: string;
|
|
57
|
+
transferReady: string;
|
|
58
|
+
messageReady: string;
|
|
59
|
+
callReady: string;
|
|
60
|
+
videoReady: string;
|
|
61
|
+
patientReady: string;
|
|
62
|
+
reviewReady: string;
|
|
63
|
+
attachmentReady: string;
|
|
64
|
+
technicalDetails: string;
|
|
65
|
+
encounterIdentifier: string;
|
|
66
|
+
transferPending: string;
|
|
67
|
+
retryTransfer: string;
|
|
68
|
+
transferRejected: string;
|
|
69
|
+
}>;
|
|
70
|
+
export type EncounterTransferApplyOutcome = Readonly<{
|
|
71
|
+
state: 'confirmed' | 'pending' | 'retryable' | 'rejected';
|
|
72
|
+
message?: string;
|
|
73
|
+
}>;
|
|
74
|
+
export type EncounterTransferConsoleProps = Readonly<{
|
|
75
|
+
copy: EncounterTransferConsoleCopy;
|
|
76
|
+
patientDisplay: string;
|
|
77
|
+
encounters: readonly EncounterTransferStage[];
|
|
78
|
+
sourceEncounterId: string;
|
|
79
|
+
destinationEncounterId: string;
|
|
80
|
+
contacts: readonly EmergencyContactAction[];
|
|
81
|
+
demo?: boolean;
|
|
82
|
+
/** Old illustrative tools are opt-in; normal hosts supply their real card/contact actions separately. */
|
|
83
|
+
legacyTools?: boolean;
|
|
84
|
+
readOnly?: boolean;
|
|
85
|
+
destinationPreview?: Readonly<{
|
|
86
|
+
serviceLabel: string;
|
|
87
|
+
locationLabel?: string;
|
|
88
|
+
}>;
|
|
89
|
+
onApplyTransfer?: (sourceOutcome: EncounterSourceOutcome) => void | EncounterTransferApplyOutcome | Promise<void | EncounterTransferApplyOutcome>;
|
|
90
|
+
}>;
|
|
91
|
+
/**
|
|
92
|
+
* Shared visual editor for one already-authorized subject transfer.
|
|
93
|
+
*
|
|
94
|
+
* Selection and demo state never grant access. The host must resolve the
|
|
95
|
+
* subject, contacts, department sender, HealthcareService and write
|
|
96
|
+
* capability in its BFF. `onApplyTransfer` reports only the requested source
|
|
97
|
+
* outcome; the provider commits authoritative Encounter changes before any
|
|
98
|
+
* completed Communication projects the result to the subject index.
|
|
99
|
+
*/
|
|
100
|
+
export declare function EncounterTransferConsole({ copy, patientDisplay, encounters, sourceEncounterId, destinationEncounterId, contacts, demo, legacyTools, readOnly, destinationPreview, onApplyTransfer }: EncounterTransferConsoleProps): import("react").JSX.Element;
|
|
101
|
+
//# sourceMappingURL=EncounterTransferConsole.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EncounterTransferConsole.d.ts","sourceRoot":"","sources":["../src/EncounterTransferConsole.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,sBAAsB,EAAC,4BAA4B,EAAC,MAAM,4CAA4C,CAAA;AAEnH,MAAM,MAAM,uBAAuB,GAAG,GAAG,OAAO,CAAC,sBAAsB,EAAC;IAAC,MAAM,EAAC,QAAQ,CAAA;CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAA;AACtG,MAAM,MAAM,sBAAsB,GAAG,4BAA4B,GAAC,GAAG,4BAA4B,EAAE,CAAA;AAEnG,MAAM,MAAM,sBAAsB,GAAG,QAAQ,CAAC;IAC5C,UAAU,EAAE,MAAM,CAAA;IAClB,wFAAwF;IACxF,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,uBAAuB,CAAA;CAChC,CAAC,CAAA;AAEF,MAAM,MAAM,sBAAsB,GAAG,QAAQ,CAAC;IAC5C,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,YAAY,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC,CAAA;AAEF,MAAM,MAAM,4BAA4B,GAAG,QAAQ,CAAC;IAClD,kBAAkB,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;IAC7E,YAAY,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,gBAAgB,EAAE,MAAM,CAAA;IACnE,SAAS,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CA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;IACnD,KAAK,EAAE,WAAW,GAAG,SAAS,GAAG,WAAW,GAAG,UAAU,CAAA;IACzD,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAC,CAAA;AAEF,MAAM,MAAM,6BAA6B,GAAG,QAAQ,CAAC;IACnD,IAAI,EAAE,4BAA4B,CAAA;IAClC,cAAc,EAAE,MAAM,CAAA;IACtB,UAAU,EAAE,SAAS,sBAAsB,EAAE,CAAA;IAC7C,iBAAiB,EAAE,MAAM,CAAA;IACzB,sBAAsB,EAAE,MAAM,CAAA;IAC9B,QAAQ,EAAE,SAAS,sBAAsB,EAAE,CAAA;IAC3C,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,yGAAyG;IACzG,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,kBAAkB,CAAC,EAAE,QAAQ,CAAC;QAAC,YAAY,EAAC,MAAM,CAAC;QAAA,aAAa,CAAC,EAAC,MAAM,CAAA;KAAC,CAAC,CAAA;IAC1E,eAAe,CAAC,EAAE,CAAC,aAAa,EAAE,sBAAsB,KAAK,IAAI,GAAG,6BAA6B,GAAG,OAAO,CAAC,IAAI,GAAG,6BAA6B,CAAC,CAAA;CAClJ,CAAC,CAAA;AAcF;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,UAAU,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,QAAQ,EAAE,IAAY,EAAE,WAAmB,EAAE,QAAgB,EAAE,kBAAkB,EAAE,eAAe,EAAE,EAAE,6BAA6B,+BA8G1P"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId, useMemo, useRef, useState } from 'react';
|
|
3
|
+
const icons = {
|
|
4
|
+
scan: _jsxs(_Fragment, { children: [_jsx("path", { d: "M4 8V5a1 1 0 0 1 1-1h3M16 4h3a1 1 0 0 1 1 1v3M20 16v3a1 1 0 0 1-1 1h-3M8 20H5a1 1 0 0 1-1-1v-3" }), _jsx("path", { d: "M8 8h3v3H8zM14 8h2v2M8 14h2v2M13 13h3v3h-3z" })] }),
|
|
5
|
+
phone: _jsx("path", { d: "M7.2 3.8 9.4 7 8 9.1a14 14 0 0 0 6.9 6.9l2.1-1.4 3.2 2.2-.8 3a2 2 0 0 1-2.1 1.4C9.8 20.2 3.8 14.2 2.8 6.7A2 2 0 0 1 4.2 4.6z" }),
|
|
6
|
+
video: _jsxs(_Fragment, { children: [_jsx("rect", { x: "3", y: "6", width: "12", height: "12", rx: "2" }), _jsx("path", { d: "m15 10 6-3v10l-6-3z" })] }),
|
|
7
|
+
message: _jsx("path", { d: "M4 4h16v12H9l-5 4z" }),
|
|
8
|
+
chevron: _jsx("path", { d: "m9 5 7 7-7 7" }),
|
|
9
|
+
};
|
|
10
|
+
function Icon({ name }) {
|
|
11
|
+
return _jsx("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", children: icons[name] });
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Shared visual editor for one already-authorized subject transfer.
|
|
15
|
+
*
|
|
16
|
+
* Selection and demo state never grant access. The host must resolve the
|
|
17
|
+
* subject, contacts, department sender, HealthcareService and write
|
|
18
|
+
* capability in its BFF. `onApplyTransfer` reports only the requested source
|
|
19
|
+
* outcome; the provider commits authoritative Encounter changes before any
|
|
20
|
+
* completed Communication projects the result to the subject index.
|
|
21
|
+
*/
|
|
22
|
+
export function EncounterTransferConsole({ copy, patientDisplay, encounters, sourceEncounterId, destinationEncounterId, contacts, demo = false, legacyTools = false, readOnly = false, destinationPreview, onApplyTransfer }) {
|
|
23
|
+
const [sourceOutcome, setSourceOutcome] = useState('on-hold');
|
|
24
|
+
const [selectedContact, setSelectedContact] = useState(contacts[0]?.identifier);
|
|
25
|
+
const [messageOpen, setMessageOpen] = useState(false);
|
|
26
|
+
const [messageMode, setMessageMode] = useState('text');
|
|
27
|
+
const [attachments, setAttachments] = useState([]);
|
|
28
|
+
const [showTechnical, setShowTechnical] = useState(false);
|
|
29
|
+
const [status, setStatus] = useState('');
|
|
30
|
+
const [transferSync, setTransferSync] = useState('idle');
|
|
31
|
+
const railRef = useRef(null);
|
|
32
|
+
const source = useMemo(() => encounters.find((item) => item.identifier === sourceEncounterId), [encounters, sourceEncounterId]);
|
|
33
|
+
const destination = useMemo(() => encounters.find((item) => item.identifier === destinationEncounterId), [encounters, destinationEncounterId]);
|
|
34
|
+
const history = useMemo(() => encounters.filter((item) => item.identifier !== sourceEncounterId && item.identifier !== destinationEncounterId), [encounters, sourceEncounterId, destinationEncounterId]);
|
|
35
|
+
const contact = contacts.find((item) => item.identifier === selectedContact) ?? contacts[0];
|
|
36
|
+
const helpId = useId();
|
|
37
|
+
function toggleAttachment(kind) {
|
|
38
|
+
setAttachments(current => current.includes(kind) ? current.filter(item => item !== kind) : [...current, kind]);
|
|
39
|
+
setStatus(copy.attachmentReady);
|
|
40
|
+
}
|
|
41
|
+
async function applyTransfer() {
|
|
42
|
+
if (readOnly || !onApplyTransfer)
|
|
43
|
+
return;
|
|
44
|
+
setTransferSync('submitting');
|
|
45
|
+
try {
|
|
46
|
+
const outcome = await onApplyTransfer?.(sourceOutcome);
|
|
47
|
+
if (!outcome && !legacyTools) {
|
|
48
|
+
setTransferSync('retryable');
|
|
49
|
+
setStatus(copy.transferPending);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
if (outcome?.state === 'pending' || outcome?.state === 'retryable') {
|
|
53
|
+
setTransferSync('retryable');
|
|
54
|
+
setStatus(outcome.message || copy.transferPending);
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
if (outcome?.state === 'rejected') {
|
|
58
|
+
setTransferSync('idle');
|
|
59
|
+
setStatus(outcome.message || copy.transferRejected);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
setTransferSync('idle');
|
|
63
|
+
setStatus(copy.transferReady);
|
|
64
|
+
}
|
|
65
|
+
catch (reason) {
|
|
66
|
+
setTransferSync('retryable');
|
|
67
|
+
setStatus(reason instanceof Error && reason.message ? reason.message : copy.transferPending);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return _jsxs("section", { className: "uhcp-transfer-console", style: legacyTools ? undefined : { gridTemplateColumns: 'minmax(0,1fr)', minHeight: 'auto' }, children: [legacyTools && _jsx("aside", { className: "uhcp-transfer-contacts", children: _jsxs("details", { open: true, children: [_jsx("summary", { children: copy.emergencyActions }), _jsx("div", { className: "uhcp-transfer-contact-list", role: "list", children: contacts.map((item) => _jsxs("button", { type: "button", role: "listitem", "aria-pressed": item.identifier === contact?.identifier, onClick: () => setSelectedContact(item.identifier), children: [_jsx("span", { "aria-hidden": "true", children: item.name.split(/\s+/).map(part => part[0]).slice(0, 2).join('') }), _jsx("strong", { children: item.name }), _jsxs("small", { children: [item.relationship, item.phone ? ` · ${item.phone}` : ''] })] }, item.identifier)) }), _jsxs("div", { className: "uhcp-transfer-contact-actions", children: [_jsxs("button", { type: "button", onClick: () => setStatus(copy.callReady), children: [_jsx(Icon, { name: "phone" }), copy.call] }), _jsxs("button", { type: "button", onClick: () => setStatus(copy.videoReady), children: [_jsx(Icon, { name: "video" }), copy.videoCall] }), _jsxs("button", { type: "button", "aria-pressed": messageOpen, onClick: () => setMessageOpen(value => !value), children: [_jsx(Icon, { name: "message" }), copy.sendMessage] })] }), messageOpen && contact ? _jsxs("form", { className: "uhcp-transfer-composer", onSubmit: (event) => { event.preventDefault(); setStatus(copy.messageReady); }, children: [_jsxs("h3", { children: [copy.sendMessage, ": ", contact.name] }), _jsxs("div", { className: "uhcp-transfer-mode", role: "group", "aria-label": copy.sendMessage, children: [_jsx("button", { type: "button", "aria-pressed": messageMode === 'text', onClick: () => setMessageMode('text'), children: copy.text }), _jsx("button", { type: "button", "aria-pressed": messageMode === 'audio', onClick: () => setMessageMode('audio'), children: copy.audio })] }), messageMode === 'text' ? _jsxs("label", { children: [copy.messageLabel, _jsx("textarea", { rows: 5 })] }) : _jsxs("button", { className: "uhcp-transfer-record", type: "button", children: ["\u25CF ", copy.audio] }), _jsxs("fieldset", { children: [_jsx("legend", { children: copy.attach }), _jsxs("div", { children: [_jsx("button", { type: "button", "aria-pressed": attachments.includes('pdf'), onClick: () => toggleAttachment('pdf'), children: copy.pdf }), _jsx("button", { type: "button", "aria-pressed": attachments.includes('fhir'), onClick: () => toggleAttachment('fhir'), children: copy.fhirBundle }), _jsx("button", { type: "button", "aria-pressed": attachments.includes('calendar'), onClick: () => toggleAttachment('calendar'), children: copy.calendar })] })] }), _jsx("button", { className: "uhcp-transfer-primary", type: "submit", children: copy.send })] }) : null] }) }), _jsxs("div", { className: "uhcp-transfer-main", children: [legacyTools && _jsxs("header", { className: "uhcp-transfer-patient", children: [_jsx("h2", { children: copy.patientSearchTitle }), _jsxs("div", { children: [_jsxs("button", { type: "button", onClick: () => setStatus(copy.patientReady), children: [_jsx(Icon, { name: "scan" }), copy.scanQr] }), _jsx("span", { "aria-hidden": "true" }), _jsxs("label", { children: [copy.patientId, _jsx("input", { defaultValue: patientDisplay })] }), _jsx("button", { type: "button", onClick: () => setStatus(copy.patientReady), children: copy.search })] })] }), _jsxs("section", { className: "uhcp-transfer-journey", role: "region", "aria-label": copy.journeyTitle, "aria-describedby": readOnly ? undefined : helpId, children: [_jsxs("header", { children: [_jsx("h2", { children: copy.journeyTitle }), _jsxs("div", { children: [_jsx("button", { type: "button", "aria-label": "Anterior", onClick: () => railRef.current?.scrollBy({ left: -260, behavior: 'smooth' }), children: _jsx(Icon, { name: "chevron" }) }), _jsx("button", { type: "button", "aria-label": "Siguiente", onClick: () => railRef.current?.scrollBy({ left: 260, behavior: 'smooth' }), children: _jsx(Icon, { name: "chevron" }) })] })] }), _jsxs("div", { className: "uhcp-transfer-rail", ref: railRef, children: [history.map((item) => _jsx(EncounterCard, { encounter: item }, item.identifier)), source ? _jsxs("article", { className: "uhcp-transfer-card uhcp-transfer-source", children: [_jsx("h3", { children: copy.sourceTitle }), _jsx(EncounterCardBody, { encounter: source, ...(legacyTools ? { identifierLabel: copy.encounterIdentifier } : {}) }), !readOnly && _jsxs("fieldset", { children: [_jsx("legend", { children: copy.helpTitle }), _jsxs("label", { children: [_jsx("input", { type: "radio", name: "source-outcome", checked: sourceOutcome === 'on-hold', onChange: () => setSourceOutcome('on-hold') }), _jsxs("span", { children: [_jsx("strong", { children: copy.returning }), _jsx("small", { children: copy.returningHint })] })] }), _jsxs("label", { children: [_jsx("input", { type: "radio", name: "source-outcome", checked: sourceOutcome === 'completed', onChange: () => setSourceOutcome('completed') }), _jsxs("span", { children: [_jsx("strong", { children: copy.notReturning }), _jsx("small", { children: copy.notReturningHint })] })] })] })] }) : null, (destination || destinationPreview) && _jsxs("div", { className: "uhcp-transfer-arrow", children: [_jsx("span", { children: copy.transferTo }), _jsx("i", {}), _jsx(Icon, { name: "chevron" })] }), destination ? _jsxs("article", { className: "uhcp-transfer-card uhcp-transfer-destination", children: [_jsx("h3", { children: copy.destinationTitle }), _jsx(EncounterCardBody, { encounter: destination, ...(legacyTools ? { identifierLabel: copy.encounterIdentifier } : {}) })] }) : destinationPreview ? _jsxs("article", { className: "uhcp-transfer-card uhcp-transfer-destination", children: [_jsx("h3", { children: copy.destinationTitle }), _jsx("strong", { children: destinationPreview.serviceLabel }), _jsx("p", { children: destinationPreview.locationLabel })] }) : null] }), !readOnly && _jsxs("details", { className: "uhcp-transfer-help", open: true, children: [_jsx("summary", { id: helpId, children: copy.helpTitle }), _jsx("p", { children: copy.helpBody })] }), !readOnly && _jsxs("div", { className: "uhcp-transfer-controls", children: [legacyTools && _jsx("button", { type: "button", onClick: () => { setShowTechnical(true); setStatus(copy.reviewReady); }, children: copy.reviewChanges }), _jsx("button", { className: "uhcp-transfer-primary", type: "button", disabled: !onApplyTransfer || transferSync === 'submitting', onClick: () => void applyTransfer(), children: transferSync === 'retryable' ? copy.retryTransfer : copy.applyTransfer })] })] }), legacyTools && _jsxs("section", { className: "uhcp-transfer-review", children: [_jsxs("header", { children: [_jsx("h2", { children: copy.resourceSummary }), demo ? _jsx("p", { children: copy.demoWarning }) : null] }), _jsx("ol", { "aria-label": copy.resourceSummary, children: [[copy.sourceUpdate, 'Encounter'], [copy.sourceHistory, 'EncounterHistory'], [copy.destinationUpdate, 'Encounter'], [copy.destinationHistory, 'EncounterHistory'], [copy.indexProjection, 'Communication']].map(([label, resource], index) => _jsxs("li", { children: [_jsx("span", { children: index + 1 }), _jsx("strong", { children: label }), _jsxs("details", { open: showTechnical, children: [_jsx("summary", { children: copy.technicalDetails }), _jsx("code", { children: resource })] })] }, `${resource}-${index}`)) })] }), status ? _jsx("p", { className: "uhcp-transfer-status", role: "status", children: status }) : null] })] });
|
|
71
|
+
}
|
|
72
|
+
function EncounterCard({ encounter }) {
|
|
73
|
+
return _jsx("article", { className: "uhcp-transfer-card", children: _jsx(EncounterCardBody, { encounter: encounter }) });
|
|
74
|
+
}
|
|
75
|
+
function EncounterCardBody({ encounter, identifierLabel }) {
|
|
76
|
+
return _jsxs("div", { className: "uhcp-transfer-card-body", children: [_jsx("time", { children: encounter.arrivedAt }), _jsx("strong", { children: encounter.serviceLabel }), encounter.locationLabel ? _jsx("span", { children: encounter.locationLabel }) : null, _jsx("small", { "data-status": encounter.status, children: encounter.status }), (identifierLabel || encounter.displayIdentifier) && _jsx("code", { "aria-label": identifierLabel, children: encounter.displayIdentifier ?? encounter.identifier })] });
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=EncounterTransferConsole.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EncounterTransferConsole.js","sourceRoot":"","sources":["../src/EncounterTransferConsole.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAyDxD,MAAM,KAAK,GAAG;IACZ,IAAI,EAAE,8BAAE,eAAM,CAA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AU,GAAQ,IAAO,CAAA;AAC7Z,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
.uhcp-transfer-console { background:var(--uhcp-surface,#fff); color:var(--uhcp-text,#102754); display:grid; font-family:Inter,ui-sans-serif,system-ui,sans-serif; grid-template-columns:minmax(16rem,23rem) minmax(0,1fr); min-height:calc(100vh - 4.5rem); }
|
|
2
|
+
.uhcp-transfer-console button,.uhcp-transfer-console input,.uhcp-transfer-console textarea { font:inherit; }
|
|
3
|
+
.uhcp-transfer-console svg { fill:none; height:1.25rem; stroke:currentColor; stroke-linecap:round; stroke-linejoin:round; stroke-width:1.8; width:1.25rem; }
|
|
4
|
+
.uhcp-transfer-contacts { border-inline-end:1px solid #dce5ec; padding:1.2rem; }
|
|
5
|
+
.uhcp-transfer-contacts summary { cursor:pointer; font-size:1.05rem; font-weight:850; list-style-position:inside; padding:.35rem 0 1rem; }
|
|
6
|
+
.uhcp-transfer-contact-list { border-block:1px solid #e2e9ef; display:grid; padding:.45rem 0; }
|
|
7
|
+
.uhcp-transfer-contact-list button { background:transparent; border:0; border-inline-start:3px solid transparent; color:inherit; cursor:pointer; display:grid; gap:.15rem; grid-template-columns:2.7rem 1fr; padding:.75rem; text-align:start; }
|
|
8
|
+
.uhcp-transfer-contact-list button[aria-pressed=true] { background:var(--uhcp-surface-muted,#eaf8fd); border-inline-start-color:var(--uhcp-text,#09a9dc); }
|
|
9
|
+
.uhcp-transfer-contact-list button>span { align-items:center; background:var(--uhcp-surface-muted,#d7e7f1); border-radius:50%; display:flex; font-weight:800; grid-row:span 2; height:2.4rem; justify-content:center; width:2.4rem; }
|
|
10
|
+
.uhcp-transfer-contact-list small { color:var(--uhcp-text,#58708e); }
|
|
11
|
+
.uhcp-transfer-contact-actions { display:grid; gap:.55rem; padding:1rem 0; }
|
|
12
|
+
.uhcp-transfer-contact-actions button,.uhcp-transfer-mode button,.uhcp-transfer-composer fieldset button { align-items:center; background:var(--uhcp-surface,#fff); border:1px solid #cad7e2; border-radius:.55rem; color:inherit; cursor:pointer; display:flex; gap:.7rem; padding:.7rem .85rem; }
|
|
13
|
+
.uhcp-transfer-contact-actions button[aria-pressed=true],.uhcp-transfer-mode button[aria-pressed=true] { background:var(--uhcp-surface-muted,#eaf8fd); border-color:var(--uhcp-text,#09a9dc); color:var(--uhcp-text,#006f96); font-weight:800; }
|
|
14
|
+
.uhcp-transfer-composer fieldset button[aria-pressed=true] { background:var(--uhcp-surface-muted,#eaf8fd); border-color:var(--uhcp-text,#09a9dc); color:var(--uhcp-text,#006f96); font-weight:800; }
|
|
15
|
+
.uhcp-transfer-composer { display:grid; gap:.8rem; }
|
|
16
|
+
.uhcp-transfer-composer h3 { font-size:.95rem; margin:.2rem 0 0; }
|
|
17
|
+
.uhcp-transfer-mode { display:grid; grid-template-columns:1fr 1fr; }
|
|
18
|
+
.uhcp-transfer-mode button { justify-content:center; }
|
|
19
|
+
.uhcp-transfer-composer label { display:grid; font-size:.82rem; font-weight:750; gap:.35rem; }
|
|
20
|
+
.uhcp-transfer-composer textarea { border:1px solid #cad7e2; border-radius:.55rem; color:inherit; resize:vertical; padding:.75rem; }
|
|
21
|
+
.uhcp-transfer-composer fieldset { border:0; margin:0; padding:0; }
|
|
22
|
+
.uhcp-transfer-composer legend { font-size:.82rem; font-weight:750; margin-bottom:.4rem; }
|
|
23
|
+
.uhcp-transfer-composer fieldset>div { display:flex; flex-wrap:wrap; gap:.4rem; }
|
|
24
|
+
.uhcp-transfer-record { background:var(--uhcp-surface,#fff); border:1px dashed #09a9dc; border-radius:.55rem; color:var(--uhcp-text,#006f96); padding:1rem; }
|
|
25
|
+
.uhcp-transfer-primary { background:#0796a8!important; border-color:#0796a8!important; color:#fff!important; font-weight:850!important; }
|
|
26
|
+
.uhcp-transfer-main { min-width:0; padding:1rem; }
|
|
27
|
+
.uhcp-transfer-patient,.uhcp-transfer-journey,.uhcp-transfer-review { border:1px solid #dce5ec; border-radius:.7rem; box-shadow:0 4px 16px rgb(16 39 84 / 5%); }
|
|
28
|
+
.uhcp-transfer-patient { padding:1rem; }
|
|
29
|
+
.uhcp-transfer-patient h2,.uhcp-transfer-journey h2,.uhcp-transfer-review h2 { font-size:1.18rem; margin:0; }
|
|
30
|
+
.uhcp-transfer-patient>div { align-items:center; display:grid; gap:.75rem; grid-template-columns:minmax(11rem,.85fr) 1px minmax(13rem,1fr) auto; margin-top:.75rem; }
|
|
31
|
+
.uhcp-transfer-patient button,.uhcp-transfer-patient label { align-items:center; background:var(--uhcp-surface,#fff); border:1px solid #9fb3c8; border-radius:.45rem; display:flex; gap:.65rem; min-height:3rem; padding:.7rem .9rem; }
|
|
32
|
+
.uhcp-transfer-patient button { color:inherit; cursor:pointer; font-weight:800; justify-content:center; }
|
|
33
|
+
.uhcp-transfer-patient button:last-child { background:var(--uhcp-surface-muted,#0796a8); border-color:var(--uhcp-text,#0796a8); color:#fff; }
|
|
34
|
+
.uhcp-transfer-patient>div>span { background:var(--uhcp-surface-muted,#cbd7e1); height:2rem; }
|
|
35
|
+
.uhcp-transfer-patient label { color:var(--uhcp-text,#64748b); }
|
|
36
|
+
.uhcp-transfer-patient input { border:0; color:var(--uhcp-text,#102754); min-width:0; outline:0; width:100%; }
|
|
37
|
+
.uhcp-transfer-journey { margin-top:.8rem; overflow:hidden; padding:1rem; }
|
|
38
|
+
.uhcp-transfer-journey>header,.uhcp-transfer-review>header { align-items:center; display:flex; justify-content:space-between; }
|
|
39
|
+
.uhcp-transfer-journey>header>div { display:flex; gap:.4rem; }
|
|
40
|
+
.uhcp-transfer-journey>header button { align-items:center; background:var(--uhcp-surface,#fff); border:1px solid #cad7e2; border-radius:.45rem; color:inherit; display:flex; padding:.45rem; }
|
|
41
|
+
.uhcp-transfer-journey>header button:first-child svg { transform:rotate(180deg); }
|
|
42
|
+
.uhcp-transfer-rail { align-items:center; display:flex; gap:.8rem; min-height:18rem; overflow-x:auto; padding:1rem .25rem; scrollbar-color:#aebfce #edf2f5; }
|
|
43
|
+
.uhcp-transfer-card { border:1px solid #cad7e2; border-radius:.5rem; flex:0 0 10rem; min-height:12rem; overflow:hidden; }
|
|
44
|
+
.uhcp-transfer-card h3 { background:var(--uhcp-surface-muted,#087db8); color:var(--uhcp-text,#fff); font-size:.82rem; margin:0; padding:.65rem; }
|
|
45
|
+
.uhcp-transfer-card-body { display:grid; gap:.45rem; padding:.85rem; }
|
|
46
|
+
.uhcp-transfer-card-body time,.uhcp-transfer-card-body span,.uhcp-transfer-card-body code { color:var(--uhcp-text,#60738c); font-size:.72rem; }
|
|
47
|
+
.uhcp-transfer-card-body small { background:var(--uhcp-surface-muted,#edf2f5); border-radius:999px; color:var(--uhcp-text,#466079); font-size:.7rem; justify-self:start; padding:.25rem .55rem; }
|
|
48
|
+
.uhcp-transfer-card-body small[data-status=in-progress] { background:var(--uhcp-surface-muted,#d7f4e5); color:var(--uhcp-text,#087a47); }
|
|
49
|
+
.uhcp-transfer-card-body small[data-status=completed] { background:var(--uhcp-surface-muted,#dff6e8); color:var(--uhcp-text,#087a47); }
|
|
50
|
+
.uhcp-transfer-card-body small[data-status=on-hold] { background:var(--uhcp-surface-muted,#fff1d2); color:var(--uhcp-text,#9a5a00); }
|
|
51
|
+
.uhcp-transfer-source { border-color:var(--uhcp-text,#078dcc); flex-basis:13.5rem; }
|
|
52
|
+
.uhcp-transfer-destination { border-color:var(--uhcp-text,#069f69); flex-basis:13rem; }
|
|
53
|
+
.uhcp-transfer-destination h3 { background:var(--uhcp-surface-muted,#069f69); }
|
|
54
|
+
.uhcp-transfer-source fieldset { border:0; border-top:1px solid #dce5ec; margin:.2rem .7rem .7rem; padding:.7rem 0 0; }
|
|
55
|
+
.uhcp-transfer-source legend { font-size:.72rem; font-weight:800; }
|
|
56
|
+
.uhcp-transfer-source label { align-items:start; display:flex; gap:.45rem; padding:.35rem 0; }
|
|
57
|
+
.uhcp-transfer-source label span { display:grid; }
|
|
58
|
+
.uhcp-transfer-source label small { color:var(--uhcp-text,#60738c); font-size:.68rem; }
|
|
59
|
+
.uhcp-transfer-arrow { align-items:center; color:var(--uhcp-text,#0796a8); display:grid; flex:0 0 5rem; grid-template-columns:1fr auto; text-align:center; }
|
|
60
|
+
.uhcp-transfer-arrow span { font-size:.7rem; font-weight:800; grid-column:1/-1; }
|
|
61
|
+
.uhcp-transfer-arrow i { background:var(--uhcp-surface-muted,#0796a8); height:2px; }
|
|
62
|
+
.uhcp-transfer-arrow svg { margin-left:-.45rem; }
|
|
63
|
+
.uhcp-transfer-help { background:var(--uhcp-surface-muted,#f4f9fc); border-radius:.5rem; padding:.65rem .8rem; }
|
|
64
|
+
.uhcp-transfer-help summary { cursor:pointer; font-size:.78rem; font-weight:800; }
|
|
65
|
+
.uhcp-transfer-help p { color:var(--uhcp-text,#51677e); font-size:.78rem; margin:.4rem 0 0; }
|
|
66
|
+
.uhcp-transfer-controls { display:flex; gap:.55rem; justify-content:flex-end; padding-top:.75rem; }
|
|
67
|
+
.uhcp-transfer-controls button { background:var(--uhcp-surface,#fff); border:1px solid #0796a8; border-radius:.45rem; color:var(--uhcp-text,#08738a); padding:.7rem 1rem; }
|
|
68
|
+
.uhcp-transfer-review { margin-top:.8rem; padding:1rem; }
|
|
69
|
+
.uhcp-transfer-review header p { background:var(--uhcp-surface-muted,#fff5dd); border:1px solid #f3ce79; border-radius:.4rem; color:var(--uhcp-text,#925800); font-size:.72rem; margin:0; padding:.5rem .7rem; }
|
|
70
|
+
.uhcp-transfer-review ol { list-style:none; margin:.7rem 0 0; padding:0; }
|
|
71
|
+
.uhcp-transfer-review li { align-items:center; border-top:1px solid #e1e8ee; display:grid; gap:.7rem; grid-template-columns:1.8rem 1fr auto; padding:.55rem; }
|
|
72
|
+
.uhcp-transfer-review li>span { align-items:center; background:var(--uhcp-surface-muted,#e8f6fc); border-radius:50%; color:var(--uhcp-text,#087db8); display:flex; font-size:.72rem; font-weight:900; height:1.7rem; justify-content:center; width:1.7rem; }
|
|
73
|
+
.uhcp-transfer-review li strong { font-size:.8rem; }
|
|
74
|
+
.uhcp-transfer-review details { font-size:.68rem; }
|
|
75
|
+
.uhcp-transfer-review summary { color:var(--uhcp-text,#60738c); cursor:pointer; }
|
|
76
|
+
.uhcp-transfer-status { background:var(--uhcp-surface-muted,#dff6e8); border-radius:.45rem; color:var(--uhcp-text,#087a47); font-weight:750; padding:.75rem; }
|
|
77
|
+
@media(max-width:900px){.uhcp-transfer-console{grid-template-columns:1fr}.uhcp-transfer-contacts{border-bottom:1px solid #dce5ec;border-inline-end:0}.uhcp-transfer-contact-actions{grid-template-columns:repeat(3,1fr)}.uhcp-transfer-patient>div{grid-template-columns:1fr}.uhcp-transfer-patient>div>span{display:none}.uhcp-transfer-review>header{align-items:flex-start;gap:.7rem;flex-direction:column}}
|
|
78
|
+
@media(max-width:560px){.uhcp-transfer-main{padding:.55rem}.uhcp-transfer-contact-actions{grid-template-columns:1fr}.uhcp-transfer-rail{align-items:stretch}.uhcp-transfer-review li{grid-template-columns:1.8rem 1fr}.uhcp-transfer-review li details{grid-column:2}.uhcp-transfer-controls button{flex:1}.uhcp-transfer-review header p{font-size:.65rem}}
|
|
79
|
+
|
|
80
|
+
.sos-encounter-journey { min-width:0; color:var(--uhcp-text,inherit); border:1px solid var(--uhcp-border,#dce5ec); border-radius:1rem; padding:clamp(.75rem,2vw,1.5rem); }
|
|
81
|
+
.sos-encounter-journey>header,.sos-encounter-journey>form,.sos-encounter-actions { display:flex; align-items:center; flex-wrap:wrap; gap:.75rem; margin-bottom:1rem; }
|
|
82
|
+
.sos-encounter-journey>header { justify-content:space-between; }
|
|
83
|
+
.sos-encounter-journey h2 { margin:0; font-size:1.25rem; }
|
|
84
|
+
.sos-encounter-journey label { display:grid; gap:.35rem; min-width:0; }
|
|
85
|
+
.sos-encounter-journey select { max-width:100%; color:inherit; background:var(--uhcp-surface,#fff); border:1px solid var(--uhcp-border,#dce5ec); border-radius:.4rem; padding:.5rem; }
|
|
86
|
+
.sos-encounter-journey button { cursor:pointer; border:1px solid var(--uhcp-border,#9bbfd1); border-radius:.5rem; padding:.55rem .8rem; color:inherit; background:var(--uhcp-surface-muted,#eef6fa); }
|
|
87
|
+
.sos-encounter-journey button:disabled { opacity:.5; cursor:not-allowed; }
|
|
88
|
+
.sos-encounter-journey button:focus-visible,.sos-encounter-journey select:focus-visible { outline:3px solid #1388c9; outline-offset:2px; }
|
|
89
|
+
.sos-encounter-journey time,.sos-encounter-journey code { overflow-wrap:anywhere; }
|
|
90
|
+
.sos-encounter-journey [role=alert] { color:var(--uhcp-danger,#b42318); }
|
|
91
|
+
.sos-encounter-journey [role=status] { color:var(--uhcp-success,#087a47); }
|
package/dist/index.d.ts
CHANGED
|
@@ -5,4 +5,6 @@ export * from './LiveKitRealtimeCallClient.js';
|
|
|
5
5
|
export * from './EmergencyContactCardDirectory.js';
|
|
6
6
|
export * from './PushNotificationRegistration.js';
|
|
7
7
|
export * from './useRealtimeCallSessionLifecycle.js';
|
|
8
|
+
export * from './EncounterTransferConsole.js';
|
|
9
|
+
export * from './EncounterJourneyPanel.js';
|
|
8
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAA;AAC5C,cAAc,kCAAkC,CAAA;AAChD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,oCAAoC,CAAA;AAClD,cAAc,mCAAmC,CAAA;AACjD,cAAc,sCAAsC,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAA;AAC5C,cAAc,kCAAkC,CAAA;AAChD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,oCAAoC,CAAA;AAClD,cAAc,mCAAmC,CAAA;AACjD,cAAc,sCAAsC,CAAA;AACpD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,4BAA4B,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -5,4 +5,6 @@ export * from './LiveKitRealtimeCallClient.js';
|
|
|
5
5
|
export * from './EmergencyContactCardDirectory.js';
|
|
6
6
|
export * from './PushNotificationRegistration.js';
|
|
7
7
|
export * from './useRealtimeCallSessionLifecycle.js';
|
|
8
|
+
export * from './EncounterTransferConsole.js';
|
|
9
|
+
export * from './EncounterJourneyPanel.js';
|
|
8
10
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAA;AAC5C,cAAc,kCAAkC,CAAA;AAChD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,oCAAoC,CAAA;AAClD,cAAc,mCAAmC,CAAA;AACjD,cAAc,sCAAsC,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAA;AAC5C,cAAc,kCAAkC,CAAA;AAChD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,oCAAoC,CAAA;AAClD,cAAc,mCAAmC,CAAA;AACjD,cAAc,sCAAsC,CAAA;AACpD,cAAc,+BAA+B,CAAA;AAC7C,cAAc,4BAA4B,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sos-portal-components-react",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "Shared portal UI for base components",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -22,7 +22,16 @@
|
|
|
22
22
|
"./subject-conversation-chat": {
|
|
23
23
|
"types": "./dist/SubjectConversationChat.d.ts",
|
|
24
24
|
"default": "./dist/SubjectConversationChat.js"
|
|
25
|
-
}
|
|
25
|
+
},
|
|
26
|
+
"./encounter-journey": {
|
|
27
|
+
"types": "./dist/EncounterJourneyPanel.d.ts",
|
|
28
|
+
"default": "./dist/EncounterJourneyPanel.js"
|
|
29
|
+
},
|
|
30
|
+
"./encounter-transfer-console": {
|
|
31
|
+
"types": "./dist/EncounterTransferConsole.d.ts",
|
|
32
|
+
"default": "./dist/EncounterTransferConsole.js"
|
|
33
|
+
},
|
|
34
|
+
"./encounter-journey.css": "./dist/encounter-journey.css"
|
|
26
35
|
},
|
|
27
36
|
"files": [
|
|
28
37
|
"dist",
|
|
@@ -31,7 +40,7 @@
|
|
|
31
40
|
],
|
|
32
41
|
"scripts": {
|
|
33
42
|
"clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
34
|
-
"build": "npm run clean && tsc -p tsconfig.build.json",
|
|
43
|
+
"build": "npm run clean && tsc -p tsconfig.build.json && node -e \"require('node:fs').copyFileSync('src/encounter-journey.css','dist/encounter-journey.css')\"",
|
|
35
44
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
36
45
|
"test": "vitest run --maxWorkers=1",
|
|
37
46
|
"check": "npm run typecheck && npm test && npm run build",
|
|
@@ -76,7 +85,8 @@
|
|
|
76
85
|
},
|
|
77
86
|
"dependencies": {
|
|
78
87
|
"antifraud-portal-components-react": "0.3.0",
|
|
79
|
-
"
|
|
88
|
+
"fhir-data-utils-ts": "0.6.24",
|
|
89
|
+
"sos-data-utils-ts": "0.6.33"
|
|
80
90
|
},
|
|
81
91
|
"devDependencies": {
|
|
82
92
|
"@testing-library/react": "^16.3.2",
|