@photonhealth/react 2.0.0-rc.2 → 2.0.0-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. package/README.md +17 -1
  2. package/dist/analytics/PhotonAnalyticsProvider.d.ts +5 -2
  3. package/dist/analytics/PhotonAnalyticsProvider.d.ts.map +1 -1
  4. package/dist/analytics/PhotonAnalyticsProvider.js +34 -15
  5. package/dist/analytics/PhotonAnalyticsProvider.js.map +1 -1
  6. package/dist/analytics/cardLifecycle.d.ts +10 -0
  7. package/dist/analytics/cardLifecycle.d.ts.map +1 -0
  8. package/dist/analytics/cardLifecycle.js +43 -0
  9. package/dist/analytics/cardLifecycle.js.map +1 -0
  10. package/dist/analytics/lifecycleOutcomes.d.ts +8 -0
  11. package/dist/analytics/lifecycleOutcomes.d.ts.map +1 -0
  12. package/dist/analytics/lifecycleOutcomes.js +16 -0
  13. package/dist/analytics/lifecycleOutcomes.js.map +1 -0
  14. package/dist/analytics/tracker.d.ts +5 -3
  15. package/dist/analytics/tracker.d.ts.map +1 -1
  16. package/dist/analytics/tracker.js +10 -5
  17. package/dist/analytics/tracker.js.map +1 -1
  18. package/dist/components/PhotonOrder.d.ts +18 -18
  19. package/dist/components/PhotonOrder.d.ts.map +1 -1
  20. package/dist/components/PhotonOrder.js +17 -6
  21. package/dist/components/PhotonOrder.js.map +1 -1
  22. package/dist/components/PhotonPatient.d.ts +7 -35
  23. package/dist/components/PhotonPatient.d.ts.map +1 -1
  24. package/dist/components/PhotonPatient.js +3 -77
  25. package/dist/components/PhotonPatient.js.map +1 -1
  26. package/dist/components/PhotonPrescription.d.ts +14 -14
  27. package/dist/components/PhotonPrescription.d.ts.map +1 -1
  28. package/dist/components/PhotonPrescription.js +0 -1
  29. package/dist/components/PhotonPrescription.js.map +1 -1
  30. package/dist/components/open.d.ts +11 -13
  31. package/dist/components/open.d.ts.map +1 -1
  32. package/dist/components/open.js +7 -2
  33. package/dist/components/open.js.map +1 -1
  34. package/dist/components/patient/PatientCard/PatientCard.d.ts +30 -0
  35. package/dist/components/patient/PatientCard/PatientCard.d.ts.map +1 -0
  36. package/dist/components/patient/PatientCard/PatientCard.js +101 -0
  37. package/dist/components/patient/PatientCard/PatientCard.js.map +1 -0
  38. package/dist/components/patient/PatientCard/usePatientToShow.d.ts +22 -0
  39. package/dist/components/patient/PatientCard/usePatientToShow.d.ts.map +1 -0
  40. package/dist/components/patient/PatientCard/usePatientToShow.js +40 -0
  41. package/dist/components/patient/PatientCard/usePatientToShow.js.map +1 -0
  42. package/dist/components/patient/PatientIntakeForm.d.ts +16 -0
  43. package/dist/components/patient/PatientIntakeForm.d.ts.map +1 -0
  44. package/dist/components/patient/PatientIntakeForm.js +114 -0
  45. package/dist/components/patient/PatientIntakeForm.js.map +1 -0
  46. package/dist/components/patient/PatientSearch.d.ts +12 -0
  47. package/dist/components/patient/PatientSearch.d.ts.map +1 -0
  48. package/dist/components/patient/PatientSearch.js +148 -0
  49. package/dist/components/patient/PatientSearch.js.map +1 -0
  50. package/dist/components/patient/{Benefits.d.ts → PatientSummary/BenefitsInputForm.d.ts} +2 -2
  51. package/dist/components/patient/PatientSummary/BenefitsInputForm.d.ts.map +1 -0
  52. package/dist/components/patient/{Benefits.js → PatientSummary/BenefitsInputForm.js} +5 -5
  53. package/dist/components/patient/PatientSummary/BenefitsInputForm.js.map +1 -0
  54. package/dist/components/patient/{Clinical.d.ts → PatientSummary/ClinicalInputForm.d.ts} +13 -15
  55. package/dist/components/patient/PatientSummary/ClinicalInputForm.d.ts.map +1 -0
  56. package/dist/components/patient/{Clinical.js → PatientSummary/ClinicalInputForm.js} +11 -11
  57. package/dist/components/patient/PatientSummary/ClinicalInputForm.js.map +1 -0
  58. package/dist/components/patient/PatientSummary/CollapsedSummary.d.ts +5 -0
  59. package/dist/components/patient/PatientSummary/CollapsedSummary.d.ts.map +1 -0
  60. package/dist/components/patient/PatientSummary/CollapsedSummary.js +30 -0
  61. package/dist/components/patient/PatientSummary/CollapsedSummary.js.map +1 -0
  62. package/dist/components/patient/PatientSummary/PatientDetailsForm.d.ts +10 -0
  63. package/dist/components/patient/PatientSummary/PatientDetailsForm.d.ts.map +1 -0
  64. package/dist/components/patient/PatientSummary/PatientDetailsForm.js +65 -0
  65. package/dist/components/patient/PatientSummary/PatientDetailsForm.js.map +1 -0
  66. package/dist/components/patient/PatientSummary/PatientDetailsSchema.d.ts +53 -0
  67. package/dist/components/patient/PatientSummary/PatientDetailsSchema.d.ts.map +1 -0
  68. package/dist/components/patient/PatientSummary/PatientDetailsSchema.js +78 -0
  69. package/dist/components/patient/PatientSummary/PatientDetailsSchema.js.map +1 -0
  70. package/dist/components/patient/PatientSummary/PatientSummary.d.ts +46 -0
  71. package/dist/components/patient/PatientSummary/PatientSummary.d.ts.map +1 -0
  72. package/dist/components/patient/PatientSummary/PatientSummary.js +57 -0
  73. package/dist/components/patient/PatientSummary/PatientSummary.js.map +1 -0
  74. package/dist/components/patient/PatientSummary/SummaryHeader.d.ts +19 -0
  75. package/dist/components/patient/PatientSummary/SummaryHeader.d.ts.map +1 -0
  76. package/dist/components/patient/PatientSummary/SummaryHeader.js +22 -0
  77. package/dist/components/patient/PatientSummary/SummaryHeader.js.map +1 -0
  78. package/dist/components/patient/fields.d.ts +7 -25
  79. package/dist/components/patient/fields.d.ts.map +1 -1
  80. package/dist/components/patient/fields.js +11 -53
  81. package/dist/components/patient/fields.js.map +1 -1
  82. package/dist/components/patient/parsePatientSearchQuery.d.ts +16 -0
  83. package/dist/components/patient/parsePatientSearchQuery.d.ts.map +1 -0
  84. package/dist/components/patient/{query.js → parsePatientSearchQuery.js} +3 -15
  85. package/dist/components/patient/parsePatientSearchQuery.js.map +1 -0
  86. package/dist/components/prescription/PrescriptionCard.d.ts +14 -8
  87. package/dist/components/prescription/PrescriptionCard.d.ts.map +1 -1
  88. package/dist/components/prescription/PrescriptionCard.js +10 -3
  89. package/dist/components/prescription/PrescriptionCard.js.map +1 -1
  90. package/dist/components/prescription/PrescriptionDetailsForm/PrescriptionDetailsForm.d.ts +6 -6
  91. package/dist/components/prescription/PrescriptionDetailsForm/PrescriptionDetailsForm.d.ts.map +1 -1
  92. package/dist/components/prescription/PrescriptionDetailsForm/PrescriptionDetailsForm.js +6 -6
  93. package/dist/components/prescription/PrescriptionDetailsForm/PrescriptionDetailsForm.js.map +1 -1
  94. package/dist/components/schemaErrors.d.ts +3 -2
  95. package/dist/components/schemaErrors.d.ts.map +1 -1
  96. package/dist/components/schemaErrors.js +2 -1
  97. package/dist/components/schemaErrors.js.map +1 -1
  98. package/dist/components/search.d.ts +1 -1
  99. package/dist/components/search.js +1 -1
  100. package/dist/index.d.ts +1 -1
  101. package/dist/index.d.ts.map +1 -1
  102. package/dist/index.js +1 -1
  103. package/dist/index.js.map +1 -1
  104. package/dist/meta/version.js +1 -1
  105. package/package.json +5 -2
  106. package/src/analytics/PhotonAnalyticsProvider.test.tsx +0 -1
  107. package/src/analytics/PhotonAnalyticsProvider.tsx +75 -20
  108. package/src/analytics/cardLifecycle.test.tsx +272 -0
  109. package/src/analytics/cardLifecycle.ts +44 -0
  110. package/src/analytics/fieldInteraction.test.tsx +11 -9
  111. package/src/analytics/lifecycleOutcomes.test.ts +78 -0
  112. package/src/analytics/lifecycleOutcomes.ts +29 -0
  113. package/src/analytics/tracker.test.ts +1 -1
  114. package/src/analytics/tracker.ts +13 -6
  115. package/src/analytics/usePhotonAnalytics.test.tsx +106 -0
  116. package/src/components/PhotonOrder.test.tsx +146 -8
  117. package/src/components/PhotonOrder.tsx +37 -26
  118. package/src/components/PhotonPatient.tsx +8 -163
  119. package/src/components/PhotonPrescription.test.tsx +22 -18
  120. package/src/components/PhotonPrescription.tsx +14 -14
  121. package/src/components/ScreeningAlerts.test.tsx +81 -0
  122. package/src/components/open.ts +13 -16
  123. package/src/components/order/DraftOrderPrompt.test.tsx +3 -6
  124. package/src/components/patient/PatientCard/PatientCard.test.tsx +255 -0
  125. package/src/components/patient/PatientCard/PatientCard.tsx +177 -0
  126. package/src/components/patient/PatientCard/usePatientToShow.ts +44 -0
  127. package/src/components/patient/PatientIntakeForm.test.tsx +262 -0
  128. package/src/components/patient/PatientIntakeForm.tsx +222 -0
  129. package/src/components/patient/PatientSearch.test.tsx +204 -0
  130. package/src/components/patient/PatientSearch.tsx +221 -0
  131. package/src/components/patient/PatientSummary/BenefitsInputForm.test.tsx +164 -0
  132. package/src/components/patient/{Benefits.tsx → PatientSummary/BenefitsInputForm.tsx} +4 -4
  133. package/src/components/patient/PatientSummary/ClinicalInputForm.test.tsx +247 -0
  134. package/src/components/patient/{Clinical.tsx → PatientSummary/ClinicalInputForm.tsx} +23 -23
  135. package/src/components/patient/PatientSummary/CollapsedSummary.test.tsx +90 -0
  136. package/src/components/patient/PatientSummary/CollapsedSummary.tsx +46 -0
  137. package/src/components/patient/PatientSummary/PatientDetailsForm.test.tsx +201 -0
  138. package/src/components/patient/PatientSummary/PatientDetailsForm.tsx +320 -0
  139. package/src/components/patient/PatientSummary/PatientDetailsSchema.test.ts +296 -0
  140. package/src/components/patient/PatientSummary/PatientDetailsSchema.ts +95 -0
  141. package/src/components/patient/PatientSummary/PatientSummary.test.tsx +194 -0
  142. package/src/components/patient/PatientSummary/PatientSummary.tsx +225 -0
  143. package/src/components/patient/PatientSummary/SummaryHeader.test.tsx +183 -0
  144. package/src/components/patient/PatientSummary/SummaryHeader.tsx +85 -0
  145. package/src/components/patient/fields.tsx +12 -138
  146. package/src/components/patient/parsePatientSearchQuery.test.ts +107 -0
  147. package/src/components/patient/{query.ts → parsePatientSearchQuery.ts} +4 -21
  148. package/src/components/prescription/PrescriptionCard.test.tsx +174 -12
  149. package/src/components/prescription/PrescriptionCard.tsx +28 -14
  150. package/src/components/prescription/PrescriptionDetailsForm/DirectionsInput.test.tsx +2 -5
  151. package/src/components/prescription/PrescriptionDetailsForm/DispenseInputs.test.tsx +3 -6
  152. package/src/components/prescription/PrescriptionDetailsForm/PrescriptionDetailsForm.test.tsx +34 -37
  153. package/src/components/prescription/PrescriptionDetailsForm/PrescriptionDetailsForm.tsx +14 -14
  154. package/src/components/prescription/PrescriptionDetailsForm/TemplatePicker.test.tsx +2 -5
  155. package/src/components/prescription/TreatmentSearch/TreatmentSearch.test.tsx +3 -7
  156. package/src/components/schemaErrors.ts +3 -2
  157. package/src/components/search.tsx +1 -1
  158. package/src/index.ts +1 -1
  159. package/src/meta/version.test.ts +1 -0
  160. package/src/meta/version.ts +1 -1
  161. package/dist/components/patient/Benefits.d.ts.map +0 -1
  162. package/dist/components/patient/Benefits.js.map +0 -1
  163. package/dist/components/patient/Clinical.d.ts.map +0 -1
  164. package/dist/components/patient/Clinical.js.map +0 -1
  165. package/dist/components/patient/IntakeForm.d.ts +0 -10
  166. package/dist/components/patient/IntakeForm.d.ts.map +0 -1
  167. package/dist/components/patient/IntakeForm.js +0 -333
  168. package/dist/components/patient/IntakeForm.js.map +0 -1
  169. package/dist/components/patient/Summary.d.ts +0 -48
  170. package/dist/components/patient/Summary.d.ts.map +0 -1
  171. package/dist/components/patient/Summary.js +0 -90
  172. package/dist/components/patient/Summary.js.map +0 -1
  173. package/dist/components/patient/query.d.ts +0 -37
  174. package/dist/components/patient/query.d.ts.map +0 -1
  175. package/dist/components/patient/query.js.map +0 -1
  176. package/src/components/patient/IntakeForm.test.tsx +0 -89
  177. package/src/components/patient/IntakeForm.tsx +0 -564
  178. package/src/components/patient/Summary.test.tsx +0 -106
  179. package/src/components/patient/Summary.tsx +0 -330
