@photonhealth/client 0.0.0-stage → 2.0.0-rc.1

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.
Files changed (178) hide show
  1. package/LICENSE +15 -0
  2. package/README.md +89 -2
  3. package/dist/api/changes/applyOption.d.ts +41 -0
  4. package/dist/api/changes/applyOption.d.ts.map +1 -0
  5. package/dist/api/changes/applyOption.js +76 -0
  6. package/dist/api/changes/applyOption.js.map +1 -0
  7. package/dist/api/changes/classifyChanges.d.ts +9 -0
  8. package/dist/api/changes/classifyChanges.d.ts.map +1 -0
  9. package/dist/api/changes/classifyChanges.js +2 -0
  10. package/dist/api/changes/classifyChanges.js.map +1 -0
  11. package/dist/api/changes/index.d.ts +3 -0
  12. package/dist/api/changes/index.d.ts.map +1 -0
  13. package/dist/api/changes/index.js +3 -0
  14. package/dist/api/changes/index.js.map +1 -0
  15. package/dist/api/client.d.ts +43 -0
  16. package/dist/api/client.d.ts.map +1 -0
  17. package/dist/api/client.js +77 -0
  18. package/dist/api/client.js.map +1 -0
  19. package/dist/api/health.d.ts +4 -0
  20. package/dist/api/health.d.ts.map +1 -0
  21. package/dist/api/health.js +6 -0
  22. package/dist/api/health.js.map +1 -0
  23. package/dist/api/index.d.ts +22 -0
  24. package/dist/api/index.d.ts.map +1 -0
  25. package/dist/api/index.js +21 -0
  26. package/dist/api/index.js.map +1 -0
  27. package/dist/api/order.d.ts +33 -0
  28. package/dist/api/order.d.ts.map +1 -0
  29. package/dist/api/order.js +33 -0
  30. package/dist/api/order.js.map +1 -0
  31. package/dist/api/patient.d.ts +33 -0
  32. package/dist/api/patient.d.ts.map +1 -0
  33. package/dist/api/patient.js +33 -0
  34. package/dist/api/patient.js.map +1 -0
  35. package/dist/api/prescription.d.ts +31 -0
  36. package/dist/api/prescription.d.ts.map +1 -0
  37. package/dist/api/prescription.js +30 -0
  38. package/dist/api/prescription.js.map +1 -0
  39. package/dist/api/results.d.ts +30 -0
  40. package/dist/api/results.d.ts.map +1 -0
  41. package/dist/api/results.js +26 -0
  42. package/dist/api/results.js.map +1 -0
  43. package/dist/gql/gql.d.ts +21 -0
  44. package/dist/gql/gql.d.ts.map +1 -0
  45. package/dist/gql/gql.js +13 -0
  46. package/dist/gql/gql.js.map +1 -0
  47. package/dist/gql/graphql.d.ts +9674 -0
  48. package/dist/gql/graphql.d.ts.map +1 -0
  49. package/dist/gql/graphql.js +4030 -0
  50. package/dist/gql/graphql.js.map +1 -0
  51. package/dist/gql/index.d.ts +2 -0
  52. package/dist/gql/index.d.ts.map +1 -0
  53. package/dist/gql/index.js +3 -0
  54. package/dist/gql/index.js.map +1 -0
  55. package/dist/index.d.ts +15 -0
  56. package/dist/index.d.ts.map +1 -0
  57. package/dist/index.js +15 -0
  58. package/dist/index.js.map +1 -0
  59. package/dist/photon/auth.d.ts +48 -0
  60. package/dist/photon/auth.d.ts.map +1 -0
  61. package/dist/photon/auth.js +34 -0
  62. package/dist/photon/auth.js.map +1 -0
  63. package/dist/photon/choices.d.ts +44 -0
  64. package/dist/photon/choices.d.ts.map +1 -0
  65. package/dist/photon/choices.js +58 -0
  66. package/dist/photon/choices.js.map +1 -0
  67. package/dist/photon/context.d.ts +29 -0
  68. package/dist/photon/context.d.ts.map +1 -0
  69. package/dist/photon/context.js +2 -0
  70. package/dist/photon/context.js.map +1 -0
  71. package/dist/photon/environments.d.ts +26 -0
  72. package/dist/photon/environments.d.ts.map +1 -0
  73. package/dist/photon/environments.js +26 -0
  74. package/dist/photon/environments.js.map +1 -0
  75. package/dist/photon/errors.d.ts +26 -0
  76. package/dist/photon/errors.d.ts.map +1 -0
  77. package/dist/photon/errors.js +42 -0
  78. package/dist/photon/errors.js.map +1 -0
  79. package/dist/photon/index.d.ts +23 -0
  80. package/dist/photon/index.d.ts.map +1 -0
  81. package/dist/photon/index.js +11 -0
  82. package/dist/photon/index.js.map +1 -0
  83. package/dist/photon/inputs.d.ts +7 -0
  84. package/dist/photon/inputs.d.ts.map +1 -0
  85. package/dist/photon/inputs.js +25 -0
  86. package/dist/photon/inputs.js.map +1 -0
  87. package/dist/photon/links.d.ts +68 -0
  88. package/dist/photon/links.d.ts.map +1 -0
  89. package/dist/photon/links.js +187 -0
  90. package/dist/photon/links.js.map +1 -0
  91. package/dist/photon/live.d.ts +62 -0
  92. package/dist/photon/live.d.ts.map +1 -0
  93. package/dist/photon/live.js +107 -0
  94. package/dist/photon/live.js.map +1 -0
  95. package/dist/photon/map.d.ts +10 -0
  96. package/dist/photon/map.d.ts.map +1 -0
  97. package/dist/photon/map.js +211 -0
  98. package/dist/photon/map.js.map +1 -0
  99. package/dist/photon/order.d.ts +148 -0
  100. package/dist/photon/order.d.ts.map +1 -0
  101. package/dist/photon/order.js +491 -0
  102. package/dist/photon/order.js.map +1 -0
  103. package/dist/photon/patient.d.ts +78 -0
  104. package/dist/photon/patient.d.ts.map +1 -0
  105. package/dist/photon/patient.js +316 -0
  106. package/dist/photon/patient.js.map +1 -0
  107. package/dist/photon/photon.d.ts +150 -0
  108. package/dist/photon/photon.d.ts.map +1 -0
  109. package/dist/photon/photon.js +315 -0
  110. package/dist/photon/photon.js.map +1 -0
  111. package/dist/photon/prescription.d.ts +132 -0
  112. package/dist/photon/prescription.d.ts.map +1 -0
  113. package/dist/photon/prescription.js +381 -0
  114. package/dist/photon/prescription.js.map +1 -0
  115. package/dist/photon/session.d.ts +84 -0
  116. package/dist/photon/session.d.ts.map +1 -0
  117. package/dist/photon/session.js +350 -0
  118. package/dist/photon/session.js.map +1 -0
  119. package/dist/photon/types.d.ts +411 -0
  120. package/dist/photon/types.d.ts.map +1 -0
  121. package/dist/photon/types.js +7 -0
  122. package/dist/photon/types.js.map +1 -0
  123. package/dist/test-utils/msw.d.ts +23 -0
  124. package/dist/test-utils/msw.d.ts.map +1 -0
  125. package/dist/test-utils/msw.js +51 -0
  126. package/dist/test-utils/msw.js.map +1 -0
  127. package/dist/testing/fixtures.d.ts +51 -0
  128. package/dist/testing/fixtures.d.ts.map +1 -0
  129. package/dist/testing/fixtures.js +166 -0
  130. package/dist/testing/fixtures.js.map +1 -0
  131. package/dist/testing/scriptedClient.d.ts +38 -0
  132. package/dist/testing/scriptedClient.d.ts.map +1 -0
  133. package/dist/testing/scriptedClient.js +52 -0
  134. package/dist/testing/scriptedClient.js.map +1 -0
  135. package/dist/testing.d.ts +11 -0
  136. package/dist/testing.d.ts.map +1 -0
  137. package/dist/testing.js +10 -0
  138. package/dist/testing.js.map +1 -0
  139. package/package.json +67 -4
  140. package/src/api/changes/applyOption.ts +103 -0
  141. package/src/api/changes/classifyChanges.ts +10 -0
  142. package/src/api/changes/index.ts +2 -0
  143. package/src/api/client.ts +124 -0
  144. package/src/api/health.ts +7 -0
  145. package/src/api/index.ts +22 -0
  146. package/src/api/order.ts +64 -0
  147. package/src/api/patient.ts +58 -0
  148. package/src/api/prescription.ts +68 -0
  149. package/src/api/results.ts +45 -0
  150. package/src/gql/gql.ts +56 -0
  151. package/src/gql/graphql.ts +5344 -0
  152. package/src/gql/index.ts +2 -0
  153. package/src/index.ts +14 -0
  154. package/src/operations/fragments.graphql +351 -0
  155. package/src/operations/health.graphql +4 -0
  156. package/src/operations/order.graphql +42 -0
  157. package/src/operations/patient.graphql +36 -0
  158. package/src/operations/prescription.graphql +70 -0
  159. package/src/photon/auth.ts +70 -0
  160. package/src/photon/choices.ts +79 -0
  161. package/src/photon/context.ts +30 -0
  162. package/src/photon/environments.ts +47 -0
  163. package/src/photon/errors.ts +56 -0
  164. package/src/photon/index.ts +35 -0
  165. package/src/photon/inputs.ts +24 -0
  166. package/src/photon/links.ts +197 -0
  167. package/src/photon/live.ts +135 -0
  168. package/src/photon/map.ts +255 -0
  169. package/src/photon/order.ts +581 -0
  170. package/src/photon/patient.ts +346 -0
  171. package/src/photon/photon.ts +513 -0
  172. package/src/photon/prescription.ts +447 -0
  173. package/src/photon/session.ts +445 -0
  174. package/src/photon/types.ts +329 -0
  175. package/src/test-utils/msw.ts +61 -0
  176. package/src/testing/fixtures.ts +191 -0
  177. package/src/testing/scriptedClient.ts +52 -0
  178. package/src/testing.ts +22 -0
