@photonhealth/elements 0.23.8 → 0.23.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -20106,6 +20106,10 @@ var CoverageStatus$1;
20106
20106
  CoverageStatus2["CoveredWithRestrictions"] = "COVERED_WITH_RESTRICTIONS";
20107
20107
  CoverageStatus2["NotCovered"] = "NOT_COVERED";
20108
20108
  })(CoverageStatus$1 || (CoverageStatus$1 = {}));
20109
+ var DiagnosisCodeType$2;
20110
+ (function(DiagnosisCodeType2) {
20111
+ DiagnosisCodeType2["Icd10"] = "ICD10";
20112
+ })(DiagnosisCodeType$2 || (DiagnosisCodeType$2 = {}));
20109
20113
  var FillState$2;
20110
20114
  (function(FillState2) {
20111
20115
  FillState2["Canceled"] = "CANCELED";
@@ -20146,6 +20150,7 @@ var PrescriptionScreeningAlertSeverity$1;
20146
20150
  var PrescriptionScreeningAlertType$1;
20147
20151
  (function(PrescriptionScreeningAlertType2) {
20148
20152
  PrescriptionScreeningAlertType2["Allergen"] = "ALLERGEN";
20153
+ PrescriptionScreeningAlertType2["Condition"] = "CONDITION";
20149
20154
  PrescriptionScreeningAlertType2["Drug"] = "DRUG";
20150
20155
  })(PrescriptionScreeningAlertType$1 || (PrescriptionScreeningAlertType$1 = {}));
20151
20156
  var PrescriptionState$3;
@@ -20154,7 +20159,6 @@ var PrescriptionState$3;
20154
20159
  PrescriptionState2["Canceled"] = "CANCELED";
20155
20160
  PrescriptionState2["Depleted"] = "DEPLETED";
20156
20161
  PrescriptionState2["Draft"] = "DRAFT";
20157
- PrescriptionState2["Expired"] = "EXPIRED";
20158
20162
  })(PrescriptionState$3 || (PrescriptionState$3 = {}));
20159
20163
  var RoutingConstraintType$1;
20160
20164
  (function(RoutingConstraintType2) {
@@ -20189,13 +20193,15 @@ const SearchTreatmentsDocument$1 = { "kind": "Document", "definitions": [{ "kind
20189
20193
  const SearchTreatmentOptionsQueryDocument$1 = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "SearchTreatmentOptionsQuery" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "filter" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "TreatmentFilter" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "treatments" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "filter" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "filter" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "__typename" } }, { "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "Medication" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "recommendedDispenseUnits" } }] } }] } }] } }] };
20190
20194
  const MeUserQueryDocument$1 = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "MeUserQuery" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "me" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "credentials" } }, { "kind": "Field", "name": { "kind": "Name", "value": "address" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "state" } }] } }] } }] } }] };
20191
20195
  const SupervisorCardQueryDocument$1 = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "SupervisorCardQuery" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "supervisors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "FragmentSpread", "name": { "kind": "Name", "value": "SupervisorCard" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "mostRecentSupervisor" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }] } }] } }, { "kind": "FragmentDefinition", "name": { "kind": "Name", "value": "SupervisorCard" }, "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "Supervisor" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "firstName" } }, { "kind": "Field", "name": { "kind": "Name", "value": "lastName" } }, { "kind": "Field", "name": { "kind": "Name", "value": "npi" } }] } }] };
20196
+ const ScreenDraftedPrescriptionsQueryDocument$1 = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "ScreenDraftedPrescriptionsQuery" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "draftedPrescriptions" } }, "type": { "kind": "NonNullType", "type": { "kind": "ListType", "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "DraftedPrescriptionInput" } } } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "patientId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "ID" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "diagnosisCodes" } }, "type": { "kind": "ListType", "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "DiagnosisCode" } } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "prescriptionScreen" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "draftedPrescriptions" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "draftedPrescriptions" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "patientId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "patientId" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "diagnosisCodes" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "diagnosisCodes" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "alerts" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "type" } }, { "kind": "Field", "name": { "kind": "Name", "value": "description" } }, { "kind": "Field", "name": { "kind": "Name", "value": "involvedEntities" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "__typename" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "severity" } }] } }] } }] } }] };
20192
20197
  const documents$1 = {
20193
20198
  "\n fragment SupervisorCard on Supervisor {\n id\n firstName\n lastName\n npi\n }\n": SupervisorCardFragmentDoc$1,
20194
20199
  "\n mutation CreateSupervisorMutation(\n $firstName: String!\n $lastName: String!\n $npi: String!\n $phone: PhoneNumber\n $address: AddressInput\n ) {\n createSupervisor(\n input: {\n firstName: $firstName\n lastName: $lastName\n npi: $npi\n phone: $phone\n address: $address\n }\n ) {\n ...SupervisorCard\n }\n }\n": CreateSupervisorMutationDocument$1,
20195
20200
  "\n query SearchTreatments($filter: TreatmentFilter!) {\n treatments(filter: $filter) {\n id\n name\n ... on Medication {\n recommendedDispenseUnits\n }\n }\n }\n": SearchTreatmentsDocument$1,
20196
20201
  "\n query SearchTreatmentOptionsQuery($filter: TreatmentFilter!) {\n treatments(filter: $filter) {\n __typename\n id\n name\n ... on Medication {\n recommendedDispenseUnits\n }\n }\n }\n": SearchTreatmentOptionsQueryDocument$1,
20197
20202
  "\n query MeUserQuery {\n me {\n id\n credentials\n address {\n state\n }\n }\n }\n": MeUserQueryDocument$1,
20198
- "\n query SupervisorCardQuery {\n supervisors {\n ...SupervisorCard\n }\n mostRecentSupervisor {\n id\n }\n }\n": SupervisorCardQueryDocument$1
20203
+ "\n query SupervisorCardQuery {\n supervisors {\n ...SupervisorCard\n }\n mostRecentSupervisor {\n id\n }\n }\n": SupervisorCardQueryDocument$1,
20204
+ "\n query ScreenDraftedPrescriptionsQuery(\n $draftedPrescriptions: [DraftedPrescriptionInput!]!\n $patientId: ID!\n $diagnosisCodes: [DiagnosisCode!]\n ) {\n prescriptionScreen(\n draftedPrescriptions: $draftedPrescriptions\n patientId: $patientId\n diagnosisCodes: $diagnosisCodes\n ) {\n alerts {\n type\n description\n involvedEntities {\n id\n name\n __typename\n }\n severity\n }\n }\n }\n": ScreenDraftedPrescriptionsQueryDocument$1
20199
20205
  };
