hplx-feature-library 1.0.202 → 1.0.203

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/dist/APIAction-5-3i1gGx.cjs +1 -0
  2. package/dist/{APIAction-BpUGTq-P.js → APIAction-l6i46qgX.js} +24 -23
  3. package/dist/AllInvestigations/components/AllInvestigationsTable.d.ts +19 -0
  4. package/dist/AllInvestigations/index.d.ts +1 -0
  5. package/dist/AllInvestigations/index.js +4 -0
  6. package/dist/AllInvestigations/utils/test-tange-util.d.ts +8 -0
  7. package/dist/AllInvestigationsTable-BDLPOHjr.cjs +79 -0
  8. package/dist/AllInvestigationsTable-Dg-YXASz.js +17065 -0
  9. package/dist/Attachments/index.js +1 -1
  10. package/dist/{Attachments-3UkuRnaT.js → Attachments-BzZHI8d3.js} +6180 -6297
  11. package/dist/Attachments-CziD-_gm.cjs +186 -0
  12. package/dist/CommonConstant-Bj7SvPfU.js +436 -0
  13. package/dist/CommonConstant-COHqiSWL.cjs +1 -0
  14. package/dist/NineDots/index.js +4 -0
  15. package/dist/NineDots-BEzE3Pj8.cjs +3 -0
  16. package/dist/NineDots-CCtE2t9I.js +1788 -0
  17. package/dist/PatientAddEdit/index.js +1 -1
  18. package/dist/{PatientAddEdit-DjNwzBQV.js → PatientAddEdit-CPjv2_ZF.js} +20 -18
  19. package/dist/PatientAddEdit-UFho4sOA.cjs +7 -0
  20. package/dist/PatientPopup/index.js +1 -1
  21. package/dist/{PatientPopupContainer-RxozPrZy.js → PatientPopupContainer-AprY0NY2.js} +49 -47
  22. package/dist/PatientPopupContainer-Cwv4GWjB.cjs +36 -0
  23. package/dist/PediatricsCalculator/index.js +1 -1
  24. package/dist/PediatricsCalculatorTable-B4fTy1J5.cjs +9 -0
  25. package/dist/{PediatricsCalculatorTable-qu37FR7D.js → PediatricsCalculatorTable-G0ttbDpi.js} +228 -236
  26. package/dist/{PrintModal-DYCkcIdD.cjs → PrintModal-CHkA2pab.cjs} +50 -52
  27. package/dist/{PrintModal-D4AX-Rz-.js → PrintModal-DFzssQg2.js} +3261 -3227
  28. package/dist/{ReusableModal-2GKjVVbf.cjs → ReusableModal-CIgDYOWZ.cjs} +1 -1
  29. package/dist/{ReusableModal-BL_DwV8I.js → ReusableModal-CT4_gW1b.js} +1 -1
  30. package/dist/ReusableTable/ReusableTable.d.ts +3 -0
  31. package/dist/ReusableTable/ReusableTableConstants.d.ts +8 -0
  32. package/dist/ReusableTable/ReusableTableTypes.d.ts +96 -0
  33. package/dist/ReusableTable/components/EmptyTableContainer.d.ts +12 -0
  34. package/dist/ReusableTable/components/FilterCheckbox.d.ts +8 -0
  35. package/dist/ReusableTable/components/FilterDropdown.d.ts +17 -0
  36. package/dist/ReusableTable/components/Pagination.d.ts +2 -0
  37. package/dist/ReusableTable/components/TableBody.d.ts +2 -0
  38. package/dist/ReusableTable/components/TableCell.d.ts +3 -0
  39. package/dist/ReusableTable/components/TableFilterSelect.d.ts +12 -0
  40. package/dist/ReusableTable/components/TableHead.d.ts +2 -0
  41. package/dist/ReusableTable/components/TableMain.d.ts +2 -0
  42. package/dist/ReusableTable/components/TableRow.d.ts +3 -0
  43. package/dist/ReusableTable/context/TableContext.d.ts +21 -0
  44. package/dist/ReusableTable/context/TableContextBase.d.ts +26 -0
  45. package/dist/ReusableTable/context/useTableContext.d.ts +2 -0
  46. package/dist/SearchPatients/index.js +1 -1
  47. package/dist/{SearchPatients-CKu0XGDw.cjs → SearchPatients-BXNWucYz.cjs} +1 -1
  48. package/dist/{SearchPatients-B34Jmyh7.js → SearchPatients-BYGGaUoD.js} +3 -3
  49. package/dist/TrendGraphs/AreaChartComponent.d.ts +9 -0
  50. package/dist/TrendGraphs/LineChartComponent/DataPointToolTip.d.ts +16 -0
  51. package/dist/TrendGraphs/LineChartComponent/LineChartBody.d.ts +2 -0
  52. package/dist/TrendGraphs/LineChartComponent/LineChartHeader.d.ts +2 -0
  53. package/dist/TrendGraphs/LineChartComponent/index.d.ts +2 -0
  54. package/dist/TrendGraphs/context/index.d.ts +2 -0
  55. package/dist/TrendGraphs/hooks/useTrendGraphContext.d.ts +2 -0
  56. package/dist/TrendGraphs/utils/index.d.ts +4 -0
  57. package/dist/UserProfile/index.js +4 -0
  58. package/dist/UserProfile-CcEbhDhd.js +1761 -0
  59. package/dist/UserProfile-DkQgWGvV.cjs +14 -0
  60. package/dist/clsx-C11secjj.cjs +1 -0
  61. package/dist/clsx-OuTLNxxd.js +16 -0
  62. package/dist/common-utils-CJv4_aVl.cjs +6 -0
  63. package/dist/common-utils-Dq5TMP7t.js +1952 -0
  64. package/dist/components/Modal.d.ts +5 -0
  65. package/dist/constants/TrendGraphsConstants.d.ts +2 -0
  66. package/dist/dayjs.min-D52_GdfV.js +284 -0
  67. package/dist/dayjs.min-DXp74Ozx.cjs +1 -0
  68. package/dist/hplx-feature-library.css +1 -1
  69. package/dist/{index-UPYT3B9g.js → index-Bd0CDVpH.js} +3 -2
  70. package/dist/index-CJFGOBPb.js +122 -0
  71. package/dist/{index-CJ2AKRoq.cjs → index-DQlbIHh3.cjs} +26 -26
  72. package/dist/index-DfcUmlge.cjs +17 -0
  73. package/dist/{index-CRCsQdYf.cjs → index-DkA8S5IK.cjs} +1 -1
  74. package/dist/{index-BzwuwvT5.js → index-T1lUjzhG.js} +1 -1
  75. package/dist/index.d.ts +3 -0
  76. package/dist/index.js +18 -12
  77. package/dist/nineDots/index.d.ts +1 -0
  78. package/dist/print-pdf/index.js +1 -1
  79. package/dist/types/AllInvestigationTypes/index.js +4 -0
  80. package/dist/types/AllInvestigationTypes.d.ts +45 -0
  81. package/dist/types/CommonTypes.d.ts +1 -1
  82. package/dist/types/NineDotsTypes/index.js +1 -0
  83. package/dist/types/TrendGraphTypes.d.ts +19 -0
  84. package/dist/useClickOutside-BjJyGTec.js +14 -0
  85. package/dist/useClickOutside-DsVG12Cs.cjs +1 -0
  86. package/dist/userProfile/index.d.ts +1 -0
  87. package/package.json +14 -9
  88. package/dist/APIAction-Dh8yXpE0.cjs +0 -1
  89. package/dist/Attachments-B9GrTokn.cjs +0 -202
  90. package/dist/PatientAddEdit-DKtOZH2N.cjs +0 -7
  91. package/dist/PatientPopupContainer-Bg9zUots.cjs +0 -36
  92. package/dist/PediatricsCalculatorTable-bTvt7SWQ.cjs +0 -9
  93. package/dist/common-utils-B6431-iN.js +0 -2657
  94. package/dist/common-utils-DeErqLTB.cjs +0 -6