@@ -1,8 +1,7 @@
1
- // @vitest-environment jsdom
2
1
  import type { Prescription, PrescriptionRecord, PrescriptionTemplate, TemplateSource } from "@photonhealth/client";
3
2
  import { treatment } from "@photonhealth/client/testing";
4
- import { cleanup, fireEvent, render, screen, within } from "@testing-library/react";
5
- import { afterEach, describe, expect, it, vi } from "vitest";
3
+ import { fireEvent, render, screen, within } from "@testing-library/react";
4
+ import { describe, expect, it, vi } from "vitest";
6
5
  import { PrescriptionDetailsForm, type PrescriptionDetailsFormProps } from "./PrescriptionDetailsForm.tsx";
7
6
 
8
7
  const directions = "Take 1 capsule by mouth 3 times per day";
@@ -58,7 +57,7 @@ const renderFields = ({
58
57
  signing: { state: "UNSIGNED", contentHash: "hash_0", message: null, signedAt: null },
59
58
  };
60
59
  const save = vi.fn<PrescriptionDetailsFormProps["save"]>();
61
- const onAdd = vi.fn<PrescriptionDetailsFormProps["onAdd"]>();
60
+ const onSign = vi.fn<PrescriptionDetailsFormProps["onSign"]>();
62
61
  const props = (): PrescriptionDetailsFormProps => ({
63
62
  live,
64
63
  rx: record,
@@ -67,15 +66,15 @@ const renderFields = ({
67
66
  templates,
68
67
  spinning: null,
69
68
  save,
70
- onAdd,
71
- adding: false,
72
- addDisabled: false,
69
+ onSign,
70
+ signing: false,
71
+ signDisabled: false,
73
72
  });
74
73
  const { rerender } = render(<PrescriptionDetailsForm {...props()} />);
75
74
  return {
76
75
  save,
77
- onAdd,
78
- clickAdd: () => fireEvent.click(screen.getByRole("button", { name: "Add" })),
76
+ onSign,
77
+ clickSign: () => fireEvent.click(screen.getByRole("button", { name: "Sign" })),
79
78
  setOpen: (isOpen: boolean) => {
80
79
  open = isOpen;
81
80
  rerender(<PrescriptionDetailsForm {...props()} />);
@@ -96,14 +95,12 @@ const leave = (label: string) => fireEvent.blur(field(label));
96
95
 
97
96
  const options = () => screen.queryByRole("list", { name: "Templates" });
98
97
 
99
- // Directions, quantity and days supply — the fields Add needs — all empty.
98
+ // Directions, quantity and days supply — the fields Sign needs — all empty.
100
99
  const empty = { instructions: null, dispense: { quantity: null, daysSupply: null } };
101
100
 
102
101
  const dispenseAsWritten = () => screen.getByRole<HTMLInputElement>("checkbox", { name: "Dispense as written" });
103
102
 
104
103
  describe("PrescriptionDetailsForm", () => {
105
- afterEach(() => cleanup());
106
-
107
104
  describe("showing the prescription", () => {
108
105
  it("shows the stored directions and dispense", () => {
109
106
  renderFields();
@@ -381,7 +378,7 @@ describe("PrescriptionDetailsForm", () => {
381
378
  return note ? document.getElementById(note)?.textContent : null;
382
379
  };
383
380
 
384
- it("shows no validation errors before Add is clicked", () => {
381
+ it("shows no validation errors before Sign is clicked", () => {
385
382
  renderFields(empty);
386
383
  expect(isInvalid("Directions (sig)")).toBe(false);
387
384
  expect(isInvalid("Quantity")).toBe(false);
@@ -389,32 +386,32 @@ describe("PrescriptionDetailsForm", () => {
389
386
  expect(screen.queryByText("Required")).toBeNull();
390
387
  });
391
388
 
392
- it("on Add, shows errors for directions, quantity and days supply when they're empty", () => {
393
- const { clickAdd } = renderFields(empty);
394
- clickAdd();
389
+ it("on Sign, shows errors for directions, quantity and days supply when they're empty", () => {
390
+ const { clickSign } = renderFields(empty);
391
+ clickSign();
395
392
  expect(errorOf("Directions (sig)")).toBe("Required");
396
393
  expect(errorOf("Quantity")).toBe("Required");
397
394
  expect(errorOf("Days supply")).toBe("Required");
398
395
  });
399
396
 
400
- it("on Add, shows no errors for unit and refills", () => {
401
- const { clickAdd } = renderFields({ ...empty, dispense: { ...empty.dispense, refillsAllowed: null } });
402
- clickAdd();
397
+ it("on Sign, shows no errors for unit and refills", () => {
398
+ const { clickSign } = renderFields({ ...empty, dispense: { ...empty.dispense, refillsAllowed: null } });
399
+ clickSign();
403
400
  expect(isInvalid("Unit")).toBe(false);
404
401
  expect(isInvalid("Refills")).toBe(false);
405
402
  });
406
403
 
407
- it("on Add, shows no errors when every required field is valid", () => {
408
- const { clickAdd } = renderFields();
409
- clickAdd();
404
+ it("on Sign, shows no errors when every required field is valid", () => {
405
+ const { clickSign } = renderFields();
406
+ clickSign();
410
407
  expect(isInvalid("Directions (sig)")).toBe(false);
411
408
  expect(isInvalid("Quantity")).toBe(false);
412
409
  expect(isInvalid("Days supply")).toBe(false);
413
410
  });
414
411
 
415
412
  it("clears a field's error once it's valid, and keeps the others'", () => {
416
- const { clickAdd } = renderFields(empty);
417
- clickAdd();
413
+ const { clickSign } = renderFields(empty);
414
+ clickSign();
418
415
  type("Quantity", "30");
419
416
  expect(isInvalid("Quantity")).toBe(false);
420
417
  expect(errorOf("Days supply")).toBe("Required");
@@ -422,35 +419,35 @@ describe("PrescriptionDetailsForm", () => {
422
419
  });
423
420
 
424
421
  it("shows a field's new error when its value changes to another invalid one", () => {
425
- const { clickAdd } = renderFields({ dispense: { quantity: null } });
426
- clickAdd();
422
+ const { clickSign } = renderFields({ dispense: { quantity: null } });
423
+ clickSign();
427
424
  expect(errorOf("Quantity")).toBe("Required");
428
425
  type("Quantity", "0");
429
426
  expect(errorOf("Quantity")).toBe("Must be greater than 0");
430
427
  });
431
428
  });
432
429
 
433
- describe("clicking Add", () => {
430
+ describe("clicking Sign", () => {
434
431
  it("doesn't add while a field has an error", () => {
435
- const { clickAdd, onAdd } = renderFields({ dispense: { daysSupply: null } });
436
- clickAdd();
437
- expect(onAdd).not.toHaveBeenCalled();
432
+ const { clickSign, onSign } = renderFields({ dispense: { daysSupply: null } });
433
+ clickSign();
434
+ expect(onSign).not.toHaveBeenCalled();
438
435
  });
439
436
 
440
437
  it("adds once every field is valid", () => {
441
- const { clickAdd, onAdd } = renderFields(empty);
442
- clickAdd();
438
+ const { clickSign, onSign } = renderFields(empty);
439
+ clickSign();
443
440
  type("Directions (sig)", directions);
444
441
  type("Quantity", "30");
445
442
  type("Days supply", "10");
446
- clickAdd();
447
- expect(onAdd).toHaveBeenCalledOnce();
443
+ clickSign();
444
+ expect(onSign).toHaveBeenCalledOnce();
448
445
  });
449
446
 
450
447
  it("adds at once when the prescription already has every required field", () => {
451
- const { clickAdd, onAdd } = renderFields();
452
- clickAdd();
453
- expect(onAdd).toHaveBeenCalledOnce();
448
+ const { clickSign, onSign } = renderFields();
449
+ clickSign();
450
+ expect(onSign).toHaveBeenCalledOnce();
454
451
  });
455
452
  });
456
453
  });
@@ -23,13 +23,13 @@ export interface PrescriptionDetailsFormProps {
23
23
  /** The field whose save is in flight. */
24
24
  spinning: string | null;
25
25
  save: (edits: PrescriptionEdits, from?: string) => void;
26
- /** Beside Add: the prescription's status (e.g. changed since signing). */
26
+ /** Beside Sign: the prescription's status (e.g. changed since signing). */
27
27
  status?: ReactNode;
28
- /** Add, once every field is valid: the card signs it. */
29
- onAdd: () => void;
28
+ /** Sign, once every field is valid: the card signs it. */
29
+ onSign: () => void;
30
30
  /** The add is in flight. */
31
- adding: boolean;
32
- addDisabled: boolean;
31
+ signing: boolean;
32
+ signDisabled: boolean;
33
33
  }
34
34
 
35
35
  export function PrescriptionDetailsForm({
@@ -41,9 +41,9 @@ export function PrescriptionDetailsForm({
41
41
  spinning,
42
42
  save,
43
43
  status,
44
- onAdd,
45
- adding,
46
- addDisabled,
44
+ onSign,
45
+ signing,
46
+ signDisabled,
47
47
  }: PrescriptionDetailsFormProps) {
48
48
  const { Button, CardBody, CardFooter, Stack } = useComponents();
49
49
  const [instructions, setInstructions] = useState(rx?.instructions ?? "");
@@ -94,7 +94,7 @@ export function PrescriptionDetailsForm({
94
94
  if (d?.dispenseAsWritten) setDaw(true);
95
95
  }
96
96
 
97
- // What's wrong with the fields: shown once Add is clicked (and following the values from then on), and never sent.
97
+ // What's wrong with the fields: shown once Sign is clicked (and following the values from then on), and never sent.
98
98
  const [showErrors, setShowErrors] = useState(false);
99
99
  const errors = schemaErrors(PrescriptionDetailsSchema, { instructions, quantity, daysSupply });
100
100
  const shown = showErrors ? errors : {};
@@ -211,16 +211,16 @@ export function PrescriptionDetailsForm({
211
211
  <CardFooter start={status}>
212
212
  <Button
213
213
  variant="secondary" // Send is the page's one primary action
214
- // Not disabled while saving: clicking Add leaves a field, which saves it — the sign waits
214
+ // Not disabled while saving: clicking Sign leaves a field, which saves it — the sign waits
215
215
  // for that save (a disabled button would swallow the click).
216
- loading={adding}
217
- disabled={addDisabled}
216
+ loading={signing}
217
+ disabled={signDisabled}
218
218
  onClick={() => {
219
219
  setShowErrors(true);
220
- if (Object.keys(errors).length === 0) onAdd();
220
+ if (Object.keys(errors).length === 0) onSign();
221
221
  }}
222
222
  >
223
- Add
223
+ Sign
224
224
  </Button>
225
225
  </CardFooter>
226
226
  </>
@@ -1,7 +1,6 @@
1
- // @vitest-environment jsdom
2
1
  import type { PrescriptionTemplate } from "@photonhealth/client";
3
- import { cleanup, fireEvent, render, screen, within } from "@testing-library/react";
4
- import { afterEach, describe, expect, it, vi } from "vitest";
2
+ import { fireEvent, render, screen, within } from "@testing-library/react";
3
+ import { describe, expect, it, vi } from "vitest";
5
4
  import { TemplatePicker, type TemplatePickerProps } from "./TemplatePicker.tsx";
6
5
 
7
6
  const sig = (instructions: string): PrescriptionTemplate => ({
@@ -21,8 +20,6 @@ const renderPicker = (props: Partial<TemplatePickerProps> = {}) => {
21
20
  };
22
21
 
23
22
  describe("TemplatePicker", () => {
24
- afterEach(() => cleanup());
25
-
26
23
  it("renders an expanded list for a new draft", () => {
27
24
  renderPicker({ templates: [sig("Take 1 capsule by mouth daily"), sig("Take 2 capsules by mouth daily")] });
28
25
  const offered = within(options()!)
@@ -1,7 +1,6 @@
1
- // @vitest-environment jsdom
2
- import { act, cleanup, fireEvent, render, screen, waitFor, within } from "@testing-library/react";
1
+ import { act, fireEvent, render, screen, waitFor, within } from "@testing-library/react";
3
2
  import userEvent from "@testing-library/user-event";
4
- import { afterEach, describe, expect, it } from "vitest";
3
+ import { describe, expect, it } from "vitest";
5
4
  import { payload, rx, fakeNetworkApiClient } from "@photonhealth/client/testing";
6
5
  import { PhotonPrescription, type PhotonPrescriptionProps } from "../../../index.ts";
7
6
  import {
@@ -19,9 +18,6 @@ import {
19
18
  // Treatment search on a prescription card: finding the drug, picking its form and strength, and what the card shows
20
19
  // once the product is picked — through <PhotonPrescription>, which it saves through. In the stock building blocks:
21
20
  // every set of building blocks is held to the same contract.
22
-
23
- afterEach(cleanup);
24
-
25
21
  const lisinoprilTablets10And20Mg = choices(
26
22
  option("Lisinopril Oral Tablet 10 MG", "med_10"),
27
23
  option("Lisinopril Oral Tablet 20 MG", "med_20"),
@@ -127,7 +123,7 @@ describe("TreatmentSearch", () => {
127
123
  });
128
124
  const med = await component.typeIntoTreatment("amoxicillin 500 mg capsule");
129
125
  fireEvent.keyDown(med, { key: "Enter" });
130
- await screen.findByRole("button", { name: "Add" });
126
+ await screen.findByRole("button", { name: "Sign" });
131
127
  await new Promise((r) => setTimeout(r, 700)); // past the type-ahead debounce
132
128
  expect(component.names()).not.toContain("UpdatePrescription");
133
129
  expect(screen.getByRole("heading", { name: /amoxicillin/i })).toBeTruthy();
@@ -10,11 +10,12 @@ export type SchemaErrors<T> = T extends readonly (infer Item)[]
10
10
  type Node = Record<PropertyKey, unknown>;
11
11
 
12
12
  /**
13
- * Return errors from Zod schema.parse in a friendlier shape
13
+ * Return errors from Zod schema.parse in a friendlier shape. The input is `unknown`: it is what the form holds before
14
+ * validation, which the schema must be able to refuse.
14
15
  */
15
16
  export function schemaErrors<S extends z.ZodType<unknown, object>>(
16
17
  schema: S,
17
- input: z.input<S>,
18
+ input: unknown,
18
19
  ): SchemaErrors<z.input<S>> {
19
20
  const errors: Node = {};
20
21
  const result = schema.safeParse(input);
@@ -6,7 +6,7 @@
6
6
  * patient search 2, drugs and clinical entries 3) and typing pauses, it searches; each
7
7
  * keystroke cancels the search waiting, and the live object aborts one in flight. Leaving the field (or
8
8
  * Enter) sends at once. Patients and drugs search without writing; for allergies, meds and diagnoses a
9
- * search is an add — a unique match is the entry (see ClinicalList).
9
+ * search is an add — a unique match is the entry (see ClinicalInputForm).
10
10
  * - Results (`SearchResults`): the first five, then "Show N more". In the list, 1–9 and 0 pick one (of those shown),
11
11
  * ↑ ↓ (or K J) move, Home / End (or g / G) go to the first / last, and Esc goes back to the field that searched
12
12
  * (← → and h l are the card flow's, / its search box: flow.ts).
package/src/index.ts CHANGED
@@ -15,7 +15,7 @@
15
15
  */
16
16
  export * from "./primitives/index.ts";
17
17
  export { useLive, useSession } from "./hooks/index.ts";
18
- export { PhotonAnalyticsProvider } from "./analytics/PhotonAnalyticsProvider.tsx";
18
+ export { PhotonAnalyticsProvider, usePhotonAnalytics } from "./analytics/PhotonAnalyticsProvider.tsx";
19
19
  export type { AnalyticsProperties } from "./analytics/tracker.ts";
20
20
  export { PhotonOrder, PhotonPatient, PhotonPrescription } from "./components/index.ts";
21
21
  export type { PhotonOrderProps, PhotonPatientProps, PhotonPrescriptionProps } from "./components/index.ts";
@@ -1,3 +1,4 @@
1
+ // @vitest-environment node
1
2
  import { readFileSync } from "node:fs";
2
3
  import { describe, expect, it } from "vitest";
3
4
  import { reactPackage } from "./version.ts";
@@ -1,4 +1,4 @@
1
1
  export const reactPackage: { readonly name: string; readonly version: string } = {
2
2
  name: "@photonhealth/react",
3
- version: "0.10.0",
3
+ version: "0.13.0",
4
4
  };
@@ -1 +0,0 @@
1
- {"version":3,"file":"Benefits.d.ts","sourceRoot":"","sources":["../../../src/components/patient/Benefits.tsx"],"names":[],"mappings":"AAMA,MAAM,MAAM,YAAY,GAAG;IAAE,EAAE,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE5G,kHAAkH;AAClH,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,MAAM,EACN,KAAK,EACL,QAAQ,EACR,MAAM,GACP,EAAE;IACD,uDAAuD;IACvD,QAAQ,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,EAAE,GAAG,IAAI,CAAC;IAC7G,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI,CAAC;IACvC,QAAQ,EAAE,CAAC,OAAO,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;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AC,GAAG,KAAK,OAAO,EAAE,CAAC;wCACtB,CAAC,CAAC,cAAc,EAAE,CAAC;wCACnB,GAAG,EAAE,CAAC;oCACR,CAAC;oCACD,IAAI,CAAC,CAAC,GAAG,KAAK,QAAQ;wCAAE,KAAK,EAAE,CAAC;gCAClC,CAAC,GACD,GACW,CAChB,EACA,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,CAC9C,KAAC,UAAU,IACT,OAAO,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,EAClG,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,OAAO,EAClB,MAAM,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,aAAa,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,GAC5D,CACH,IACK,GACJ,CACP,IACK,CACT,CAAC;AACJ,CAAC"}
@@ -1,10 +0,0 @@
1
- import { type Patient } from "@photonhealth/client";
2
- export declare function PatientIntakeForm({ patient, notice, }: {
3
- patient: Patient;
4
- /** Why someone else is being found (e.g. the patient given by id isn't there): with the matches, where answers go. */
5
- notice?: {
6
- title: string;
7
- description: string;
8
- } | null;
9
- }): import("react").JSX.Element;
10
- //# sourceMappingURL=IntakeForm.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IntakeForm.d.ts","sourceRoot":"","sources":["../../../src/components/patient/IntakeForm.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA4B,KAAK,OAAO,EAAY,MAAM,sBAAsB,CAAC;AAiBxF,wBAAgB,iBAAiB,CAAC,EAChC,OAAO,EACP,MAAM,GACP,EAAE;IACD,OAAO,EAAE,OAAO,CAAC;IACjB,sHAAsH;IACtH,MAAM,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CACxD,+BAyhBA"}