20200
20206
  function graphql$1(source) {
20201
20207
  var _a2;
@@ -20245,6 +20251,30 @@ const SupervisorCardQuery = graphql$1(`
20245
20251
  }
20246
20252
  }
20247
20253
  `);
20254
+ graphql$1(`
20255
+ query ScreenDraftedPrescriptionsQuery(
20256
+ $draftedPrescriptions: [DraftedPrescriptionInput!]!
20257
+ $patientId: ID!
20258
+ $diagnosisCodes: [DiagnosisCode!]
20259
+ ) {
20260
+ prescriptionScreen(
20261
+ draftedPrescriptions: $draftedPrescriptions
20262
+ patientId: $patientId
20263
+ diagnosisCodes: $diagnosisCodes
20264
+ ) {
20265
+ alerts {
20266
+ type
20267
+ description
20268
+ involvedEntities {
20269
+ id
20270
+ name
20271
+ __typename
20272
+ }
20273
+ severity
20274
+ }
20275
+ }
20276
+ }
20277
+ `);
20248
20278
  const CreateSupervisorMutation$1 = graphql$1(`
20249
20279
  mutation CreateSupervisorMutation(
20250
20280
  $firstName: String!
@@ -42395,7 +42425,7 @@ function getRefillsCount(fillsAllowed = 0) {
42395
42425
  return Math.max(fillsAllowed - 1, 0);
42396
42426
  }
42397
42427
 
42398
- var _tmpl$$w = /* @__PURE__ */ template(`<div><span class=font-semibold></span> interaction with `), _tmpl$2$k$1 = /* @__PURE__ */ template(`<span class=font-semibold>`), _tmpl$3$d$1 = /* @__PURE__ */ template(`<div class="text-sm text-gray-700">`), _tmpl$4$c$1 = /* @__PURE__ */ template(`<div>`), _tmpl$5$7$1 = /* @__PURE__ */ template(`<div class="flex grid-flow-col justify-start"><div class="flex flex-col gap-2"><div class=text-sm> `);
42428
+ var _tmpl$$w = /* @__PURE__ */ template(`<div><span class=font-semibold></span> interaction with `), _tmpl$2$k$1 = /* @__PURE__ */ template(`<span class=font-semibold>`), _tmpl$3$d$1 = /* @__PURE__ */ template(`<div class="text-sm text-gray-700">`), _tmpl$4$c$1 = /* @__PURE__ */ template(`<div>`), _tmpl$5$7$1 = /* @__PURE__ */ template(`<div class="flex grid-flow-col justify-start"><div class="flex flex-col gap-2">`);
42399
42429
  const getSeverityText$1 = (severity) => {
42400
42430
  return severity.charAt(0).toUpperCase() + severity.slice(1).toLowerCase();
42401
42431
  };
@@ -42413,7 +42443,8 @@ const getStatus$1 = (severity, type) => {
42413
42443
  const TYPE_TO_DESCRIPTOR_MAP$1 = {
42414
42444
  PrescriptionScreeningAlertInvolvedDraftedPrescription: "(Pending Rx)",
42415
42445
  PrescriptionScreeningAlertInvolvedExistingPrescription: "(Existing Rx)",
42416
- PrescriptionScreeningAlertInvolvedAllergen: "(Allergen)"
42446
+ PrescriptionScreeningAlertInvolvedAllergen: "(Allergen)",
42447
+ PrescriptionScreeningAlertInvolvedCondition: "(Condition)"
42417
42448
  };
42418
42449
  const filterOutOwningId = (involvedEntities, owningId) => {
42419
42450
  return involvedEntities.filter((element) => element.id !== owningId);
@@ -42421,40 +42452,45 @@ const filterOutOwningId = (involvedEntities, owningId) => {
42421
42452
  const getDescriptorByType$1 = (type) => {
42422
42453
  return TYPE_TO_DESCRIPTOR_MAP$1[type] ?? "";
42423
42454
  };
42424
- const textClasses = () => clsx("text-pretty mr-2 text-black text-base", {});
42425
- const getTitle = (props) => {
42426
- return createComponent(Show, {
42455
+ const textClasses = () => clsx("text-sm text-pretty mr-2 text-black text-base", {});
42456
+ const Title = (props) => {
42457
+ const entities = () => filterOutOwningId(props.screeningAlert.involvedEntities, props.owningId);
42458
+ return [createComponent(Show, {
42427
42459
  get when() {
42428
- return props.screeningAlert.type === "DRUG";
42429
- },
42430
- get fallback() {
42431
- return createComponent(Text, {
42432
- bold: true,
42433
- get ["class"]() {
42434
- return textClasses();
42435
- },
42436
- children: "Allergy found"
42437
- });
42460
+ return props.screeningAlert.type !== "ALLERGEN";
42438
42461
  },
42439
42462
  get children() {
42440
42463
  var _el$ = _tmpl$$w(), _el$2 = _el$.firstChild; _el$2.nextSibling;
42441
42464
  insert(_el$2, () => getSeverityText$1(props.screeningAlert.severity));
42442
42465
  insert(_el$, createComponent(For, {
42443
42466
  get each() {
42444
- return filterOutOwningId(props.screeningAlert.involvedEntities, props.owningId);
42467
+ return entities();
42445
42468
  },
42446
42469
  children: (entity, index) => {
42447
42470
  return [(() => {
42448
42471
  var _el$6 = _tmpl$2$k$1();
42449
42472
  insert(_el$6, () => entity.name);
42450
42473
  return _el$6;
42451
- })(), " ", memo$1(() => getDescriptorByType$1(entity.__typename)), memo$1(() => index() < filterOutOwningId(props.screeningAlert.involvedEntities, props.owningId).length - 1 && " and ")];
42474
+ })(), " ", memo$1(() => getDescriptorByType$1(entity.__typename)), memo$1(() => index() < entities().length - 1 && " and ")];
42452
42475
  }
42453
42476
  }), null);
42454
42477
  createRenderEffect(() => className(_el$, textClasses()));
42455
42478
  return _el$;
42456
42479
  }
42457
- });
42480
+ }), createComponent(Show, {
42481
+ get when() {
42482
+ return props.screeningAlert.type === "ALLERGEN";
42483
+ },
42484
+ get children() {
42485
+ return createComponent(Text, {
42486
+ bold: true,
42487
+ get ["class"]() {
42488
+ return textClasses();
42489
+ },
42490
+ children: "Allergy found"
42491
+ });
42492
+ }
42493
+ })];
42458
42494
  };
42459
42495
  const ScreeningAlert = (props) => {
42460
42496
  const [isAllergen, setIsAllergen] = createSignal();
@@ -42472,16 +42508,23 @@ const ScreeningAlert = (props) => {
42472
42508
  },
42473
42509
  withBorder: true,
42474
42510
  get children() {
42475
- var _el$7 = _tmpl$5$7$1(), _el$8 = _el$7.firstChild, _el$9 = _el$8.firstChild; _el$9.firstChild;
42476
- insert(_el$9, () => getTitle(props), null);
42511
+ var _el$7 = _tmpl$5$7$1(), _el$8 = _el$7.firstChild;
42512
+ insert(_el$8, createComponent(Title, {
42513
+ get owningId() {
42514
+ return props.owningId;
42515
+ },
42516
+ get screeningAlert() {
42517
+ return props.screeningAlert;
42518
+ }
42519
+ }), null);
42477
42520
  insert(_el$8, createComponent(Show, {
42478
42521
  get when() {
42479
42522
  return isExpanded() || isAllergen();
42480
42523
  },
42481
42524
  get children() {
42482
- var _el$1 = _tmpl$3$d$1();
42483
- insert(_el$1, () => props.screeningAlert.description);
42484
- return _el$1;
42525
+ var _el$9 = _tmpl$3$d$1();
42526
+ insert(_el$9, () => props.screeningAlert.description);
42527
+ return _el$9;
42485
42528
  }
42486
42529
  }), null);
42487
42530
  insert(_el$8, createComponent(Show, {
@@ -42489,11 +42532,11 @@ const ScreeningAlert = (props) => {
42489
42532
  return !isAllergen();
42490
42533
  },
42491
42534
  get children() {
42492
- var _el$10 = _tmpl$4$c$1();
42493
- _el$10.$$click = () => {
42535
+ var _el$0 = _tmpl$4$c$1();
42536
+ _el$0.$$click = () => {
42494
42537
  toggleExpandedState();
42495
42538
  };
42496
- insert(_el$10, createComponent(Text, {
42539
+ insert(_el$0, createComponent(Text, {
42497
42540
  bold: true,
42498
42541
  "class": "text-blue-600 cursor-pointer",
42499
42542
  size: "xs",
@@ -42501,7 +42544,7 @@ const ScreeningAlert = (props) => {
42501
42544
  return ["See ", memo$1(() => isExpanded() ? "less" : "more")];
42502
42545
  }
42503
42546
  }));
42504
- return _el$10;
42547
+ return _el$0;
42505
42548
  }
42506
42549
  }), null);
42507
42550
  return _el$7;
@@ -43502,6 +43545,17 @@ const PrescribeEventDispatchProvider = (props) => {
43502
43545
  });
43503
43546
  ref?.dispatchEvent(event);
43504
43547
  };
43548
+ const dispatchDiagnosisCodeError = (errors) => {
43549
+ console.error(errors);
43550
+ const event = new CustomEvent("photon-diagnosis-code-error", {
43551
+ composed: true,
43552
+ bubbles: true,
43553
+ detail: {
43554
+ errors
43555
+ }
43556
+ });
43557
+ ref?.dispatchEvent(event);
43558
+ };
43505
43559
  const value = {
43506
43560
  dispatchFormValidate,
43507
43561
  dispatchDraftPrescriptionCreated,
@@ -43518,7 +43572,8 @@ const PrescribeEventDispatchProvider = (props) => {
43518
43572
  dispatchSignatureAttestationCanceled,
43519
43573
  dispatchAttestationResolved,
43520
43574
  dispatchAnalyticsTrackEvent: dispatchAnalyticsTrackEvent$1,
43521
- dispatchSupervisorError
43575
+ dispatchSupervisorError,
43576
+ dispatchDiagnosisCodeError
43522
43577
  };
43523
43578
  return createComponent(PrescribeEventDispatchContext.Provider, {
43524
43579
  value,
@@ -56038,6 +56093,10 @@ var CoverageStatus;
56038
56093
  CoverageStatus2["CoveredWithRestrictions"] = "COVERED_WITH_RESTRICTIONS";
56039
56094
  CoverageStatus2["NotCovered"] = "NOT_COVERED";
56040
56095
  })(CoverageStatus || (CoverageStatus = {}));
56096
+ var DiagnosisCodeType$1;
56097
+ (function(DiagnosisCodeType2) {
56098
+ DiagnosisCodeType2["Icd10"] = "ICD10";
56099
+ })(DiagnosisCodeType$1 || (DiagnosisCodeType$1 = {}));
56041
56100
  var FillState;
56042
56101
  (function(FillState2) {
56043
56102
  FillState2["Canceled"] = "CANCELED";
@@ -56078,6 +56137,7 @@ var PrescriptionScreeningAlertSeverity;
56078
56137
  var PrescriptionScreeningAlertType;
56079
56138
  (function(PrescriptionScreeningAlertType2) {
56080
56139
  PrescriptionScreeningAlertType2["Allergen"] = "ALLERGEN";
56140
+ PrescriptionScreeningAlertType2["Condition"] = "CONDITION";
56081
56141
  PrescriptionScreeningAlertType2["Drug"] = "DRUG";
56082
56142
  })(PrescriptionScreeningAlertType || (PrescriptionScreeningAlertType = {}));
56083
56143
  var PrescriptionState$2;
@@ -56086,7 +56146,6 @@ var PrescriptionState$2;
56086
56146
  PrescriptionState2["Canceled"] = "CANCELED";
56087
56147
  PrescriptionState2["Depleted"] = "DEPLETED";
56088
56148
  PrescriptionState2["Draft"] = "DRAFT";
56089
- PrescriptionState2["Expired"] = "EXPIRED";
56090
56149
  })(PrescriptionState$2 || (PrescriptionState$2 = {}));
56091
56150
  var RoutingConstraintType;
56092
56151
  (function(RoutingConstraintType2) {
@@ -56121,13 +56180,15 @@ const SearchTreatmentsDocument = { "kind": "Document", "definitions": [{ "kind":
56121
56180
  const SearchTreatmentOptionsQueryDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "SearchTreatmentOptionsQuery" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "filter" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "TreatmentFilter" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "treatments" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "filter" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "filter" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "__typename" } }, { "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "InlineFragment", "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "Medication" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "recommendedDispenseUnits" } }] } }] } }] } }] };
56122
56181
  const MeUserQueryDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "MeUserQuery" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "me" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "credentials" } }, { "kind": "Field", "name": { "kind": "Name", "value": "address" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "state" } }] } }] } }] } }] };
56123
56182
  const SupervisorCardQueryDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "SupervisorCardQuery" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "supervisors" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "FragmentSpread", "name": { "kind": "Name", "value": "SupervisorCard" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "mostRecentSupervisor" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }] } }] } }, { "kind": "FragmentDefinition", "name": { "kind": "Name", "value": "SupervisorCard" }, "typeCondition": { "kind": "NamedType", "name": { "kind": "Name", "value": "Supervisor" } }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "firstName" } }, { "kind": "Field", "name": { "kind": "Name", "value": "lastName" } }, { "kind": "Field", "name": { "kind": "Name", "value": "npi" } }] } }] };
56183
+ const ScreenDraftedPrescriptionsQueryDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "ScreenDraftedPrescriptionsQuery" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "draftedPrescriptions" } }, "type": { "kind": "NonNullType", "type": { "kind": "ListType", "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "DraftedPrescriptionInput" } } } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "patientId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "ID" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "diagnosisCodes" } }, "type": { "kind": "ListType", "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "DiagnosisCode" } } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "prescriptionScreen" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "draftedPrescriptions" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "draftedPrescriptions" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "patientId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "patientId" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "diagnosisCodes" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "diagnosisCodes" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "alerts" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "type" } }, { "kind": "Field", "name": { "kind": "Name", "value": "description" } }, { "kind": "Field", "name": { "kind": "Name", "value": "involvedEntities" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "__typename" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "severity" } }] } }] } }] } }] };
56124
56184
  const documents = {
56125
56185
  "\n fragment SupervisorCard on Supervisor {\n id\n firstName\n lastName\n npi\n }\n": SupervisorCardFragmentDoc,
56126
56186
  "\n mutation CreateSupervisorMutation(\n $firstName: String!\n $lastName: String!\n $npi: String!\n $phone: PhoneNumber\n $address: AddressInput\n ) {\n createSupervisor(\n input: {\n firstName: $firstName\n lastName: $lastName\n npi: $npi\n phone: $phone\n address: $address\n }\n ) {\n ...SupervisorCard\n }\n }\n": CreateSupervisorMutationDocument,
56127
56187
  "\n query SearchTreatments($filter: TreatmentFilter!) {\n treatments(filter: $filter) {\n id\n name\n ... on Medication {\n recommendedDispenseUnits\n }\n }\n }\n": SearchTreatmentsDocument,
56128
56188
  "\n query SearchTreatmentOptionsQuery($filter: TreatmentFilter!) {\n treatments(filter: $filter) {\n __typename\n id\n name\n ... on Medication {\n recommendedDispenseUnits\n }\n }\n }\n": SearchTreatmentOptionsQueryDocument,
56129
56189
  "\n query MeUserQuery {\n me {\n id\n credentials\n address {\n state\n }\n }\n }\n": MeUserQueryDocument,
56130
- "\n query SupervisorCardQuery {\n supervisors {\n ...SupervisorCard\n }\n mostRecentSupervisor {\n id\n }\n }\n": SupervisorCardQueryDocument
56190
+ "\n query SupervisorCardQuery {\n supervisors {\n ...SupervisorCard\n }\n mostRecentSupervisor {\n id\n }\n }\n": SupervisorCardQueryDocument,
56191
+ "\n query ScreenDraftedPrescriptionsQuery(\n $draftedPrescriptions: [DraftedPrescriptionInput!]!\n $patientId: ID!\n $diagnosisCodes: [DiagnosisCode!]\n ) {\n prescriptionScreen(\n draftedPrescriptions: $draftedPrescriptions\n patientId: $patientId\n diagnosisCodes: $diagnosisCodes\n ) {\n alerts {\n type\n description\n involvedEntities {\n id\n name\n __typename\n }\n severity\n }\n }\n }\n": ScreenDraftedPrescriptionsQueryDocument
56131
56192
  };
56132
56193
  function graphql(source) {
56133
56194
  var _a2;
@@ -56177,6 +56238,30 @@ graphql(`
56177
56238
  }
56178
56239
  }