@@ -0,0 +1,17 @@
1
+ "use strict";const T=require("react");var l={exports:{}},y={};/**
2
+ * @license React
3
+ * use-sync-external-store-shim.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var L;function A(){if(L)return y;L=1;var i=T;function _(t,o){return t===o&&(t!==0||1/t===1/o)||t!==t&&o!==o}var c=typeof Object.is=="function"?Object.is:_,E=i.useState,u=i.useEffect,S=i.useLayoutEffect,p=i.useDebugValue;function O(t,o){var e=o(),n=E({inst:{value:e,getSnapshot:o}}),r=n[0].inst,a=n[1];return S(function(){r.value=e,r.getSnapshot=o,f(r)&&a({inst:r})},[t,e,o]),u(function(){return f(r)&&a({inst:r}),t(function(){f(r)&&a({inst:r})})},[t]),p(e),e}function f(t){var o=t.getSnapshot;t=t.value;try{var e=o();return!c(t,e)}catch{return!0}}function v(t,o){return o()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?v:O;return y.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:d,y}var m={};/**
10
+ * @license React
11
+ * use-sync-external-store-shim.development.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var w;function R(){return w||(w=1,process.env.NODE_ENV!=="production"&&function(){function i(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}function _(e,n){d||u.startTransition===void 0||(d=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var r=n();if(!t){var a=n();S(r,a)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),t=!0)}a=p({inst:{value:r,getSnapshot:n}});var s=a[0].inst,h=a[1];return f(function(){s.value=r,s.getSnapshot=n,c(s)&&h({inst:s})},[e,r,n]),O(function(){return c(s)&&h({inst:s}),e(function(){c(s)&&h({inst:s})})},[e]),v(r),r}function c(e){var n=e.getSnapshot;e=e.value;try{var r=n();return!S(e,r)}catch{return!0}}function E(e,n){return n()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var u=T,S=typeof Object.is=="function"?Object.is:i,p=u.useState,O=u.useEffect,f=u.useLayoutEffect,v=u.useDebugValue,d=!1,t=!1,o=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?E:_;m.useSyncExternalStore=u.useSyncExternalStore!==void 0?u.useSyncExternalStore:o,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),m}var x;function g(){return x||(x=1,process.env.NODE_ENV==="production"?l.exports=A():l.exports=R()),l.exports}exports.requireShim=g;
@@ -1,4 +1,4 @@
1
- "use strict";const X=require("./index-CJ2AKRoq.cjs"),pe=require("react"),Ee=require("react-dom"),Se=require("./warning-W0tkkrLJ.cjs");var Y={exports:{}},W={},G={exports:{}},T={},J={exports:{}},te;function ve(){return te||(te=1,function(p,s){Object.defineProperty(s,"__esModule",{value:!0}),s.default=a;/*!
1
+ "use strict";const X=require("./index-DQlbIHh3.cjs"),pe=require("react"),Ee=require("react-dom"),Se=require("./warning-W0tkkrLJ.cjs");var Y={exports:{}},W={},G={exports:{}},T={},J={exports:{}},te;function ve(){return te||(te=1,function(p,s){Object.defineProperty(s,"__esModule",{value:!0}),s.default=a;/*!
2
2
  * Adapted from jQuery UI core
3
3
  *
4
4
  * http://jqueryui.com
@@ -1,4 +1,4 @@
1
- import { r as de, f as Ee, g as Se } from "./index-UPYT3B9g.js";
1
+ import { r as de, f as Ee, g as Se } from "./index-Bd0CDVpH.js";
2
2
  import pe from "react";
3
3
  import Me from "react-dom";
4
4
  import { r as we } from "./warning-BozzKWdr.js";
package/dist/index.d.ts CHANGED
@@ -1,6 +1,9 @@
1
1
  export { default as PediatricsCalculator } from './PediatricsCalculator';
2
+ export { default as AllInvestigations } from './AllInvestigations';
2
3
  export { default as PatientPopup } from './PatientPopup';
3
4
  export { default as Attachments } from './Attachments';
4
5
  export { default as PatientAddEdit } from './PatientAddEdit';
5
6
  export { default as SearchPatients } from './SearchPatients';
7
+ export { default as NineDots } from './nineDots';
8
+ export { default as UserProfile } from './userProfile';
6
9
  export { default as PrintModal } from './print-pdf/index';
package/dist/index.js CHANGED
@@ -1,14 +1,20 @@
1
- import { P as a } from "./PediatricsCalculatorTable-qu37FR7D.js";
2
- import { P as e } from "./PatientPopupContainer-RxozPrZy.js";
3
- import { A as s } from "./Attachments-3UkuRnaT.js";
4
- import { P as i } from "./PatientAddEdit-DjNwzBQV.js";
5
- import { S as f } from "./SearchPatients-B34Jmyh7.js";
6
- import { P as d } from "./PrintModal-D4AX-Rz-.js";
1
+ import { P as r } from "./PediatricsCalculatorTable-G0ttbDpi.js";
2
+ import { A as e } from "./AllInvestigationsTable-Dg-YXASz.js";
3
+ import { P as i } from "./PatientPopupContainer-AprY0NY2.js";
4
+ import { A as P } from "./Attachments-BzZHI8d3.js";
5
+ import { P as m } from "./PatientAddEdit-CPjv2_ZF.js";
6
+ import { S as n } from "./SearchPatients-BYGGaUoD.js";
7
+ import { N as d } from "./NineDots-CCtE2t9I.js";
8
+ import { U as c } from "./UserProfile-CcEbhDhd.js";
9
+ import { P as u } from "./PrintModal-DFzssQg2.js";
7
10
  export {
8
- s as Attachments,
9
- i as PatientAddEdit,
10
- e as PatientPopup,
11
- a as PediatricsCalculator,
12
- d as PrintModal,
13
- f as SearchPatients
11
+ e as AllInvestigations,
12
+ P as Attachments,
13
+ d as NineDots,
14
+ m as PatientAddEdit,
15
+ i as PatientPopup,
16
+ r as PediatricsCalculator,
17
+ u as PrintModal,
18
+ n as SearchPatients,
19
+ c as UserProfile
14
20
  };
@@ -0,0 +1 @@
1
+ export { default } from './NineDots';
@@ -1,4 +1,4 @@
1
- import { P as f } from "../PrintModal-D4AX-Rz-.js";
1
+ import { P as f } from "../PrintModal-DFzssQg2.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -0,0 +1,4 @@
1
+ var I = /* @__PURE__ */ ((A) => (A.CLINICAL_NOTES = "CLINICAL_NOTES", A.DISCHARGE_SUMMARY = "DISCHARGE_SUMMARY", A.INVESTIGATIONS = "INVESTIGATIONS", A))(I || {});
2
+ export {
3
+ I as E_INVESTIGATIONS_SOURCE
4
+ };
@@ -0,0 +1,45 @@
1
+ export declare enum E_INVESTIGATIONS_SOURCE {
2
+ CLINICAL_NOTES = "CLINICAL_NOTES",
3
+ DISCHARGE_SUMMARY = "DISCHARGE_SUMMARY",
4
+ INVESTIGATIONS = "INVESTIGATIONS"
5
+ }
6
+ export interface I_InvestigationTest {
7
+ test_id: string;
8
+ test_value: string;
9
+ out_of_range: boolean;
10
+ watermelon_id?: string;
11
+ created_on: string;
12
+ test_name?: string;
13
+ test_unit?: string;
14
+ source_id: number;
15
+ source_type: E_INVESTIGATIONS_SOURCE;
16
+ isEditPermitted?: boolean;
17
+ id: string;
18
+ }
19
+ export interface I_InvestigationTestWithPrint extends I_InvestigationTest {
20
+ isPrintable?: boolean;
21
+ test_date: string;
22
+ }
23
+ export interface I_AllInvestigations {
24
+ isPrintable: boolean;
25
+ test_id: string;
26
+ test_name: string;
27
+ test_unit: string;
28
+ [key: string]: string | boolean | I_AllInvestigationsDateDetail;
29
+ }
30
+ export interface I_AllInvestigationsDateDetail {
31
+ test_value: string;
32
+ out_of_range: boolean;
33
+ created_on: string;
34
+ source_id: number;
35
+ source_type: E_INVESTIGATIONS_SOURCE;
36
+ isEditPermitted: boolean;
37
+ id: string;
38
+ }
39
+ export interface I_TestRanges {
40
+ test_id: string;
41
+ test_names: string;
42
+ test_units: string;
43
+ test_range_text: string;
44
+ test_range_rule: string;
45
+ }
@@ -139,7 +139,7 @@ export interface GlobalWindow {
139
139
  removeEventListener: (type: string, listener: (e: Event) => void) => void;
140
140
  user_id: string;
141
141
  orientation: number;
142
- _getTranslation: (word: string, language: string) => Promise<string>;
142
+ _getTranslationTemp: (word: string, language: string) => Promise<string>;
143
143
  }
