ai-ebm-assistant-v4 0.2.5 → 0.2.6

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.es.js CHANGED
@@ -133244,20 +133244,9 @@ function OutputSTepper({ getInputData: en, params: Ye, data: tn, setData: nn, lo
133244
133244
  ragResponse: _n?.length === 2 ? vn : kn
133245
133245
  }, [ra, ma] = React.useState(""), [ia, oa] = React.useState(!1);
133246
133246
  return /* @__PURE__ */ jsxs(Box, { sx: { padding: 2, width: "100%" }, children: [
133247
- /* @__PURE__ */ jsx$3(Box, { sx: { position: "sticky", top: 0, zIndex: 2 }, children: /* @__PURE__ */ jsx$3(
133248
- Stepper,
133249
- {
133250
- activeStep: hn,
133251
- sx: {
133252
- padding: 2,
133253
- borderRadius: 2,
133254
- backgroundColor: mn?.palette?.background?.default
133255
- },
133256
- children: _n.map((ta, aa) => /* @__PURE__ */ jsx$3(Step$1, { children: /* @__PURE__ */ jsx$3(StepLabel, { onClick: () => On(aa), children: ta }) }, ta))
133257
- }
133258
- ) }),
133259
- /* @__PURE__ */ jsx$3(Box, { sx: { height: "70vh", overflowY: "auto", display: "flex", flexDirection: "column" }, children: hn == 0 ? /* @__PURE__ */ jsx$3(Fragment, { children: wn?.diagnosesData?.length > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
133260
- /* @__PURE__ */ jsx$3(Grid, { container: !0, p: 2, flexDirection: "column", sx: { flexGrow: 1, pb: 8 }, children: wn?.diagnosesData?.map((ta, aa) => {
133247
+ /* @__PURE__ */ jsx$3(Box, { sx: { position: "sticky", top: 0, zIndex: 1 }, children: /* @__PURE__ */ jsx$3(Stepper, { activeStep: hn, sx: { padding: 2, borderRadius: 2, backgroundColor: mn?.palette?.background?.default }, children: _n.map((ta, aa) => /* @__PURE__ */ jsx$3(Step$1, { ...{}, children: /* @__PURE__ */ jsx$3(StepLabel, { onClick: () => On(aa), ...{}, children: ta }) }, ta)) }) }),
133248
+ /* @__PURE__ */ jsx$3("div", { children: /* @__PURE__ */ jsx$3("div", { style: { height: "70vh" }, children: hn == 0 ? /* @__PURE__ */ jsx$3(Grid, { container: !0, p: 2, justifyContent: "space-between", flexDirection: "column", children: wn?.diagnosesData?.length > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
133249
+ /* @__PURE__ */ jsx$3(Grid, { container: !0, p: 2, justifyContent: "space-between", flexDirection: "column", height: "100vh", children: /* @__PURE__ */ jsx$3(Grid, { item: !0, children: wn?.diagnosesData?.map((ta, aa) => {
133261
133250
  const Aa = Object.values(ta?.justification).join("|| "), na = [
133262
133251
  ...new Set(
133263
133252
  ta?.graph_evidence?.nodes?.map((sa) => sa?.reference)?.filter(Boolean)
@@ -133279,228 +133268,115 @@ function OutputSTepper({ getInputData: en, params: Ye, data: tn, setData: nn, lo
133279
133268
  diagnosisAction: ta?.action ?? "",
133280
133269
  setAccepted: Kn,
133281
133270
  allowed: ta.allowed
133282
- },
133283
- aa
133271
+ }
133284
133272
  );
133285
- }) }),
133286
- /* @__PURE__ */ jsx$3(
133287
- Grid,
133288
- {
133289
- container: !0,
133290
- justifyContent: "flex-end",
133291
- alignItems: "center",
133292
- sx: {
133293
- mt: 2,
133294
- padding: 2,
133295
- borderRadius: 2,
133296
- position: "sticky",
133297
- bottom: 0,
133298
- zIndex: 3,
133299
- backgroundColor: mn?.palette?.background?.default
133300
- },
133301
- gap: 2,
133302
- children: /* @__PURE__ */ jsx$3(Button$1, { variant: "outlined", color: "primary", onClick: In, children: "Next" })
133303
- }
133304
- )
133305
- ] }) : /* @__PURE__ */ jsx$3(
133306
- LoadingAiOutput,
133307
- {
133308
- animationJson: findingDiagnosisJson,
133309
- loadingsentance: Qn
133310
- }
133311
- ) }) : hn == 1 ? /* @__PURE__ */ jsx$3(Fragment, { children: /* @__PURE__ */ jsx$3(Grid, { container: !0, p: 1, children: Object.keys(vn).length !== 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
133312
- /* @__PURE__ */ jsx$3(Grid, { item: !0, xs: 12, container: !0, children: /* @__PURE__ */ jsx$3(Tabs, { value: yn, onChange: (ta, aa) => bn(aa), children: Object.keys(vn).map((ta) => /* @__PURE__ */ jsx$3(Tab, { label: ta }, ta)) }) }),
133313
- /* @__PURE__ */ jsx$3(Grid, { item: !0, xs: 12, mt: 2, container: !0, children: Object.values(vn).map(
133314
- (ta, aa) => yn === aa && /* @__PURE__ */ jsxs("div", { children: [
133315
- /* @__PURE__ */ jsx$3(Summary, { data: ta?.summary }),
133273
+ }) }) }),
133274
+ /* @__PURE__ */ jsx$3(Grid, { container: !0, justifyContent: "flex-end", alignItems: "flex-end", sx: { mt: 2, flexGrow: 1, padding: 2, borderRadius: 2, position: "sticky", bottom: 0, zIndex: 1, backgroundColor: mn?.palette?.background?.default }, gap: 2, children: /* @__PURE__ */ jsx$3(Button$1, { variant: "outlined", color: "primary", onClick: In, children: "Next" }) })
133275
+ ] }) : /* @__PURE__ */ jsx$3(Fragment, { children: /* @__PURE__ */ jsx$3(LoadingAiOutput, { animationJson: findingDiagnosisJson, loadingsentance: Qn }) }) }) : hn == 1 ? /* @__PURE__ */ jsx$3(Fragment, { children: /* @__PURE__ */ jsx$3(Grid, { container: !0, p: 1, children: Object.keys(vn).length !== 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
133276
+ /* @__PURE__ */ jsx$3(Grid, { item: !0, xs: 12, container: !0, children: /* @__PURE__ */ jsx$3(Tabs, { value: yn, onChange: (ta, aa) => bn(aa), children: Object.keys(vn).map((ta, aa) => /* @__PURE__ */ jsx$3(Tab, { label: ta }, ta)) }) }),
133277
+ /* @__PURE__ */ jsx$3(Grid, { item: !0, xs: 12, mt: 2, container: !0, children: Object.values(vn).map((ta, aa) => yn === aa && /* @__PURE__ */ jsxs("div", { children: [
133278
+ /* @__PURE__ */ jsx$3(Summary, { data: ta?.summary }),
133279
+ /* @__PURE__ */ jsx$3(SuggestedOrders, { data: ta, setData: nn, loadingData: an, params: Ye }),
133280
+ /* @__PURE__ */ jsx$3(Paper, { elevation: 0, sx: {
133281
+ border: `2px solid ${mn?.palette?.lineBorderFill}`,
133282
+ margin: "2px",
133283
+ borderRadius: 1,
133284
+ backgroundColor: "#fff"
133285
+ }, children: /* @__PURE__ */ jsxs(Grid, { container: !0, p: 2, children: [
133286
+ /* @__PURE__ */ jsx$3(Typography, { variant: "head2", color: mn?.palette?.secondaryText, children: "Feedback" }),
133316
133287
  /* @__PURE__ */ jsx$3(
133317
- SuggestedOrders,
133288
+ TextField,
133318
133289
  {
133319
- data: ta,
133320
- setData: nn,
133321
- loadingData: an,
133322
- params: Ye
133323
- }
133324
- ),
133325
- /* @__PURE__ */ jsx$3(
133326
- Paper,
133327
- {
133328
- elevation: 0,
133329
- sx: {
133330
- border: `2px solid ${mn?.palette?.lineBorderFill}`,
133331
- margin: "2px",
133332
- borderRadius: 1,
133333
- backgroundColor: "#fff"
133290
+ fullWidth: !0,
133291
+ multiline: !0,
133292
+ rows: 4,
133293
+ variant: "outlined",
133294
+ margin: "dense",
133295
+ value: rn,
133296
+ onChange: (Aa) => {
133297
+ on(Aa.target.value);
133334
133298
  },
133335
- children: /* @__PURE__ */ jsxs(Grid, { container: !0, p: 2, children: [
133336
- /* @__PURE__ */ jsx$3(Typography, { variant: "head2", color: mn?.palette?.secondaryText, children: "Feedback" }),
133337
- /* @__PURE__ */ jsx$3(
133338
- TextField,
133339
- {
133340
- fullWidth: !0,
133341
- multiline: !0,
133342
- rows: 4,
133343
- variant: "outlined",
133344
- margin: "dense",
133345
- value: rn,
133346
- onChange: (Aa) => on(Aa.target.value),
133347
- placeholder: "Type your feedback here"
133348
- }
133349
- )
133350
- ] })
133299
+ placeholder: "Type your feedback here"
133351
133300
  }
133352
133301
  )
133353
- ] }, aa)
133354
- ) }),
133355
- /* @__PURE__ */ jsxs(
133356
- Grid,
133357
- {
133358
- container: !0,
133359
- justifyContent: "flex-end",
133360
- alignItems: "center",
133361
- sx: {
133362
- mt: 2,
133363
- padding: 2,
133364
- borderRadius: 2,
133365
- position: "sticky",
133366
- bottom: 0,
133367
- zIndex: 3,
133368
- backgroundColor: mn?.palette?.background?.default
133369
- },
133370
- gap: 2,
133371
- children: [
133372
- /* @__PURE__ */ jsx$3(Button$1, { variant: "outlined", color: "primary", onClick: () => fn(0), children: "Previous" }),
133373
- wn?.diagnosesData?.filter((ta) => ta.checked).map((ta) => ta.diagnosiscode)?.length > 1 && /* @__PURE__ */ jsx$3(Button$1, { variant: "outlined", color: "primary", onClick: Nn, children: "Next" }),
133374
- hn === _n.length - 1 ? /* @__PURE__ */ jsx$3(
133375
- ChatModal,
133376
- {
133377
- apiEndPoint: "https://ebm-service-graphrag-dev.ainqaplatform.in/v1/chat",
133378
- chatBody: ea,
133379
- title: "AI Clinical Assistant",
133380
- modalCloseIconClassName: "!right-55 !top-161 !z-11111111111 absolute",
133381
- geminiResponseIconClassName: "!right-55 !top-161",
133382
- height: "h-[700px]",
133383
- modalWidth: "500px",
133384
- modalMinWidth: "500px",
133385
- showAi: !0,
133386
- isOpen: ia,
133387
- onOpen: () => oa(!0),
133388
- onClose: () => oa(!1),
133389
- input: ra,
133390
- setInput: ma
133391
- }
133392
- ) : null
133393
- ]
133394
- }
133395
- )
133396
- ] }) : /* @__PURE__ */ jsx$3(
133397
- LoadingAiOutput,
133398
- {
133399
- animationJson: singleGuidelineJson,
133400
- loadingsentance: Rn
133401
- }
133402
- ) }) }) : /* @__PURE__ */ jsx$3(Grid, { container: !0, p: 2, children: Object.keys(kn).length !== 0 ? /* @__PURE__ */ jsxs(Grid, { container: !0, xs: 12, children: [
133302
+ ] }) })
133303
+ ] }, aa)) }),
133304
+ /* @__PURE__ */ jsxs(Grid, { container: !0, justifyContent: "flex-end", alignItems: "center", sx: { mt: 2, flexGrow: 1, padding: 2, borderRadius: 2, position: "sticky", bottom: 0, zIndex: 1, backgroundColor: mn?.palette?.background?.default }, gap: 2, children: [
133305
+ /* @__PURE__ */ jsx$3(Button$1, { variant: "outlined", color: "primary", onClick: () => fn(0), children: "Previous" }),
133306
+ wn?.diagnosesData?.filter((ta) => ta.checked).map((ta) => ta.diagnosiscode)?.length > 1 ? /* @__PURE__ */ jsx$3(Button$1, { variant: "outlined", color: "primary", onClick: Nn, children: "Next" }) : /* @__PURE__ */ jsx$3(Fragment, {}),
133307
+ hn === _n.length - 1 ? /* @__PURE__ */ jsx$3(
133308
+ ChatModal,
133309
+ {
133310
+ apiEndPoint: "https://ebm-service-graphrag-dev.ainqaplatform.in/v1/chat",
133311
+ chatBody: ea,
133312
+ title: "AI Clinical Assistant",
133313
+ modalCloseIconClassName: "!right-55 !top-161 !z-11111111111 absolute",
133314
+ geminiResponseIconClassName: "!right-55 !top-161",
133315
+ height: "h-[700px]",
133316
+ modalWidth: "500px",
133317
+ modalMinWidth: "500px",
133318
+ showAi: !0,
133319
+ isOpen: ia,
133320
+ onOpen: () => oa(!0),
133321
+ onClose: () => oa(!1),
133322
+ input: ra,
133323
+ setInput: ma
133324
+ }
133325
+ ) : /* @__PURE__ */ jsx$3(Fragment, {})
133326
+ ] })
133327
+ ] }) : /* @__PURE__ */ jsx$3(LoadingAiOutput, { animationJson: singleGuidelineJson, loadingsentance: Rn }) }) }) : /* @__PURE__ */ jsx$3(Grid, { container: !0, p: 2, children: Object.keys(kn).length !== 0 ? /* @__PURE__ */ jsxs(Grid, { container: !0, xs: 12, children: [
133403
133328
  kn?.summary && /* @__PURE__ */ jsx$3(Grid, { m: 1, children: /* @__PURE__ */ jsx$3(Summary, { data: kn?.summary }) }),
133404
- /* @__PURE__ */ jsx$3(Grid, { m: 1, children: /* @__PURE__ */ jsx$3(
133405
- SuggestedOrders,
133406
- {
133407
- data: kn,
133408
- setData: nn,
133409
- loadingData: an,
133410
- params: Ye
133411
- }
133412
- ) }),
133329
+ /* @__PURE__ */ jsx$3(Grid, { m: 1, children: /* @__PURE__ */ jsx$3(SuggestedOrders, { data: kn, setData: nn, loadingData: an, params: Ye }) }),
133413
133330
  kn?.lifeStyleAdvices?.length > 0 && /* @__PURE__ */ jsx$3(Grid, { m: 1, children: /* @__PURE__ */ jsx$3(EducationDescription, { data: kn, setData: nn }) }),
133414
- /* @__PURE__ */ jsx$3(
133415
- Paper,
133416
- {
133417
- elevation: 0,
133418
- sx: {
133419
- border: `2px solid ${mn?.palette?.lineBorderFill}`,
133420
- margin: "2px",
133421
- borderRadius: 1,
133422
- backgroundColor: "#fff",
133423
- width: "100%",
133424
- padding: 2
133425
- },
133426
- children: /* @__PURE__ */ jsxs(Grid, { container: !0, p: 2, children: [
133427
- /* @__PURE__ */ jsx$3(Typography, { variant: "head2", color: mn?.palette?.secondaryText, children: "Feedback" }),
133428
- /* @__PURE__ */ jsx$3(
133429
- TextField,
133430
- {
133431
- fullWidth: !0,
133432
- multiline: !0,
133433
- rows: 4,
133434
- variant: "outlined",
133435
- margin: "dense",
133436
- value: rn,
133437
- onChange: (ta) => on(ta.target.value),
133438
- placeholder: "Type your feedback here"
133439
- }
133440
- )
133441
- ] })
133442
- }
133443
- ),
133444
- /* @__PURE__ */ jsxs(
133445
- Grid,
133446
- {
133447
- container: !0,
133448
- justifyContent: "flex-end",
133449
- alignItems: "center",
133450
- sx: {
133451
- mt: 2,
133452
- padding: 2,
133453
- borderRadius: 2,
133454
- position: "sticky",
133455
- bottom: 0,
133456
- zIndex: 3,
133457
- backgroundColor: mn?.palette?.background?.default
133458
- },
133459
- gap: 2,
133460
- children: [
133461
- /* @__PURE__ */ jsx$3(Button$1, { variant: "outlined", color: "primary", onClick: () => fn(1), children: "Previous" }),
133462
- /* @__PURE__ */ jsx$3(Button$1, { onClick: sn, variant: "contained", color: "primary", children: "Generate Order" }),
133463
- /* @__PURE__ */ jsx$3(
133464
- ChatModal,
133465
- {
133466
- apiEndPoint: "https://ebm-service-graphrag-dev.ainqaplatform.in/v1/chat",
133467
- chatBody: ea,
133468
- title: "AI Clinical Assistant",
133469
- modalCloseIconClassName: "!right-55 !top-161 !z-11111111111 absolute",
133470
- geminiResponseIconClassName: "!right-55 !top-161",
133471
- height: "h-[700px]",
133472
- modalWidth: "600px",
133473
- modalMinWidth: "600px",
133474
- showAi: !0,
133475
- isOpen: ia,
133476
- onOpen: () => oa(!0),
133477
- onClose: () => oa(!1),
133478
- input: ra,
133479
- setInput: ma
133480
- }
133481
- )
133482
- ]
133483
- }
133484
- )
133485
- ] }) : /* @__PURE__ */ jsx$3(
133486
- "div",
133487
- {
133488
- style: {
133489
- display: "flex",
133490
- justifyContent: "center",
133491
- alignItems: "center",
133492
- width: "100%",
133493
- flexGrow: 1
133494
- },
133495
- children: /* @__PURE__ */ jsx$3(
133496
- LoadingAiOutput,
133331
+ /* @__PURE__ */ jsx$3(Paper, { elevation: 0, sx: {
133332
+ border: `2px solid ${mn?.palette?.lineBorderFill}`,
133333
+ margin: "2px",
133334
+ borderRadius: 1,
133335
+ backgroundColor: "#fff",
133336
+ width: "100%",
133337
+ padding: 2
133338
+ }, children: /* @__PURE__ */ jsxs(Grid, { container: !0, p: 2, children: [
133339
+ /* @__PURE__ */ jsx$3(Typography, { variant: "head2", color: mn?.palette?.secondaryText, children: "Feedback" }),
133340
+ /* @__PURE__ */ jsx$3(
133341
+ TextField,
133342
+ {
133343
+ fullWidth: !0,
133344
+ multiline: !0,
133345
+ rows: 4,
133346
+ variant: "outlined",
133347
+ margin: "dense",
133348
+ value: rn,
133349
+ onChange: (ta) => {
133350
+ on(ta.target.value);
133351
+ },
133352
+ placeholder: "Type your feedback here"
133353
+ }
133354
+ )
133355
+ ] }) }),
133356
+ /* @__PURE__ */ jsxs(Grid, { container: !0, justifyContent: "flex-end", alignItems: "center", sx: { mt: 2, flexGrow: 1, padding: 2, borderRadius: 2, position: "sticky", bottom: 0, zIndex: 1, backgroundColor: mn?.palette?.background?.default }, gap: 2, children: [
133357
+ /* @__PURE__ */ jsx$3(Button$1, { variant: "outlined", color: "primary", onClick: () => fn(1), children: "Previous" }),
133358
+ /* @__PURE__ */ jsx$3(Button$1, { onClick: sn, variant: "contained", color: "primary", children: "Generate Order" }),
133359
+ /* @__PURE__ */ jsx$3(
133360
+ ChatModal,
133497
133361
  {
133498
- animationJson: multiGuidelineJson,
133499
- loadingsentance: Fn
133362
+ apiEndPoint: "https://ebm-service-graphrag-dev.ainqaplatform.in/v1/chat",
133363
+ chatBody: ea,
133364
+ title: "AI Clinical Assistant",
133365
+ modalCloseIconClassName: "!right-55 !top-161 !z-11111111111 absolute",
133366
+ geminiResponseIconClassName: "!right-55 !top-161",
133367
+ height: "h-[700px]",
133368
+ modalWidth: "600px",
133369
+ modalMinWidth: "600px",
133370
+ showAi: !0,
133371
+ isOpen: ia,
133372
+ onOpen: () => oa(!0),
133373
+ onClose: () => oa(!1),
133374
+ input: ra,
133375
+ setInput: ma
133500
133376
  }
133501
133377
  )
133502
- }
133503
- ) }) })
133378
+ ] })
133379
+ ] }) : /* @__PURE__ */ jsx$3("div", { style: { display: "flex", justifyContent: "center", alignItems: "center", width: "100%", flexGrow: 1 }, children: /* @__PURE__ */ jsx$3(LoadingAiOutput, { animationJson: multiGuidelineJson, loadingsentance: Fn }) }) }) }) })
133504
133380
  ] });
133505
133381
  }
133506
133382
  function ChiefComplaintsIcn(en) {