56179
56240
  `);
56241
+ const ScreenDraftedPrescriptionsQuery = graphql(`
56242
+ query ScreenDraftedPrescriptionsQuery(
56243
+ $draftedPrescriptions: [DraftedPrescriptionInput!]!
56244
+ $patientId: ID!
56245
+ $diagnosisCodes: [DiagnosisCode!]
56246
+ ) {
56247
+ prescriptionScreen(
56248
+ draftedPrescriptions: $draftedPrescriptions
56249
+ patientId: $patientId
56250
+ diagnosisCodes: $diagnosisCodes
56251
+ ) {
56252
+ alerts {
56253
+ type
56254
+ description
56255
+ involvedEntities {
56256
+ id
56257
+ name
56258
+ __typename
56259
+ }
56260
+ severity
56261
+ }
56262
+ }
56263
+ }
56264
+ `);
56180
56265
  const CreateSupervisorMutation = graphql(`
56181
56266
  mutation CreateSupervisorMutation(
56182
56267
  $firstName: String!
@@ -57854,6 +57939,120 @@ const useSupervisor = () => {
57854
57939
  return context;
57855
57940
  };
57856
57941
 
57942
+ var DiagnosisCodeType = /* @__PURE__ */ ((DiagnosisCodeType2) => {
57943
+ DiagnosisCodeType2["Icd10"] = "ICD10";
57944
+ return DiagnosisCodeType2;
57945
+ })(DiagnosisCodeType || {});
57946
+
57947
+ const toScreenableDraftPrescription = (prescription) => ({
57948
+ dispenseAsWritten: prescription.dispenseAsWritten || void 0,
57949
+ dispenseQuantity: prescription.dispenseQuantity,
57950
+ dispenseUnit: prescription.dispenseUnit,
57951
+ fillsAllowed: prescription.fillsAllowed,
57952
+ daysSupply: prescription.daysSupply || void 0,
57953
+ instructions: prescription.instructions,
57954
+ notes: prescription.notes || void 0,
57955
+ effectiveDate: prescription.effectiveDate,
57956
+ treatment: {
57957
+ id: prescription.treatment.id
57958
+ }
57959
+ });
57960
+ const removeDuplicateTreatments = (prescriptions) => {
57961
+ const seenTreatmentIds = /* @__PURE__ */ new Set();
57962
+ return prescriptions.filter(({
57963
+ treatment
57964
+ }) => {
57965
+ if (seenTreatmentIds.has(treatment.id)) return false;
57966
+ seenTreatmentIds.add(treatment.id);
57967
+ return true;
57968
+ });
57969
+ };
57970
+ const PrescriptionScreeningContext = createContext();
57971
+ const PrescriptionScreeningProvider = (props) => {
57972
+ const client = usePhoton();
57973
+ const {
57974
+ draftPrescriptions
57975
+ } = useDraftPrescriptions();
57976
+ const {
57977
+ dispatchDiagnosisCodeError
57978
+ } = usePrescribeEventDispatch();
57979
+ const [screeningAlerts, setScreeningAlerts] = createSignal([]);
57980
+ const [diagnosisCodes, setDiagnosisCodes] = createSignal();
57981
+ createEffect(() => {
57982
+ if (!props.diagnosisCodes) {
57983
+ return;
57984
+ }
57985
+ if (typeof props.diagnosisCodes === "string") {
57986
+ const error = "Invalid diagnosis codes JSON passed in, cannot pass to screening request";
57987
+ dispatchDiagnosisCodeError([error]);
57988
+ return;
57989
+ }
57990
+ const validCodes = [];
57991
+ const invalidCodes = [];
57992
+ for (const dc of props.diagnosisCodes) {
57993
+ const isValid = dc.code && dc.type && Object.values(DiagnosisCodeType).includes(dc.type);
57994
+ if (isValid) {
57995
+ validCodes.push(dc);
57996
+ } else {
57997
+ invalidCodes.push(dc);
57998
+ }
57999
+ }
58000
+ if (invalidCodes.length) {
58001
+ const error = `Invalid diagnosis codes detected, cannot pass to screening request: ${JSON.stringify(invalidCodes)}`;
58002
+ dispatchDiagnosisCodeError([error]);
58003
+ return;
58004
+ }
58005
+ if (validCodes.length) {
58006
+ setDiagnosisCodes(validCodes);
58007
+ }
58008
+ });
58009
+ const screenDraftedPrescriptions = async () => {
58010
+ const inProgressDraftedPrescriptionTreatmentId = props.formStore.treatment?.value?.id;
58011
+ const draftedPrescriptions = draftPrescriptions().map(toScreenableDraftPrescription);
58012
+ if (inProgressDraftedPrescriptionTreatmentId) {
58013
+ draftedPrescriptions.push({
58014
+ treatment: {
58015
+ id: inProgressDraftedPrescriptionTreatmentId
58016
+ }
58017
+ });
58018
+ }
58019
+ const dedupedSanitizedPrescriptions = removeDuplicateTreatments(draftedPrescriptions);
58020
+ const {
58021
+ data
58022
+ } = await client.sdk.apolloClinical.query({
58023
+ query: ScreenDraftedPrescriptionsQuery,
58024
+ variables: {
58025
+ patientId: props.formStore.patient?.value?.id,
58026
+ draftedPrescriptions: dedupedSanitizedPrescriptions,
58027
+ diagnosisCodes: diagnosisCodes()
58028
+ }
58029
+ });
58030
+ setScreeningAlerts(data?.prescriptionScreen?.alerts ?? []);
58031
+ };
58032
+ createEffect(() => {
58033
+ if (draftPrescriptions().length > 0) {
58034
+ screenDraftedPrescriptions();
58035
+ }
58036
+ });
58037
+ const value = {
58038
+ screeningAlerts,
58039
+ screenDraftedPrescriptions
58040
+ };
58041
+ return createComponent(PrescriptionScreeningContext.Provider, {
58042
+ value,
58043
+ get children() {
58044
+ return props.children;
58045
+ }
58046
+ });
58047
+ };
58048
+ const usePrescriptionScreening = () => {
58049
+ const context = useContext(PrescriptionScreeningContext);
58050
+ if (!context) {
58051
+ throw new Error("usePrescriptionScreening must be used within PrescriptionScreeningProvider");
58052
+ }
58053
+ return context;
58054
+ };
58055
+
57857
58056
  /**
57858
58057
  * Creates a callback that is debounced and cancellable. The debounced callback is called on **trailing** edge.
57859
58058
  *
@@ -58721,7 +58920,7 @@ function checkHasPermission(subset, superset) {
58721
58920
  return subset.every((permission) => superset.includes(permission));
58722
58921
  }
58723
58922
 
58724
- const version$1 = "0.23.8";
58923
+ const version$1 = "0.23.9";
58725
58924
  const pkg = {
58726
58925
  version: version$1};
58727
58926
 
@@ -73557,6 +73756,10 @@ const DraftPrescriptions = (props) => {
73557
73756
  isLoadingPrefills,
73558
73757
  prescriptionIds
73559
73758
  } = useDraftPrescriptions();
73759
+ const {
73760
+ screenDraftedPrescriptions,
73761
+ screeningAlerts
73762
+ } = usePrescriptionScreening();
73560
73763
  const prescriptionRoutingConstraints = createMemo(() => {
73561
73764
  return getPrescriptionRoutingConstraints(props.routingConstraints);
73562
73765
  });
@@ -73575,7 +73778,7 @@ const DraftPrescriptions = (props) => {
73575
73778
  behavior: "smooth",
73576
73779
  block: "start"
73577
73780
  });
73578
- props.handleDraftPrescriptionsChange();
73781
+ screenDraftedPrescriptions();
73579
73782
  }
73580
73783
  };
73581
73784
  const checkCanEditPrescription = (draft, onConfirm) => {
@@ -73628,7 +73831,7 @@ const DraftPrescriptions = (props) => {
73628
73831
  }
73629
73832
  setDeleteDialogOpen(false);
73630
73833
  setDeleteDraftId(void 0);
73631
- props.handleDraftPrescriptionsChange();
73834
+ screenDraftedPrescriptions();
73632
73835
  };
73633
73836
  const handleDeleteCancel = () => {
73634
73837
  setDeleteDialogOpen(false);
@@ -73691,7 +73894,7 @@ const DraftPrescriptions = (props) => {
73691
73894
  },
73692
73895
  children: (draftPrescription) => createComponent(DraftPrescriptionItem, {
73693
73896
  get screeningAlerts() {
73694
- return props.screeningAlerts;
73897
+ return screeningAlerts();
73695
73898
  },
73696
73899
  get routingConstraint() {
73697
73900
  return prescriptionRoutingConstraints().get(draftPrescription.id);
@@ -73774,6 +73977,10 @@ const DraftPrescriptionForm = (props) => {
73774
73977
  dispatchOrderError,
73775
73978
  dispatchAnalyticsTrackEvent
73776
73979
  } = usePrescribeEventDispatch();
73980
+ const {
73981
+ screenDraftedPrescriptions,
73982
+ screeningAlerts
73983
+ } = usePrescriptionScreening();
73777
73984
  const [offCatalog, setOffCatalog] = createSignal(void 0);
73778
73985
  const [openDoseCalculator, setOpenDoseCalculator] = createSignal(false);
73779
73986
  const [searchText, setSearchText] = createSignal("");
@@ -73814,7 +74021,7 @@ const DraftPrescriptionForm = (props) => {
73814
74021
  value: e.detail.catalogId
73815
74022
  });
73816
74023
  }
73817
- props.screenDraftedPrescriptions();
74024
+ screenDraftedPrescriptions();
73818
74025
  };
73819
74026
  const handleAddPrescription = async () => {
73820
74027
  setIsLoading(true);
@@ -73863,7 +74070,7 @@ const DraftPrescriptionForm = (props) => {
73863
74070
  return;
73864
74071
  }
73865
74072
  props.onHideForm();
73866
- props.screenDraftedPrescriptions();
74073
+ screenDraftedPrescriptions();
73867
74074
  setOffCatalog(void 0);
73868
74075
  clearForm(props.actions, {
73869
74076
  notes: props.prefillNotes
@@ -73888,7 +74095,7 @@ const DraftPrescriptionForm = (props) => {
73888
74095
  clearForm(props.actions, {
73889
74096
  notes: props.prefillNotes
73890
74097
  });
73891
- props.screenDraftedPrescriptions();
74098
+ screenDraftedPrescriptions();
73892
74099
  });
73893
74100
  addEventListener$1(_el$2, "photon-treatment-selected", handleTreatmentSelected);
73894
74101
  _el$2._$owner = getOwner();
@@ -73896,7 +74103,7 @@ const DraftPrescriptionForm = (props) => {
73896
74103
  ScreeningAlerts,
73897
74104
  {
73898
74105
  get screeningAlerts() {
73899
- return props.screeningAlerts.filter((screeningAlert) => screeningAlert.involvedEntities.map((involvedEntity) => involvedEntity.id).indexOf(props.store.treatment?.value?.id) >= 0);
74106
+ return screeningAlerts().filter((screeningAlert) => screeningAlert.involvedEntities.map((involvedEntity) => involvedEntity.id).indexOf(props.store.treatment?.value?.id) >= 0);
73900
74107
  },
73901
74108
  get owningId() {
73902
74109
  return props.store.treatment?.value?.id;
@@ -76925,12 +77132,6 @@ const PrescriptionCard = (props) => {
76925
77132
  return props.store;
76926
77133
  },
76927
77134
  expandForm: () => setShowForm(true),
76928
- get handleDraftPrescriptionsChange() {
76929
- return props.screenDraftedPrescriptions;
76930
- },
76931
- get screeningAlerts() {
76932
- return props.screeningAlerts;
76933
- },
76934
77135
  get routingConstraints() {
76935
77136
  return pharmacySelectionContext.routingConstraints();
76936
77137
  },
@@ -76977,12 +77178,6 @@ const PrescriptionCard = (props) => {
76977
77178
  get prefillNotes() {
76978
77179
  return props.prefillNotes;
76979
77180
  },
76980
- get screenDraftedPrescriptions() {
76981
- return props.screenDraftedPrescriptions;
76982
- },
76983
- get screeningAlerts() {
76984
- return props.screeningAlerts;
76985
- },
76986
77181
  get catalogId() {
76987
77182
  return props.catalogId;
76988
77183
  },
@@ -77026,25 +77221,6 @@ const fulfillmentNeedsAddress$1 = (fulfillmentType) => {
77026
77221
  const shouldBlockOrderWithoutAddress$1 = (fulfillmentType, hasAddress) => {
77027
77222
  return fulfillmentNeedsAddress$1(fulfillmentType) && !hasAddress;
77028
77223
  };
77029
- const ScreenDraftedPrescriptionsQuery = gql$1`
77030
- query ScreenDraftedPrescriptionsQuery(
77031
- $draftedPrescriptions: [DraftedPrescriptionInput!]!
77032
- $patientId: ID!
77033
- ) {
77034
- prescriptionScreen(draftedPrescriptions: $draftedPrescriptions, patientId: $patientId) {
77035
- alerts {
77036
- type
77037
- description
77038
- involvedEntities {
77039
- id
77040
- name
77041
- __typename
77042
- }
77043
- severity
77044
- }
77045
- }
77046
- }
77047
- `;
77048
77224
  const calculateNeedsSupervisor = ({
77049
77225
  credentials,
77050
77226
  state
@@ -77078,7 +77254,9 @@ function PrescribeWorkflow(props) {
77078
77254
  const [isLoading, setIsLoading] = createSignal(true);
77079
77255
  const [authenticated, setAuthenticated] = createSignal(client?.authentication.state.isAuthenticated || false);
77080
77256
  const [, recentOrdersActions] = useRecentOrders();
77081
- const [screeningAlerts, setScreeningAlerts] = createSignal([]);
77257
+ const {
77258
+ screeningAlerts
77259
+ } = usePrescriptionScreening();
77082
77260
  const [overrideScreenAlerts, setOverrideScreenAlerts] = createSignal(false);
77083
77261
  const hasPatientAddress = createMemo(() => {
77084
77262
  const address = props.formStore?.address?.value ?? props.formStore?.patient?.value?.address;
@@ -77160,45 +77338,6 @@ function PrescribeWorkflow(props) {
77160
77338
  };
77161
77339
  return address;
77162
77340
  });
77163
- const removeDuplicateTreatments = (prescriptions) => {
77164
- const seenTreatmentIds = /* @__PURE__ */ new Set();
77165
- return prescriptions.filter((entity) => {
77166
- const treatmentId = entity.treatment.id;
77167
- if (seenTreatmentIds.has(treatmentId)) {
77168
- return false;
77169
- } else {
77170
- seenTreatmentIds.add(treatmentId);
77171
- return true;
77172
- }
77173
- });
77174
- };
77175
- const screenDraftedPrescriptions = async () => {
77176
- const inProgressDraftedPrescriptionTreatmentId = props.formStore.treatment?.value?.id;
77177
- const draftedPrescriptions = draftPrescriptions().map(toScreenableDraftPrescription);
77178
- if (inProgressDraftedPrescriptionTreatmentId) {
77179
- draftedPrescriptions.push({
77180
- treatment: {
77181
- id: inProgressDraftedPrescriptionTreatmentId
77182
- }
77183
- });
77184
- }
77185
- const dedupedSanitizedPrescriptions = removeDuplicateTreatments(draftedPrescriptions);
77186
- const {
77187
- data
77188
- } = await clinicalClient.query({
77189
- query: ScreenDraftedPrescriptionsQuery,
77190
- variables: {
77191
- patientId: props.formStore.patient?.value.id,
77192
- draftedPrescriptions: dedupedSanitizedPrescriptions
77193
- }
77194
- });
77195
- setScreeningAlerts(data?.prescriptionScreen?.alerts ?? []);
77196
- };
77197
- createEffect(() => {
77198
- if (draftPrescriptions().length > 0) {
77199
- screenDraftedPrescriptions();
77200
- }
77201
- });
77202
77341
  const displayAlertsWarning = () => {
77203
77342
  setIsScreeningAlertWarningOpen(true);
77204
77343
  };