144
144
  export interface I_PatientData {
145
145
  name: string;
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,19 @@
1
+ import { Dispatch, SetStateAction } from 'react';
2
+ export interface TrendGraphDataPoint {
3
+ date: string;
4
+ value: number;
5
+ }
6
+ export interface TrendGraphData {
7
+ unit: string;
8
+ data: TrendGraphDataPoint[];
9
+ testName: string;
10
+ color: AreaGraphColor;
11
+ }
12
+ export interface AreaGraphColor {
13
+ lineColor: string;
14
+ areaColor: string;
15
+ }
16
+ export interface TrendGraphContextType {
17
+ data: TrendGraphData;
18
+ setShowLineChart: Dispatch<SetStateAction<boolean>>;
19
+ }
@@ -0,0 +1,14 @@
1
+ import { useEffect as s } from "react";
2
+ const r = (e, t) => {
3
+ s(() => {
4
+ const n = (o) => {
5
+ e.current && !e.current.contains(o.target) && t();
6
+ };
7
+ return document.addEventListener("mousedown", n), () => {
8
+ document.removeEventListener("mousedown", n);
9
+ };
10
+ }, [e, t]);
11
+ };
12
+ export {
13
+ r as u
14
+ };
@@ -0,0 +1 @@
1
+ "use strict";const u=require("react"),c=(e,t)=>{u.useEffect(()=>{const n=s=>{e.current&&!e.current.contains(s.target)&&t()};return document.addEventListener("mousedown",n),()=>{document.removeEventListener("mousedown",n)}},[e,t])};exports.useClickOutside=c;
@@ -0,0 +1 @@
1
+ export { default } from './UserProfile';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hplx-feature-library",
3
3
  "private": false,
4
- "version": "1.0.202",
4
+ "version": "1.0.203",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "dev": "npm i hplx-react-elements-dev@qa && vite",
@@ -63,6 +63,14 @@
63
63
  "import": "./dist/constants/AttachmentConstants/index.js",
64
64
  "types": "./dist/constants/AttachmentConstants.d.ts"
65
65
  },
