@photonhealth/client 2.0.0-rc.1 → 2.0.0-rc.2
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/README.md +150 -5
- package/dist/analytics/lifecycleEvents.d.ts +29 -0
- package/dist/analytics/lifecycleEvents.d.ts.map +1 -0
- package/dist/analytics/lifecycleEvents.js +72 -0
- package/dist/analytics/lifecycleEvents.js.map +1 -0
- package/dist/api/client.d.ts +6 -1
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +47 -33
- package/dist/api/client.js.map +1 -1
- package/dist/api/index.d.ts +2 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +2 -0
- package/dist/api/index.js.map +1 -1
- package/dist/api/me.d.ts +37 -0
- package/dist/api/me.d.ts.map +1 -0
- package/dist/api/me.js +6 -0
- package/dist/api/me.js.map +1 -0
- package/dist/api/orders.d.ts +1047 -0
- package/dist/api/orders.d.ts.map +1 -0
- package/dist/api/orders.js +7 -0
- package/dist/api/orders.js.map +1 -0
- package/dist/api/patient.d.ts +5 -2
- package/dist/api/patient.d.ts.map +1 -1
- package/dist/api/patient.js +1 -1
- package/dist/api/patient.js.map +1 -1
- package/dist/api/prescription.d.ts +7 -1
- package/dist/api/prescription.d.ts.map +1 -1
- package/dist/api/prescription.js +10 -1
- package/dist/api/prescription.js.map +1 -1
- package/dist/gql/gql.d.ts +11 -3
- package/dist/gql/gql.d.ts.map +1 -1
- package/dist/gql/gql.js +5 -3
- package/dist/gql/gql.js.map +1 -1
- package/dist/gql/graphql.d.ts +10507 -1563
- package/dist/gql/graphql.d.ts.map +1 -1
- package/dist/gql/graphql.js +2984 -435
- package/dist/gql/graphql.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/meta/version.d.ts +2 -0
- package/dist/meta/version.d.ts.map +1 -0
- package/dist/meta/version.js +2 -0
- package/dist/meta/version.js.map +1 -0
- package/dist/photon/analytics.d.ts +39 -0
- package/dist/photon/analytics.d.ts.map +1 -0
- package/dist/photon/analytics.js +91 -0
- package/dist/photon/analytics.js.map +1 -0
- package/dist/photon/auth.d.ts +9 -5
- package/dist/photon/auth.d.ts.map +1 -1
- package/dist/photon/auth.js +2 -6
- package/dist/photon/auth.js.map +1 -1
- package/dist/photon/choices.d.ts +1 -1
- package/dist/photon/choices.js +2 -2
- package/dist/photon/choices.js.map +1 -1
- package/dist/photon/environments.d.ts +2 -1
- package/dist/photon/environments.d.ts.map +1 -1
- package/dist/photon/environments.js +2 -1
- package/dist/photon/environments.js.map +1 -1
- package/dist/photon/index.d.ts +6 -3
- package/dist/photon/index.d.ts.map +1 -1
- package/dist/photon/index.js +2 -1
- package/dist/photon/index.js.map +1 -1
- package/dist/photon/machine.d.ts +28 -0
- package/dist/photon/machine.d.ts.map +1 -0
- package/dist/photon/machine.js +53 -0
- package/dist/photon/machine.js.map +1 -0
- package/dist/photon/map.d.ts +6 -2
- package/dist/photon/map.d.ts.map +1 -1
- package/dist/photon/map.js +133 -33
- package/dist/photon/map.js.map +1 -1
- package/dist/photon/order.d.ts +21 -1
- package/dist/photon/order.d.ts.map +1 -1
- package/dist/photon/order.js +79 -12
- package/dist/photon/order.js.map +1 -1
- package/dist/photon/orders.d.ts +5 -0
- package/dist/photon/orders.d.ts.map +1 -0
- package/dist/photon/orders.js +39 -0
- package/dist/photon/orders.js.map +1 -0
- package/dist/photon/patient.d.ts +8 -6
- package/dist/photon/patient.d.ts.map +1 -1
- package/dist/photon/patient.js +61 -30
- package/dist/photon/patient.js.map +1 -1
- package/dist/photon/photon.d.ts +39 -1
- package/dist/photon/photon.d.ts.map +1 -1
- package/dist/photon/photon.js +85 -5
- package/dist/photon/photon.js.map +1 -1
- package/dist/photon/prescription.d.ts +17 -4
- package/dist/photon/prescription.d.ts.map +1 -1
- package/dist/photon/prescription.js +48 -11
- package/dist/photon/prescription.js.map +1 -1
- package/dist/photon/session.d.ts +15 -10
- package/dist/photon/session.d.ts.map +1 -1
- package/dist/photon/session.js +5 -3
- package/dist/photon/session.js.map +1 -1
- package/dist/photon/types.d.ts +278 -46
- package/dist/photon/types.d.ts.map +1 -1
- package/dist/test-utils/msw.d.ts +2 -2
- package/dist/test-utils/msw.d.ts.map +1 -1
- package/dist/test-utils/msw.js +5 -5
- package/dist/test-utils/msw.js.map +1 -1
- package/dist/testing/{scriptedClient.d.ts → fakeNetworkApiClient.d.ts} +5 -4
- package/dist/testing/fakeNetworkApiClient.d.ts.map +1 -0
- package/dist/testing/{scriptedClient.js → fakeNetworkApiClient.js} +8 -4
- package/dist/testing/fakeNetworkApiClient.js.map +1 -0
- package/dist/testing/fixtures.d.ts +1047 -0
- package/dist/testing/fixtures.d.ts.map +1 -1
- package/dist/testing/fixtures.js +47 -13
- package/dist/testing/fixtures.js.map +1 -1
- package/dist/testing.d.ts +4 -4
- package/dist/testing.d.ts.map +1 -1
- package/dist/testing.js +4 -4
- package/dist/testing.js.map +1 -1
- package/package.json +2 -2
- package/src/analytics/lifecycleEvents.test.ts +417 -0
- package/src/analytics/lifecycleEvents.ts +155 -0
- package/src/api/client.ts +71 -46
- package/src/api/index.ts +2 -0
- package/src/api/me.ts +7 -0
- package/src/api/orders.ts +8 -0
- package/src/api/patient.ts +11 -2
- package/src/api/prescription.ts +18 -0
- package/src/gql/gql.ts +21 -9
- package/src/gql/graphql.ts +4280 -597
- package/src/index.ts +1 -1
- package/src/meta/version.test.ts +10 -0
- package/src/meta/version.ts +1 -0
- package/src/operations/fragments.graphql +166 -20
- package/src/operations/me.graphql +38 -0
- package/src/operations/orders.graphql +35 -0
- package/src/operations/patient.graphql +29 -3
- package/src/operations/prescription.graphql +20 -0
- package/src/photon/analytics.ts +129 -0
- package/src/photon/auth.ts +9 -10
- package/src/photon/choices.ts +2 -2
- package/src/photon/environments.ts +3 -1
- package/src/photon/index.ts +16 -2
- package/src/photon/machine.ts +90 -0
- package/src/photon/map.ts +151 -35
- package/src/photon/order.test.ts +142 -0
- package/src/photon/order.ts +92 -12
- package/src/photon/orders.ts +42 -0
- package/src/photon/patient.ts +73 -33
- package/src/photon/photon.ts +139 -6
- package/src/photon/prescription.ts +71 -12
- package/src/photon/session.ts +18 -9
- package/src/photon/types.ts +280 -26
- package/src/test-utils/msw.ts +16 -5
- package/src/testing/{scriptedClient.ts → fakeNetworkApiClient.ts} +8 -4
- package/src/testing/fixtures.ts +55 -13
- package/src/testing.ts +6 -3
- package/dist/testing/scriptedClient.d.ts.map +0 -1
- package/dist/testing/scriptedClient.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orders.d.ts","sourceRoot":"","sources":["../../src/api/orders.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EAAkB,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAG9E,6FAA6F;AAC7F,wBAAsB,MAAM,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,kBAAkB,CAAC,oBAAoB,CAAC;;;;;;;;;;;;;;;;0BAG2r9R,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAD9x9R"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { OrdersDocument } from "../gql/graphql.js";
|
|
2
|
+
import { assertNotOperationError } from "./results.js";
|
|
3
|
+
/** The read-only Orders query. It never routes an order, including a lone pharmacy match. */
|
|
4
|
+
export async function orders(client, input) {
|
|
5
|
+
return assertNotOperationError((await client.execute(OrdersDocument, input)).orders);
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=orders.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orders.js","sourceRoot":"","sources":["../../src/api/orders.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAA6B,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAEvD,6FAA6F;AAC7F,MAAM,CAAC,KAAK,UAAU,MAAM,CAAC,MAAqB,EAAE,KAA+C;IACjG,OAAO,uBAAuB,CAAC,CAAC,MAAM,MAAM,CAAC,OAAO,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;AACvF,CAAC"}
|
package/dist/api/patient.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ChangeSet } from "./changes/index.ts";
|
|
2
2
|
import type { NetworkClient } from "./client.ts";
|
|
3
|
-
import { type PatientClinicalInput, type PatientDemographicInput, type PatientFieldsFragment, type PatientResultFieldsFragment } from "../gql/graphql.ts";
|
|
3
|
+
import { type BenefitsPatch, type PatientClinicalInput, type PatientContactInput, type PatientDemographicInput, type PatientFieldsFragment, type PatientResultFieldsFragment, type PharmacyReferenceInput } from "../gql/graphql.ts";
|
|
4
4
|
import { type Outcome } from "./results.ts";
|
|
5
5
|
export type Patient = PatientFieldsFragment;
|
|
6
6
|
export type PatientCandidate = Extract<PatientResultFieldsFragment, {
|
|
@@ -17,7 +17,10 @@ export type PatientOutcome = Outcome<{
|
|
|
17
17
|
export declare function getPatient(client: NetworkClient, id: string): Promise<PatientOutcome>;
|
|
18
18
|
type PatientFields = {
|
|
19
19
|
demographic?: PatientDemographicInput;
|
|
20
|
+
contact?: PatientContactInput;
|
|
20
21
|
clinical?: PatientClinicalInput;
|
|
22
|
+
benefits?: BenefitsPatch;
|
|
23
|
+
preferredPharmacy?: PharmacyReferenceInput;
|
|
21
24
|
};
|
|
22
25
|
/**
|
|
23
26
|
* SyncPatient — whatever's known, an id or not: the server finds the patient, lists candidates (the prescriber
|
|
@@ -27,7 +30,7 @@ type PatientFields = {
|
|
|
27
30
|
export declare function syncPatient(client: NetworkClient, input: PatientFields & {
|
|
28
31
|
id?: string;
|
|
29
32
|
}, signal?: AbortSignal): Promise<PatientOutcome>;
|
|
30
|
-
/** UpdatePatient — change that one patient: demographics and/or clinical lists. NKDA: `clinical: { allergies: { none: true } }`. */
|
|
33
|
+
/** UpdatePatient — change that one patient: demographics, contact, benefits, preferred pharmacy and/or clinical lists. NKDA: `clinical: { allergies: { none: true } }`. */
|
|
31
34
|
export declare function updatePatient(client: NetworkClient, id: string, patch: PatientFields): Promise<PatientOutcome>;
|
|
32
35
|
export {};
|
|
33
36
|
//# sourceMappingURL=patient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"patient.d.ts","sourceRoot":"","sources":["../../src/api/patient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAIL,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,2BAA2B,
|
|
1
|
+
{"version":3,"file":"patient.d.ts","sourceRoot":"","sources":["../../src/api/patient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAIL,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,2BAA2B,EAChC,KAAK,sBAAsB,EAC5B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAA6C,KAAK,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvF,MAAM,MAAM,OAAO,GAAG,qBAAqB,CAAC;AAC5C,MAAM,MAAM,gBAAgB,GAAG,OAAO,CACpC,2BAA2B,EAC3B;IAAE,UAAU,EAAE,uBAAuB,CAAA;CAAE,CACxC,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAExB,MAAM,MAAM,cAAc,GAAG,OAAO,CAClC;IAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAAC,OAAO,EAAE,SAAS,CAAA;CAAE,EAC/C;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,gBAAgB,EAAE,CAAA;CAAE,CACnD,CAAC;AAgBF,yCAAyC;AACzC,wBAAsB,UAAU,CAAC,MAAM,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,2BAEjE;AAED,KAAK,aAAa,GAAG;IACnB,WAAW,CAAC,EAAE,uBAAuB,CAAC;IACtC,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B,QAAQ,CAAC,EAAE,oBAAoB,CAAC;IAChC,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,iBAAiB,CAAC,EAAE,sBAAsB,CAAC;CAC5C,CAAC;AAEF;;;;GAIG;AACH,wBAAsB,WAAW,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,GAAG;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,MAAM,CAAC,EAAE,WAAW,2BAEpH;AAED,2KAA2K;AAC3K,wBAAsB,aAAa,CAAC,MAAM,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,2BAE1F"}
|
package/dist/api/patient.js
CHANGED
|
@@ -26,7 +26,7 @@ export async function getPatient(client, id) {
|
|
|
26
26
|
export async function syncPatient(client, input, signal) {
|
|
27
27
|
return settle((await client.execute(SyncPatientDocument, input, { signal })).patient, input);
|
|
28
28
|
}
|
|
29
|
-
/** UpdatePatient — change that one patient: demographics and/or clinical lists. NKDA: `clinical: { allergies: { none: true } }`. */
|
|
29
|
+
/** UpdatePatient — change that one patient: demographics, contact, benefits, preferred pharmacy and/or clinical lists. NKDA: `clinical: { allergies: { none: true } }`. */
|
|
30
30
|
export async function updatePatient(client, id, patch) {
|
|
31
31
|
return settle((await client.execute(UpdatePatientDocument, { id, ...patch })).patient, patch);
|
|
32
32
|
}
|
package/dist/api/patient.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"patient.js","sourceRoot":"","sources":["../../src/api/patient.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,
|
|
1
|
+
{"version":3,"file":"patient.js","sourceRoot":"","sources":["../../src/api/patient.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,GAQtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAgB,MAAM,cAAc,CAAC;AAavF,SAAS,MAAM,CAAC,MAAmC,EAAE,IAAa;IAChE,MAAM,CAAC,GAAG,uBAAuB,CAAC,MAAM,CAAC,CAAC;IAC1C,IAAI,CAAC,CAAC,UAAU,KAAK,uBAAuB,EAAE,CAAC;QAC7C,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC,UAAU,EAAE,CAAC;IAC3E,CAAC;IACD,MAAM,MAAM,GAAG,CAAC,CAAC,OAAO,CAAC;IACzB,IAAI,MAAM,EAAE,UAAU,KAAK,gBAAgB;QAAE,MAAM,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAChF,OAAO;QACL,IAAI,EAAE,IAAI;QACV,OAAO,EAAE,MAAM,IAAI,IAAI;QACvB,OAAO,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,IAAI,EAAE;KACtC,CAAC;AACJ,CAAC;AAED,yCAAyC;AACzC,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,MAAqB,EAAE,EAAU;IAChE,OAAO,MAAM,CAAC,CAAC,MAAM,MAAM,CAAC,OAAO,CAAC,kBAAkB,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;AACpF,CAAC;AAUD;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,MAAqB,EAAE,KAAsC,EAAE,MAAoB;IACnH,OAAO,MAAM,CAAC,CAAC,MAAM,MAAM,CAAC,OAAO,CAAC,mBAAmB,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AAC/F,CAAC;AAED,2KAA2K;AAC3K,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,MAAqB,EAAE,EAAU,EAAE,KAAoB;IACzF,OAAO,MAAM,CAAC,CAAC,MAAM,MAAM,CAAC,OAAO,CAAC,qBAAqB,EAAE,EAAE,EAAE,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AAChG,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ChangeSet } from "./changes/index.ts";
|
|
2
2
|
import type { NetworkClient, OperationVariables } from "./client.ts";
|
|
3
|
-
import { type SyncPrescriptionMutationVariables, type UpdatePrescriptionMutationVariables, type PrescriptionFieldsFragment, type PrescriptionResultFieldsFragment } from "../gql/graphql.ts";
|
|
3
|
+
import { type SyncPrescriptionMutationVariables, type UpdatePrescriptionMutationVariables, type PrescriptionFieldsFragment, type PrescriptionResultFieldsFragment, type PrescriptionTemplateFieldsFragment } from "../gql/graphql.ts";
|
|
4
4
|
import { type Outcome } from "./results.ts";
|
|
5
5
|
export type Prescription = PrescriptionFieldsFragment;
|
|
6
6
|
export type PrescriptionCandidate = Extract<PrescriptionResultFieldsFragment, {
|
|
@@ -19,6 +19,12 @@ type PrescriptionSync = OperationVariables<SyncPrescriptionMutationVariables>;
|
|
|
19
19
|
type PrescriptionPatch = Omit<OperationVariables<UpdatePrescriptionMutationVariables>, "id">;
|
|
20
20
|
/** GetPrescription — read a known prescription, draft or signed. */
|
|
21
21
|
export declare function getPrescription(client: NetworkClient, id: string): Promise<PrescriptionOutcome>;
|
|
22
|
+
/**
|
|
23
|
+
* GetPrescriptionTemplates — the templates for a prescription's drug: the caller's catalog templates, then recommended
|
|
24
|
+
* ones (sigs worded for its patient, and units). null when network-api has none to offer (not a draft, or the catalog
|
|
25
|
+
* lookup failed).
|
|
26
|
+
*/
|
|
27
|
+
export declare function getPrescriptionTemplates(client: NetworkClient, id: string, signal?: AbortSignal): Promise<readonly PrescriptionTemplateFieldsFragment[] | null>;
|
|
22
28
|
/**
|
|
23
29
|
* SyncPrescription — whatever's known. Without a patient it can only look the drug up (its choices, or why
|
|
24
30
|
* nothing matched); with one it continues their in-progress draft or starts one. Always send a treatment or
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prescription.d.ts","sourceRoot":"","sources":["../../src/api/prescription.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,
|
|
1
|
+
{"version":3,"file":"prescription.d.ts","sourceRoot":"","sources":["../../src/api/prescription.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EAKL,KAAK,iCAAiC,EACtC,KAAK,mCAAmC,EACxC,KAAK,0BAA0B,EAC/B,KAAK,gCAAgC,EACrC,KAAK,kCAAkC,EACxC,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAA2B,KAAK,OAAO,EAAE,MAAM,cAAc,CAAC;AAErE,MAAM,MAAM,YAAY,GAAG,0BAA0B,CAAC;AACtD,MAAM,MAAM,qBAAqB,GAAG,OAAO,CACzC,gCAAgC,EAChC;IAAE,UAAU,EAAE,4BAA4B,CAAA;CAAE,CAC7C,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;AAExB,MAAM,MAAM,mBAAmB,GAAG,OAAO,CACvC;IAAE,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IAAC,OAAO,EAAE,SAAS,CAAA;CAAE,EACzD;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,qBAAqB,EAAE,CAAA;CAAE,CACxD,CAAC;AAcF,+EAA+E;AAC/E,KAAK,gBAAgB,GAAG,kBAAkB,CAAC,iCAAiC,CAAC,CAAC;AAC9E,gFAAgF;AAChF,KAAK,iBAAiB,GAAG,IAAI,CAAC,kBAAkB,CAAC,mCAAmC,CAAC,EAAE,IAAI,CAAC,CAAC;AAE7F,oEAAoE;AACpE,wBAAsB,eAAe,CAAC,MAAM,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,gCAEtE;AAED;;;;GAIG;AACH,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,aAAa,EACrB,EAAE,EAAE,MAAM,EACV,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,SAAS,kCAAkC,EAAE,GAAG,IAAI,CAAC,CAK/D;AAED;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,CAAC,EAAE,WAAW,gCAW1G;AAED,4GAA4G;AAC5G,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,iBAAiB,gCAEnG"}
|
package/dist/api/prescription.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GetPrescriptionDocument, SyncPrescriptionDocument, UpdatePrescriptionDocument, } from "../gql/graphql.js";
|
|
1
|
+
import { GetPrescriptionDocument, GetPrescriptionTemplatesDocument, SyncPrescriptionDocument, UpdatePrescriptionDocument, } from "../gql/graphql.js";
|
|
2
2
|
import { assertNotOperationError } from "./results.js";
|
|
3
3
|
function settle(result, sent) {
|
|
4
4
|
const r = assertNotOperationError(result);
|
|
@@ -15,6 +15,15 @@ function settle(result, sent) {
|
|
|
15
15
|
export async function getPrescription(client, id) {
|
|
16
16
|
return settle((await client.execute(GetPrescriptionDocument, { id })).prescription, { id });
|
|
17
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* GetPrescriptionTemplates — the templates for a prescription's drug: the caller's catalog templates, then recommended
|
|
20
|
+
* ones (sigs worded for its patient, and units). null when network-api has none to offer (not a draft, or the catalog
|
|
21
|
+
* lookup failed).
|
|
22
|
+
*/
|
|
23
|
+
export async function getPrescriptionTemplates(client, id, signal) {
|
|
24
|
+
const result = assertNotOperationError((await client.execute(GetPrescriptionTemplatesDocument, { id }, { signal })).prescription);
|
|
25
|
+
return result.__typename === "PrescriptionPayload" ? (result.prescription?.treatment.templates ?? null) : null;
|
|
26
|
+
}
|
|
18
27
|
/**
|
|
19
28
|
* SyncPrescription — whatever's known. Without a patient it can only look the drug up (its choices, or why
|
|
20
29
|
* nothing matched); with one it continues their in-progress draft or starts one. Always send a treatment or
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prescription.js","sourceRoot":"","sources":["../../src/api/prescription.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,0BAA0B,
|
|
1
|
+
{"version":3,"file":"prescription.js","sourceRoot":"","sources":["../../src/api/prescription.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,uBAAuB,EACvB,gCAAgC,EAChC,wBAAwB,EACxB,0BAA0B,GAM3B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,uBAAuB,EAAgB,MAAM,cAAc,CAAC;AAarE,SAAS,MAAM,CAAC,MAAwC,EAAE,IAAa;IACrE,MAAM,CAAC,GAAG,uBAAuB,CAAC,MAAM,CAAC,CAAC;IAC1C,IAAI,CAAC,CAAC,UAAU,KAAK,4BAA4B,EAAE,CAAC;QAClD,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC,UAAU,EAAE,CAAC;IAC3E,CAAC;IACD,OAAO;QACL,IAAI,EAAE,IAAI;QACV,YAAY,EAAE,CAAC,CAAC,YAAY;QAC5B,OAAO,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,IAAI,EAAE;KACtC,CAAC;AACJ,CAAC;AAOD,oEAAoE;AACpE,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,MAAqB,EAAE,EAAU;IACrE,OAAO,MAAM,CAAC,CAAC,MAAM,MAAM,CAAC,OAAO,CAAC,uBAAuB,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;AAC9F,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAC5C,MAAqB,EACrB,EAAU,EACV,MAAoB;IAEpB,MAAM,MAAM,GAAG,uBAAuB,CACpC,CAAC,MAAM,MAAM,CAAC,OAAO,CAAC,gCAAgC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,YAAY,CAC1F,CAAC;IACF,OAAO,MAAM,CAAC,UAAU,KAAK,qBAAqB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,EAAE,SAAS,CAAC,SAAS,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACjH,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,MAAqB,EAAE,KAAuB,EAAE,MAAoB;IACzG,OAAO,MAAM,CACX,CACE,MAAM,MAAM,CAAC,OAAO,CAClB,wBAAwB,EACxB,EAAE,GAAG,KAAK,EAAE,UAAU,EAAE,KAAK,CAAC,UAAU,IAAI,SAAS,EAAE,EACvD,EAAE,MAAM,EAAE,CACX,CACF,CAAC,YAAY,EACd,KAAK,CACN,CAAC;AACJ,CAAC;AAED,4GAA4G;AAC5G,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,MAAqB,EAAE,EAAU,EAAE,KAAwB;IAClG,OAAO,MAAM,CAAC,CAAC,MAAM,MAAM,CAAC,OAAO,CAAC,0BAA0B,EAAE,EAAE,EAAE,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;AAC1G,CAAC"}
|
package/dist/gql/gql.d.ts
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
3
3
|
*/
|
|
4
|
-
export declare function graphql(source: "fragment TreatmentFields on Treatment {\n id\n name\n rxNormId\n ndc\n upc\n entityKind\n prescribableName\n brandName\n genericName\n form\n route\n strength\n medicationType\n schedule\n
|
|
4
|
+
export declare function graphql(source: "fragment TreatmentFields on Treatment {\n id\n name\n rxNormId\n ndc\n upc\n entityKind\n prescribableName\n brandName\n genericName\n form\n route\n strength\n medicationType\n schedule\n}\n\nfragment ChoiceFields on Choice {\n __typename\n displayName\n reason\n operation\n argument\n value\n matchReasons {\n type\n label\n confidence\n value {\n displayValue\n value\n unit\n }\n }\n entity {\n __typename\n ... on Treatment {\n ...TreatmentFields\n templates {\n ...PrescriptionTemplateFields\n }\n }\n ... on Pharmacy {\n ...PharmacyFields\n }\n }\n}\n\nfragment PharmacyOfferFields on PharmacyOffer {\n source\n prescriptionId\n priceType\n isPromoted\n attributeTags {\n kind\n label\n }\n price {\n amount\n retailAmount\n promotions {\n type\n baseAmount\n amountSaved\n }\n }\n deliveryEstimate {\n deliveryPromise\n deliveryPromiseRangeStart\n deliveryPromiseRangeEnd\n }\n redemptionState\n redemptionMethods {\n ...RedemptionMethodFields\n }\n}\n\nfragment RedemptionMethodFields on RedemptionMethod {\n __typename\n ... on PharmacyDiscountCard {\n id\n prescriptionId\n bin\n pcn\n group\n memberId\n externalUrl\n }\n}\n\nfragment ChangeFields on Change {\n key\n label\n status\n severity\n reason\n category\n operation\n options {\n ...ChoiceFields\n }\n before {\n ...ChoiceFields\n }\n after {\n ...ChoiceFields\n }\n}\n\nfragment ChangeSetFields on ChangeSet {\n changes {\n ...ChangeFields\n }\n}\n\nfragment OperationErrorFields on OperationError {\n __typename\n type\n code\n message\n requiredPermission\n service\n retryable\n}\n\nfragment PharmacyFields on Pharmacy {\n id\n name\n logo\n phone\n hours {\n openFrom\n openUntil\n dayOfWeek\n is24Hr\n timezone\n }\n isOpen\n nextEvents {\n open {\n ...PharmacyEventFields\n }\n close {\n ...PharmacyEventFields\n }\n }\n address {\n street1\n street2\n city\n state\n postalCode\n }\n latitude\n longitude\n fulfillmentType\n offers {\n ...PharmacyOfferFields\n }\n}\n\nfragment PharmacyEventFields on PharmacyEvent {\n __typename\n ... on PharmacyOpenEvent {\n type\n datetime\n }\n ... on PharmacyCloseEvent {\n type\n datetime\n }\n ... on PharmacyOpen24HrEvent {\n type\n }\n}\n\nfragment OrganizationFields on Organization {\n id\n name\n customer {\n __typename\n ... on Customer {\n id\n name\n }\n }\n settings {\n brandColor\n brandLogo\n priorAuthorizationExceptionMessage\n patientUx {\n enablePatientRerouting\n enableAutomatedOps\n }\n }\n}\n\nfragment PatientDemographicFields on PatientDemographic {\n name {\n first\n middle\n last\n }\n dateOfBirth\n sex\n gender\n}\n\nfragment PatientContactFields on PatientContact {\n email\n phone\n address {\n street1\n street2\n city\n state\n postalCode\n country\n }\n}\n\nfragment PatientFields on Patient {\n id\n demographic {\n ...PatientDemographicFields\n }\n contact {\n ...PatientContactFields\n }\n benefits {\n status\n entries {\n id\n bin\n pcn\n groupId\n memberId\n }\n }\n preferredPharmacy {\n ...PharmacyFields\n }\n clinical {\n allergies {\n status\n entries {\n id\n name\n rxNormId\n }\n }\n medications {\n status\n entries {\n id\n name\n rxNormId\n status\n }\n }\n diagnoses {\n status\n entries {\n id\n name\n icd10Code\n }\n }\n notes\n }\n}\n\nfragment PatientRecordFields on PatientRecordResult {\n __typename\n ... on Patient {\n ...PatientFields\n }\n ... on OperationError {\n ...OperationErrorFields\n }\n}\n\nfragment ScreeningAlertFields on ScreeningAlert {\n severity\n type\n description\n category\n involvedEntities {\n id\n name\n }\n options {\n ...ChoiceFields\n }\n}\n\nfragment PrescriptionFields on Prescription {\n id\n prescriber {\n id\n name {\n first\n middle\n last\n }\n }\n fulfillment {\n state\n pharmacyEstimatedReadyAt\n exceptions {\n id\n type\n message\n createdAt\n }\n }\n templateId\n patient {\n id\n }\n treatment {\n ...TreatmentFields\n }\n instructions\n dispense {\n quantity\n unit\n daysSupply\n refillsAllowed\n dispenseAsWritten\n }\n clinical {\n diagnoses {\n id\n name\n icd10Code\n }\n notes\n }\n screeningAlerts {\n ...ScreeningAlertFields\n }\n signing {\n state\n contentHash\n message\n signedAt\n }\n}\n\nfragment OrderFields on Order {\n id\n state\n offers {\n atPharmacy {\n ...PharmacyOfferFields\n }\n }\n organization {\n __typename\n ... on Organization {\n ...OrganizationFields\n }\n }\n patient {\n ...PatientRecordFields\n }\n prescriptions {\n ...PrescriptionFields\n }\n screeningAlerts {\n ...ScreeningAlertFields\n }\n pharmacy {\n ...PharmacyFields\n }\n fulfillment {\n state\n history {\n pharmacy {\n ...PharmacyFields\n }\n selector\n reason\n createdAt\n }\n routability {\n allowed\n reason\n }\n exceptions {\n id\n type\n message\n createdAt\n }\n }\n}\n\nfragment PrescriptionTemplateFields on PrescriptionTemplate {\n id\n source\n name\n instructions\n dispense {\n quantity\n unit\n daysSupply\n refillsAllowed\n dispenseAsWritten\n }\n}\n\nfragment PatientResultFields on PatientResult {\n __typename\n ... on PatientPayload {\n patient {\n ...PatientRecordFields\n }\n ...ChangeSetFields\n }\n ... on AmbiguousPatientMatch {\n reason\n candidates {\n id\n firstName\n lastName\n dateOfBirth\n }\n }\n ... on OperationError {\n ...OperationErrorFields\n }\n}\n\nfragment PrescriptionResultFields on PrescriptionResult {\n __typename\n ... on PrescriptionPayload {\n prescription {\n ...PrescriptionFields\n }\n ...ChangeSetFields\n }\n ... on AmbiguousPrescriptionMatch {\n reason\n candidates {\n id\n instructions\n dispense {\n quantity\n unit\n daysSupply\n refillsAllowed\n dispenseAsWritten\n }\n }\n }\n ... on OperationError {\n ...OperationErrorFields\n }\n}\n\nfragment OrderCandidateFields on OrderCandidate {\n id\n pharmacy {\n ...PharmacyFields\n }\n prescriptions {\n ...PrescriptionFields\n }\n}\n\nfragment OrderResultFields on OrderResult {\n __typename\n ... on OrderPayload {\n order {\n ...OrderFields\n }\n ...ChangeSetFields\n }\n ... on AmbiguousOrderMatch {\n reason\n candidates {\n ...OrderCandidateFields\n }\n }\n ... on OperationError {\n ...OperationErrorFields\n }\n}"): typeof import('./graphql.js').TreatmentFieldsFragmentDoc;
|
|
5
5
|
/**
|
|
6
6
|
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
7
7
|
*/
|
|
8
8
|
export declare function graphql(source: "query Ping {\n ping\n}"): typeof import('./graphql.js').PingDocument;
|
|
9
|
+
/**
|
|
10
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
11
|
+
*/
|
|
12
|
+
export declare function graphql(source: "query Me {\n me {\n __typename\n ... on User {\n id\n name {\n first\n last\n }\n organization {\n __typename\n ... on Organization {\n id\n name\n }\n }\n permissions\n }\n ... on Patient {\n id\n name {\n first\n last\n }\n }\n ... on Machine {\n organization {\n __typename\n ... on Organization {\n id\n name\n }\n }\n permissions\n }\n ...OperationErrorFields\n }\n}"): typeof import('./graphql.js').MeDocument;
|
|
9
13
|
/**
|
|
10
14
|
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
11
15
|
*/
|
|
@@ -13,9 +17,13 @@ export declare function graphql(source: "mutation GetOrder($id: ID!, $metadata:
|
|
|
13
17
|
/**
|
|
14
18
|
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
15
19
|
*/
|
|
16
|
-
export declare function graphql(source: "
|
|
20
|
+
export declare function graphql(source: "query Orders($filter: OrdersFilterInput, $limit: Int, $pharmacy: PharmacyReferenceInput, $page: PageInput, $includePharmacies: Boolean!) {\n orders(filter: $filter, limit: $limit) {\n __typename\n ... on OrdersPayload {\n orders {\n ...OrderFields\n routablePharmacies(pharmacy: $pharmacy, page: $page) @include(if: $includePharmacies) {\n options {\n ...ChoiceFields\n }\n totalCount\n nextOffset\n }\n }\n }\n ... on AmbiguousPatientMatch {\n reason\n candidates {\n id\n firstName\n lastName\n dateOfBirth\n }\n }\n ...OperationErrorFields\n }\n}"): typeof import('./graphql.js').OrdersDocument;
|
|
21
|
+
/**
|
|
22
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
23
|
+
*/
|
|
24
|
+
export declare function graphql(source: "mutation GetPatient($id: ID!, $metadata: RequestMetadata!) {\n patient(patient: {id: $id}, metadata: $metadata) {\n ...PatientResultFields\n }\n}\n\nmutation SyncPatient($id: ID, $demographic: PatientDemographicInput, $contact: PatientContactInput, $clinical: PatientClinicalInput, $benefits: BenefitsPatch, $preferredPharmacy: PharmacyReferenceInput, $metadata: RequestMetadata!) {\n patient(\n patient: {id: $id, demographic: $demographic, contact: $contact, clinical: $clinical, benefits: $benefits, preferredPharmacy: $preferredPharmacy}\n metadata: $metadata\n ) {\n ...PatientResultFields\n }\n}\n\nmutation UpdatePatient($id: ID!, $demographic: PatientDemographicInput, $contact: PatientContactInput, $clinical: PatientClinicalInput, $benefits: BenefitsPatch, $preferredPharmacy: PharmacyReferenceInput, $metadata: RequestMetadata!) {\n patient(\n patient: {id: $id, demographic: $demographic, contact: $contact, clinical: $clinical, benefits: $benefits, preferredPharmacy: $preferredPharmacy}\n metadata: $metadata\n ) {\n ...PatientResultFields\n }\n}"): typeof import('./graphql.js').GetPatientDocument;
|
|
17
25
|
/**
|
|
18
26
|
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
19
27
|
*/
|
|
20
|
-
export declare function graphql(source: "mutation GetPrescription($id: ID!, $metadata: RequestMetadata!) {\n prescription(prescription: {id: $id}, metadata: $metadata) {\n ...PrescriptionResultFields\n }\n}\n\nmutation SyncPrescription($id: ID, $externalId: String, $patient: PatientReferenceInput, $treatment: TreatmentReferenceInput, $templateId: ID, $instructions: String, $dispense: DispenseInput, $clinical: PrescriptionClinicalInput, $metadata: RequestMetadata!) {\n prescription(\n prescription: {id: $id, externalId: $externalId, patient: $patient, treatment: $treatment, templateId: $templateId, instructions: $instructions, dispense: $dispense, clinical: $clinical}\n metadata: $metadata\n ) {\n ...PrescriptionResultFields\n }\n}\n\nmutation UpdatePrescription($id: ID!, $externalId: String, $treatment: TreatmentReferenceInput, $instructions: String, $dispense: DispenseInput, $clinical: PrescriptionClinicalInput, $signing: PrescriptionSigningDetailsInput, $metadata: RequestMetadata!) {\n prescription(\n prescription: {id: $id, externalId: $externalId, treatment: $treatment, instructions: $instructions, dispense: $dispense, clinical: $clinical, signing: $signing}\n metadata: $metadata\n ) {\n ...PrescriptionResultFields\n }\n}"): typeof import('./graphql.js').GetPrescriptionDocument;
|
|
28
|
+
export declare function graphql(source: "mutation GetPrescription($id: ID!, $metadata: RequestMetadata!) {\n prescription(prescription: {id: $id}, metadata: $metadata) {\n ...PrescriptionResultFields\n }\n}\n\nmutation GetPrescriptionTemplates($id: ID!, $metadata: RequestMetadata!) {\n prescription(prescription: {id: $id}, metadata: $metadata) {\n __typename\n ... on PrescriptionPayload {\n prescription {\n treatment {\n templates {\n ...PrescriptionTemplateFields\n }\n }\n }\n }\n ... on OperationError {\n ...OperationErrorFields\n }\n }\n}\n\nmutation SyncPrescription($id: ID, $externalId: String, $patient: PatientReferenceInput, $treatment: TreatmentReferenceInput, $templateId: ID, $instructions: String, $dispense: DispenseInput, $clinical: PrescriptionClinicalInput, $metadata: RequestMetadata!) {\n prescription(\n prescription: {id: $id, externalId: $externalId, patient: $patient, treatment: $treatment, templateId: $templateId, instructions: $instructions, dispense: $dispense, clinical: $clinical}\n metadata: $metadata\n ) {\n ...PrescriptionResultFields\n }\n}\n\nmutation UpdatePrescription($id: ID!, $externalId: String, $treatment: TreatmentReferenceInput, $instructions: String, $dispense: DispenseInput, $clinical: PrescriptionClinicalInput, $signing: PrescriptionSigningDetailsInput, $metadata: RequestMetadata!) {\n prescription(\n prescription: {id: $id, externalId: $externalId, treatment: $treatment, instructions: $instructions, dispense: $dispense, clinical: $clinical, signing: $signing}\n metadata: $metadata\n ) {\n ...PrescriptionResultFields\n }\n}"): typeof import('./graphql.js').GetPrescriptionDocument;
|
|
21
29
|
//# sourceMappingURL=gql.d.ts.map
|
package/dist/gql/gql.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gql.d.ts","sourceRoot":"","sources":["../../src/gql/gql.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gql.d.ts","sourceRoot":"","sources":["../../src/gql/gql.ts"],"names":[],"mappings":"AAmCA;;GAEG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,y+NAAy+N,GAAG,cAAc,cAAc,EAAE,0BAA0B,CAAC;AACrkO;;GAEG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,yBAAyB,GAAG,cAAc,cAAc,EAAE,YAAY,CAAC;AACvG;;GAEG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,qjBAAqjB,GAAG,cAAc,cAAc,EAAE,UAAU,CAAC;AACjoB;;GAEG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,kyBAAkyB,GAAG,cAAc,cAAc,EAAE,gBAAgB,CAAC;AACp3B;;GAEG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,orBAAorB,GAAG,cAAc,cAAc,EAAE,cAAc,CAAC;AACpwB;;GAEG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,mkCAAmkC,GAAG,cAAc,cAAc,EAAE,kBAAkB,CAAC;AACvpC;;GAEG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,mnDAAmnD,GAAG,cAAc,cAAc,EAAE,uBAAuB,CAAC"}
|
package/dist/gql/gql.js
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import * as types from './graphql.js';
|
|
3
3
|
const documents = {
|
|
4
|
-
"fragment TreatmentFields on Treatment {\n id\n name\n rxNormId\n ndc\n upc\n entityKind\n prescribableName\n brandName\n genericName\n form\n route\n strength\n medicationType\n schedule\n
|
|
4
|
+
"fragment TreatmentFields on Treatment {\n id\n name\n rxNormId\n ndc\n upc\n entityKind\n prescribableName\n brandName\n genericName\n form\n route\n strength\n medicationType\n schedule\n}\n\nfragment ChoiceFields on Choice {\n __typename\n displayName\n reason\n operation\n argument\n value\n matchReasons {\n type\n label\n confidence\n value {\n displayValue\n value\n unit\n }\n }\n entity {\n __typename\n ... on Treatment {\n ...TreatmentFields\n templates {\n ...PrescriptionTemplateFields\n }\n }\n ... on Pharmacy {\n ...PharmacyFields\n }\n }\n}\n\nfragment PharmacyOfferFields on PharmacyOffer {\n source\n prescriptionId\n priceType\n isPromoted\n attributeTags {\n kind\n label\n }\n price {\n amount\n retailAmount\n promotions {\n type\n baseAmount\n amountSaved\n }\n }\n deliveryEstimate {\n deliveryPromise\n deliveryPromiseRangeStart\n deliveryPromiseRangeEnd\n }\n redemptionState\n redemptionMethods {\n ...RedemptionMethodFields\n }\n}\n\nfragment RedemptionMethodFields on RedemptionMethod {\n __typename\n ... on PharmacyDiscountCard {\n id\n prescriptionId\n bin\n pcn\n group\n memberId\n externalUrl\n }\n}\n\nfragment ChangeFields on Change {\n key\n label\n status\n severity\n reason\n category\n operation\n options {\n ...ChoiceFields\n }\n before {\n ...ChoiceFields\n }\n after {\n ...ChoiceFields\n }\n}\n\nfragment ChangeSetFields on ChangeSet {\n changes {\n ...ChangeFields\n }\n}\n\nfragment OperationErrorFields on OperationError {\n __typename\n type\n code\n message\n requiredPermission\n service\n retryable\n}\n\nfragment PharmacyFields on Pharmacy {\n id\n name\n logo\n phone\n hours {\n openFrom\n openUntil\n dayOfWeek\n is24Hr\n timezone\n }\n isOpen\n nextEvents {\n open {\n ...PharmacyEventFields\n }\n close {\n ...PharmacyEventFields\n }\n }\n address {\n street1\n street2\n city\n state\n postalCode\n }\n latitude\n longitude\n fulfillmentType\n offers {\n ...PharmacyOfferFields\n }\n}\n\nfragment PharmacyEventFields on PharmacyEvent {\n __typename\n ... on PharmacyOpenEvent {\n type\n datetime\n }\n ... on PharmacyCloseEvent {\n type\n datetime\n }\n ... on PharmacyOpen24HrEvent {\n type\n }\n}\n\nfragment OrganizationFields on Organization {\n id\n name\n customer {\n __typename\n ... on Customer {\n id\n name\n }\n }\n settings {\n brandColor\n brandLogo\n priorAuthorizationExceptionMessage\n patientUx {\n enablePatientRerouting\n enableAutomatedOps\n }\n }\n}\n\nfragment PatientDemographicFields on PatientDemographic {\n name {\n first\n middle\n last\n }\n dateOfBirth\n sex\n gender\n}\n\nfragment PatientContactFields on PatientContact {\n email\n phone\n address {\n street1\n street2\n city\n state\n postalCode\n country\n }\n}\n\nfragment PatientFields on Patient {\n id\n demographic {\n ...PatientDemographicFields\n }\n contact {\n ...PatientContactFields\n }\n benefits {\n status\n entries {\n id\n bin\n pcn\n groupId\n memberId\n }\n }\n preferredPharmacy {\n ...PharmacyFields\n }\n clinical {\n allergies {\n status\n entries {\n id\n name\n rxNormId\n }\n }\n medications {\n status\n entries {\n id\n name\n rxNormId\n status\n }\n }\n diagnoses {\n status\n entries {\n id\n name\n icd10Code\n }\n }\n notes\n }\n}\n\nfragment PatientRecordFields on PatientRecordResult {\n __typename\n ... on Patient {\n ...PatientFields\n }\n ... on OperationError {\n ...OperationErrorFields\n }\n}\n\nfragment ScreeningAlertFields on ScreeningAlert {\n severity\n type\n description\n category\n involvedEntities {\n id\n name\n }\n options {\n ...ChoiceFields\n }\n}\n\nfragment PrescriptionFields on Prescription {\n id\n prescriber {\n id\n name {\n first\n middle\n last\n }\n }\n fulfillment {\n state\n pharmacyEstimatedReadyAt\n exceptions {\n id\n type\n message\n createdAt\n }\n }\n templateId\n patient {\n id\n }\n treatment {\n ...TreatmentFields\n }\n instructions\n dispense {\n quantity\n unit\n daysSupply\n refillsAllowed\n dispenseAsWritten\n }\n clinical {\n diagnoses {\n id\n name\n icd10Code\n }\n notes\n }\n screeningAlerts {\n ...ScreeningAlertFields\n }\n signing {\n state\n contentHash\n message\n signedAt\n }\n}\n\nfragment OrderFields on Order {\n id\n state\n offers {\n atPharmacy {\n ...PharmacyOfferFields\n }\n }\n organization {\n __typename\n ... on Organization {\n ...OrganizationFields\n }\n }\n patient {\n ...PatientRecordFields\n }\n prescriptions {\n ...PrescriptionFields\n }\n screeningAlerts {\n ...ScreeningAlertFields\n }\n pharmacy {\n ...PharmacyFields\n }\n fulfillment {\n state\n history {\n pharmacy {\n ...PharmacyFields\n }\n selector\n reason\n createdAt\n }\n routability {\n allowed\n reason\n }\n exceptions {\n id\n type\n message\n createdAt\n }\n }\n}\n\nfragment PrescriptionTemplateFields on PrescriptionTemplate {\n id\n source\n name\n instructions\n dispense {\n quantity\n unit\n daysSupply\n refillsAllowed\n dispenseAsWritten\n }\n}\n\nfragment PatientResultFields on PatientResult {\n __typename\n ... on PatientPayload {\n patient {\n ...PatientRecordFields\n }\n ...ChangeSetFields\n }\n ... on AmbiguousPatientMatch {\n reason\n candidates {\n id\n firstName\n lastName\n dateOfBirth\n }\n }\n ... on OperationError {\n ...OperationErrorFields\n }\n}\n\nfragment PrescriptionResultFields on PrescriptionResult {\n __typename\n ... on PrescriptionPayload {\n prescription {\n ...PrescriptionFields\n }\n ...ChangeSetFields\n }\n ... on AmbiguousPrescriptionMatch {\n reason\n candidates {\n id\n instructions\n dispense {\n quantity\n unit\n daysSupply\n refillsAllowed\n dispenseAsWritten\n }\n }\n }\n ... on OperationError {\n ...OperationErrorFields\n }\n}\n\nfragment OrderCandidateFields on OrderCandidate {\n id\n pharmacy {\n ...PharmacyFields\n }\n prescriptions {\n ...PrescriptionFields\n }\n}\n\nfragment OrderResultFields on OrderResult {\n __typename\n ... on OrderPayload {\n order {\n ...OrderFields\n }\n ...ChangeSetFields\n }\n ... on AmbiguousOrderMatch {\n reason\n candidates {\n ...OrderCandidateFields\n }\n }\n ... on OperationError {\n ...OperationErrorFields\n }\n}": types.TreatmentFieldsFragmentDoc,
|
|
5
5
|
"query Ping {\n ping\n}": types.PingDocument,
|
|
6
|
+
"query Me {\n me {\n __typename\n ... on User {\n id\n name {\n first\n last\n }\n organization {\n __typename\n ... on Organization {\n id\n name\n }\n }\n permissions\n }\n ... on Patient {\n id\n name {\n first\n last\n }\n }\n ... on Machine {\n organization {\n __typename\n ... on Organization {\n id\n name\n }\n }\n permissions\n }\n ...OperationErrorFields\n }\n}": types.MeDocument,
|
|
6
7
|
"mutation GetOrder($id: ID!, $metadata: RequestMetadata!) {\n order(order: {id: $id}, metadata: $metadata) {\n ...OrderResultFields\n }\n}\n\nmutation SyncOrder($id: ID, $patient: PatientReferenceInput, $prescriptions: OrderPrescriptionsPatch, $pharmacy: OrderPharmacyInput, $metadata: RequestMetadata!) {\n order(\n order: {id: $id, patient: $patient, prescriptions: $prescriptions, pharmacy: $pharmacy}\n metadata: $metadata\n ) {\n ...OrderResultFields\n }\n}\n\nmutation UpdateOrder($id: ID!, $prescriptions: OrderPrescriptionsPatch, $state: OrderState, $pharmacy: OrderPharmacyInput, $metadata: RequestMetadata!) {\n order(\n order: {id: $id, prescriptions: $prescriptions, state: $state, pharmacy: $pharmacy}\n metadata: $metadata\n ) {\n ...OrderResultFields\n }\n}": types.GetOrderDocument,
|
|
7
|
-
"
|
|
8
|
-
"mutation
|
|
8
|
+
"query Orders($filter: OrdersFilterInput, $limit: Int, $pharmacy: PharmacyReferenceInput, $page: PageInput, $includePharmacies: Boolean!) {\n orders(filter: $filter, limit: $limit) {\n __typename\n ... on OrdersPayload {\n orders {\n ...OrderFields\n routablePharmacies(pharmacy: $pharmacy, page: $page) @include(if: $includePharmacies) {\n options {\n ...ChoiceFields\n }\n totalCount\n nextOffset\n }\n }\n }\n ... on AmbiguousPatientMatch {\n reason\n candidates {\n id\n firstName\n lastName\n dateOfBirth\n }\n }\n ...OperationErrorFields\n }\n}": types.OrdersDocument,
|
|
9
|
+
"mutation GetPatient($id: ID!, $metadata: RequestMetadata!) {\n patient(patient: {id: $id}, metadata: $metadata) {\n ...PatientResultFields\n }\n}\n\nmutation SyncPatient($id: ID, $demographic: PatientDemographicInput, $contact: PatientContactInput, $clinical: PatientClinicalInput, $benefits: BenefitsPatch, $preferredPharmacy: PharmacyReferenceInput, $metadata: RequestMetadata!) {\n patient(\n patient: {id: $id, demographic: $demographic, contact: $contact, clinical: $clinical, benefits: $benefits, preferredPharmacy: $preferredPharmacy}\n metadata: $metadata\n ) {\n ...PatientResultFields\n }\n}\n\nmutation UpdatePatient($id: ID!, $demographic: PatientDemographicInput, $contact: PatientContactInput, $clinical: PatientClinicalInput, $benefits: BenefitsPatch, $preferredPharmacy: PharmacyReferenceInput, $metadata: RequestMetadata!) {\n patient(\n patient: {id: $id, demographic: $demographic, contact: $contact, clinical: $clinical, benefits: $benefits, preferredPharmacy: $preferredPharmacy}\n metadata: $metadata\n ) {\n ...PatientResultFields\n }\n}": types.GetPatientDocument,
|
|
10
|
+
"mutation GetPrescription($id: ID!, $metadata: RequestMetadata!) {\n prescription(prescription: {id: $id}, metadata: $metadata) {\n ...PrescriptionResultFields\n }\n}\n\nmutation GetPrescriptionTemplates($id: ID!, $metadata: RequestMetadata!) {\n prescription(prescription: {id: $id}, metadata: $metadata) {\n __typename\n ... on PrescriptionPayload {\n prescription {\n treatment {\n templates {\n ...PrescriptionTemplateFields\n }\n }\n }\n }\n ... on OperationError {\n ...OperationErrorFields\n }\n }\n}\n\nmutation SyncPrescription($id: ID, $externalId: String, $patient: PatientReferenceInput, $treatment: TreatmentReferenceInput, $templateId: ID, $instructions: String, $dispense: DispenseInput, $clinical: PrescriptionClinicalInput, $metadata: RequestMetadata!) {\n prescription(\n prescription: {id: $id, externalId: $externalId, patient: $patient, treatment: $treatment, templateId: $templateId, instructions: $instructions, dispense: $dispense, clinical: $clinical}\n metadata: $metadata\n ) {\n ...PrescriptionResultFields\n }\n}\n\nmutation UpdatePrescription($id: ID!, $externalId: String, $treatment: TreatmentReferenceInput, $instructions: String, $dispense: DispenseInput, $clinical: PrescriptionClinicalInput, $signing: PrescriptionSigningDetailsInput, $metadata: RequestMetadata!) {\n prescription(\n prescription: {id: $id, externalId: $externalId, treatment: $treatment, instructions: $instructions, dispense: $dispense, clinical: $clinical, signing: $signing}\n metadata: $metadata\n ) {\n ...PrescriptionResultFields\n }\n}": types.GetPrescriptionDocument,
|
|
9
11
|
};
|
|
10
12
|
export function graphql(source) {
|
|
11
13
|
return documents[source] ?? {};
|
package/dist/gql/gql.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gql.js","sourceRoot":"","sources":["../../src/gql/gql.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"gql.js","sourceRoot":"","sources":["../../src/gql/gql.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAwBtC,MAAM,SAAS,GAAc;IACzB,y+NAAy+N,EAAE,KAAK,CAAC,0BAA0B;IAC3gO,yBAAyB,EAAE,KAAK,CAAC,YAAY;IAC7C,qjBAAqjB,EAAE,KAAK,CAAC,UAAU;IACvkB,kyBAAkyB,EAAE,KAAK,CAAC,gBAAgB;IAC1zB,orBAAorB,EAAE,KAAK,CAAC,cAAc;IAC1sB,mkCAAmkC,EAAE,KAAK,CAAC,kBAAkB;IAC7lC,mnDAAmnD,EAAE,KAAK,CAAC,uBAAuB;CACrpD,CAAC;AAgCF,MAAM,UAAU,OAAO,CAAC,MAAc;IACpC,OAAQ,SAAiB,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;AAC1C,CAAC"}
|