@@ -77544,10 +77683,6 @@ function PrescribeWorkflow(props) {
77544
77683
  get prefillNotes() {
77545
77684
  return rxNotesPrefill();
77546
77685
  },
77547
- screenDraftedPrescriptions,
77548
- get screeningAlerts() {
77549
- return screeningAlerts();
77550
- },
77551
77686
  get enableOrder() {
77552
77687
  return props.enableOrder;
77553
77688
  },
@@ -77674,22 +77809,6 @@ function PrescribeWorkflow(props) {
77674
77809
  return _el$;
77675
77810
  })();
77676
77811
  }
77677
- const toScreenableDraftPrescription = (prescription) => {
77678
- return {
77679
- dispenseAsWritten: prescription.dispenseAsWritten || void 0,
77680
- dispenseQuantity: prescription.dispenseQuantity,
77681
- dispenseUnit: prescription.dispenseUnit,
77682
- fillsAllowed: prescription.fillsAllowed,
77683
- daysSupply: prescription.daysSupply || void 0,
77684
- instructions: prescription.instructions,
77685
- notes: prescription.notes || void 0,
77686
- // TODO: is effectiveDate needed to screen prescription?
77687
- effectiveDate: prescription.effectiveDate,
77688
- treatment: {
77689
- id: prescription.treatment.id
77690
- }
77691
- };
77692
- };
77693
77812
 
