@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.mjs CHANGED
@@ -20104,6 +20104,10 @@ var CoverageStatus$1;
20104
20104
  CoverageStatus2["CoveredWithRestrictions"] = "COVERED_WITH_RESTRICTIONS";
20105
20105
  CoverageStatus2["NotCovered"] = "NOT_COVERED";
20106
20106
  })(CoverageStatus$1 || (CoverageStatus$1 = {}));
20107
+ var DiagnosisCodeType$2;
20108
+ (function(DiagnosisCodeType2) {
20109
+ DiagnosisCodeType2["Icd10"] = "ICD10";
20110
+ })(DiagnosisCodeType$2 || (DiagnosisCodeType$2 = {}));
20107
20111
  var FillState$2;
20108
20112
  (function(FillState2) {
20109
20113
  FillState2["Canceled"] = "CANCELED";
@@ -20144,6 +20148,7 @@ var PrescriptionScreeningAlertSeverity$1;
20144
20148
  var PrescriptionScreeningAlertType$1;
20145
20149
  (function(PrescriptionScreeningAlertType2) {
20146
20150
  PrescriptionScreeningAlertType2["Allergen"] = "ALLERGEN";
20151
+ PrescriptionScreeningAlertType2["Condition"] = "CONDITION";
20147
20152
  PrescriptionScreeningAlertType2["Drug"] = "DRUG";
20148
20153
  })(PrescriptionScreeningAlertType$1 || (PrescriptionScreeningAlertType$1 = {}));
20149
20154
  var PrescriptionState$3;
@@ -20152,7 +20157,6 @@ var PrescriptionState$3;
20152
20157
  PrescriptionState2["Canceled"] = "CANCELED";
20153
20158
  PrescriptionState2["Depleted"] = "DEPLETED";
20154
20159
  PrescriptionState2["Draft"] = "DRAFT";
20155
- PrescriptionState2["Expired"] = "EXPIRED";
20156
20160
  })(PrescriptionState$3 || (PrescriptionState$3 = {}));
20157
20161
  var RoutingConstraintType$1;
