@photonhealth/elements 0.20.6 → 0.20.7
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/dist/index.js +286 -286
- package/dist/index.mjs +11573 -11575
- package/dist/photon-multirx-form/components/AddPrescriptionCard.d.ts +0 -1
- package/dist/photon-multirx-form/components/DraftPrescriptionCard.d.ts +1 -0
- package/dist/photon-multirx-form/components/PrescribeWorkflow.d.ts +3 -0
- package/dist/photon-multirx-form/photon-prescribe-workflow-component.d.ts +14 -0
- package/dist/photon-multirx-form/prescribe-workflow-analytics.test.d.ts +1 -0
- package/dist/test-utils/createTestClient.d.ts +49 -0
- package/dist/test-utils/mock-medication-search.element.d.ts +3 -0
- package/package.json +1 -1
|
@@ -10,7 +10,6 @@ export declare const AddPrescriptionCard: (props: {
|
|
|
10
10
|
enableCombineAndDuplicate?: boolean;
|
|
11
11
|
screenDraftedPrescriptions: () => void;
|
|
12
12
|
draftedPrescriptionChanged: () => void;
|
|
13
|
-
onDraftPrescriptionCreated: () => void;
|
|
14
13
|
screeningAlerts: ScreeningAlertType[];
|
|
15
14
|
catalogId?: string;
|
|
16
15
|
allowOffCatalogSearch?: boolean;
|
|
@@ -35,6 +35,9 @@ export type PrescribeProps = {
|
|
|
35
35
|
allowOffCatalogSearch?: boolean;
|
|
36
36
|
disableList?: DisableList;
|
|
37
37
|
groupId?: string;
|
|
38
|
+
/**
|
|
39
|
+
* This logic keeps the rx form closed when refilling a particular template/prescription
|
|
40
|
+
*/
|
|
38
41
|
initialShowForm: boolean;
|
|
39
42
|
};
|
|
40
43
|
export declare const ScreenDraftedPrescriptionsQuery: import("graphql").DocumentNode;
|
|
@@ -1,4 +1,18 @@
|
|
|
1
|
+
import { TemplateOverrides } from '@photonhealth/components';
|
|
2
|
+
import { PrescribeProps } from './components/PrescribeWorkflow';
|
|
1
3
|
import '@shoelace-style/shoelace/dist/components/alert/alert';
|
|
2
4
|
import '@shoelace-style/shoelace/dist/components/icon-button/icon-button';
|
|
3
5
|
import '@shoelace-style/shoelace/dist/components/icon/icon';
|
|
4
6
|
import '@shoelace-style/shoelace/dist/components/switch/switch';
|
|
7
|
+
export interface PrescribeWorkflowComponentProps extends Omit<PrescribeProps, 'initialShowForm'> {
|
|
8
|
+
templateIds?: string;
|
|
9
|
+
templateOverrides?: TemplateOverrides;
|
|
10
|
+
prescriptionIds?: string;
|
|
11
|
+
enableCoverageCheck: boolean;
|
|
12
|
+
pharmacyId?: string;
|
|
13
|
+
enableLocalPickup: boolean;
|
|
14
|
+
enableSendToPatient: boolean;
|
|
15
|
+
enableDeliveryPharmacies: boolean;
|
|
16
|
+
mailOrderIds?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare const PhotonPrescribeWorkflowComponent: (props: PrescribeWorkflowComponentProps) => import("solid-js").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { PhotonClient } from '@photonhealth/sdk';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a PhotonClient for testing.
|
|
4
|
+
*
|
|
5
|
+
* - apolloClinical: real fetch - intercepted by MSW
|
|
6
|
+
* - apollo: real fetch - intercepted by MSW
|
|
7
|
+
* watchQuery overridden (Observable pattern doesn't resolve with MSW in jsdom)
|
|
8
|
+
* - auth: getAccessToken stubbed to skip Auth0
|
|
9
|
+
*/
|
|
10
|
+
export declare function createTestClient(): PhotonClient;
|
|
11
|
+
/**
|
|
12
|
+
* Creates a plain object matching the PhotonClientStore shape for PhotonContext.Provider.
|
|
13
|
+
*
|
|
14
|
+
* We can't use the real PhotonClientStore because its constructor initializes auth state
|
|
15
|
+
* as { isAuthenticated: false, isLoading: true } and only updates via checkSession(),
|
|
16
|
+
* which calls Auth0. Components like PhotonAuthorized gate on these values, so we need
|
|
17
|
+
* them pre-set to authenticated. The real store also doesn't expose setStore publicly,
|
|
18
|
+
* so there's no way to override auth state after construction.
|
|
19
|
+
*
|
|
20
|
+
* Network calls triggered by store methods (getDispenseUnits, etc.) are handled by MSW,
|
|
21
|
+
* but the initial auth/loading state must be set here.
|
|
22
|
+
*/
|
|
23
|
+
export declare function createTestClientStore(client: PhotonClient): {
|
|
24
|
+
sdk: PhotonClient;
|
|
25
|
+
getSDK: () => PhotonClient;
|
|
26
|
+
autoLogin: boolean;
|
|
27
|
+
authentication: {
|
|
28
|
+
state: {
|
|
29
|
+
isAuthenticated: boolean;
|
|
30
|
+
isLoading: boolean;
|
|
31
|
+
isInOrg: boolean;
|
|
32
|
+
permissions: string[];
|
|
33
|
+
error: undefined;
|
|
34
|
+
};
|
|
35
|
+
login: import("vitest").Mock<(...args: any[]) => any>;
|
|
36
|
+
logout: import("vitest").Mock<(...args: any[]) => any>;
|
|
37
|
+
handleRedirect: import("vitest").Mock<(...args: any[]) => any>;
|
|
38
|
+
checkSession: import("vitest").Mock<(...args: any[]) => any>;
|
|
39
|
+
};
|
|
40
|
+
clinical: {
|
|
41
|
+
dispenseUnits: {
|
|
42
|
+
state: {
|
|
43
|
+
isLoading: boolean;
|
|
44
|
+
dispenseUnits: any[];
|
|
45
|
+
};
|
|
46
|
+
getDispenseUnits: import("vitest").Mock<(...args: any[]) => any>;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
};
|