uhc-portal-components-react 0.1.26 → 0.1.27
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 +8 -0
- package/README.md +5 -0
- package/dist/AllClinicalSections.d.ts +41 -0
- package/dist/AllClinicalSections.d.ts.map +1 -0
- package/dist/AllClinicalSections.js +35 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/styles.css +11 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.27
|
|
4
|
+
|
|
5
|
+
- Add generic `AllClinicalSections<Person|Animal>` organization with stack or
|
|
6
|
+
tab presentation, nested collapsible groups and host-controlled exclusions.
|
|
7
|
+
- Keep family health history, care-team members, emergency contacts,
|
|
8
|
+
Encounters and IPS summary as independent navigation concepts while the host
|
|
9
|
+
supplies authorized clinical content.
|
|
10
|
+
|
|
3
11
|
## 0.1.26
|
|
4
12
|
|
|
5
13
|
- Add a brand-neutral clinical document and Encounter explorer for an
|
package/README.md
CHANGED
|
@@ -58,6 +58,11 @@ The package deliberately exposes modules instead of a cloned application:
|
|
|
58
58
|
journey navigation and renders either IPS or non-IPS sections with the same
|
|
59
59
|
viewer. It never treats an Encounter as the clinical subject or performs
|
|
60
60
|
authorization, fetching or persistence in the browser.
|
|
61
|
+
- `AllClinicalSections<Person|Animal>`: lets each portal compose the same
|
|
62
|
+
authorized section views as a stack or tabs, nest collapsible subsections and
|
|
63
|
+
exclude inapplicable areas. Family history, care-team members and emergency
|
|
64
|
+
contacts remain independent; the organizer never follows another subject's
|
|
65
|
+
card or documents automatically.
|
|
61
66
|
- `ClinicalArtifactEditor`: renders the same schema-driven clinical form for
|
|
62
67
|
human and animal subjects. The host supplies its UHC/Vet schema,
|
|
63
68
|
terminology-search adapter and authorized persistence callback. Selecting a
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export declare const ClinicalSectionNavigationIds: Readonly<{
|
|
3
|
+
readonly IpsSummary: "ips-summary";
|
|
4
|
+
readonly Encounters: "encounters";
|
|
5
|
+
readonly HealthStatusAssessments: "health-status-assessments";
|
|
6
|
+
readonly HealthInsuranceInformation: "health-insurance-information";
|
|
7
|
+
readonly GoalsAndPreferences: "goals-and-preferences";
|
|
8
|
+
readonly FamilyHealthHistory: "family-health-history";
|
|
9
|
+
readonly ClinicalTests: "clinical-tests";
|
|
10
|
+
readonly ClinicalNotes: "clinical-notes";
|
|
11
|
+
readonly CareTeamMembers: "care-team-members";
|
|
12
|
+
readonly EmergencyContacts: "emergency-contacts";
|
|
13
|
+
}>;
|
|
14
|
+
export type ClinicalSectionNavigationId = typeof ClinicalSectionNavigationIds[keyof typeof ClinicalSectionNavigationIds];
|
|
15
|
+
export type ClinicalSubjectKind = 'person' | 'animal';
|
|
16
|
+
export type AllClinicalSectionDefinition<SubjectKind extends ClinicalSubjectKind> = Readonly<{
|
|
17
|
+
id: ClinicalSectionNavigationId | (string & {});
|
|
18
|
+
title: string;
|
|
19
|
+
description?: string;
|
|
20
|
+
content?: ReactNode;
|
|
21
|
+
collapsible?: boolean;
|
|
22
|
+
defaultOpen?: boolean;
|
|
23
|
+
children?: readonly AllClinicalSectionDefinition<SubjectKind>[];
|
|
24
|
+
}>;
|
|
25
|
+
export type AllClinicalSectionsProps<SubjectKind extends ClinicalSubjectKind> = Readonly<{
|
|
26
|
+
subjectKind: SubjectKind;
|
|
27
|
+
title: string;
|
|
28
|
+
sections: readonly AllClinicalSectionDefinition<SubjectKind>[];
|
|
29
|
+
excludedSectionIds?: readonly string[];
|
|
30
|
+
presentation?: 'sections' | 'tabs';
|
|
31
|
+
}>;
|
|
32
|
+
/**
|
|
33
|
+
* Organizes host-provided clinical views without redefining their FHIR model.
|
|
34
|
+
*
|
|
35
|
+
* The host decides which sections apply to a person or animal, supplies only
|
|
36
|
+
* authorized content and may exclude sections. Family history, emergency
|
|
37
|
+
* contacts and care-team members remain independent domains; this component
|
|
38
|
+
* never follows another subject's card or document links automatically.
|
|
39
|
+
*/
|
|
40
|
+
export declare function AllClinicalSections<SubjectKind extends ClinicalSubjectKind>({ subjectKind, title, sections, excludedSectionIds, presentation, }: AllClinicalSectionsProps<SubjectKind>): import("react").JSX.Element;
|
|
41
|
+
//# sourceMappingURL=AllClinicalSections.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AllClinicalSections.d.ts","sourceRoot":"","sources":["../src/AllClinicalSections.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAEhD,eAAO,MAAM,4BAA4B;;;;;;;;;;;EAW9B,CAAA;AAEX,MAAM,MAAM,2BAA2B,GAAG,OAAO,4BAA4B,CAAC,MAAM,OAAO,4BAA4B,CAAC,CAAA;AACxH,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAErD,MAAM,MAAM,4BAA4B,CAAC,WAAW,SAAS,mBAAmB,IAAI,QAAQ,CAAC;IAC3F,EAAE,EAAE,2BAA2B,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;IAC/C,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,QAAQ,CAAC,EAAE,SAAS,4BAA4B,CAAC,WAAW,CAAC,EAAE,CAAA;CAChE,CAAC,CAAA;AAEF,MAAM,MAAM,wBAAwB,CAAC,WAAW,SAAS,mBAAmB,IAAI,QAAQ,CAAC;IACvF,WAAW,EAAE,WAAW,CAAA;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,SAAS,4BAA4B,CAAC,WAAW,CAAC,EAAE,CAAA;IAC9D,kBAAkB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACtC,YAAY,CAAC,EAAE,UAAU,GAAG,MAAM,CAAA;CACnC,CAAC,CAAA;AAEF;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,SAAS,mBAAmB,EAAE,EAC3E,WAAW,EACX,KAAK,EACL,QAAQ,EACR,kBAAuB,EACvB,YAAyB,GAC1B,EAAE,wBAAwB,CAAC,WAAW,CAAC,+BAqCvC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
export const ClinicalSectionNavigationIds = Object.freeze({
|
|
4
|
+
IpsSummary: 'ips-summary',
|
|
5
|
+
Encounters: 'encounters',
|
|
6
|
+
HealthStatusAssessments: 'health-status-assessments',
|
|
7
|
+
HealthInsuranceInformation: 'health-insurance-information',
|
|
8
|
+
GoalsAndPreferences: 'goals-and-preferences',
|
|
9
|
+
FamilyHealthHistory: 'family-health-history',
|
|
10
|
+
ClinicalTests: 'clinical-tests',
|
|
11
|
+
ClinicalNotes: 'clinical-notes',
|
|
12
|
+
CareTeamMembers: 'care-team-members',
|
|
13
|
+
EmergencyContacts: 'emergency-contacts',
|
|
14
|
+
});
|
|
15
|
+
/**
|
|
16
|
+
* Organizes host-provided clinical views without redefining their FHIR model.
|
|
17
|
+
*
|
|
18
|
+
* The host decides which sections apply to a person or animal, supplies only
|
|
19
|
+
* authorized content and may exclude sections. Family history, emergency
|
|
20
|
+
* contacts and care-team members remain independent domains; this component
|
|
21
|
+
* never follows another subject's card or document links automatically.
|
|
22
|
+
*/
|
|
23
|
+
export function AllClinicalSections({ subjectKind, title, sections, excludedSectionIds = [], presentation = 'sections', }) {
|
|
24
|
+
const visibleSections = sections.filter(({ id }) => !excludedSectionIds.includes(id));
|
|
25
|
+
const [selectedId, setSelectedId] = useState(visibleSections[0]?.id ?? '');
|
|
26
|
+
const selectedSection = visibleSections.find(({ id }) => id === selectedId) ?? visibleSections[0];
|
|
27
|
+
return (_jsxs("section", { className: "uhcp-all-clinical-sections", "data-subject-kind": subjectKind, children: [_jsx("h2", { children: title }), presentation === 'tabs' ? (_jsxs(_Fragment, { children: [_jsx("div", { className: "uhcp-all-clinical-tabs", role: "tablist", "aria-label": title, children: visibleSections.map((section) => (_jsx("button", { type: "button", role: "tab", "aria-selected": section.id === selectedSection?.id, "aria-controls": `uhcp-all-section-${section.id}`, onClick: () => setSelectedId(section.id), children: section.title }, section.id))) }), selectedSection ? (_jsx("div", { id: `uhcp-all-section-${selectedSection.id}`, role: "tabpanel", children: _jsx(ClinicalSection, { definition: selectedSection, excludedSectionIds: excludedSectionIds }) })) : null] })) : (_jsx("div", { className: "uhcp-all-clinical-stack", children: visibleSections.map((section) => (_jsx(ClinicalSection, { definition: section, excludedSectionIds: excludedSectionIds }, section.id))) }))] }));
|
|
28
|
+
}
|
|
29
|
+
function ClinicalSection({ definition, excludedSectionIds, }) {
|
|
30
|
+
const body = (_jsxs("div", { className: "uhcp-all-clinical-content", children: [definition.description ? _jsx("p", { children: definition.description }) : null, definition.content, definition.children?.filter(({ id }) => !excludedSectionIds.includes(id)).map((child) => (_jsx(ClinicalSection, { definition: child, excludedSectionIds: excludedSectionIds }, child.id)))] }));
|
|
31
|
+
if (definition.collapsible !== false) {
|
|
32
|
+
return (_jsxs("details", { className: "uhcp-all-clinical-section", open: definition.defaultOpen, children: [_jsx("summary", { children: definition.title }), body] }));
|
|
33
|
+
}
|
|
34
|
+
return (_jsxs("section", { className: "uhcp-all-clinical-section", "aria-labelledby": `uhcp-all-section-title-${definition.id}`, children: [_jsx("h3", { id: `uhcp-all-section-title-${definition.id}`, children: definition.title }), body] }));
|
|
35
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export * from './PortalLoadingSkeleton.js';
|
|
|
9
9
|
export * from './ClinicalSectionSummary.js';
|
|
10
10
|
export * from './IpsBundleSummary.js';
|
|
11
11
|
export * from './ClinicalDocumentEncounterExplorer.js';
|
|
12
|
+
export * from './AllClinicalSections.js';
|
|
12
13
|
export * from './ClinicalArtifactEditor.js';
|
|
13
14
|
export * from './VitalSignArtifactEditor.js';
|
|
14
15
|
export * from './InvitationAcceptancePanel.js';
|
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,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,yBAAyB,CAAA;AACvC,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAChC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,uBAAuB,CAAA;AACrC,cAAc,wCAAwC,CAAA;AACtD,cAAc,6BAA6B,CAAA;AAC3C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,wBAAwB,CAAA;AACtC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,0CAA0C,CAAA;AACxD,cAAc,kCAAkC,CAAA;AAChD,cAAc,0BAA0B,CAAA;AACxC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,oCAAoC,CAAA;AAClD,cAAc,sCAAsC,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,yBAAyB,CAAA;AACvC,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAChC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,uBAAuB,CAAA;AACrC,cAAc,wCAAwC,CAAA;AACtD,cAAc,0BAA0B,CAAA;AACxC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,wBAAwB,CAAA;AACtC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,0CAA0C,CAAA;AACxD,cAAc,kCAAkC,CAAA;AAChD,cAAc,0BAA0B,CAAA;AACxC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,oCAAoC,CAAA;AAClD,cAAc,sCAAsC,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -9,6 +9,7 @@ export * from './PortalLoadingSkeleton.js';
|
|
|
9
9
|
export * from './ClinicalSectionSummary.js';
|
|
10
10
|
export * from './IpsBundleSummary.js';
|
|
11
11
|
export * from './ClinicalDocumentEncounterExplorer.js';
|
|
12
|
+
export * from './AllClinicalSections.js';
|
|
12
13
|
export * from './ClinicalArtifactEditor.js';
|
|
13
14
|
export * from './VitalSignArtifactEditor.js';
|
|
14
15
|
export * from './InvitationAcceptancePanel.js';
|
package/dist/styles.css
CHANGED
|
@@ -204,6 +204,17 @@ html[data-theme='dark'] .uhcp-brand-artwork-dark { display: block !important; }
|
|
|
204
204
|
.uhcp-document-tabs button[aria-pressed=true] { background:var(--uhcp-turquoise); color:#fff; }
|
|
205
205
|
.uhcp-document-panel>article>header { align-items:start; border-bottom:1px solid var(--uhcp-border); display:flex; gap:1rem; justify-content:space-between; margin:1rem 0; padding-bottom:1rem; }
|
|
206
206
|
.uhcp-document-panel>article>header time { color:var(--uhcp-muted); font-size:.8rem; white-space:nowrap; }
|
|
207
|
+
.uhcp-all-clinical-sections { color:var(--uhcp-text); display:grid; gap:1rem; }
|
|
208
|
+
.uhcp-all-clinical-sections>h2 { margin:0; }
|
|
209
|
+
.uhcp-all-clinical-stack { display:grid; gap:.75rem; }
|
|
210
|
+
.uhcp-all-clinical-section { background:var(--uhcp-panel); border:1px solid var(--uhcp-border); border-radius:1rem; padding:1rem; }
|
|
211
|
+
.uhcp-all-clinical-section>summary { cursor:pointer; font-size:1.05rem; font-weight:800; }
|
|
212
|
+
.uhcp-all-clinical-section>h3 { margin:0; }
|
|
213
|
+
.uhcp-all-clinical-content { display:grid; gap:.75rem; padding-top:.85rem; }
|
|
214
|
+
.uhcp-all-clinical-content>p { color:var(--uhcp-muted); margin:0; }
|
|
215
|
+
.uhcp-all-clinical-tabs { display:flex; gap:.5rem; overflow:auto; }
|
|
216
|
+
.uhcp-all-clinical-tabs button { background:var(--uhcp-panel); border:1px solid var(--uhcp-border); border-radius:999px; color:inherit; cursor:pointer; font:inherit; padding:.6rem .85rem; white-space:nowrap; }
|
|
217
|
+
.uhcp-all-clinical-tabs button[aria-selected=true] { background:var(--uhcp-turquoise); color:#fff; }
|
|
207
218
|
.uhcp-terminology-results ul { display:grid; gap:.35rem; list-style:none; margin:.25rem 0 0; padding:0; }
|
|
208
219
|
.uhcp-terminology-results button { background:var(--uhcp-surface-muted); color:inherit; display:grid; text-align:start; width:100%; }
|
|
209
220
|
.uhcp-terminology-results small { color:var(--uhcp-muted); display:block; font-weight:400; }
|
package/package.json
CHANGED