66
+ "./AllInvestigations": {
67
+ "import": "./dist/AllInvestigations/index.js",
68
+ "types": "./dist/AllInvestigations/index.d.ts"
69
+ },
70
+ "./Types/AllInvestigationTypes": {
71
+ "import": "./dist/types/AllInvestigationTypes/index.js",
72
+ "types": "./dist/types/AllInvestigationTypes.d.ts"
73
+ },
66
74
  "./PatientAddEdit": {
67
75
  "import": "./dist/PatientAddEdit/index.js",
68
76
  "types": "./dist/PatientAddEdit/index.d.ts"
@@ -72,28 +80,24 @@
72
80
  "types": "./dist/types/PatientAddEditTypes.d.ts"
73
81
  },
74
82
  "./common/constants/CommonConstants": {
75
- "import": "./dist/common/constants/CommonConstants/index.js",
76
- "types": "./dist/common/constants/CommonConstants.d.ts"
83
+ "import": "./dist/common/constants/CommonConstants/index.js"
77
84
  },
78
85
  "./PatientPopup": {
79
86
  "import": "./dist/PatientPopup/index.js",
80
87
  "types": "./dist/PatientPopup/index.d.ts"
81
88
  },
82
89
  "./print-pdf": {
83
- "import": "./dist/print-pdf/index.js",
84
- "types": "./dist/print-pdf/index.d.ts"
90
+ "import": "./dist/print-pdf/index.js"
85
91
  },