20158
20162
  (function(RoutingConstraintType2) {
@@ -20187,13 +20191,15 @@ const SearchTreatmentsDocument$1 = { "kind": "Document", "definitions": [{ "kind
20187
20191
  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" } }] } }] } }] } }] };
20188
20192
  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" } }] } }] } }] } }] };
20189
20193
  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" } }] } }] };
20194
+ 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" } }] } }] } }] } }] };
20190
20195
  const documents$1 = {
20191
20196
  "\n fragment SupervisorCard on Supervisor {\n id\n firstName\n lastName\n npi\n }\n": SupervisorCardFragmentDoc$1,
20192
20197
  "\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,
20193
20198
  "\n query SearchTreatments($filter: TreatmentFilter!) {\n treatments(filter: $filter) {\n id\n name\n ... on Medication {\n recommendedDispenseUnits\n }\n }\n }\n": SearchTreatmentsDocument$1,
20194
20199
  "\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,
20195
20200
  "\n query MeUserQuery {\n me {\n id\n credentials\n address {\n state\n }\n }\n }\n": MeUserQueryDocument$1,
20196
- "\n query SupervisorCardQuery {\n supervisors {\n ...SupervisorCard\n }\n mostRecentSupervisor {\n id\n }\n }\n": SupervisorCardQueryDocument$1
20201
+ "\n query SupervisorCardQuery {\n supervisors {\n ...SupervisorCard\n }\n mostRecentSupervisor {\n id\n }\n }\n": SupervisorCardQueryDocument$1,
20202
+ "\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
20197
20203
  };
20198
20204
  function graphql$1(source) {
20199
20205
  var _a2;
@@ -20243,6 +20249,30 @@ const SupervisorCardQuery = graphql$1(`
20243
20249
  }
20244
20250
  }
20245
20251
  `);
20252
+ graphql$1(`
20253
+ query ScreenDraftedPrescriptionsQuery(
20254
+ $draftedPrescriptions: [DraftedPrescriptionInput!]!
20255
+ $patientId: ID!
20256
+ $diagnosisCodes: [DiagnosisCode!]
20257
+ ) {
20258
+ prescriptionScreen(
20259
+ draftedPrescriptions: $draftedPrescriptions
20260
+ patientId: $patientId
20261
+ diagnosisCodes: $diagnosisCodes
20262
+ ) {
20263
+ alerts {
20264
+ type
20265
+ description
20266
+ involvedEntities {
20267
+ id
20268
+ name
20269
+ __typename
20270
+ }
20271
+ severity
20272
+ }
20273
+ }
20274
+ }
20275
+ `);
20246
20276
  const CreateSupervisorMutation$1 = graphql$1(`
20247
20277
  mutation CreateSupervisorMutation(
20248
20278
  $firstName: String!
@@ -42393,7 +42423,7 @@ function getRefillsCount(fillsAllowed = 0) {
42393
42423
  return Math.max(fillsAllowed - 1, 0);
42394
42424
  }
42395
42425
 
42396
- 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> `);
42426
+ 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">`);
42397
42427
  const getSeverityText$1 = (severity) => {
42398
42428
  return severity.charAt(0).toUpperCase() + severity.slice(1).toLowerCase();
42399
42429
  };
@@ -42411,7 +42441,8 @@ const getStatus$1 = (severity, type) => {
42411
42441
  const TYPE_TO_DESCRIPTOR_MAP$1 = {
42412
42442
  PrescriptionScreeningAlertInvolvedDraftedPrescription: "(Pending Rx)",
42413
42443
  PrescriptionScreeningAlertInvolvedExistingPrescription: "(Existing Rx)",
42414
- PrescriptionScreeningAlertInvolvedAllergen: "(Allergen)"
42444
+ PrescriptionScreeningAlertInvolvedAllergen: "(Allergen)",
42445
+ PrescriptionScreeningAlertInvolvedCondition: "(Condition)"
42415
42446
  };
42416
42447
  const filterOutOwningId = (involvedEntities, owningId) => {
42417
42448
  return involvedEntities.filter((element) => element.id !== owningId);
@@ -42419,40 +42450,45 @@ const filterOutOwningId = (involvedEntities, owningId) => {
42419
42450
  const getDescriptorByType$1 = (type) => {
42420
42451
  return TYPE_TO_DESCRIPTOR_MAP$1[type] ?? "";
42421
42452
  };
42422
- const textClasses = () => clsx("text-pretty mr-2 text-black text-base", {});
42423
- const getTitle = (props) => {
42424
- return createComponent(Show, {
42453
+ const textClasses = () => clsx("text-sm text-pretty mr-2 text-black text-base", {});
42454
+ const Title = (props) => {
42455
+ const entities = () => filterOutOwningId(props.screeningAlert.involvedEntities, props.owningId);
42456
+ return [createComponent(Show, {
42425
42457
  get when() {
42426
- return props.screeningAlert.type === "DRUG";
42427
- },
42428
- get fallback() {
42429
- return createComponent(Text, {
42430
- bold: true,
42431
- get ["class"]() {
42432
- return textClasses();
42433
- },
42434
- children: "Allergy found"
42435
- });
42458
+ return props.screeningAlert.type !== "ALLERGEN";
42436
42459
  },
42437
42460
  get children() {
42438
42461
  var _el$ = _tmpl$$w(), _el$2 = _el$.firstChild; _el$2.nextSibling;
42439
42462
  insert(_el$2, () => getSeverityText$1(props.screeningAlert.severity));
42440
42463
  insert(_el$, createComponent(For, {
42441
42464
  get each() {
42442
- return filterOutOwningId(props.screeningAlert.involvedEntities, props.owningId);
42465
+ return entities();
42443
42466
  },
42444
42467
  children: (entity, index) => {
42445
42468
  return [(() => {
42446
42469
  var _el$6 = _tmpl$2$k$1();
42447
42470
  insert(_el$6, () => entity.name);
42448
42471
  return _el$6;
42449
- })(), " ", memo$1(() => getDescriptorByType$1(entity.__typename)), memo$1(() => index() < filterOutOwningId(props.screeningAlert.involvedEntities, props.owningId).length - 1 && " and ")];
42472
+ })(), " ", memo$1(() => getDescriptorByType$1(entity.__typename)), memo$1(() => index() < entities().length - 1 && " and ")];
42450
42473
  }
42451
42474
  }), null);
42452
42475
  createRenderEffect(() => className(_el$, textClasses()));
42453
42476
  return _el$;
42454
42477
  }
42455
- });
42478
+ }), createComponent(Show, {
42479
+ get when() {
42480
+ return props.screeningAlert.type === "ALLERGEN";
42481
+ },
42482
+ get children() {
42483
+ return createComponent(Text, {
42484
+ bold: true,
42485
+ get ["class"]() {
42486
+ return textClasses();
42487
+ },
42488
+ children: "Allergy found"
42489
+ });
42490
+ }
42491
+ })];
42456
42492
  };
42457
42493
  const ScreeningAlert = (props) => {
42458
42494
  const [isAllergen, setIsAllergen] = createSignal();
@@ -42470,16 +42506,23 @@ const ScreeningAlert = (props) => {
42470
42506
  },
42471
42507
  withBorder: true,
42472
42508
  get children() {
42473
- var _el$7 = _tmpl$5$7$1(), _el$8 = _el$7.firstChild, _el$9 = _el$8.firstChild; _el$9.firstChild;
42474
- insert(_el$9, () => getTitle(props), null);
42509
+ var _el$7 = _tmpl$5$7$1(), _el$8 = _el$7.firstChild;
42510
+ insert(_el$8, createComponent(Title, {
42511
+ get owningId() {
42512
+ return props.owningId;
42513
+ },
42514
+ get screeningAlert() {
42515
+ return props.screeningAlert;
42516
+ }
42517
+ }), null);
42475
42518
  insert(_el$8, createComponent(Show, {
42476
42519
  get when() {
42477
42520
  return isExpanded() || isAllergen();
42478
42521
  },
42479
42522
  get children() {
42480
- var _el$1 = _tmpl$3$d$1();
42481
- insert(_el$1, () => props.screeningAlert.description);
42482
- return _el$1;
42523
+ var _el$9 = _tmpl$3$d$1();
42524
+ insert(_el$9, () => props.screeningAlert.description);
42525
+ return _el$9;
42483
42526
  }
42484
42527
  }), null);
42485
42528
  insert(_el$8, createComponent(Show, {
@@ -42487,11 +42530,11 @@ const ScreeningAlert = (props) => {
42487
42530
  return !isAllergen();
42488
42531
  },
42489
42532
  get children() {
42490
- var _el$10 = _tmpl$4$c$1();
42491
- _el$10.$$click = () => {
42533
+ var _el$0 = _tmpl$4$c$1();
42534
+ _el$0.$$click = () => {
42492
42535
  toggleExpandedState();
42493
42536
  };
42494
- insert(_el$10, createComponent(Text, {
42537
+ insert(_el$0, createComponent(Text, {
42495
42538
  bold: true,
42496
42539
  "class": "text-blue-600 cursor-pointer",
42497
42540
  size: "xs",
@@ -42499,7 +42542,7 @@ const ScreeningAlert = (props) => {
42499
42542
  return ["See ", memo$1(() => isExpanded() ? "less" : "more")];
42500
42543
  }
42501
42544
  }));
42502
- return _el$10;
42545
+ return _el$0;
42503
42546
  }
42504
42547
  }), null);
42505
42548
  return _el$7;
@@ -43500,6 +43543,17 @@ const PrescribeEventDispatchProvider = (props) => {
43500
43543
  });
43501
43544
  ref?.dispatchEvent(event);
43502
43545
  };
43546
+ const dispatchDiagnosisCodeError = (errors) => {
43547
+ console.error(errors);
43548
+ const event = new CustomEvent("photon-diagnosis-code-error", {
43549
+ composed: true,
43550
+ bubbles: true,
43551
+ detail: {
43552
+ errors
43553
+ }
43554
+ });
43555
+ ref?.dispatchEvent(event);
43556
+ };
43503
43557
  const value = {
43504
43558
  dispatchFormValidate,
43505
43559
  dispatchDraftPrescriptionCreated,
@@ -43516,7 +43570,8 @@ const PrescribeEventDispatchProvider = (props) => {
43516
43570
  dispatchSignatureAttestationCanceled,
43517
43571
  dispatchAttestationResolved,
43518
43572
  dispatchAnalyticsTrackEvent: dispatchAnalyticsTrackEvent$1,
43519
- dispatchSupervisorError
43573
+ dispatchSupervisorError,
43574
+ dispatchDiagnosisCodeError
43520
43575
  };
43521
43576
  return createComponent(PrescribeEventDispatchContext.Provider, {
43522
43577
  value,
@@ -56036,6 +56091,10 @@ var CoverageStatus;
56036
56091
  CoverageStatus2["CoveredWithRestrictions"] = "COVERED_WITH_RESTRICTIONS";
56037
56092
  CoverageStatus2["NotCovered"] = "NOT_COVERED";
56038
56093
  })(CoverageStatus || (CoverageStatus = {}));
56094
+ var DiagnosisCodeType$1;
56095
+ (function(DiagnosisCodeType2) {
56096
+ DiagnosisCodeType2["Icd10"] = "ICD10";
56097
+ })(DiagnosisCodeType$1 || (DiagnosisCodeType$1 = {}));
56039
56098
  var FillState;
56040
56099
  (function(FillState2) {
56041
56100
  FillState2["Canceled"] = "CANCELED";
@@ -56076,6 +56135,7 @@ var PrescriptionScreeningAlertSeverity;
56076
56135
  var PrescriptionScreeningAlertType;
56077
56136
  (function(PrescriptionScreeningAlertType2) {
56078
56137
  PrescriptionScreeningAlertType2["Allergen"] = "ALLERGEN";
56138
+ PrescriptionScreeningAlertType2["Condition"] = "CONDITION";
56079
56139
  PrescriptionScreeningAlertType2["Drug"] = "DRUG";
56080
56140
  })(PrescriptionScreeningAlertType || (PrescriptionScreeningAlertType = {}));
56081
56141
  var PrescriptionState$2;
@@ -56084,7 +56144,6 @@ var PrescriptionState$2;
56084
56144
  PrescriptionState2["Canceled"] = "CANCELED";
56085
56145
  PrescriptionState2["Depleted"] = "DEPLETED";
56086
56146
  PrescriptionState2["Draft"] = "DRAFT";
56087
- PrescriptionState2["Expired"] = "EXPIRED";
56088
56147
  })(PrescriptionState$2 || (PrescriptionState$2 = {}));
56089
56148
  var RoutingConstraintType;
56090
56149
  (function(RoutingConstraintType2) {
@@ -56119,13 +56178,15 @@ const SearchTreatmentsDocument = { "kind": "Document", "definitions": [{ "kind":
56119
56178
  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" } }] } }] } }] } }] };
56120
56179
  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" } }] } }] } }] } }] };
56121
56180
  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" } }] } }] };
56181
+ 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" } }] } }] } }] } }] };
56122
56182
  const documents = {
56123
56183
  "\n fragment SupervisorCard on Supervisor {\n id\n firstName\n lastName\n npi\n }\n": SupervisorCardFragmentDoc,
56124
56184
  "\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,
56125
56185
  "\n query SearchTreatments($filter: TreatmentFilter!) {\n treatments(filter: $filter) {\n id\n name\n ... on Medication {\n recommendedDispenseUnits\n }\n }\n }\n": SearchTreatmentsDocument,
56126
56186
  "\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,
56127
56187
  "\n query MeUserQuery {\n me {\n id\n credentials\n address {\n state\n }\n }\n }\n": MeUserQueryDocument,
56128
- "\n query SupervisorCardQuery {\n supervisors {\n ...SupervisorCard\n }\n mostRecentSupervisor {\n id\n }\n }\n": SupervisorCardQueryDocument
56188
+ "\n query SupervisorCardQuery {\n supervisors {\n ...SupervisorCard\n }\n mostRecentSupervisor {\n id\n }\n }\n": SupervisorCardQueryDocument,
56189
+ "\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
56129
56190
  };
56130
56191
  function graphql(source) {
56131
56192
  var _a2;
@@ -56175,6 +56236,30 @@ graphql(`
56175
56236
  }
56176
56237
  }
56177
56238
  `);
56239
+ const ScreenDraftedPrescriptionsQuery = graphql(`
56240
+ query ScreenDraftedPrescriptionsQuery(
56241
+ $draftedPrescriptions: [DraftedPrescriptionInput!]!
56242
+ $patientId: ID!
56243
+ $diagnosisCodes: [DiagnosisCode!]
56244
+ ) {
56245
+ prescriptionScreen(
56246
+ draftedPrescriptions: $draftedPrescriptions
56247
+ patientId: $patientId
56248
+ diagnosisCodes: $diagnosisCodes
56249
+ ) {
56250
+ alerts {
56251
+ type
56252
+ description
56253
+ involvedEntities {
56254
+ id
56255
+ name
56256
+ __typename
56257
+ }
56258
+ severity
56259
+ }
56260
+ }
56261
+ }
56262
+ `);
56178
56263
  const CreateSupervisorMutation = graphql(`
56179
56264
  mutation CreateSupervisorMutation(
56180
56265
  $firstName: String!
@@ -57852,6 +57937,120 @@ const useSupervisor = () => {
57852
57937
  return context;
57853
57938
  };
57854
57939
 
57940
+ var DiagnosisCodeType = /* @__PURE__ */ ((DiagnosisCodeType2) => {
57941
+ DiagnosisCodeType2["Icd10"] = "ICD10";
57942
+ return DiagnosisCodeType2;
57943
+ })(DiagnosisCodeType || {});
57944
+
57945
+ const toScreenableDraftPrescription = (prescription) => ({
57946
+ dispenseAsWritten: prescription.dispenseAsWritten || void 0,
57947
+ dispenseQuantity: prescription.dispenseQuantity,
57948
+ dispenseUnit: prescription.dispenseUnit,
57949
+ fillsAllowed: prescription.fillsAllowed,
57950
+ daysSupply: prescription.daysSupply || void 0,
57951
+ instructions: prescription.instructions,
57952
+ notes: prescription.notes || void 0,
57953
+ effectiveDate: prescription.effectiveDate,
57954
+ treatment: {
57955
+ id: prescription.treatment.id
57956
+ }
57957
+ });
57958
+ const removeDuplicateTreatments = (prescriptions) => {
57959
+ const seenTreatmentIds = /* @__PURE__ */ new Set();
57960
+ return prescriptions.filter(({
57961
+ treatment
57962
+ }) => {
57963
+ if (seenTreatmentIds.has(treatment.id)) return false;
57964
+ seenTreatmentIds.add(treatment.id);
57965
+ return true;
57966
+ });
57967
+ };
57968
+ const PrescriptionScreeningContext = createContext();
57969
+ const PrescriptionScreeningProvider = (props) => {
57970
+ const client = usePhoton();
57971
+ const {
57972
+ draftPrescriptions
57973
+ } = useDraftPrescriptions();
57974
+ const {
57975
+ dispatchDiagnosisCodeError
57976
+ } = usePrescribeEventDispatch();
57977
+ const [screeningAlerts, setScreeningAlerts] = createSignal([]);
57978
+ const [diagnosisCodes, setDiagnosisCodes] = createSignal();
57979
+ createEffect(() => {
57980
+ if (!props.diagnosisCodes) {
57981
+ return;
57982
+ }
57983
+ if (typeof props.diagnosisCodes === "string") {
57984
+ const error = "Invalid diagnosis codes JSON passed in, cannot pass to screening request";
57985
+ dispatchDiagnosisCodeError([error]);
57986
+ return;
57987
+ }
57988
+ const validCodes = [];
57989
+ const invalidCodes = [];
57990
+ for (const dc of props.diagnosisCodes) {
57991
+ const isValid = dc.code && dc.type && Object.values(DiagnosisCodeType).includes(dc.type);
57992
+ if (isValid) {
57993
+ validCodes.push(dc);
57994
+ } else {
57995
+ invalidCodes.push(dc);
57996
+ }
57997
+ }
57998
+ if (invalidCodes.length) {
57999
+ const error = `Invalid diagnosis codes detected, cannot pass to screening request: ${JSON.stringify(invalidCodes)}`;
58000
+ dispatchDiagnosisCodeError([error]);
58001
+ return;
58002
+ }
58003
+ if (validCodes.length) {
58004
+ setDiagnosisCodes(validCodes);
58005
+ }
58006
+ });
58007
+ const screenDraftedPrescriptions = async () => {
58008
+ const inProgressDraftedPrescriptionTreatmentId = props.formStore.treatment?.value?.id;
58009
+ const draftedPrescriptions = draftPrescriptions().map(toScreenableDraftPrescription);
58010
+ if (inProgressDraftedPrescriptionTreatmentId) {
58011
+ draftedPrescriptions.push({
58012
+ treatment: {
58013
+ id: inProgressDraftedPrescriptionTreatmentId
58014
+ }
58015
+ });
58016
+ }
58017
+ const dedupedSanitizedPrescriptions = removeDuplicateTreatments(draftedPrescriptions);
58018
+ const {
58019
+ data
58020
+ } = await client.sdk.apolloClinical.query({
58021
+ query: ScreenDraftedPrescriptionsQuery,
58022
+ variables: {
58023
+ patientId: props.formStore.patient?.value?.id,
58024
+ draftedPrescriptions: dedupedSanitizedPrescriptions,
58025
+ diagnosisCodes: diagnosisCodes()
58026
+ }
58027
+ });
58028
+ setScreeningAlerts(data?.prescriptionScreen?.alerts ?? []);
58029
+ };
58030
+ createEffect(() => {
58031
+ if (draftPrescriptions().length > 0) {
58032
+ screenDraftedPrescriptions();
58033
+ }
58034
+ });
58035
+ const value = {
58036
+ screeningAlerts,
58037
+ screenDraftedPrescriptions
58038
+ };
58039
+ return createComponent(PrescriptionScreeningContext.Provider, {
58040
+ value,
58041
+ get children() {
58042
+ return props.children;
58043
+ }
58044
+ });
58045
+ };
58046
+ const usePrescriptionScreening = () => {
58047
+ const context = useContext(PrescriptionScreeningContext);
58048
+ if (!context) {
58049
+ throw new Error("usePrescriptionScreening must be used within PrescriptionScreeningProvider");
58050
+ }
58051
+ return context;
58052
+ };
58053
+
57855
58054
  /**
57856
58055
  * Creates a callback that is debounced and cancellable. The debounced callback is called on **trailing** edge.
57857
58056
  *
@@ -58719,7 +58918,7 @@ function checkHasPermission(subset, superset) {
58719
58918
  return subset.every((permission) => superset.includes(permission));
58720
58919
  }
58721
58920
 
58722
- const version$1 = "0.23.8";
58921
+ const version$1 = "0.23.9";
58723
58922
  const pkg = {
58724
58923
  version: version$1};
58725
58924
 
@@ -73555,6 +73754,10 @@ const DraftPrescriptions = (props) => {
73555
73754
  isLoadingPrefills,
73556
73755
  prescriptionIds
73557
73756
  } = useDraftPrescriptions();
73757
+ const {
73758
+ screenDraftedPrescriptions,
73759
+ screeningAlerts
73760
+ } = usePrescriptionScreening();
73558
73761
  const prescriptionRoutingConstraints = createMemo(() => {
73559
73762
  return getPrescriptionRoutingConstraints(props.routingConstraints);
73560
73763
  });
@@ -73573,7 +73776,7 @@ const DraftPrescriptions = (props) => {
73573
73776
  behavior: "smooth",
73574
73777
  block: "start"
73575
73778
  });
73576
- props.handleDraftPrescriptionsChange();
73779
+ screenDraftedPrescriptions();
73577
73780
  }
73578
73781
  };
73579
73782
  const checkCanEditPrescription = (draft, onConfirm) => {
@@ -73626,7 +73829,7 @@ const DraftPrescriptions = (props) => {
73626
73829
  }
73627
73830
  setDeleteDialogOpen(false);
73628
73831
  setDeleteDraftId(void 0);
73629
- props.handleDraftPrescriptionsChange();
73832
+ screenDraftedPrescriptions();
73630
73833
  };
73631
73834
  const handleDeleteCancel = () => {
73632
73835
  setDeleteDialogOpen(false);
@@ -73689,7 +73892,7 @@ const DraftPrescriptions = (props) => {
73689
73892
  },
73690
73893
  children: (draftPrescription) => createComponent(DraftPrescriptionItem, {
73691
73894
  get screeningAlerts() {
73692
- return props.screeningAlerts;
73895
+ return screeningAlerts();
73693
73896
  },
73694
73897
  get routingConstraint() {
73695
73898
  return prescriptionRoutingConstraints().get(draftPrescription.id);
@@ -73772,6 +73975,10 @@ const DraftPrescriptionForm = (props) => {
73772
73975
  dispatchOrderError,
73773
73976
  dispatchAnalyticsTrackEvent
73774
73977
  } = usePrescribeEventDispatch();
73978
+ const {
73979
+ screenDraftedPrescriptions,
73980
+ screeningAlerts
73981
+ } = usePrescriptionScreening();
73775
73982
  const [offCatalog, setOffCatalog] = createSignal(void 0);
73776
73983
  const [openDoseCalculator, setOpenDoseCalculator] = createSignal(false);
73777
73984
  const [searchText, setSearchText] = createSignal("");
@@ -73812,7 +74019,7 @@ const DraftPrescriptionForm = (props) => {
73812
74019
  value: e.detail.catalogId
73813
74020
  });
73814
74021
  }
73815
- props.screenDraftedPrescriptions();
74022
+ screenDraftedPrescriptions();
73816
74023
  };
73817
74024
  const handleAddPrescription = async () => {
73818
74025
  setIsLoading(true);
@@ -73861,7 +74068,7 @@ const DraftPrescriptionForm = (props) => {
73861
74068
  return;
73862
74069
  }
73863
74070
  props.onHideForm();
73864
- props.screenDraftedPrescriptions();
74071
+ screenDraftedPrescriptions();
73865
74072
  setOffCatalog(void 0);
73866
74073
  clearForm(props.actions, {
73867
74074
  notes: props.prefillNotes
@@ -73886,7 +74093,7 @@ const DraftPrescriptionForm = (props) => {
73886
74093
  clearForm(props.actions, {
73887
74094
  notes: props.prefillNotes
73888
74095
  });
73889
- props.screenDraftedPrescriptions();
74096
+ screenDraftedPrescriptions();
73890
74097
  });
73891
74098
  addEventListener$1(_el$2, "photon-treatment-selected", handleTreatmentSelected);
73892
74099
  _el$2._$owner = getOwner();
@@ -73894,7 +74101,7 @@ const DraftPrescriptionForm = (props) => {
73894
74101
  ScreeningAlerts,
73895
74102
  {
73896
74103
  get screeningAlerts() {
73897
- return props.screeningAlerts.filter((screeningAlert) => screeningAlert.involvedEntities.map((involvedEntity) => involvedEntity.id).indexOf(props.store.treatment?.value?.id) >= 0);
74104
+ return screeningAlerts().filter((screeningAlert) => screeningAlert.involvedEntities.map((involvedEntity) => involvedEntity.id).indexOf(props.store.treatment?.value?.id) >= 0);
73898
74105
  },
73899
74106
  get owningId() {
73900
74107
  return props.store.treatment?.value?.id;
@@ -76923,12 +77130,6 @@ const PrescriptionCard = (props) => {
76923
77130
  return props.store;
76924
77131
  },
76925
77132
  expandForm: () => setShowForm(true),
76926
- get handleDraftPrescriptionsChange() {
76927
- return props.screenDraftedPrescriptions;
76928
- },
76929
- get screeningAlerts() {
76930
- return props.screeningAlerts;
76931
- },
76932
77133
  get routingConstraints() {
76933
77134
  return pharmacySelectionContext.routingConstraints();
76934
77135
  },
@@ -76975,12 +77176,6 @@ const PrescriptionCard = (props) => {
76975
77176
  get prefillNotes() {
76976
77177
  return props.prefillNotes;
76977
77178
  },
76978
- get screenDraftedPrescriptions() {
76979
- return props.screenDraftedPrescriptions;
76980
- },
76981
- get screeningAlerts() {
76982
- return props.screeningAlerts;
76983
- },
76984
77179
  get catalogId() {
76985
77180
  return props.catalogId;
76986
77181
  },
@@ -77024,25 +77219,6 @@ const fulfillmentNeedsAddress$1 = (fulfillmentType) => {
77024
77219
  const shouldBlockOrderWithoutAddress$1 = (fulfillmentType, hasAddress) => {
77025
77220
  return fulfillmentNeedsAddress$1(fulfillmentType) && !hasAddress;
77026
77221
  };
77027
- const ScreenDraftedPrescriptionsQuery = gql$1`
77028
- query ScreenDraftedPrescriptionsQuery(
77029
- $draftedPrescriptions: [DraftedPrescriptionInput!]!
77030
- $patientId: ID!
77031
- ) {
77032
- prescriptionScreen(draftedPrescriptions: $draftedPrescriptions, patientId: $patientId) {
77033
- alerts {
77034
- type
77035
- description
77036
- involvedEntities {
77037
- id
77038
- name
77039
- __typename
77040
- }
77041
- severity
77042
- }
77043
- }
77044
- }
77045
- `;
77046
77222
  const calculateNeedsSupervisor = ({
77047
77223
  credentials,
77048
77224
  state
@@ -77076,7 +77252,9 @@ function PrescribeWorkflow(props) {
77076
77252
  const [isLoading, setIsLoading] = createSignal(true);
77077
77253
  const [authenticated, setAuthenticated] = createSignal(client?.authentication.state.isAuthenticated || false);
77078
77254
  const [, recentOrdersActions] = useRecentOrders();
77079
- const [screeningAlerts, setScreeningAlerts] = createSignal([]);
77255
+ const {
77256
+ screeningAlerts
77257
+ } = usePrescriptionScreening();
77080
77258
  const [overrideScreenAlerts, setOverrideScreenAlerts] = createSignal(false);
77081
77259
  const hasPatientAddress = createMemo(() => {
77082
77260
  const address = props.formStore?.address?.value ?? props.formStore?.patient?.value?.address;
@@ -77158,45 +77336,6 @@ function PrescribeWorkflow(props) {
77158
77336
  };
77159
77337
  return address;
77160
77338
  });
77161
- const removeDuplicateTreatments = (prescriptions) => {
77162
- const seenTreatmentIds = /* @__PURE__ */ new Set();
77163
- return prescriptions.filter((entity) => {
77164
- const treatmentId = entity.treatment.id;
77165
- if (seenTreatmentIds.has(treatmentId)) {
77166
- return false;
77167
- } else {
77168
- seenTreatmentIds.add(treatmentId);
77169
- return true;
77170
- }
77171
- });
77172
- };
77173
- const screenDraftedPrescriptions = async () => {
77174
- const inProgressDraftedPrescriptionTreatmentId = props.formStore.treatment?.value?.id;
77175
- const draftedPrescriptions = draftPrescriptions().map(toScreenableDraftPrescription);
77176
- if (inProgressDraftedPrescriptionTreatmentId) {
77177
- draftedPrescriptions.push({
77178
- treatment: {
77179
- id: inProgressDraftedPrescriptionTreatmentId
77180
- }
77181
- });
77182
- }
77183
- const dedupedSanitizedPrescriptions = removeDuplicateTreatments(draftedPrescriptions);
77184
- const {
77185
- data
77186
- } = await clinicalClient.query({
77187
- query: ScreenDraftedPrescriptionsQuery,
77188
- variables: {
77189
- patientId: props.formStore.patient?.value.id,
77190
- draftedPrescriptions: dedupedSanitizedPrescriptions
77191
- }
77192
- });
77193
- setScreeningAlerts(data?.prescriptionScreen?.alerts ?? []);
77194
- };
77195
- createEffect(() => {
77196
- if (draftPrescriptions().length > 0) {
77197
- screenDraftedPrescriptions();
77198
- }
77199
- });
77200
77339
  const displayAlertsWarning = () => {
77201
77340
  setIsScreeningAlertWarningOpen(true);
77202
77341
  };
@@ -77542,10 +77681,6 @@ function PrescribeWorkflow(props) {
77542
77681
  get prefillNotes() {
77543
77682
  return rxNotesPrefill();
77544
77683
  },
77545
- screenDraftedPrescriptions,
77546
- get screeningAlerts() {
77547
- return screeningAlerts();
77548
- },
77549
77684
  get enableOrder() {
77550
77685
  return props.enableOrder;
77551
77686
  },
@@ -77672,22 +77807,6 @@ function PrescribeWorkflow(props) {
77672
77807
  return _el$;
77673
77808
  })();
77674
77809
  }
77675
- const toScreenableDraftPrescription = (prescription) => {
77676
- return {
77677
- dispenseAsWritten: prescription.dispenseAsWritten || void 0,
77678
- dispenseQuantity: prescription.dispenseQuantity,
77679
- dispenseUnit: prescription.dispenseUnit,
77680
- fillsAllowed: prescription.fillsAllowed,
77681
- daysSupply: prescription.daysSupply || void 0,
77682
- instructions: prescription.instructions,
77683
- notes: prescription.notes || void 0,
77684
- // TODO: is effectiveDate needed to screen prescription?
77685
- effectiveDate: prescription.effectiveDate,
77686
- treatment: {
77687
- id: prescription.treatment.id
77688
- }
77689
- };
77690
- };
77691
77810
 
77692
77811
  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}";
77693
77812
 
@@ -78540,94 +78659,102 @@ const PhotonPrescribeWorkflowComponent = (props) => {
78540
78659
  return props.enableCoverageCheck;
78541
78660
  },
78542
78661
  get children() {
78543
- return createComponent(SupervisorProvider, {
78544
- get supervisor() {
78545
- return props.supervisor;
78662
+ return createComponent(PrescriptionScreeningProvider, {
78663
+ formStore: store,
78664
+ get diagnosisCodes() {
78665
+ return props.diagnosisCodes;
78546
78666
  },
78547
78667
  get children() {
78548
- return [(() => {
78549
- var _el$ = _tmpl$$e();
78550
- insert$1(_el$, tailwind);
78551
- return _el$;
78552
- })(), (() => {
78553
- var _el$2 = _tmpl$$e();
78554
- insert$1(_el$2, shoelaceDarkStyles);
78555
- return _el$2;
78556
- })(), (() => {
78557
- var _el$3 = _tmpl$$e();
78558
- insert$1(_el$3, shoelaceLightStyles);
78559
- return _el$3;
78560
- })(), (() => {
78561
- var _el$4 = _tmpl$$e();
78562
- insert$1(_el$4, styles$5);
78563
- return _el$4;
78564
- })(), createComponent(PrescribeWorkflow, {
78565
- get patientId() {
78566
- return props.patientId;
78567
- },
78568
- get hideSubmit() {
78569
- return props.hideSubmit;
78570
- },
78571
- get hideTemplates() {
78572
- return props.hideTemplates;
78573
- },
78574
- get hidePatientCard() {
78575
- return props.hidePatientCard;
78576
- },
78577
- get enableOrder() {
78578
- return props.enableOrder;
78579
- },
78580
- get enableMedHistory() {
78581
- return props.enableMedHistory;
78582
- },
78583
- get enableMedHistoryLinks() {
78584
- return props.enableMedHistoryLinks;
78585
- },
78586
- get enableMedHistoryRefillButton() {
78587
- return props.enableMedHistoryRefillButton;
78668
+ return createComponent(SupervisorProvider, {
78669
+ get supervisor() {
78670
+ return props.supervisor;
78588
78671
  },
78589
- get enableCombineAndDuplicate() {
78590
- return props.enableCombineAndDuplicate;
78591
- },
78592
- get optionalPatientAddress() {
78593
- return props.optionalPatientAddress;
78594
- },
78595
- get address() {
78596
- return props.address;
78597
- },
78598
- get weight() {
78599
- return props.weight;
78600
- },
78601
- get weightUnit() {
78602
- return props.weightUnit;
78603
- },
78604
- get additionalNotes() {
78605
- return props.additionalNotes;
78606
- },
78607
- get triggerSubmit() {
78608
- return props.triggerSubmit;
78609
- },
78610
- get toastBuffer() {
78611
- return props.toastBuffer;
78612
- },
78613
- formStore: store,
78614
- formActions: actions,
78615
- get externalOrderId() {
78616
- return props.externalOrderId;
78617
- },
78618
- get catalogId() {
78619
- return props.catalogId;
78620
- },
78621
- get allowOffCatalogSearch() {
78622
- return props.allowOffCatalogSearch;
78623
- },
78624
- get disableList() {
78625
- return props.disableList;
78626
- },
78627
- get groupId() {
78628
- return props.groupId;
78672
+ get children() {
78673
+ return [(() => {
78674
+ var _el$ = _tmpl$$e();
78675
+ insert$1(_el$, tailwind);
78676
+ return _el$;
78677
+ })(), (() => {
78678
+ var _el$2 = _tmpl$$e();
78679
+ insert$1(_el$2, shoelaceDarkStyles);
78680
+ return _el$2;
78681
+ })(), (() => {
78682
+ var _el$3 = _tmpl$$e();
78683
+ insert$1(_el$3, shoelaceLightStyles);
78684
+ return _el$3;
78685
+ })(), (() => {
78686
+ var _el$4 = _tmpl$$e();
78687
+ insert$1(_el$4, styles$5);
78688
+ return _el$4;
78689
+ })(), createComponent(PrescribeWorkflow, {
78690
+ get patientId() {
78691
+ return props.patientId;
78692
+ },
78693
+ get hideSubmit() {
78694
+ return props.hideSubmit;
78695
+ },
78696
+ get hideTemplates() {
78697
+ return props.hideTemplates;
78698
+ },
78699
+ get hidePatientCard() {
78700
+ return props.hidePatientCard;
78701
+ },
78702
+ get enableOrder() {
78703
+ return props.enableOrder;
78704
+ },
78705
+ get enableMedHistory() {
78706
+ return props.enableMedHistory;
78707
+ },
78708
+ get enableMedHistoryLinks() {
78709
+ return props.enableMedHistoryLinks;
78710
+ },
78711
+ get enableMedHistoryRefillButton() {
78712
+ return props.enableMedHistoryRefillButton;
78713
+ },
78714
+ get enableCombineAndDuplicate() {
78715
+ return props.enableCombineAndDuplicate;
78716
+ },
78717
+ get optionalPatientAddress() {
78718
+ return props.optionalPatientAddress;
78719
+ },
78720
+ get address() {
78721
+ return props.address;
78722
+ },
78723
+ get weight() {
78724
+ return props.weight;
78725
+ },
78726
+ get weightUnit() {
78727
+ return props.weightUnit;
78728
+ },
78729
+ get additionalNotes() {
78730
+ return props.additionalNotes;
78731
+ },
78732
+ get triggerSubmit() {
78733
+ return props.triggerSubmit;
78734
+ },
78735
+ get toastBuffer() {
78736
+ return props.toastBuffer;
78737
+ },
78738
+ formStore: store,
78739
+ formActions: actions,
78740
+ get externalOrderId() {
78741
+ return props.externalOrderId;
78742
+ },
78743
+ get catalogId() {
78744
+ return props.catalogId;
78745
+ },
78746
+ get allowOffCatalogSearch() {
78747
+ return props.allowOffCatalogSearch;
78748
+ },
78749
+ get disableList() {
78750
+ return props.disableList;
78751
+ },
78752
+ get groupId() {
78753
+ return props.groupId;
78754
+ }
78755
+ })];
78629
78756
  }
78630
- })];
78757
+ });
78631
78758
  }
78632
78759
  });
78633
78760
  }
@@ -78672,7 +78799,8 @@ customElement("photon-prescribe-workflow", {
78672
78799
  enableCoverageCheck: false,
78673
78800
  disableList: void 0,
78674
78801
  groupId: void 0,
78675
- supervisor: void 0
78802
+ supervisor: void 0,
78803
+ diagnosisCodes: void 0
78676
78804
  }, PhotonPrescribeWorkflowComponent);
78677
78805
 
78678
78806
  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>`);