77694
77813
  const styles$5 = "\n\n:host {}\n\n.remove-icon-button::part(base):hover,\n.remove-icon-button::part(base):focus {\n --tw-text-opacity: 1;\n color: rgb(248, 113, 113, var(--tw-text-opacity));\n}\n\n.edit-icon-button::part(base):hover,\n.edit-icon-button::part(base):focus {\n --tw-text-opacity: 1;\n color: rgb(234, 179, 8, var(--tw-text-opacity));\n}\n\n.enable-switch {\n --width: 60px;\n --height: 32px;\n --thumb-size: 26px;\n --sl-color-primary-600: #22c55e;\n}";
77695
77814
 
@@ -78542,94 +78661,102 @@ const PhotonPrescribeWorkflowComponent = (props) => {
78542
78661
  return props.enableCoverageCheck;
78543
78662
  },
78544
78663
  get children() {
78545
- return createComponent(SupervisorProvider, {
78546
- get supervisor() {
78547
- return props.supervisor;
78664
+ return createComponent(PrescriptionScreeningProvider, {
78665
+ formStore: store,
78666
+ get diagnosisCodes() {
78667
+ return props.diagnosisCodes;
78548
78668
  },
78549
78669
  get children() {
78550
- return [(() => {
78551
- var _el$ = _tmpl$$e();
78552
- insert$1(_el$, tailwind);
78553
- return _el$;
78554
- })(), (() => {
78555
- var _el$2 = _tmpl$$e();
78556
- insert$1(_el$2, shoelaceDarkStyles);
78557
- return _el$2;
78558
- })(), (() => {
78559
- var _el$3 = _tmpl$$e();
78560
- insert$1(_el$3, shoelaceLightStyles);
78561
- return _el$3;
78562
- })(), (() => {
78563
- var _el$4 = _tmpl$$e();
78564
- insert$1(_el$4, styles$5);
78565
- return _el$4;
78566
- })(), createComponent(PrescribeWorkflow, {
78567
- get patientId() {
78568
- return props.patientId;
78569
- },
78570
- get hideSubmit() {
78571
- return props.hideSubmit;
78572
- },
78573
- get hideTemplates() {
78574
- return props.hideTemplates;
78575
- },
78576
- get hidePatientCard() {
78577
- return props.hidePatientCard;
78578
- },
78579
- get enableOrder() {
78580
- return props.enableOrder;
78581
- },
78582
- get enableMedHistory() {
78583
- return props.enableMedHistory;
78584
- },
78585
- get enableMedHistoryLinks() {
78586
- return props.enableMedHistoryLinks;
78587
- },
78588
- get enableMedHistoryRefillButton() {
78589
- return props.enableMedHistoryRefillButton;
78670
+ return createComponent(SupervisorProvider, {
78671
+ get supervisor() {
78672
+ return props.supervisor;
78590
78673
  },
78591
- get enableCombineAndDuplicate() {
78592
- return props.enableCombineAndDuplicate;
78593
- },
78594
- get optionalPatientAddress() {
78595
- return props.optionalPatientAddress;
78596
- },
78597
- get address() {
78598
- return props.address;
78599
- },
78600
- get weight() {
78601
- return props.weight;
78602
- },
78603
- get weightUnit() {
78604
- return props.weightUnit;
78605
- },
78606
- get additionalNotes() {
78607
- return props.additionalNotes;
78608
- },
78609
- get triggerSubmit() {
78610
- return props.triggerSubmit;
78611
- },
78612
- get toastBuffer() {
78613
- return props.toastBuffer;
78614
- },
78615
- formStore: store,
78616
- formActions: actions,
78617
- get externalOrderId() {
78618
- return props.externalOrderId;
78619
- },
78620
- get catalogId() {
78621
- return props.catalogId;
78622
- },
78623
- get allowOffCatalogSearch() {
78624
- return props.allowOffCatalogSearch;
78625
- },
78626
- get disableList() {
78627
- return props.disableList;
78628
- },
78629
- get groupId() {
78630
- return props.groupId;
78674
+ get children() {
78675
+ return [(() => {
78676
+ var _el$ = _tmpl$$e();
78677
+ insert$1(_el$, tailwind);
78678
+ return _el$;
78679
+ })(), (() => {
78680
+ var _el$2 = _tmpl$$e();
78681
+ insert$1(_el$2, shoelaceDarkStyles);
78682
+ return _el$2;
78683
+ })(), (() => {
78684
+ var _el$3 = _tmpl$$e();
78685
+ insert$1(_el$3, shoelaceLightStyles);
78686
+ return _el$3;
78687
+ })(), (() => {
78688
+ var _el$4 = _tmpl$$e();
78689
+ insert$1(_el$4, styles$5);
78690
+ return _el$4;
78691
+ })(), createComponent(PrescribeWorkflow, {
78692
+ get patientId() {
78693
+ return props.patientId;
78694
+ },
78695
+ get hideSubmit() {
78696
+ return props.hideSubmit;
78697
+ },
78698
+ get hideTemplates() {
78699
+ return props.hideTemplates;
78700
+ },
78701
+ get hidePatientCard() {
78702
+ return props.hidePatientCard;
78703
+ },
78704
+ get enableOrder() {
78705
+ return props.enableOrder;
78706
+ },
78707
+ get enableMedHistory() {
78708
+ return props.enableMedHistory;
78709
+ },
78710
+ get enableMedHistoryLinks() {
78711
+ return props.enableMedHistoryLinks;
78712
+ },
78713
+ get enableMedHistoryRefillButton() {
78714
+ return props.enableMedHistoryRefillButton;
78715
+ },
78716
+ get enableCombineAndDuplicate() {
78717
+ return props.enableCombineAndDuplicate;
78718
+ },
78719
+ get optionalPatientAddress() {
78720
+ return props.optionalPatientAddress;
78721
+ },
78722
+ get address() {
78723
+ return props.address;
78724
+ },
78725
+ get weight() {
78726
+ return props.weight;
78727
+ },
78728
+ get weightUnit() {
78729
+ return props.weightUnit;
78730
+ },
78731
+ get additionalNotes() {
78732
+ return props.additionalNotes;
78733
+ },
78734
+ get triggerSubmit() {
78735
+ return props.triggerSubmit;
78736
+ },
78737
+ get toastBuffer() {
78738
+ return props.toastBuffer;
78739
+ },
78740
+ formStore: store,
78741
+ formActions: actions,
78742
+ get externalOrderId() {
78743
+ return props.externalOrderId;
78744
+ },
78745
+ get catalogId() {
78746
+ return props.catalogId;
78747
+ },
78748
+ get allowOffCatalogSearch() {
78749
+ return props.allowOffCatalogSearch;
78750
+ },
78751
+ get disableList() {
78752
+ return props.disableList;
78753
+ },
78754
+ get groupId() {
78755
+ return props.groupId;
78756
+ }
78757
+ })];
78631
78758
  }
78632
- })];
78759
+ });
78633
78760
  }
78634
78761
  });
78635
78762
  }
@@ -78674,7 +78801,8 @@ customElement("photon-prescribe-workflow", {
78674
78801
  enableCoverageCheck: false,
78675
78802
  disableList: void 0,
78676
78803
  groupId: void 0,
78677
- supervisor: void 0
78804
+ supervisor: void 0,
78805
+ diagnosisCodes: void 0
78678
78806
  }, PhotonPrescribeWorkflowComponent);
78679
78807
 
78680
78808
  var _tmpl$$d = /* @__PURE__ */ template$1(`<p class="font-sans text-l font-medium mb-2">`), _tmpl$2$a = /* @__PURE__ */ template$1(`<sl-icon-button class=self-start>`, true, false, false), _tmpl$3$9 = /* @__PURE__ */ template$1(`<style>`), _tmpl$4$7 = /* @__PURE__ */ template$1(`<div class="rounded-lg bg-white p-4 shadow-card border border-gray-200">`), _tmpl$5$7 = /* @__PURE__ */ template$1(`<div class="flex flex-row justify-between">`), _tmpl$6$6 = /* @__PURE__ */ template$1(`<slot>`);