86
92
  "./NineDots": {
87
93
  "import": "./dist/NineDots/index.js",
88
94
  "types": "./dist/NineDots/index.d.ts"
89
95
  },
90
96
  "./UserProfile": {
91
- "import": "./dist/UserProfile/index.js",
92
- "types": "./dist/UserProfile/index.d.ts"
97
+ "import": "./dist/UserProfile/index.js"
93
98
  },
94
99
  "./SearchPatients": {
95
- "import": "./dist/SearchPatients/index.js",
96
- "types": "./dist/SearchPatients/index.d.ts"
100
+ "import": "./dist/SearchPatients/index.js"
97
101
  }
98
102
  },
99
103
  "dependencies": {
@@ -111,6 +115,7 @@
111
115
  "react-konva": "^18.2.12",
112
116
  "react-router-dom": "^7.9.4",
113
117
  "react-table": "^7.8.0",
118
+ "recharts": "^3.1.2",
114
119
  "swr": "^2.3.4",
115
120
  "to-words": "^4.7.0",
116
121
  "yup": "^1.7.1",
@@ -1 +0,0 @@
1
- "use strict";const o=require("./common-utils-DeErqLTB.cjs"),l="/preferences/doctor",m="/preferences/visitpad",d="/preferences/branch",E="patient/search",A="../api/modelGetAddPatientSuggestion.php",u="appointments/get",g="/v1/patient/add",h="/v1/patients",_="../api/modelSavePatientImage.php",f="../api/modelDeletePatientImage.php",P="/patient/detail",I=async(s="",t={},e,n,r)=>{const{doc_rid:a=""}=t;let c="";Array.isArray(s)?c=s.map(i=>`&fields_required=${encodeURIComponent(i)}`).join(""):s&&(c=`&fields_required=${encodeURIComponent(s)}`);try{const i=await o.hplxAPI(r?.token,r.envName).get(`${l}/${a||e}?branch_id=${n}`+c),{data:p}=i||{};return Promise.resolve(p)}catch(i){return console.error("Error fetching doctor preference:",i),Promise.reject(i)}},D=async(s="",t,e)=>{try{const n=await o.ReArchAPI(e.token,e.envName).get(`${d}/${t}?fields_required=${s}`),{data:r}=n||{};return Promise.resolve(r)}catch(n){return console.log(n),Promise.reject(n)}},T=async(s,t,e,n,r)=>{try{const a={appnt_date:s,doctor_role_id:t,doctor_id:n,org_branch_id:e},c=await o.ReArchAPI(r.token,r.envName).post(u,{...a}),{data:i}=c||{};return Promise.resolve(i)}catch(a){return a instanceof Error&&console.error("Error fetching appointments:",a.message),a?.response?.status===401&&o.handle401Status(),Promise.reject(a)}},w=async(s,t)=>{let e=[];const n=await T(o.dayjs().format("YYYY-MM-DD"),s.doctor_role_id,s.branch_id,s.doctor_id,t);n?.appointments?.length&&(e=n.appointments),window.filteredUpcomingAppts=[],e.length&&(s.term?.length?window.filteredUpcomingAppts=e.filter(r=>r.org_person_name.length&&r.org_person_name.toLowerCase().includes(s.term.toLowerCase())&&r.appnt_date>=o.dayjs(new Date).format("YYYY-MM-DD")&&(r.remote_appnt_status==="CONFIRMED"||r.appnt_status===0||r.appnt_status===3||r.appnt_status===5)):window.filteredUpcomingAppts=e.filter(r=>r.appnt_date>=o.dayjs(new Date).format("YYYY-MM-DD")&&(r.remote_appnt_status==="CONFIRMED"||r.appnt_status===0||r.appnt_status===3||r.appnt_status===5)));try{const r=await o.ReArchAPI(t.token,t.envName).post(E,s),{data:a}=r||{};return Promise.resolve(a)}catch(r){return console.log(r),null}},y=async s=>{try{const t=await o.hplxAPI(s.token,s.envName).post(A),{data:e}=t||{},{apiError:n}=e||{};if(n)throw new Error(n);return Promise.resolve(e)}catch(t){return t instanceof Error&&console.error("Error fetching referred by list:",t.message),t?.response?.status===401&&o.handle401Status(),Promise.reject(t)}},N=async(s,t)=>{try{const e=await o.ReArchAPI(t.token,t.envName).post(g,{...s,token:t.token}),{data:n}=e||{};return Promise.resolve(n)}catch(e){return Promise.reject(e)}},R=async(s,t)=>{try{const e=await o.ReArchAPI(t.token,t.envName).put(h+"/"+s?.person_role_id,{...s}),{data:n}=e||{};return Promise.resolve(n)}catch(e){return console.log(e),Promise.reject(e)}},v=async(s,t)=>{try{const e=await o.hplxAPI(t.token,t.envName).post(_,s),{data:n}=e||{};return Promise.resolve(n)}catch(e){return console.log(e),Promise.reject(e)}},j=async(s,t)=>{try{const e=await o.hplxAPI(t.token,t.envName).post(f,s),{data:n}=e||{};return Promise.resolve(n)}catch(e){return console.log(e),Promise.reject(e)}},Y=async({callback:s,payload:t,token_env:e,isCallbackNeeded:n=!0})=>{try{const r=t;window?.partner_service_enabled==="1"&&(r.partner_service_enabled=!0);const a=await o.ReArchAPI(e.token,e.envName).post(P,{...r}),{data:c}=a||{},{error:i}=c||{};if(i)throw new Error(i);if(n)s(c);else return c}catch(r){console.log(r)}},C=async({doc_id:s="",doc_rid:t=""},e,n,r,a)=>{try{const c={branch_id:n,doctor_id:s||r,doctor_role_id:t||a},i=await o.hplxAPI(e.token,e.envName).post(m,c),{data:p}=i||{};return Promise.resolve(p)}catch(c){return console.error("Error fetching visitpad preference:",c),Promise.reject(c)}};exports.GET_PATIENT_DETAILS=P;exports.addPatientDetails=N;exports.addPatientImage=v;exports.deletePatientImage=j;exports.getBranchPreferences=D;exports.getDoctorPreference=I;exports.getPatientDetails=Y;exports.getPatientList=w;exports.getReferredByList=y;exports.getVisitpadPreference=C;exports.updatePatientDetails=R;