@@ -0,0 +1,33 @@
1
+ import { GetPatientDocument, SyncPatientDocument, UpdatePatientDocument, } from "../gql/graphql.js";
2
+ import { OperationFailure, assertNotOperationError } from "./results.js";
3
+ function settle(result, sent) {
4
+ const r = assertNotOperationError(result);
5
+ if (r.__typename === "AmbiguousPatientMatch") {
6
+ return { kind: "ambiguous", reason: r.reason, candidates: r.candidates };
7
+ }
8
+ const record = r.patient;
9
+ if (record?.__typename === "OperationError")
10
+ throw new OperationFailure(record);
11
+ return {
12
+ kind: "ok",
13
+ patient: record ?? null,
14
+ changes: { changes: r.changes, sent },
15
+ };
16
+ }
17
+ /** GetPatient — read a known patient. */
18
+ export async function getPatient(client, id) {
19
+ return settle((await client.execute(GetPatientDocument, { id })).patient, { id });
20
+ }
21
+ /**
22
+ * SyncPatient — whatever's known, an id or not: the server finds the patient, lists candidates (the prescriber
23
+ * picks), says what's missing, or creates one when nothing matches and it has enough (today: first, last, DOB,
24
+ * sex — leave `sex` out to look without creating).
25
+ */
26
+ export async function syncPatient(client, input, signal) {
27
+ return settle((await client.execute(SyncPatientDocument, input, { signal })).patient, input);
28
+ }
29
+ /** UpdatePatient — change that one patient: demographics and/or clinical lists. NKDA: `clinical: { allergies: { none: true } }`. */
30
+ export async function updatePatient(client, id, patch) {
31
+ return settle((await client.execute(UpdatePatientDocument, { id, ...patch })).patient, patch);
32
+ }
33
+ //# sourceMappingURL=patient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"patient.js","sourceRoot":"","sources":["../../src/api/patient.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,GAKtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAgB,MAAM,cAAc,CAAC;AAavF,SAAS,MAAM,CAAC,MAAmC,EAAE,IAAa;IAChE,MAAM,CAAC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,CAAC,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AAChG,CAAC"}
@@ -0,0 +1,31 @@
1
+ import type { ChangeSet } from "./changes/index.ts";
2
+ import type { NetworkClient, OperationVariables } from "./client.ts";
3
+ import { type SyncPrescriptionMutationVariables, type UpdatePrescriptionMutationVariables, type PrescriptionFieldsFragment, type PrescriptionResultFieldsFragment } from "../gql/graphql.ts";
4
+ import { type Outcome } from "./results.ts";
5
+ export type Prescription = PrescriptionFieldsFragment;
6
+ export type PrescriptionCandidate = Extract<PrescriptionResultFieldsFragment, {
7
+ __typename: "AmbiguousPrescriptionMatch";
8
+ }>["candidates"][number];
9
+ export type PrescriptionOutcome = Outcome<{
10
+ prescription: Prescription | null;
11
+ changes: ChangeSet;
12
+ }, {
13
+ reason: string;
14
+ candidates: PrescriptionCandidate[];
15
+ }>;
16
+ /** What a sync sends: an id or not, a patient or not, and the fields known. */
17
+ type PrescriptionSync = OperationVariables<SyncPrescriptionMutationVariables>;
18
+ /** Fields you can change on a draft (everything but the id), or the signing. */
19
+ type PrescriptionPatch = Omit<OperationVariables<UpdatePrescriptionMutationVariables>, "id">;
20
+ /** GetPrescription — read a known prescription, draft or signed. */
21
+ export declare function getPrescription(client: NetworkClient, id: string): Promise<PrescriptionOutcome>;
22
+ /**
23
+ * SyncPrescription — whatever's known. Without a patient it can only look the drug up (its choices, or why
24
+ * nothing matched); with one it continues their in-progress draft or starts one. Always send a treatment or
25
+ * template with a patient (without one the server copies the patient's last Rx).
26
+ */
27
+ export declare function syncPrescription(client: NetworkClient, input: PrescriptionSync, signal?: AbortSignal): Promise<PrescriptionOutcome>;
28
+ /** UpdatePrescription — change only the fields sent, or sign; screening re-runs and contentHash changes. */
29
+ export declare function updatePrescription(client: NetworkClient, id: string, patch: PrescriptionPatch): Promise<PrescriptionOutcome>;
30
+ export {};
31
+ //# sourceMappingURL=prescription.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prescription.d.ts","sourceRoot":"","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EAAE,KAAK,EAAE,iBAAiB,gCAEnG"}
@@ -0,0 +1,30 @@
1
+ import { GetPrescriptionDocument, SyncPrescriptionDocument, UpdatePrescriptionDocument, } from "../gql/graphql.js";
2
+ import { assertNotOperationError } from "./results.js";
3
+ function settle(result, sent) {
4
+ const r = assertNotOperationError(result);
5
+ if (r.__typename === "AmbiguousPrescriptionMatch") {
6
+ return { kind: "ambiguous", reason: r.reason, candidates: r.candidates };
7
+ }
8
+ return {
9
+ kind: "ok",
10
+ prescription: r.prescription,
11
+ changes: { changes: r.changes, sent },
12
+ };
13
+ }
14
+ /** GetPrescription — read a known prescription, draft or signed. */
15
+ export async function getPrescription(client, id) {
16
+ return settle((await client.execute(GetPrescriptionDocument, { id })).prescription, { id });
17
+ }
18
+ /**
19
+ * SyncPrescription — whatever's known. Without a patient it can only look the drug up (its choices, or why
20
+ * nothing matched); with one it continues their in-progress draft or starts one. Always send a treatment or
21
+ * template with a patient (without one the server copies the patient's last Rx).
22
+ */
23
+ export async function syncPrescription(client, input, signal) {
24
+ return settle((await client.execute(SyncPrescriptionDocument, { ...input, templateId: input.templateId ?? undefined }, { signal })).prescription, input);
25
+ }
26
+ /** UpdatePrescription — change only the fields sent, or sign; screening re-runs and contentHash changes. */
27
+ export async function updatePrescription(client, id, patch) {
28
+ return settle((await client.execute(UpdatePrescriptionDocument, { id, ...patch })).prescription, patch);
29
+ }
30
+ //# sourceMappingURL=prescription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prescription.js","sourceRoot":"","sources":["../../src/api/prescription.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,0BAA0B,GAK3B,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,CA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+ /**
3
+ * network-api results are tiered unions:
4
+ * Payload — the business outcome (may still carry REJECTED/BLOCKING changes)
5
+ * Ambiguous*Match — a likely duplicate; nothing was written, pick a candidate and retry
6
+ * OperationError — a real failure (`type`: UNAUTHORIZED or UPSTREAM_SERVICE)
7
+ *
8
+ * We return the first two as a discriminated `Outcome` (the UI must handle
9
+ * both) and throw the last as `OperationFailure` (the UI shows an error).
10
+ */
11
+ export type Outcome<TOk, TAmbiguous> = ({
12
+ kind: "ok";
13
+ } & TOk) | ({
14
+ kind: "ambiguous";
15
+ } & TAmbiguous);
16
+ export declare class OperationFailure extends Error {
17
+ readonly code: string;
18
+ readonly type: OperationErrorType;
19
+ readonly requiredPermission?: string | null;
20
+ readonly service?: string | null;
21
+ readonly retryable: boolean;
22
+ constructor(error: OperationErrorFieldsFragment);
23
+ }
24
+ /** Throws on real failures so callers only ever see business outcomes. */
25
+ export declare function assertNotOperationError<T extends {
26
+ __typename: string;
27
+ }>(result: T): Exclude<T, {
28
+ __typename: "OperationError";
29
+ }>;
30
+ //# sourceMappingURL=results.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"results.d.ts","sourceRoot":"","sources":["../../src/api/results.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE1F;;;;;;;;GAQG;AAEH,MAAM,MAAM,OAAO,CAAC,GAAG,EAAE,UAAU,IAAI,CAAC;IAAE,IAAI,EAAE,IAAI,CAAA;CAAE,GAAG,GAAG,CAAC,GAAG,CAAC;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,GAAG,UAAU,CAAC,CAAC;AAErG,qBAAa,gBAAiB,SAAQ,KAAK;IACzC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5C,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;gBAEhB,KAAK,EAAE,4BAA4B;CAShD;AAQD,0EAA0E;AAC1E,wBAAgB,uBAAuB,CAAC,CAAC,SAAS;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,EACtE,MAAM,EAAE,CAAC,GACR,OAAO,CAAC,CAAC,EAAE;IAAE,UAAU,EAAE,gBAAgB,CAAA;CAAE,CAAC,CAG9C"}
@@ -0,0 +1,26 @@
1
+ export class OperationFailure extends Error {
2
+ code;
3
+ type;
4
+ requiredPermission;
5
+ service;
6
+ retryable;
7
+ constructor(error) {
8
+ super(error.message);
9
+ this.name = "OperationFailure";
10
+ this.code = error.code;
11
+ this.type = error.type;
12
+ this.requiredPermission = error.requiredPermission;
13
+ this.service = error.service;
14
+ this.retryable = error.retryable;
15
+ }
16
+ }
17
+ function isOperationError(result) {
18
+ return result.__typename === "OperationError";
19
+ }
20
+ /** Throws on real failures so callers only ever see business outcomes. */
21
+ export function assertNotOperationError(result) {
22
+ if (isOperationError(result))
23
+ throw new OperationFailure(result);
24
+ return result;
25
+ }
26
+ //# sourceMappingURL=results.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"results.js","sourceRoot":"","sources":["../../src/api/results.ts"],"names":[],"mappings":"AAcA,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IAChC,IAAI,CAAS;IACb,IAAI,CAAqB;IACzB,kBAAkB,CAAiB;IACnC,OAAO,CAAiB;IACxB,SAAS,CAAU;IAE5B,YAAY,KAAmC;QAC7C,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;QAC/B,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QACvB,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC,kBAAkB,CAAC;QACnD,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;QAC7B,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;IACnC,CAAC;CACF;AAED,SAAS,gBAAgB,CACvB,MAAS;IAET,OAAO,MAAM,CAAC,UAAU,KAAK,gBAAgB,CAAC;AAChD,CAAC;AAED,0EAA0E;AAC1E,MAAM,UAAU,uBAAuB,CACrC,MAAS;IAET,IAAI,gBAAgB,CAAC,MAAM,CAAC;QAAE,MAAM,IAAI,gBAAgB,CAAC,MAAiD,CAAC,CAAC;IAC5G,OAAO,MAAe,CAAC;AACzB,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
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 recommendedDispenseUnits\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 }\n entity {\n __typename\n ... on Treatment {\n ...TreatmentFields\n }\n ... on Pharmacy {\n ...PharmacyFields\n }\n }\n}\n\nfragment PharmacyOfferFields on PharmacyOffer {\n source\n isPromoted\n attributeTags {\n kind\n label\n }\n priceSummary {\n priceType\n totalAmount\n totalRetailAmount\n totalSavings\n }\n prescriptionDeliveryEstimates {\n prescriptionId\n deliveryPromise\n deliveryPromiseRangeStart\n deliveryPromiseRangeEnd\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 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 PatientDemographicFields on PatientDemographic {\n name {\n first\n middle\n last\n }\n dateOfBirth\n sex\n gender\n email\n phone\n address {\n street1\n street2\n city\n state\n postalCode\n country\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}\n\nfragment PatientFields on Patient {\n id\n demographic {\n ...PatientDemographicFields\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 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 patient {\n ...PatientRecordFields\n }\n prescriptions {\n ...PrescriptionFields\n }\n screeningAlerts {\n ...ScreeningAlertFields\n }\n pharmacy {\n ...PharmacyFields\n }\n exceptions {\n id\n type\n message\n createdAt\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
+ /**
6
+ * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
7
+ */
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: "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}"): typeof import('./graphql.js').GetOrderDocument;
13
+ /**
14
+ * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
15
+ */
16
+ 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, $clinical: PatientClinicalInput, $metadata: RequestMetadata!) {\n patient(\n patient: {id: $id, demographic: $demographic, clinical: $clinical}\n metadata: $metadata\n ) {\n ...PatientResultFields\n }\n}\n\nmutation UpdatePatient($id: ID!, $demographic: PatientDemographicInput, $clinical: PatientClinicalInput, $metadata: RequestMetadata!) {\n patient(\n patient: {id: $id, demographic: $demographic, clinical: $clinical}\n metadata: $metadata\n ) {\n ...PatientResultFields\n }\n}"): typeof import('./graphql.js').GetPatientDocument;
17
+ /**
18
+ * The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
19
+ */
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;
21
+ //# sourceMappingURL=gql.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gql.d.ts","sourceRoot":"","sources":["../../src/gql/gql.ts"],"names":[],"mappings":"AA+BA;;GAEG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,k5JAAk5J,GAAG,cAAc,cAAc,EAAE,0BAA0B,CAAC;AAC9+J;;GAEG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,yBAAyB,GAAG,cAAc,cAAc,EAAE,YAAY,CAAC;AACvG;;GAEG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,kyBAAkyB,GAAG,cAAc,cAAc,EAAE,gBAAgB,CAAC;AACp3B;;GAEG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,2tBAA2tB,GAAG,cAAc,cAAc,EAAE,kBAAkB,CAAC;AAC/yB;;GAEG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,mtCAAmtC,GAAG,cAAc,cAAc,EAAE,uBAAuB,CAAC"}
@@ -0,0 +1,13 @@
1
+ /* eslint-disable */
2
+ import * as types from './graphql.js';
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 recommendedDispenseUnits\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 }\n entity {\n __typename\n ... on Treatment {\n ...TreatmentFields\n }\n ... on Pharmacy {\n ...PharmacyFields\n }\n }\n}\n\nfragment PharmacyOfferFields on PharmacyOffer {\n source\n isPromoted\n attributeTags {\n kind\n label\n }\n priceSummary {\n priceType\n totalAmount\n totalRetailAmount\n totalSavings\n }\n prescriptionDeliveryEstimates {\n prescriptionId\n deliveryPromise\n deliveryPromiseRangeStart\n deliveryPromiseRangeEnd\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 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 PatientDemographicFields on PatientDemographic {\n name {\n first\n middle\n last\n }\n dateOfBirth\n sex\n gender\n email\n phone\n address {\n street1\n street2\n city\n state\n postalCode\n country\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}\n\nfragment PatientFields on Patient {\n id\n demographic {\n ...PatientDemographicFields\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 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 patient {\n ...PatientRecordFields\n }\n prescriptions {\n ...PrescriptionFields\n }\n screeningAlerts {\n ...ScreeningAlertFields\n }\n pharmacy {\n ...PharmacyFields\n }\n exceptions {\n id\n type\n message\n createdAt\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
+ "query Ping {\n ping\n}": types.PingDocument,
6
+ "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
+ "mutation GetPatient($id: ID!, $metadata: RequestMetadata!) {\n patient(patient: {id: $id}, metadata: $metadata) {\n ...PatientResultFields\n }\n}\n\nmutation SyncPatient($id: ID, $demographic: PatientDemographicInput, $clinical: PatientClinicalInput, $metadata: RequestMetadata!) {\n patient(\n patient: {id: $id, demographic: $demographic, clinical: $clinical}\n metadata: $metadata\n ) {\n ...PatientResultFields\n }\n}\n\nmutation UpdatePatient($id: ID!, $demographic: PatientDemographicInput, $clinical: PatientClinicalInput, $metadata: RequestMetadata!) {\n patient(\n patient: {id: $id, demographic: $demographic, clinical: $clinical}\n metadata: $metadata\n ) {\n ...PatientResultFields\n }\n}": types.GetPatientDocument,
8
+ "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}": types.GetPrescriptionDocument,
9
+ };
10
+ export function graphql(source) {
11
+ return documents[source] ?? {};
12
+ }
13
+ //# sourceMappingURL=gql.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gql.js","sourceRoot":"","sources":["../../src/gql/gql.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAsBtC,MAAM,SAAS,GAAc;IACzB,k5JAAk5J,EAAE,KAAK,CAAC,0BAA0B;IACp7J,yBAAyB,EAAE,KAAK,CAAC,YAAY;IAC7C,kyBAAkyB,EAAE,KAAK,CAAC,gBAAgB;IAC1zB,2tBAA2tB,EAAE,KAAK,CAAC,kBAAkB;IACrvB,mtCAAmtC,EAAE,KAAK,CAAC,uBAAuB;CACrvC,CAAC;AAwBF,MAAM,UAAU,OAAO,CAAC,MAAc;IACpC,OAAQ,SAAiB,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;AAC1C,CAAC"}