@argusoft/medplat-app-shell 1.0.6 → 1.0.8
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/package.json +139 -141
- package/src/GlobalErrorBoundary.jsx +31 -0
- package/src/SilentErrorFallback.jsx +68 -0
- package/src/TrackingProviderWrapper.jsx +40 -0
- package/src/_tests_/__mocks__/MockTranslationProvider.jsx +21 -0
- package/src/_tests_/__mocks__/ckeditor.js +45 -0
- package/src/_tests_/__mocks__/fileMock.js +1 -0
- package/src/_tests_/__mocks__/useranalytics.js +5 -0
- package/src/_tests_/views/components/Dashboard/DashboardUI.test.jsx +137 -0
- package/src/_tests_/views/components/Dashboard/DashboardUIMock.js +877 -0
- package/src/_tests_/views/components/ForgotPassword/ForgotPassword.test.jsx +314 -0
- package/src/_tests_/views/components/LocationDirective/LocationDirective.test.jsx.disable +229 -0
- package/src/_tests_/views/components/LocationDirective/mockLocationDirective.js +810 -0
- package/src/_tests_/views/components/LocationType/MockLocationType.js +42259 -0
- package/src/_tests_/views/components/LocationType/addlocationtype.test.jsx.disable +276 -0
- package/src/_tests_/views/components/LocationType/editlocationtype.test.jsx.disable +262 -0
- package/src/_tests_/views/components/LocationType/locationtype.test.jsx.disable +148 -0
- package/src/_tests_/views/components/Profile/UpdateProfileModalData.js +4396 -0
- package/src/_tests_/views/components/Profile/updateprofilemodal.test.jsx +282 -0
- package/src/_tests_/views/components/SideBar/MockSideBar.js +1379 -0
- package/src/_tests_/views/components/SideBar/SideBar.test.jsx +98 -0
- package/src/_tests_/views/components/SystemConfig/ManageSystemConfig/AddManageSystemConfig.test.jsx.disable +164 -0
- package/src/_tests_/views/components/SystemConfig/ManageSystemConfig/UpdateManageSystemConfig.test.jsx.disable +157 -0
- package/src/_tests_/views/components/SystemConfig/MockSystemConfig.js +1280 -0
- package/src/_tests_/views/components/SystemConfig/SystemConfig.test.jsx.disable +165 -0
- package/src/_tests_/views/components/login/Login.test.jsx +276 -0
- package/src/_tests_/views/components/login/MockAuthorise.js +2414 -0
- package/src/_tests_/views/components/login/ServiceResponse.js +595 -0
- package/src/_tests_/views/components/user/MockManageUser.js +7965 -0
- package/src/_tests_/views/components/user/manageuser.test.jsx.disable +989 -0
- package/src/_tests_/views/components/user/mockUsersData.js +582 -0
- package/src/assets/img/OASISLogin.png +0 -0
- package/src/assets/img/bahaarNew.png +0 -0
- package/src/assets/img/dnhdd4K.png +0 -0
- package/src/assets/img/govtofup.png +0 -0
- package/src/assets/img/sewarural4K.png +0 -0
- package/src/assets/img/techo4K.png +0 -0
- package/src/assets/img/up4K.png +0 -0
- package/src/common/HolidayList.jsx +573 -0
- package/src/common/MalaciaousInputUtil.js +23 -0
- package/src/common/SafeHtml.jsx +17 -0
- package/src/common/VersionManager.jsx +109 -0
- package/src/common/constants/PerformanceDashboard.js +514 -0
- package/src/common/constants/app.constant.js +781 -0
- package/src/common/constants/cccVerificationConstants.js +18 -0
- package/src/common/constants/fhsrConstant.js +33 -0
- package/src/common/constants/gvk-verification.constant.js +76 -0
- package/src/common/constants/search.constant.js +23 -0
- package/src/common/constants/teleconsulatationConstant.jsx +1339 -0
- package/src/common/directives/SearchTemplate.jsx +784 -0
- package/src/common/directives/SearchTemplate.scss +14 -0
- package/src/common/dynamicView/DynamicView.jsx +353 -0
- package/src/common/dynamicView/InputFieldComponent.jsx +1501 -0
- package/src/common/dynamicView/InputViewComponent.jsx +298 -0
- package/src/common/dynamicView/InputViewComponent.scss +15 -0
- package/src/common/env.js +5 -0
- package/src/common/filters/locationNameFilter.js +26 -0
- package/src/common/fontAwesomeIcons/FontAwesomeIcons.jsx +27 -0
- package/src/common/fontAwesomeIcons/FontAwesomeIconsNames.js +1968 -0
- package/src/common/fontPreferences/fontSizeProvider.jsx +34 -0
- package/src/common/fontPreferences/fontSizeSelector.jsx +116 -0
- package/src/common/getAssignedFeature/getAssignedFeature.js +32 -0
- package/src/common/interceptors/AxiosInterceptor.js +216 -0
- package/src/common/languageTranslator/TranslationContext.js +5 -0
- package/src/common/languageTranslator/TranslationProvider.jsx +24 -0
- package/src/common/languageTranslator/i18n.js +49 -0
- package/src/common/services/AuthenticateService.js +116 -0
- package/src/common/services/DownloadFile.js +35 -0
- package/src/common/services/ForgotPassword.js +18 -0
- package/src/common/services/FormConfiguratorService.js +195 -0
- package/src/common/services/GlobalApis.js +84 -0
- package/src/common/services/InterceptorNavigationService.js +17 -0
- package/src/common/services/LocationService.js +65 -0
- package/src/common/services/LocationType.js +11 -0
- package/src/common/services/QueryBuilder.js +36 -0
- package/src/common/services/Roles.js +28 -0
- package/src/common/services/SyncWithServer.js +15 -0
- package/src/common/services/SystemConfig.js +15 -0
- package/src/common/services/TranslationService.js +70 -0
- package/src/common/services/TwoFactorService.js +7 -0
- package/src/common/services/Users.js +91 -0
- package/src/common/services/Webtasks.js +27 -0
- package/src/common/services/util/Convert-pad-data-to-API-format.jsx +167 -0
- package/src/common/services/util/Convert-to-UI-format.jsx +82 -0
- package/src/common/services/util/EmptyPrescriptionPadData.jsx +11 -0
- package/src/common/services/util/GeneralUtil.js +456 -0
- package/src/common/services/util/Prescription-pad-util.js +339 -0
- package/src/common/services/util/PrescriptionPadData.js +67 -0
- package/src/common/services/util/PrescriptionpadCommonUtil.js +96 -0
- package/src/common/services/util/ReportFieldUtil.jsx +398 -0
- package/src/common/services/util/WebSocketContext.jsx +261 -0
- package/src/common/syncWithServer/SyncWithServerDialog.jsx +170 -0
- package/src/common/syncWithServer/SyncWithServerDialogSkeleton.jsx +67 -0
- package/src/common/tests/CustomWrapper.jsx +49 -0
- package/src/common/tests/TranslationWrapper.jsx +38 -0
- package/src/common/themeProvider/ColorInputs.jsx +97 -0
- package/src/common/themeProvider/EditableColorInput.jsx +128 -0
- package/src/common/themeProvider/ThemeEditor.jsx +319 -0
- package/src/common/themeProvider/ThemeProvider.jsx +210 -0
- package/src/common/themeProvider/themeConfig.js +558 -0
- package/src/common/toaster/toaster.jsx +30 -0
- package/src/firebaseConfig.js +24 -0
- package/src/global.scss +221 -0
- package/src/hooks/.gitkeep +0 -0
- package/src/hooks/useAESEncryption.js +56 -0
- package/src/hooks/useCaching.js +43 -0
- package/src/hooks/useDebounce.js +34 -0
- package/src/hooks/useDebounceFn.js +50 -0
- package/src/hooks/useDownloadPdf.js +358 -0
- package/src/hooks/useDownloadXlsx.js +55 -0
- package/src/hooks/useListValueFieldValues.js +30 -0
- package/src/hooks/useLocationHierarchies.js +63 -0
- package/src/hooks/useLocationHierarchyTranslate.js +16 -0
- package/src/hooks/useOnline.js +27 -0
- package/src/hooks/usePagination.js +63 -0
- package/src/hooks/useRefreshToken.js +87 -0
- package/src/hooks/useScript.js +25 -0
- package/src/hooks/useStopwatch.js +75 -0
- package/src/hooks/useTrackEvent.js +22 -0
- package/src/hooks/useWebAudioRecorder.js +115 -0
- package/src/layout/LoaderComponet.jsx +22 -0
- package/src/layout/LoaderContext.jsx +29 -0
- package/src/layout/mainLayout/AdaptiveZoom.jsx +27 -0
- package/src/layout/mainLayout/Chatbot.jsx +243 -0
- package/src/layout/mainLayout/Layout.jsx +445 -0
- package/src/layout/mainLayout/Profile/UpdateProfileModal.jsx +684 -0
- package/src/layout/mainLayout/header/LogoutModal.jsx +131 -0
- package/src/layout/mainLayout/header/Navbar.jsx +1677 -0
- package/src/layout/mainLayout/header/Navbar.scss +4 -0
- package/src/layout/mainLayout/header/index.js +0 -0
- package/src/layout/mainLayout/sidebar/SideBar.jsx +1402 -0
- package/src/layout/mainLayout/sidebar/Sidebar.css +159 -0
- package/src/layout/mainLayout/sidebar/index.js +0 -0
- package/src/logo.svg +1 -0
- package/src/reportWebVitals.js +13 -0
- package/src/setupFirebaseMessaging.js +28 -0
- package/src/setupTests.js +8 -0
- package/src/store/actions/AuthenticationActions.js +0 -0
- package/src/store/actions/ReportsActions.js +0 -0
- package/src/store/actions/TranslationAction.js +0 -0
- package/src/store/index.js +8 -0
- package/src/store/reducer.js +46 -0
- package/src/store/reducers/AuthenticationReducer.js +50 -0
- package/src/store/reducers/CalendarEventReducer.js +41 -0
- package/src/store/reducers/ConditionClipboardReducer.js +45 -0
- package/src/store/reducers/FeatureReducer.js +27 -0
- package/src/store/reducers/FormConfiguratorReducer.js +38 -0
- package/src/store/reducers/LoadingReducer.js +20 -0
- package/src/store/reducers/MembersAuthenticationReducer.js +28 -0
- package/src/store/reducers/PrescriptionPadReducer.js +329 -0
- package/src/store/reducers/QuestionaireReducer.js +29 -0
- package/src/store/reducers/ReportsReducer.js +24 -0
- package/src/store/reducers/SkeletonReducer.js +20 -0
- package/src/store/reducers/ThemeReducer.js +106 -0
- package/src/store/reducers/TranslationReducer.js +126 -0
- package/src/store/reducers/dashboardEditorSlice.js +77 -0
- package/src/store/reducers/districtHealthDashboardSlice.js +58 -0
- package/src/store/reducers/immunizationSlice.js +234 -0
- package/src/store/slices/dashboardPagesSlice.js +51 -0
- package/src/store/slices/dashboardSlice.js +14 -0
- package/src/utils/.gitkeep +0 -0
- package/src/utils/FormConstants.js +2629 -0
- package/src/utils/GujaratTopoChart.jsx +483 -0
- package/src/utils/UUIDgenerator.js +8 -0
- package/src/utils/appointment-utils/appointment-utils.js +123 -0
- package/src/utils/feature.js +42 -0
- package/src/utils/getThemeColor.js +12 -0
- package/src/utils/localStorageHelper.js +11 -0
- package/src/utils/notifications/enable-push-notifications.js +27 -0
- package/src/utils/resolveAppliedStyle.js +11 -0
- package/src/utils/themeConfigs.js +1483 -0
- package/src/views/custom-components/.gitkeep +0 -0
- package/src/views/custom-components/AgIconButton/RIf.jsx +14 -0
- package/src/views/custom-components/AgIconButton/button.jsx +108 -0
- package/src/views/custom-components/AgIconButton/waterDrop.jsx +95 -0
- package/src/views/custom-components/AgIconButton/waterDrop.scss +37 -0
- package/src/views/custom-components/AlertPlaceholder.jsx +32 -0
- package/src/views/custom-components/AllFaIconsSelector.jsx +56 -0
- package/src/views/custom-components/CkEditor/CkEditor.js +102 -0
- package/src/views/custom-components/CustomAccordion.jsx +72 -0
- package/src/views/custom-components/CustomActionIcons.jsx +118 -0
- package/src/views/custom-components/CustomAutoComplete.jsx +188 -0
- package/src/views/custom-components/CustomCheckBox.jsx +60 -0
- package/src/views/custom-components/CustomConfirmationModal.jsx +118 -0
- package/src/views/custom-components/CustomCountrySelect.jsx +129 -0
- package/src/views/custom-components/CustomDatePicker.jsx +122 -0
- package/src/views/custom-components/CustomDropdown.jsx +191 -0
- package/src/views/custom-components/CustomFileUpload.jsx +387 -0
- package/src/views/custom-components/CustomFullCalendar.jsx +514 -0
- package/src/views/custom-components/CustomInfiniteScroll.jsx +126 -0
- package/src/views/custom-components/CustomRadioComponent.jsx +65 -0
- package/src/views/custom-components/CustomStatsComponent.jsx +114 -0
- package/src/views/custom-components/CustomSvgUpload.jsx +170 -0
- package/src/views/custom-components/CustomSwitch.jsx +37 -0
- package/src/views/custom-components/CustomTabPanel.jsx +19 -0
- package/src/views/custom-components/CustomTextArea.jsx +62 -0
- package/src/views/custom-components/CustomTextArea.scss +27 -0
- package/src/views/custom-components/CustomTextField.jsx +116 -0
- package/src/views/custom-components/CustomToggleSwitch.jsx +138 -0
- package/src/views/custom-components/CustomTooltip.jsx +51 -0
- package/src/views/custom-components/CustomZoomImage.jsx +134 -0
- package/src/views/custom-components/CustomizedTable/CustomizedTableV2.jsx +1407 -0
- package/src/views/custom-components/CustomizedTable/VirtualizeTableBody.jsx +295 -0
- package/src/views/custom-components/CustomizedTable/helper.jsx +159 -0
- package/src/views/custom-components/CustomizedTable.jsx +532 -0
- package/src/views/custom-components/EditInputField.jsx +174 -0
- package/src/views/custom-components/FieldDescription.jsx +22 -0
- package/src/views/custom-components/FileDisplayComponent.jsx +138 -0
- package/src/views/custom-components/FormItem.jsx +53 -0
- package/src/views/custom-components/GenericChart.jsx +80 -0
- package/src/views/custom-components/InfoBadge.jsx +60 -0
- package/src/views/custom-components/PostgresEditor.jsx +801 -0
- package/src/views/custom-components/ResizableEditAutocompleteField.jsx +249 -0
- package/src/views/custom-components/ResizableEditInputField.jsx +215 -0
- package/src/views/custom-components/ResizeableEditSelectField.jsx +197 -0
- package/src/views/custom-components/SideOverlay.jsx +113 -0
- package/src/views/custom-components/SideOverlay.scss +42 -0
- package/src/views/custom-components/calendar.scss +571 -0
- package/src/views/feature-components/.gitkeep +0 -0
- package/src/views/feature-components/Dashboard/DashboardUI.jsx +1043 -0
- package/src/views/feature-components/Dashboard/DhnddModal/AshaDataQualityVerificationModal.jsx +278 -0
- package/src/views/feature-components/Dashboard/PinFeatureModal.jsx +143 -0
- package/src/views/feature-components/Dashboard/QuickLinks.jsx +163 -0
- package/src/views/feature-components/Dashboard/Taskbar.jsx +56 -0
- package/src/views/feature-components/Dashboard/WebtasksFilterForm.jsx +109 -0
- package/src/views/feature-components/Dashboard/WidgetCard.jsx +161 -0
- package/src/views/feature-components/Dashboard/actionModal.jsx +263 -0
- package/src/views/feature-components/Dashboard/ekavachModal/HealthWorkerIncorrectDetailsModal.jsx +332 -0
- package/src/views/feature-components/Dashboard/ekavachModal/MoMaternalDeathVerifcationModal.jsx +275 -0
- package/src/views/feature-components/Dashboard/ekavachModal/MoVerficationForChildScreeningMoadal.jsx +566 -0
- package/src/views/feature-components/FeatureUsageAnalytics/FeatureUsageAnalytics.jsx +989 -0
- package/src/views/feature-components/Features/NewServerManagement.jsx +217 -0
- package/src/views/feature-components/Features/ServerManagement.scss +120 -0
- package/src/views/feature-components/ForgotPassword/ForgotPassword.jsx +226 -0
- package/src/views/feature-components/LocationDirective/LocationDirective.jsx +992 -0
- package/src/views/feature-components/LocationDirective/LocationDirectiveV2.jsx +909 -0
- package/src/views/feature-components/NotFound.jsx +66 -0
- package/src/views/feature-components/Onboarding/Onboarding.jsx +1400 -0
- package/src/views/feature-components/Skeletons.js +115 -0
- package/src/views/feature-components/Unauthorized.jsx +48 -0
- package/src/views/feature-components/VerifyRoute.jsx +88 -0
- package/src/views/feature-components/YearlyRecap/YearlyRecap.jsx +357 -0
- package/src/views/feature-components/YearlyRecap/components/RecapSlide.jsx +183 -0
- package/src/views/feature-components/YearlyRecap/languageTranslator/TranslationContext.js +5 -0
- package/src/views/feature-components/YearlyRecap/languageTranslator/TranslationProvider.jsx +26 -0
- package/src/views/feature-components/YearlyRecap/languageTranslator/i18n.js +46 -0
- package/src/views/feature-components/YearlyRecap/languageTranslator/translations.json +167 -0
- package/src/views/feature-components/YearlyRecap/slides/IntroSlide.jsx +233 -0
- package/src/views/feature-components/YearlyRecap/slides/MaternalHealthSlide.jsx +146 -0
- package/src/views/feature-components/YearlyRecap/slides/MetricSlide.jsx +227 -0
- package/src/views/feature-components/YearlyRecap/slides/OutroSlide.jsx +701 -0
- package/src/views/feature-components/YearlyRecap/slides/ReachSlide.jsx +273 -0
- package/src/views/feature-components/login/Login.jsx +840 -0
- package/src/views/feature-components/login/Login.scss +154 -0
- package/src/views/feature-components/login/LoginConfigurator.jsx +1149 -0
- package/src/views/feature-components/login/TwoFactorSetupModal.jsx +411 -0
- package/src/views/feature-components/login/simplifyMenu.js +45 -0
- package/src/views/feature-components/system-config/ManageSystemConfigs.jsx +284 -0
- package/src/views/feature-components/system-config/SystemConfig.jsx +299 -0
- package/src/views/feature-components/users/ChangePasswordModal.jsx +243 -0
- package/src/views/feature-components/users/PasswordField.jsx +56 -0
- package/dist/index.css +0 -1
- package/dist/index.js +0 -32001
- package/dist/index.js.map +0 -1
|
@@ -0,0 +1,1339 @@
|
|
|
1
|
+
// import axios from "axios";
|
|
2
|
+
|
|
3
|
+
import { v4 as uuidv4 } from "uuid";
|
|
4
|
+
// import dayjs from "dayjs";
|
|
5
|
+
|
|
6
|
+
// theme constant
|
|
7
|
+
export const gridSpacing = 3;
|
|
8
|
+
export const roleName ='Doctor'
|
|
9
|
+
export const drawerWidth = 260;
|
|
10
|
+
export const appDrawerWidth = 320;
|
|
11
|
+
|
|
12
|
+
export const filterTypeGlobalAndTenant = "GLOBAL_AND_TENANT";
|
|
13
|
+
export const SYSTEM = "SYSTEM";
|
|
14
|
+
export const UHI = "UHI";
|
|
15
|
+
export const ACTIVE_STATE = "ACTIVE";
|
|
16
|
+
export const INACTIVE_STATE = "INACTIVE";
|
|
17
|
+
export const TELE_CONSULTATION = "TELE_CONSULTATION";
|
|
18
|
+
export const NONE = "NONE";
|
|
19
|
+
export const CLINIC = "CLINIC";
|
|
20
|
+
export const CLINIC_VISIT = "CLINIC_VISIT";
|
|
21
|
+
export const BOTH = "BOTH";
|
|
22
|
+
export const SCHEDULED = "SCHEDULED";
|
|
23
|
+
export const COMPLETED = "COMPLETED";
|
|
24
|
+
export const CANCELLED = "CANCELLED";
|
|
25
|
+
export const ON_GOING = "ON_GOING";
|
|
26
|
+
export const DISCONTINUED = "DISCONTINUED";
|
|
27
|
+
export const RESCHEDULED = "RESCHEDULED";
|
|
28
|
+
export const NO_SHOW = "NO_SHOW";
|
|
29
|
+
export const NO_SHOW_LABEL = "NO SHOW";
|
|
30
|
+
export const PRESCRIPTION_DONE = "PRESCRIPTION_DONE";
|
|
31
|
+
export const BILLING_PENDING = "BILLING_PENDING";
|
|
32
|
+
export const PAID = "PAID";
|
|
33
|
+
export const PARTIALLY_PAID = "PARTIALLY_PAID";
|
|
34
|
+
export const BILLING_DONE = "BILLING_DONE";
|
|
35
|
+
export const INITIALIZED = "INITIALIZED";
|
|
36
|
+
export const DRAFT = "DRAFT";
|
|
37
|
+
export const DONE = "DONE";
|
|
38
|
+
export const NEW = "NEW";
|
|
39
|
+
export const PRESCRIPTION_DONE_LABEL = "PRESCRIPTION DONE";
|
|
40
|
+
export const CHECKED_IN_LABEL = "CHECKED IN";
|
|
41
|
+
export const SUPER_ADMIN = "SUPER ADMIN";
|
|
42
|
+
export const ADMIN = "ADMIN";
|
|
43
|
+
export const CLINIC_ADMIN = "HOSPITAL/CLINIC ADMIN";
|
|
44
|
+
export const DOCTOR = "DOCTOR";
|
|
45
|
+
export const NURSE = "NURSE";
|
|
46
|
+
export const PATIENT = "PATIENT";
|
|
47
|
+
export const PHARMACIST = "PHARMACIST";
|
|
48
|
+
export const MANAGER = "MANAGER";
|
|
49
|
+
export const RADIOGRAPHER = "RADIOGRAPHER";
|
|
50
|
+
export const ORGANIZATION = "ORGANIZATION";
|
|
51
|
+
export const FRONT_DESK = "FRONT DESK";
|
|
52
|
+
export const GENERAL_PRACTITIONER = "GENERAL PRACTITIONER";
|
|
53
|
+
export const PARAMEDIC = "PARAMEDIC";
|
|
54
|
+
export const MALE = "MALE";
|
|
55
|
+
export const FEMALE = "FEMALE";
|
|
56
|
+
export const OTHER = "OTHER";
|
|
57
|
+
export const AADHAAR_OTP = "AADHAAR_OTP";
|
|
58
|
+
export const MOBILE_OTP = "MOBILE_OTP";
|
|
59
|
+
export const PASSWORD = "PASSWORD";
|
|
60
|
+
export const PENDING = "PENDING";
|
|
61
|
+
export const DISCOUNT = "DISCOUNT";
|
|
62
|
+
export const MOBILE_NUMBER = "LOGIN_MOBILE_NUMBER";
|
|
63
|
+
export const LOGIN_PASSWORD = "LOGIN_PWD";
|
|
64
|
+
export const HPR_ID = "LOGIN_HPR";
|
|
65
|
+
export const ABHA_NUMBER = "LOGIN_ABHA_NUMBER";
|
|
66
|
+
export const VERIFY_MOBILE_NUMBER = "VERIFY_MOBILE_NUMBER";
|
|
67
|
+
export const VERIFY_EMAIL = "VERIFY_EMAIL";
|
|
68
|
+
export const VERIFY_HPR = "VERIFY_HPR";
|
|
69
|
+
export const VERIFY_ABHA_NUMBER = "VERIFY_ABHA_NUMBER";
|
|
70
|
+
export const VERIFY_INVITATION_LINK = "VERIFY_INVITATION_LINK";
|
|
71
|
+
export const TEXT_FOR_CLINIC_VISIT = "Clinic visit";
|
|
72
|
+
export const TEXT_FOR_TELECONSULTATION = "Teleconsultation";
|
|
73
|
+
export const TEXT_FOR_CHECKED_IN = "Checked In";
|
|
74
|
+
export const TEXT_FOR_COMPLETED = "Completed";
|
|
75
|
+
export const TOTAL = "Total";
|
|
76
|
+
export const CHECKED_IN = "CHECKED_IN";
|
|
77
|
+
export const GET_API_METHOD_NAME = "get";
|
|
78
|
+
export const SKELETON_LOADING_TIME_IN_MILLISECONDS = 500;
|
|
79
|
+
export const AVAILABILITY_TIME_FOR_THE_24TH_HOUR = "00:00";
|
|
80
|
+
export const ARTICLE = "ARTICLE";
|
|
81
|
+
export const MEDIA = "MEDIA";
|
|
82
|
+
export const CAMPAIGN = "CAMPAIGN";
|
|
83
|
+
export const CREATE_ABHA_VIA_AADHAAR = "create_abha_via_aadhaar";
|
|
84
|
+
export const VERIFY_AADHAAR_OTP = "aadhaar_otp";
|
|
85
|
+
export const UPDATE_MOBILE_NUMBER = "update_mobile_number";
|
|
86
|
+
export const ABHA_MOBILE_NUMBER = "mobile_number";
|
|
87
|
+
export const ABHA_ADDRESS = "abha_address";
|
|
88
|
+
export const basePackage = "Base Package";
|
|
89
|
+
export const APPOINTMENT_TYPE_SYSTEM = "SYSTEM";
|
|
90
|
+
export const APPOINTMENT_TYPE_UHI = "UHI";
|
|
91
|
+
export const VERIFICATION_VIA_MOBILE = "verification_via_mobile";
|
|
92
|
+
export const VERIFICATION_VIA_AADHAAR = "verification_via_aadhaar";
|
|
93
|
+
export const VERIFICATION_VIA_ABHA_NUMBER = "verification_via_abha_number";
|
|
94
|
+
export const VERIFICATION_VIA_ABHA_ADDRESS = "verification_via_abha_address";
|
|
95
|
+
export const VERIFICATION_VIA_ABHA_USING_AADHAAR = "verification_via_abha_using_aadhaar";
|
|
96
|
+
export const VERIFICATION_VIA_ABHA_USING_MOBILE = "verification_via_abha_using_mobile";
|
|
97
|
+
export const VERIFICATION_VIA_ABHA_ADDRESS_USING_AADHAAR =
|
|
98
|
+
"verification_via_abha_address_using_aadhaar";
|
|
99
|
+
export const VERIFICATION_VIA_ABHA_ADDRESS_USING_MOBILE =
|
|
100
|
+
"verification_via_abha_address_using_mobile";
|
|
101
|
+
export const VERIFICATION_ABHA_USING_AADHAAR_OTP = "verification_abha_using_aadhaar_otp";
|
|
102
|
+
export const VERIFICATION_ABHA_USING_MOBILE_OTP = "verification_abha_using_mobile_otp";
|
|
103
|
+
export const VERIFY_SELECTED_ABHA_NUMBER = "verify_selected_abha_number";
|
|
104
|
+
export const VERIFICATION_SEARCH_ABHA_VIA_MOBILE_OTP = "verification_search_abha_via_mobile_otp";
|
|
105
|
+
export const CATEGORY = "CATEGORY";
|
|
106
|
+
export const GENERIC = "GENERIC";
|
|
107
|
+
export const CUSTOM_TIME_RANGE = "CUSTOM_TIME_RANGE";
|
|
108
|
+
export const CUSTOM_DATE_TIME_RANGE = "CUSTOM_DATE_TIME_RANGE";
|
|
109
|
+
export const SINGLE_DATE = "SINGLE_DATE";
|
|
110
|
+
export const SINGLE = "SINGLE";
|
|
111
|
+
export const DOUBLE = "DOUBLE";
|
|
112
|
+
export const TRIPLE = "TRIPLE";
|
|
113
|
+
export const SURGERY = "SURGERY";
|
|
114
|
+
export const APPOINTMENT = "APPOINTMENT";
|
|
115
|
+
export const DATE_ONLY = "DATE_ONLY";
|
|
116
|
+
export const TIME_ONLY = "TIME_ONLY";
|
|
117
|
+
export const DATE_TIME = "DATE_TIME";
|
|
118
|
+
export const VERIFY_PASSWORD = "VERIFY_PASSWORD";
|
|
119
|
+
export const OTHER_OPTION = "Other";
|
|
120
|
+
|
|
121
|
+
export const intervalDays = {
|
|
122
|
+
DAILY: 1,
|
|
123
|
+
ALTERNATE: 2,
|
|
124
|
+
EVERY_THIRD_DAY: 3,
|
|
125
|
+
WEEKLY: 7,
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
export const appointmentTypeMapper = {
|
|
129
|
+
SCHEDULED: "Scheduled",
|
|
130
|
+
RESCHEDULED: "Rescheduled",
|
|
131
|
+
PRESCRIPTION_DONE: "Prescription Done",
|
|
132
|
+
NO_SHOW: "No Show",
|
|
133
|
+
COMPLETED: "Completed",
|
|
134
|
+
CANCELLED: "Cancelled",
|
|
135
|
+
CHECKED_IN: "Checked In",
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
// let roleIdByName = null;
|
|
139
|
+
|
|
140
|
+
// const fetchRoleData = async () => {
|
|
141
|
+
// try {
|
|
142
|
+
// const response = await axios.post(`${baseUrl}/api/roles/global?operation=GET`);
|
|
143
|
+
// roleIdByName = response.data;
|
|
144
|
+
// } catch {
|
|
145
|
+
// console.error("Error fetching roleId");
|
|
146
|
+
// }
|
|
147
|
+
// };
|
|
148
|
+
|
|
149
|
+
export const getUUID = () => {
|
|
150
|
+
return uuidv4();
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
// export const getRoleIdByName = async (roleName, handleClick) => {
|
|
154
|
+
// if (roleIdByName) {
|
|
155
|
+
// const role = roleIdByName.find((role) => role.name === roleName);
|
|
156
|
+
// return role ? role.id : null;
|
|
157
|
+
// } else {
|
|
158
|
+
// await fetchRoleData(handleClick);
|
|
159
|
+
// const role = roleIdByName.find((role) => role.name === roleName);
|
|
160
|
+
// return role ? role.id : null;
|
|
161
|
+
// }
|
|
162
|
+
// };
|
|
163
|
+
|
|
164
|
+
export const HeadersForAccessTokenAPI = {
|
|
165
|
+
"Content-Type": "application/json",
|
|
166
|
+
Authorization: "Basic " + btoa("hc-web:healthcloud-secret"), // .toString('Base64')
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
export const genderList = [
|
|
170
|
+
{
|
|
171
|
+
value: MALE,
|
|
172
|
+
menuLabel: "Male",
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
value: FEMALE,
|
|
176
|
+
menuLabel: "Female",
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
value: OTHER,
|
|
180
|
+
menuLabel: "Other",
|
|
181
|
+
},
|
|
182
|
+
];
|
|
183
|
+
|
|
184
|
+
export const roomStatus = [
|
|
185
|
+
{
|
|
186
|
+
value: "AVAILABLE",
|
|
187
|
+
menuLabel: "Available",
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
value: "UNDER_MAINTENANCE",
|
|
191
|
+
menuLabel: "Under Maintenance",
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
value: "CLEANING_IN_PROGRESS",
|
|
195
|
+
menuLabel: "Cleaning in Progress",
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
value: "NOT_OPERATIONAL",
|
|
199
|
+
menuLabel: "Not Operational",
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
value: "DISINFECTING",
|
|
203
|
+
menuLabel: "Disinfecting",
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
value: "OUT_OF_SERVICE",
|
|
207
|
+
menuLabel: "Out of Service",
|
|
208
|
+
},
|
|
209
|
+
];
|
|
210
|
+
|
|
211
|
+
export const bedStatus = [
|
|
212
|
+
{
|
|
213
|
+
value: "AVAILABLE",
|
|
214
|
+
menuLabel: "Available",
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
value: "OCCUPIED",
|
|
218
|
+
menuLabel: "Occupied",
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
value: "UNDER_MAINTENANCE",
|
|
222
|
+
menuLabel: "Under Maintenance",
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
value: "CLEANING_IN_PROGRESS",
|
|
226
|
+
menuLabel: "Cleaning in Progress",
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
value: "RESERVED",
|
|
230
|
+
menuLabel: "Reserved",
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
value: "NOT_OPERATIONAL",
|
|
234
|
+
menuLabel: "Not Operational",
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
value: "DISINFECTING",
|
|
238
|
+
menuLabel: "Disinfecting",
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
value: "OUT_OF_SERVICE",
|
|
242
|
+
menuLabel: "Out of Service",
|
|
243
|
+
},
|
|
244
|
+
];
|
|
245
|
+
|
|
246
|
+
export const roomCategory = [
|
|
247
|
+
{
|
|
248
|
+
value: "GENERAL_WARD",
|
|
249
|
+
menuLabel: "General Ward",
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
value: "SEMI_PRIVATE",
|
|
253
|
+
menuLabel: "Semi-Private Room",
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
value: "PRIVATE_ROOM",
|
|
257
|
+
menuLabel: "Private Room",
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
value: "DELUXE",
|
|
261
|
+
menuLabel: "Deluxe Room",
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
value: "SUITE",
|
|
265
|
+
menuLabel: "Suite Room",
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
value: "GENERAL_ICU",
|
|
269
|
+
menuLabel: "General ICU",
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
value: "CARDIAC_ICU",
|
|
273
|
+
menuLabel: "Cardiac ICU",
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
value: "NEONATAL_ICU",
|
|
277
|
+
menuLabel: "Neonatal ICU",
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
value: "PEDIATRIC_ICU",
|
|
281
|
+
menuLabel: "Pediatric ICU",
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
value: "NEURO_ICU",
|
|
285
|
+
menuLabel: "Neuro ICU",
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
value: "TRAUMA_ICU",
|
|
289
|
+
menuLabel: "Trauma ICU",
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
value: "POST_OPERATIVE_CARE_ROOM",
|
|
293
|
+
menuLabel: "Post-Operative Care Room",
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
value: "MATERNITY_ROOM",
|
|
297
|
+
menuLabel: "Maternity Room",
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
value: "LABOR_AND_DELIVERY_ROOM",
|
|
301
|
+
menuLabel: "Labor and Delivery Room",
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
value: "RECOVERY_ROOM",
|
|
305
|
+
menuLabel: "Recovery Room",
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
value: "DIALYSIS_ROOM",
|
|
309
|
+
menuLabel: "Dialysis Room",
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
value: "ISOLATION_ROOM",
|
|
313
|
+
menuLabel: "Isolation Room",
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
value: "OPERATION_THEATER",
|
|
317
|
+
menuLabel: "Operation Theater (OT)",
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
value: "ENDOSCOPY_ROOM",
|
|
321
|
+
menuLabel: "Endoscopy Room",
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
value: "CATH_LAB",
|
|
325
|
+
menuLabel: "Cath Lab",
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
value: "RADIOLOGY_ROOM",
|
|
329
|
+
menuLabel: "Radiology Room",
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
value: "EMERGENCY_ROOM",
|
|
333
|
+
menuLabel: "Emergency Room (ER)",
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
value: "OBSERVATION_ROOM",
|
|
337
|
+
menuLabel: "Observation Room",
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
value: "BURN_UNIT_ROOM",
|
|
341
|
+
menuLabel: "Burn Unit Room",
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
value: "PSYCHIATRIC_ROOM",
|
|
345
|
+
menuLabel: "Psychiatric Room",
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
value: "REHABILITATION_ROOM",
|
|
349
|
+
menuLabel: "Rehabilitation Room",
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
value: "COUNSELING_ROOM",
|
|
353
|
+
menuLabel: "Counseling Room",
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
value: "DOCTORS_ON_CALL_ROOM",
|
|
357
|
+
menuLabel: "Doctor’s On-Call Room",
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
value: "NURSES_STATION",
|
|
361
|
+
menuLabel: "Nurses’ Station",
|
|
362
|
+
},
|
|
363
|
+
];
|
|
364
|
+
|
|
365
|
+
export const bedTypes = [
|
|
366
|
+
{
|
|
367
|
+
value: "SINGLE",
|
|
368
|
+
menuLabel: "Single Bed",
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
value: "DOUBLE",
|
|
372
|
+
menuLabel: "Double Bed",
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
value: "QUEEN",
|
|
376
|
+
menuLabel: "Queen Bed",
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
value: "KING",
|
|
380
|
+
menuLabel: "King Bed",
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
value: "BUNK",
|
|
384
|
+
menuLabel: "Bunk Bed",
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
value: "SOFA",
|
|
388
|
+
menuLabel: "Sofa Bed",
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
value: "ROLLAWAY",
|
|
392
|
+
menuLabel: "Rollaway Bed",
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
value: "DAYBED",
|
|
396
|
+
menuLabel: "Daybed",
|
|
397
|
+
},
|
|
398
|
+
];
|
|
399
|
+
|
|
400
|
+
export const timeFormats = [
|
|
401
|
+
{
|
|
402
|
+
value: "12",
|
|
403
|
+
menuLabel: "12 Hour",
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
value: "24",
|
|
407
|
+
menuLabel: "24 Hour",
|
|
408
|
+
},
|
|
409
|
+
];
|
|
410
|
+
|
|
411
|
+
export const prescriptionSearchTypesMenu = [
|
|
412
|
+
{
|
|
413
|
+
value: "CATEGORY",
|
|
414
|
+
menuLabel: "Category",
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
value: "GENERIC",
|
|
418
|
+
menuLabel: "Generic",
|
|
419
|
+
},
|
|
420
|
+
];
|
|
421
|
+
|
|
422
|
+
export const contentTypes = [
|
|
423
|
+
{
|
|
424
|
+
value: ARTICLE,
|
|
425
|
+
menuLabel: "Article",
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
value: MEDIA,
|
|
429
|
+
menuLabel: "Media",
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
value: CAMPAIGN,
|
|
433
|
+
menuLabel: "Campaign",
|
|
434
|
+
},
|
|
435
|
+
];
|
|
436
|
+
|
|
437
|
+
export const blockCalenderOptions = [
|
|
438
|
+
{
|
|
439
|
+
value: CLINIC_VISIT,
|
|
440
|
+
menuLabel: "Available only for Clinic Visit",
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
value: TELE_CONSULTATION,
|
|
444
|
+
menuLabel: "Available only for Teleconsultation",
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
value: NONE,
|
|
448
|
+
menuLabel: "Not Available",
|
|
449
|
+
},
|
|
450
|
+
];
|
|
451
|
+
|
|
452
|
+
export const familyRelations = [
|
|
453
|
+
{ value: "FATHER", menuLabel: "Father", gender: MALE },
|
|
454
|
+
{ value: "MOTHER", menuLabel: "Mother", gender: FEMALE },
|
|
455
|
+
{ value: "BROTHER", menuLabel: "Brother", gender: MALE },
|
|
456
|
+
{ value: "SISTER", menuLabel: "Sister", gender: FEMALE },
|
|
457
|
+
{ value: "WIFE", menuLabel: "Wife", gender: FEMALE },
|
|
458
|
+
{ value: "HUSBAND", menuLabel: "Husband", gender: MALE },
|
|
459
|
+
{ value: "GRANDFATHER", menuLabel: "Grandfather", gender: MALE },
|
|
460
|
+
{ value: "GRANDMOTHER", menuLabel: "Grandmother", gender: FEMALE },
|
|
461
|
+
{ value: "UNCLE", menuLabel: "Uncle", gender: MALE },
|
|
462
|
+
{ value: "AUNT", menuLabel: "Aunt", gender: FEMALE },
|
|
463
|
+
{ value: "SON", menuLabel: "Son", gender: MALE },
|
|
464
|
+
{ value: "DAUGHTER", menuLabel: "Daughter", gender: FEMALE },
|
|
465
|
+
{ value: "NEPHEW", menuLabel: "Nephew", gender: MALE },
|
|
466
|
+
{ value: "NIECE", menuLabel: "Niece", gender: FEMALE },
|
|
467
|
+
{ value: "FRIEND", menuLabel: "Friend" },
|
|
468
|
+
{ value: "OTHER", menuLabel: "Other" },
|
|
469
|
+
];
|
|
470
|
+
|
|
471
|
+
const filterRelationsByGender = (gender) => {
|
|
472
|
+
return familyRelations.filter((relation) => !relation.gender || relation.gender === gender);
|
|
473
|
+
};
|
|
474
|
+
|
|
475
|
+
// Example usage
|
|
476
|
+
export const filteredRelationsForMale = filterRelationsByGender(MALE);
|
|
477
|
+
export const filteredRelationsForFemale = filterRelationsByGender(FEMALE);
|
|
478
|
+
|
|
479
|
+
export const RELATIONSHIPS_WITH_OLDER_AGE = ["FATHER", "MOTHER", "GRANDFATHER", "GRANDMOTHER"];
|
|
480
|
+
|
|
481
|
+
export const RELATIONSHIPS_WITH_YOUNGER_AGE = ["SON", "DAUGHTER"];
|
|
482
|
+
|
|
483
|
+
export const AGE_DIFFERENCE_MAP = {
|
|
484
|
+
FATHER: 15,
|
|
485
|
+
MOTHER: 15,
|
|
486
|
+
GRANDFATHER: 30,
|
|
487
|
+
GRANDMOTHER: 30,
|
|
488
|
+
SON: 15,
|
|
489
|
+
DAUGHTER: 15,
|
|
490
|
+
};
|
|
491
|
+
|
|
492
|
+
|
|
493
|
+
|
|
494
|
+
export const doctorTableColumns = [
|
|
495
|
+
{ field: "Sr. No.", label: "Sr. No" },
|
|
496
|
+
{ field: "userResponse.name", label: "Name" },
|
|
497
|
+
{ field: "status", label: "Status" },
|
|
498
|
+
{ field: "Actions", label: "Actions" },
|
|
499
|
+
];
|
|
500
|
+
|
|
501
|
+
export const profileForm = [
|
|
502
|
+
{
|
|
503
|
+
type: "allergies",
|
|
504
|
+
url: "/api/patient/allergies",
|
|
505
|
+
formData: {
|
|
506
|
+
name: "",
|
|
507
|
+
description: "",
|
|
508
|
+
severity: "",
|
|
509
|
+
},
|
|
510
|
+
},
|
|
511
|
+
];
|
|
512
|
+
|
|
513
|
+
export const MAX_AGE_FOR_REGULAR_DOB = 124;
|
|
514
|
+
export const MIN_AGE_FOR_DOCTOR = 20;
|
|
515
|
+
export const MIN_AGE_FOR_GENERAL_PRACTITIONER_AND_PARAMEDIC_AND_FRONTDESK = 18;
|
|
516
|
+
export const MIN_AGE_FOR_QUALIFICATION = 20;
|
|
517
|
+
|
|
518
|
+
export const CUSTOM_PRIMARY = "#004C70";
|
|
519
|
+
export const CUSTOM_SECONDARY = "#29BF91";
|
|
520
|
+
export const CUSTOM_TERNARY = "#29BF911A";
|
|
521
|
+
export const SIZE_20_MB = 20 * 1024 * 1024;
|
|
522
|
+
export const SIZE_10_MB = 10 * 1024 * 1024;
|
|
523
|
+
export const SIZE_1_MB = 1 * 1024 * 1024;
|
|
524
|
+
export const SIZE_5_MB = 5 * 1024 * 1024;
|
|
525
|
+
|
|
526
|
+
export const DAY_GRID_CALENDAR = "timeGridDay";
|
|
527
|
+
export const WEEK_GRID_CALENDAR = "timeGridWeek";
|
|
528
|
+
export const MONTH_GRID_CALENDAR = "dayGridMonth";
|
|
529
|
+
|
|
530
|
+
export const fileTypes = {
|
|
531
|
+
// Images
|
|
532
|
+
"image/jpeg": "jpeg",
|
|
533
|
+
"image/png": "png",
|
|
534
|
+
"image/gif": "gif",
|
|
535
|
+
"image/bmp": "bmp",
|
|
536
|
+
"image/svg+xml": "svg+xml",
|
|
537
|
+
"image/tiff": "tiff",
|
|
538
|
+
"image/webp": "webp",
|
|
539
|
+
"image/jpg": "jpg",
|
|
540
|
+
|
|
541
|
+
// Documents
|
|
542
|
+
"application/pdf": "pdf",
|
|
543
|
+
"application/msword": "msword",
|
|
544
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document":
|
|
545
|
+
"wordprocessingml.document",
|
|
546
|
+
"application/vnd.ms-excel": "ms-excel",
|
|
547
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "spreadsheetml.sheet",
|
|
548
|
+
"application/vnd.ms-powerpoint": "ms-powerpoint",
|
|
549
|
+
"application/vnd.openxmlformats-officedocument.presentationml.presentation":
|
|
550
|
+
"presentationml.presentation",
|
|
551
|
+
"text/plain": "plain",
|
|
552
|
+
"application/rtf": "rtf",
|
|
553
|
+
"application/octet-stream": "dcim",
|
|
554
|
+
|
|
555
|
+
// Audio
|
|
556
|
+
"audio/mpeg": "mpeg",
|
|
557
|
+
"audio/wav": "wav",
|
|
558
|
+
"audio/ogg": "ogg",
|
|
559
|
+
"audio/midi": "midi",
|
|
560
|
+
"audio/aac": "aac",
|
|
561
|
+
|
|
562
|
+
//Video
|
|
563
|
+
"video/mp4": "mp4",
|
|
564
|
+
"video/webm": "webm",
|
|
565
|
+
"video/ogg": "ogg",
|
|
566
|
+
"video/x-msvideo": "x-msvideo",
|
|
567
|
+
"video/mpeg": "mpeg",
|
|
568
|
+
|
|
569
|
+
//Archives
|
|
570
|
+
"application/zip": "zip",
|
|
571
|
+
"application/gzip": "gzip",
|
|
572
|
+
"application/x-tar": "x-tar",
|
|
573
|
+
"application/x-7z-compressed": "x-7z-compressed",
|
|
574
|
+
|
|
575
|
+
//CodeAndMarkup
|
|
576
|
+
"text/html": "html",
|
|
577
|
+
"text/css": "css",
|
|
578
|
+
"application/javascript": "js",
|
|
579
|
+
"application/json": "json",
|
|
580
|
+
"application/xml": "xml",
|
|
581
|
+
"text/csv": "csv",
|
|
582
|
+
};
|
|
583
|
+
|
|
584
|
+
export const DATE_FORMAT = "YYYY-MM-DD";
|
|
585
|
+
export const TIME_FORMAT = "HH:mm:ss";
|
|
586
|
+
export const HOUR_MINUTE_FORMAT = "HH:mm";
|
|
587
|
+
export const DATE_TIME_FORMAT = "YYYY-MM-DDTHH:mm:ss";
|
|
588
|
+
export const DATE_TIME_FORMAT_DMY = "DD-MM-YYYYTHH:mm:ss";
|
|
589
|
+
export const DATE_FORMAT_DMY = "DD-MM-YYYY";
|
|
590
|
+
export const DISPLAY_DATE_FORMAT = "DD MMM, YYYY";
|
|
591
|
+
|
|
592
|
+
// export const entitiesInfo = [
|
|
593
|
+
// {
|
|
594
|
+
// id: "CommonTreats",
|
|
595
|
+
// info: `For doctors and clinic admins, the section on "commonly treats" highlights the health issues they manage and their areas of expertise. This list includes common conditions addressed by the practitioners, such as chronic diseases for internists or skin disorders for dermatologists. It provides patients with clear insights into the services offered and helps them choose the right care based on their needs. This information reflects the clinic’s overall capabilities and the expertise of its medical team.`,
|
|
596
|
+
// icon: <Healing fontSize="large" color="primary" />,
|
|
597
|
+
// },
|
|
598
|
+
// {
|
|
599
|
+
// id: "Procedure",
|
|
600
|
+
// info: `For doctors and clinic admins, the "procedures" section details the medical and surgical interventions offered. This includes routine procedures like blood tests and vaccinations, as well as specialized treatments such as minimally invasive surgeries or diagnostic imaging. By outlining the procedures performed, these provide patients with insight into the clinic's capabilities and the range of services available, helping them make informed decisions about their care based on the procedures they may need.`,
|
|
601
|
+
// icon: <Assignment fontSize="large" color="secondary" />,
|
|
602
|
+
// },
|
|
603
|
+
// {
|
|
604
|
+
// id: "MedicalServiceCategory",
|
|
605
|
+
// info: `This feature enables clinic administrators to organize and categorize their products and services into specific groups. By defining categories such as "Diagnostic Tests," "Consultation fees," and "Therapeutic Treatments," administrators can streamline service management and help patients easily find the care they need. This structured approach improves internal efficiency along with clearly presenting the clinic's range of offerings.`,
|
|
606
|
+
// icon: <LocalHospital fontSize="large" color="success" />,
|
|
607
|
+
// },
|
|
608
|
+
// {
|
|
609
|
+
// id: "TaxRates",
|
|
610
|
+
// info: `Under this section, clinics can manage all standard tax rates applicable to their products and services. This feature allows administrators to set, update, and apply the appropriate tax rates to ensure accurate billing and compliance with tax regulations. By managing these rates centrally, clinics can streamline their financial processes and ensure that all transactions reflect the correct tax charges.`,
|
|
611
|
+
// icon: <MonetizationOn fontSize="large" color="error" />,
|
|
612
|
+
// },
|
|
613
|
+
// ];
|
|
614
|
+
|
|
615
|
+
export const SEVERITY_TYPES = [
|
|
616
|
+
{ value: "", menuLabel: "" },
|
|
617
|
+
{ value: "MILD", menuLabel: "Mild" },
|
|
618
|
+
{ value: "MODERATE", menuLabel: "Moderate" },
|
|
619
|
+
{ value: "SEVERE", menuLabel: "Severe" },
|
|
620
|
+
{ value: "CRITICAL", menuLabel: "Critical" },
|
|
621
|
+
];
|
|
622
|
+
|
|
623
|
+
export const DOSE_TIMINGS = [
|
|
624
|
+
{ value: "", menuLabel: "" },
|
|
625
|
+
{ value: "Before Meal", menuLabel: "Before Meal" },
|
|
626
|
+
{ value: "After Meal", menuLabel: "After Meal" },
|
|
627
|
+
{ value: "At Bedtime", menuLabel: "At Bedtime" },
|
|
628
|
+
{ value: "Empty Stomach", menuLabel: "Empty Stomach" },
|
|
629
|
+
];
|
|
630
|
+
|
|
631
|
+
export const AFTER_MEAL = "AFTER_MEAL";
|
|
632
|
+
export const BEFORE_MEAL = "BEFORE_MEAL";
|
|
633
|
+
export const AT_BEDTIME = "AT_BEDTIME";
|
|
634
|
+
export const EMPTY_STOMACH = "EMPTY_STOMACH";
|
|
635
|
+
|
|
636
|
+
export const startsAndEndsWithAlphabetic = (value) => /^[a-zA-Z].*[a-zA-Z]$/.test(value);
|
|
637
|
+
|
|
638
|
+
export const startsWithAlphabetic = (value) => /^[a-zA-Z]/.test(value);
|
|
639
|
+
|
|
640
|
+
// export const convertTimeForTimeFormat = (value) => {
|
|
641
|
+
// let formattedTime;
|
|
642
|
+
// if (timeFormat() == 12) {
|
|
643
|
+
// formattedTime = dayjs(`2000-01-01T${value}`)?.format("hh:mm A");
|
|
644
|
+
// } else {
|
|
645
|
+
// formattedTime = dayjs(`2000-01-01T${value}`)?.format("HH:mm");
|
|
646
|
+
// }
|
|
647
|
+
// return formattedTime;
|
|
648
|
+
// };
|
|
649
|
+
|
|
650
|
+
export const SEVERITY_ORDER = {
|
|
651
|
+
CRITICAL: 1,
|
|
652
|
+
SEVERE: 2,
|
|
653
|
+
MODERATE: 3,
|
|
654
|
+
MILD: 4,
|
|
655
|
+
};
|
|
656
|
+
|
|
657
|
+
export const VITAL_ICON_LIST = [
|
|
658
|
+
{
|
|
659
|
+
key: "BLOOD_GLUCOSE",
|
|
660
|
+
icon: (
|
|
661
|
+
<img
|
|
662
|
+
height="23px !important"
|
|
663
|
+
width="23px !important"
|
|
664
|
+
src="/images/blood_glucose.svg"
|
|
665
|
+
alt="abha_logo"
|
|
666
|
+
></img>
|
|
667
|
+
),
|
|
668
|
+
},
|
|
669
|
+
{
|
|
670
|
+
key: "BODY_MASS_INDEX",
|
|
671
|
+
icon: (
|
|
672
|
+
<img
|
|
673
|
+
height="23px !important"
|
|
674
|
+
width="20px !important"
|
|
675
|
+
src="/images/bmi_index.svg"
|
|
676
|
+
alt="abha_logo"
|
|
677
|
+
></img>
|
|
678
|
+
),
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
key: "BLOOD_OXYGEN",
|
|
682
|
+
icon: (
|
|
683
|
+
<img
|
|
684
|
+
height="25px !important"
|
|
685
|
+
width="25px !important"
|
|
686
|
+
src="/images/blood_oxygen.svg"
|
|
687
|
+
alt="abha_logo"
|
|
688
|
+
></img>
|
|
689
|
+
),
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
key: "HEART_RATE",
|
|
693
|
+
icon: (
|
|
694
|
+
<img
|
|
695
|
+
height="20px !important"
|
|
696
|
+
width="20px !important"
|
|
697
|
+
src="/images/heart_rate.svg"
|
|
698
|
+
alt="abha_logo"
|
|
699
|
+
></img>
|
|
700
|
+
),
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
key: "BODY_TEMPERATURE",
|
|
704
|
+
icon: (
|
|
705
|
+
<img
|
|
706
|
+
height="20px !important"
|
|
707
|
+
width="20px !important"
|
|
708
|
+
src="/images/body_temperature.svg"
|
|
709
|
+
alt="abha_logo"
|
|
710
|
+
></img>
|
|
711
|
+
),
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
key: "BLOOD_PRESSURE",
|
|
715
|
+
icon: (
|
|
716
|
+
<img
|
|
717
|
+
height="23px !important"
|
|
718
|
+
width="20px !important"
|
|
719
|
+
src="/images/blood_pressure.svg"
|
|
720
|
+
alt="abha_logo"
|
|
721
|
+
></img>
|
|
722
|
+
),
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
key: "HEIGHT",
|
|
726
|
+
icon: (
|
|
727
|
+
<img
|
|
728
|
+
height="20px !important"
|
|
729
|
+
width="20px !important"
|
|
730
|
+
src="/images/height.svg"
|
|
731
|
+
alt="abha_logo"
|
|
732
|
+
></img>
|
|
733
|
+
),
|
|
734
|
+
},
|
|
735
|
+
{
|
|
736
|
+
key: "WEIGHT",
|
|
737
|
+
icon: (
|
|
738
|
+
<img
|
|
739
|
+
height="20px !important"
|
|
740
|
+
width="20px !important"
|
|
741
|
+
src="/images/weight.svg"
|
|
742
|
+
alt="abha_logo"
|
|
743
|
+
></img>
|
|
744
|
+
),
|
|
745
|
+
},
|
|
746
|
+
// {
|
|
747
|
+
// key: "BLOOD_GLUCOSE",
|
|
748
|
+
// icon: <></>
|
|
749
|
+
// },
|
|
750
|
+
// {
|
|
751
|
+
// key: "BLOOD_GLUCOSE",
|
|
752
|
+
// icon: <></>
|
|
753
|
+
// },
|
|
754
|
+
// {
|
|
755
|
+
// key: "BLOOD_GLUCOSE",
|
|
756
|
+
// icon: <></>
|
|
757
|
+
// },
|
|
758
|
+
];
|
|
759
|
+
|
|
760
|
+
// export const VITAL_ICON_LIST = [
|
|
761
|
+
// {
|
|
762
|
+
// key: "BLOOD_GLUCOSE",
|
|
763
|
+
// icon: (style = {}) => (
|
|
764
|
+
// <img
|
|
765
|
+
// style={{ height: "23px", width: "23px", ...style }}
|
|
766
|
+
// src="/images/blood_glucose_2.svg"
|
|
767
|
+
// alt="abha_logo"
|
|
768
|
+
// />
|
|
769
|
+
// ),
|
|
770
|
+
// },
|
|
771
|
+
// {
|
|
772
|
+
// key: "BODY_MASS_INDEX",
|
|
773
|
+
// icon: (style = {}) => (
|
|
774
|
+
// <img
|
|
775
|
+
// style={{ height: "23px", width: "20px", ...style }}
|
|
776
|
+
// src="/images/bmi_index.svg"
|
|
777
|
+
// alt="abha_logo"
|
|
778
|
+
// />
|
|
779
|
+
// ),
|
|
780
|
+
// },
|
|
781
|
+
// {
|
|
782
|
+
// key: "BLOOD_OXYGEN",
|
|
783
|
+
// icon: (style = {}) => (
|
|
784
|
+
// <img
|
|
785
|
+
// style={{ height: "25px", width: "25px", ...style }}
|
|
786
|
+
// src="/images/blood_oxygen.svg"
|
|
787
|
+
// alt="abha_logo"
|
|
788
|
+
// />
|
|
789
|
+
// ),
|
|
790
|
+
// },
|
|
791
|
+
// {
|
|
792
|
+
// key: "HEART_RATE",
|
|
793
|
+
// icon: (style = {}) => (
|
|
794
|
+
// <img
|
|
795
|
+
// style={{ height: "20px", width: "20px", ...style }}
|
|
796
|
+
// src="/images/heart_rate.svg"
|
|
797
|
+
// alt="abha_logo"
|
|
798
|
+
// />
|
|
799
|
+
// ),
|
|
800
|
+
// },
|
|
801
|
+
// {
|
|
802
|
+
// key: "BODY_TEMPERATURE",
|
|
803
|
+
// icon: (style = {}) => (
|
|
804
|
+
// <img
|
|
805
|
+
// style={{ height: "20px", width: "20px", ...style }}
|
|
806
|
+
// src="/images/body_temperature.svg"
|
|
807
|
+
// alt="abha_logo"
|
|
808
|
+
// />
|
|
809
|
+
// ),
|
|
810
|
+
// },
|
|
811
|
+
// {
|
|
812
|
+
// key: "BLOOD_PRESSURE",
|
|
813
|
+
// icon: (style = {}) => (
|
|
814
|
+
// <img
|
|
815
|
+
// style={{ height: "23px", width: "20px", ...style }}
|
|
816
|
+
// src="/images/blood_pressure.svg"
|
|
817
|
+
// alt="abha_logo"
|
|
818
|
+
// />
|
|
819
|
+
// ),
|
|
820
|
+
// },
|
|
821
|
+
// {
|
|
822
|
+
// key: "HEIGHT",
|
|
823
|
+
// icon: (style = {}) => (
|
|
824
|
+
// <img
|
|
825
|
+
// style={{ height: "20px", width: "20px", ...style }}
|
|
826
|
+
// src="/images/height.svg"
|
|
827
|
+
// alt="abha_logo"
|
|
828
|
+
// />
|
|
829
|
+
// ),
|
|
830
|
+
// },
|
|
831
|
+
// {
|
|
832
|
+
// key: "WEIGHT",
|
|
833
|
+
// icon: (style = {}) => (
|
|
834
|
+
// <img
|
|
835
|
+
// style={{ height: "20px", width: "20px", ...style }}
|
|
836
|
+
// src="/images/weight.svg"
|
|
837
|
+
// alt="abha_logo"
|
|
838
|
+
// />
|
|
839
|
+
// ),
|
|
840
|
+
// },
|
|
841
|
+
// ];
|
|
842
|
+
|
|
843
|
+
export const LINE_CHART = "LINE_CHART";
|
|
844
|
+
export const SINGLE_BAR_CHART = "SINGLE_BAR_CHART";
|
|
845
|
+
export const BAR_CHART = "BAR_CHART";
|
|
846
|
+
export const CHART_OPTIONS = {
|
|
847
|
+
scales: {
|
|
848
|
+
x: {
|
|
849
|
+
display: false,
|
|
850
|
+
|
|
851
|
+
// Hide X-axis
|
|
852
|
+
barThickness: 2,
|
|
853
|
+
},
|
|
854
|
+
y: {
|
|
855
|
+
display: false,
|
|
856
|
+
barThickness: 2, // Hide Y-axis
|
|
857
|
+
},
|
|
858
|
+
},
|
|
859
|
+
plugins: {
|
|
860
|
+
legend: {
|
|
861
|
+
display: false, // Hide legend
|
|
862
|
+
},
|
|
863
|
+
tooltip: {
|
|
864
|
+
enabled: false, // Optionally disable tooltips if needed
|
|
865
|
+
},
|
|
866
|
+
},
|
|
867
|
+
elements: {
|
|
868
|
+
point: {
|
|
869
|
+
radius: 0, // Hide points if needed
|
|
870
|
+
},
|
|
871
|
+
},
|
|
872
|
+
barThickness: 2,
|
|
873
|
+
};
|
|
874
|
+
|
|
875
|
+
export const CHART_OPTIONS_TWO = {
|
|
876
|
+
scales: {
|
|
877
|
+
x: {
|
|
878
|
+
display: true,
|
|
879
|
+
barThickness: 2,
|
|
880
|
+
offset: true,
|
|
881
|
+
},
|
|
882
|
+
y: {
|
|
883
|
+
display: true,
|
|
884
|
+
barThickness: 2,
|
|
885
|
+
},
|
|
886
|
+
},
|
|
887
|
+
plugins: {
|
|
888
|
+
legend: {
|
|
889
|
+
display: false,
|
|
890
|
+
},
|
|
891
|
+
tooltip: {
|
|
892
|
+
enabled: false,
|
|
893
|
+
},
|
|
894
|
+
},
|
|
895
|
+
elements: {
|
|
896
|
+
point: {
|
|
897
|
+
radius: 0,
|
|
898
|
+
},
|
|
899
|
+
},
|
|
900
|
+
barThickness: 2,
|
|
901
|
+
};
|
|
902
|
+
|
|
903
|
+
export const CHART_OPTIONS_MEDIUM = {
|
|
904
|
+
scales: {
|
|
905
|
+
x: {
|
|
906
|
+
display: true,
|
|
907
|
+
|
|
908
|
+
// Hide X-axis
|
|
909
|
+
barThickness: 2,
|
|
910
|
+
grid: {
|
|
911
|
+
display: false, // Hide X-axis grid lines
|
|
912
|
+
},
|
|
913
|
+
ticks: {
|
|
914
|
+
display: false, // Hide X-axis labels
|
|
915
|
+
},
|
|
916
|
+
offset: true,
|
|
917
|
+
},
|
|
918
|
+
y: {
|
|
919
|
+
display: true,
|
|
920
|
+
barThickness: 2, // Hide Y-axis
|
|
921
|
+
grid: {
|
|
922
|
+
display: false, // Hide Y-axis grid lines
|
|
923
|
+
},
|
|
924
|
+
},
|
|
925
|
+
},
|
|
926
|
+
elements: {
|
|
927
|
+
point: {
|
|
928
|
+
radius: 0, // Hide points if needed
|
|
929
|
+
},
|
|
930
|
+
},
|
|
931
|
+
};
|
|
932
|
+
|
|
933
|
+
export const CHART_OPTION_OBJECT_FOR_LEGEND = {
|
|
934
|
+
plugins: {
|
|
935
|
+
legend: {
|
|
936
|
+
labels: {
|
|
937
|
+
font: {
|
|
938
|
+
size: 10, // Adjust font size for smaller legends
|
|
939
|
+
},
|
|
940
|
+
padding: 10, // Adjust padding to control spacing around legend items
|
|
941
|
+
boxWidth: 10, // Smaller box width for each legend item
|
|
942
|
+
boxHeight: 10, // Smaller box height for each legend item
|
|
943
|
+
},
|
|
944
|
+
},
|
|
945
|
+
},
|
|
946
|
+
};
|
|
947
|
+
|
|
948
|
+
// export const hiuUrl = (doctorId, patientAbhaId, gender, dob) =>
|
|
949
|
+
// `${hiuAddress}&username=${doctorId}&searchValue=${patientAbhaId}&themeColor=004c70&hfrId=${getHfrFacilityId()}&gender=${gender}&dob=${dob}`;
|
|
950
|
+
|
|
951
|
+
// status for in department patient
|
|
952
|
+
export const ADMITTED = "ADMITTED";
|
|
953
|
+
export const DISCHARGED = "DISCHARGED";
|
|
954
|
+
|
|
955
|
+
// breakpoints for mediaQueries
|
|
956
|
+
// const isExtraSmallScreen = useMediaQuery('(max-width:600px)');
|
|
957
|
+
// const isSmallScreen = useMediaQuery('(min-width:600px) and (max-width:900px)');
|
|
958
|
+
// const isMediumScreen = useMediaQuery('(min-width:901px) and (max-width:1200px)');
|
|
959
|
+
// const isLargeScreen = useMediaQuery('(min-width:1202px) and (max-width:1536px)');
|
|
960
|
+
// const isExtraLargeScreen = useMediaQuery('(min-width:1537px)');
|
|
961
|
+
|
|
962
|
+
const compilePathToRegex = (path) => {
|
|
963
|
+
const regexPath = path.replace(
|
|
964
|
+
/\{[^}]+\}/g,
|
|
965
|
+
"([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})"
|
|
966
|
+
);
|
|
967
|
+
return new RegExp(`^${regexPath}$`); // Ensure it matches the full path
|
|
968
|
+
};
|
|
969
|
+
|
|
970
|
+
// Function to match a request against the route list
|
|
971
|
+
const matchRoute = (routes, method, path) => {
|
|
972
|
+
for (const route of routes) {
|
|
973
|
+
if (route.method.toLowerCase() === method) {
|
|
974
|
+
const regex = compilePathToRegex(route.path);
|
|
975
|
+
if (regex.test(path)) {
|
|
976
|
+
return route;
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
return null; // No match found
|
|
981
|
+
};
|
|
982
|
+
|
|
983
|
+
export const IsMatching = (routes, method, path) => {
|
|
984
|
+
const matchedRoute = matchRoute(routes, method, path);
|
|
985
|
+
if (matchedRoute) {
|
|
986
|
+
return true;
|
|
987
|
+
} else {
|
|
988
|
+
return false;
|
|
989
|
+
}
|
|
990
|
+
};
|
|
991
|
+
|
|
992
|
+
// const for the dashbopard components Ids
|
|
993
|
+
export const MANAGE_APPOINTMENTS = "MANAGE_APPOINTMENTS";
|
|
994
|
+
export const APPOINTMENTS_LIST = "APPOINTMENTS_LIST";
|
|
995
|
+
export const SURGERY_SCHEDULE = "SURGERY_SCHEDULE";
|
|
996
|
+
export const PATIENT_CARD = "PATIENT_CARD";
|
|
997
|
+
export const LATEST_VITALS = "LATEST_VITALS";
|
|
998
|
+
export const VITALS_GRAPH = "VITALS_GRAPH";
|
|
999
|
+
export const PRESCRIPTION_PAD = "PRESCRIPTION_PAD";
|
|
1000
|
+
export const HEALTH_HISTORY = "HEALTH_HISTORY";
|
|
1001
|
+
export const NO_APPOINTMENT_SELECTED = "NO_APPOINTMENT_SELECTED";
|
|
1002
|
+
export const APPOINTMENT_MEDICATION_DETAIL = "APPOINTMENT_MEDICATION_DETAIL";
|
|
1003
|
+
export const UPLOAD_DICOM = "UPLOAD_DICOM";
|
|
1004
|
+
export const ON_EXAMINATION = "O/E";
|
|
1005
|
+
export const BOOK_APPOINTMENT = "BOOK_APPOINTMENT";
|
|
1006
|
+
export const SURGERY_LIST = "SURGERY_LIST";
|
|
1007
|
+
export const THERAPY = "THERAPY";
|
|
1008
|
+
export const REHAB = "REHAB";
|
|
1009
|
+
export const CARDIAC_RISK_CALCULATOR = "CARDIAC_RISK_CALCULATOR";
|
|
1010
|
+
|
|
1011
|
+
// action type for resetting dynamic doctor dashboard redux store
|
|
1012
|
+
export const RESET_DYNAMIC_DASHBOARD_REDUX_STORE = "RESET_DYNAMIC_DASHBOARD_REDUX_STORE";
|
|
1013
|
+
|
|
1014
|
+
export const SurgeryTaskPhase = {
|
|
1015
|
+
PREPARATION: "PREPARATION",
|
|
1016
|
+
PRE_SERVICE: "PRE_SERVICE",
|
|
1017
|
+
POST_SERVICE: "POST_SERVICE",
|
|
1018
|
+
};
|
|
1019
|
+
export const surgeryStatus = [
|
|
1020
|
+
{
|
|
1021
|
+
value: "REQUESTED",
|
|
1022
|
+
menuLabel: "REQUESTED",
|
|
1023
|
+
},
|
|
1024
|
+
{
|
|
1025
|
+
value: "CONFIRMED",
|
|
1026
|
+
menuLabel: "CONFIRMED",
|
|
1027
|
+
},
|
|
1028
|
+
{
|
|
1029
|
+
value: "ON_HOLD",
|
|
1030
|
+
menuLabel: "ON HOLD",
|
|
1031
|
+
},
|
|
1032
|
+
{
|
|
1033
|
+
value: "CANCELLED",
|
|
1034
|
+
menuLabel: "CANCELLED",
|
|
1035
|
+
},
|
|
1036
|
+
{
|
|
1037
|
+
value: "DISCHARGED",
|
|
1038
|
+
menuLabel: "DISCHARGED",
|
|
1039
|
+
},
|
|
1040
|
+
{
|
|
1041
|
+
value: "ARCHIVED",
|
|
1042
|
+
menuLabel: "ARCHIVED",
|
|
1043
|
+
},
|
|
1044
|
+
];
|
|
1045
|
+
|
|
1046
|
+
// Email regex
|
|
1047
|
+
export const EMAIL_REGEX = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
|
|
1048
|
+
|
|
1049
|
+
// Task constants
|
|
1050
|
+
export const getSurgeryTaskStatusBadgeClass = {
|
|
1051
|
+
TODO: "badge-teal",
|
|
1052
|
+
WAITING: "badge-brown",
|
|
1053
|
+
CANCELLED: "badge-grey",
|
|
1054
|
+
BLOCKED: "badge-red",
|
|
1055
|
+
ERROR: "badge-orange",
|
|
1056
|
+
IN_PROGRESS: "badge-yellow",
|
|
1057
|
+
COMPLETED: "badge-green",
|
|
1058
|
+
};
|
|
1059
|
+
|
|
1060
|
+
export const surgeryTaskStatusMenus = [
|
|
1061
|
+
{
|
|
1062
|
+
value: "TODO",
|
|
1063
|
+
label: "TODO",
|
|
1064
|
+
},
|
|
1065
|
+
{
|
|
1066
|
+
value: "WAITING",
|
|
1067
|
+
label: "WAITING",
|
|
1068
|
+
},
|
|
1069
|
+
{
|
|
1070
|
+
value: "CANCELLED",
|
|
1071
|
+
label: "CANCELLED",
|
|
1072
|
+
},
|
|
1073
|
+
{
|
|
1074
|
+
value: "BLOCKED",
|
|
1075
|
+
label: "BLOCKED",
|
|
1076
|
+
},
|
|
1077
|
+
{
|
|
1078
|
+
value: "ERROR",
|
|
1079
|
+
label: "ERROR",
|
|
1080
|
+
},
|
|
1081
|
+
{
|
|
1082
|
+
value: "IN_PROGRESS",
|
|
1083
|
+
label: "IN_PROGRESS",
|
|
1084
|
+
},
|
|
1085
|
+
{
|
|
1086
|
+
value: "COMPLETED",
|
|
1087
|
+
label: "COMPLETED",
|
|
1088
|
+
},
|
|
1089
|
+
];
|
|
1090
|
+
|
|
1091
|
+
export const TaskTypes = [
|
|
1092
|
+
{
|
|
1093
|
+
id: "CONTACT",
|
|
1094
|
+
title: "Contact",
|
|
1095
|
+
},
|
|
1096
|
+
{
|
|
1097
|
+
id: "INPUT",
|
|
1098
|
+
title: "Input",
|
|
1099
|
+
},
|
|
1100
|
+
{
|
|
1101
|
+
id: "REVIEW",
|
|
1102
|
+
title: "Review",
|
|
1103
|
+
},
|
|
1104
|
+
{
|
|
1105
|
+
id: "MEDICATION",
|
|
1106
|
+
title: "Medication",
|
|
1107
|
+
},
|
|
1108
|
+
{
|
|
1109
|
+
id: "FOLLOW_UP",
|
|
1110
|
+
title: "Follow-Up",
|
|
1111
|
+
},
|
|
1112
|
+
];
|
|
1113
|
+
// Elements per prescription search pagination page.
|
|
1114
|
+
export const ITEMS_PER_PRESCRIPTION_SEARCH_PAGE = 10;
|
|
1115
|
+
|
|
1116
|
+
//Errors for file upload
|
|
1117
|
+
export const errorFileName =
|
|
1118
|
+
"Invalid filename. Use only letters, numbers, underscores, and hyphens.";
|
|
1119
|
+
export const errorFileFormat = "Only JPG, JPEG, and PNG files are allowed.";
|
|
1120
|
+
export const errorFileSize = "File size exceeds 10 MB. Please choose a smaller file.";
|
|
1121
|
+
export const errorTotalFileSize = "Total file size exceeds 20 MB. Please choose smaller files.";
|
|
1122
|
+
export const appointmentStatus = [
|
|
1123
|
+
{
|
|
1124
|
+
value: "SCHEDULED",
|
|
1125
|
+
menuLabel: "Scheduled",
|
|
1126
|
+
},
|
|
1127
|
+
{
|
|
1128
|
+
value: "RESCHEDULED",
|
|
1129
|
+
menuLabel: "Rescheduled",
|
|
1130
|
+
},
|
|
1131
|
+
{
|
|
1132
|
+
value: "PRESCRIPTION_DONE",
|
|
1133
|
+
menuLabel: "Prescription Done",
|
|
1134
|
+
},
|
|
1135
|
+
{
|
|
1136
|
+
value: "NO_SHOW",
|
|
1137
|
+
menuLabel: "No Show",
|
|
1138
|
+
},
|
|
1139
|
+
{
|
|
1140
|
+
value: "COMPLETED",
|
|
1141
|
+
menuLabel: "Completed",
|
|
1142
|
+
},
|
|
1143
|
+
{
|
|
1144
|
+
value: "CANCELLED",
|
|
1145
|
+
menuLabel: "Cancelled",
|
|
1146
|
+
},
|
|
1147
|
+
{
|
|
1148
|
+
value: "CHECKED_IN",
|
|
1149
|
+
menuLabel: "Checked In",
|
|
1150
|
+
},
|
|
1151
|
+
];
|
|
1152
|
+
|
|
1153
|
+
export const removeNullValuesFromObject = (obj) => {
|
|
1154
|
+
let nonNullObj = {};
|
|
1155
|
+
for (let key of Object.keys(obj)) {
|
|
1156
|
+
let value = obj[key];
|
|
1157
|
+
if (value !== null && value !== undefined && value !== 0) {
|
|
1158
|
+
if (typeof value === "string") {
|
|
1159
|
+
if (value?.length > 0) {
|
|
1160
|
+
nonNullObj[key] = value;
|
|
1161
|
+
}
|
|
1162
|
+
} else if (Array.isArray(value)) {
|
|
1163
|
+
nonNullObj[key] = value;
|
|
1164
|
+
} else if (typeof value === "object") {
|
|
1165
|
+
nonNullObj[key] = removeNullValuesFromObject(value);
|
|
1166
|
+
} else {
|
|
1167
|
+
nonNullObj[key] = value;
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
}
|
|
1171
|
+
return nonNullObj;
|
|
1172
|
+
};
|
|
1173
|
+
|
|
1174
|
+
// Page size for getting all the appointments from filterAppointment API
|
|
1175
|
+
export const PAGE_SIZE_FOR_APPOINTMENT_DATA = 1000000000;
|
|
1176
|
+
|
|
1177
|
+
export const saveToIndexedDB = (data) => {
|
|
1178
|
+
return new Promise((resolve, reject) => {
|
|
1179
|
+
if (!data?.id) {
|
|
1180
|
+
reject("No Prescription Id Provided");
|
|
1181
|
+
}
|
|
1182
|
+
const request = indexedDB.open("arog", 1);
|
|
1183
|
+
|
|
1184
|
+
request.onupgradeneeded = function (event) {
|
|
1185
|
+
const db = event.target.result;
|
|
1186
|
+
if (!db.objectStoreNames.contains("audioStore")) {
|
|
1187
|
+
db.createObjectStore("audioStore", { keyPath: "id" });
|
|
1188
|
+
}
|
|
1189
|
+
};
|
|
1190
|
+
|
|
1191
|
+
request.onsuccess = function (event) {
|
|
1192
|
+
const db = event.target.result;
|
|
1193
|
+
const transaction = db.transaction("audioStore", "readwrite");
|
|
1194
|
+
const store = transaction.objectStore("audioStore");
|
|
1195
|
+
|
|
1196
|
+
const addRequest = store.put(data);
|
|
1197
|
+
|
|
1198
|
+
addRequest.onsuccess = function () {
|
|
1199
|
+
resolve("Data saved successfully");
|
|
1200
|
+
};
|
|
1201
|
+
|
|
1202
|
+
addRequest.onerror = function (event) {
|
|
1203
|
+
reject("Error saving data: " + event.target.error);
|
|
1204
|
+
};
|
|
1205
|
+
};
|
|
1206
|
+
|
|
1207
|
+
request.onerror = function (event) {
|
|
1208
|
+
reject("IndexedDB error: " + event.target.error);
|
|
1209
|
+
};
|
|
1210
|
+
});
|
|
1211
|
+
};
|
|
1212
|
+
|
|
1213
|
+
export const getFromIndexedDB = (id) => {
|
|
1214
|
+
return new Promise((resolve, reject) => {
|
|
1215
|
+
if (!id) {
|
|
1216
|
+
reject("No Prescription Id Provided");
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
const request = indexedDB.open("arog", 1);
|
|
1220
|
+
|
|
1221
|
+
request.onsuccess = function (event) {
|
|
1222
|
+
const db = event.target.result;
|
|
1223
|
+
const transaction = db.transaction("audioStore", "readonly");
|
|
1224
|
+
const store = transaction.objectStore("audioStore");
|
|
1225
|
+
|
|
1226
|
+
const getRequest = store?.get(id);
|
|
1227
|
+
|
|
1228
|
+
getRequest.onsuccess = function () {
|
|
1229
|
+
if (getRequest.result) {
|
|
1230
|
+
resolve(getRequest.result);
|
|
1231
|
+
} else {
|
|
1232
|
+
reject("No data found for ID: " + id);
|
|
1233
|
+
}
|
|
1234
|
+
};
|
|
1235
|
+
|
|
1236
|
+
getRequest.onerror = function () {
|
|
1237
|
+
reject("Error retrieving data.");
|
|
1238
|
+
};
|
|
1239
|
+
};
|
|
1240
|
+
|
|
1241
|
+
request.onerror = function (event) {
|
|
1242
|
+
reject("IndexedDB error: " + event.target.error);
|
|
1243
|
+
};
|
|
1244
|
+
});
|
|
1245
|
+
};
|
|
1246
|
+
|
|
1247
|
+
export const deleteBlobFromIndexedDB = (id) => {
|
|
1248
|
+
const request = indexedDB.open("arog", 1);
|
|
1249
|
+
|
|
1250
|
+
request.onsuccess = function (event) {
|
|
1251
|
+
const db = event.target.result;
|
|
1252
|
+
const transaction = db.transaction("audioStore", "readwrite");
|
|
1253
|
+
const store = transaction.objectStore("audioStore");
|
|
1254
|
+
|
|
1255
|
+
store.delete(id);
|
|
1256
|
+
};
|
|
1257
|
+
};
|
|
1258
|
+
|
|
1259
|
+
export const discountArray = [
|
|
1260
|
+
{
|
|
1261
|
+
value: "0",
|
|
1262
|
+
menuLabel: "---",
|
|
1263
|
+
},
|
|
1264
|
+
{
|
|
1265
|
+
value: "5",
|
|
1266
|
+
menuLabel: "5%",
|
|
1267
|
+
},
|
|
1268
|
+
{
|
|
1269
|
+
value: "10",
|
|
1270
|
+
menuLabel: "10%",
|
|
1271
|
+
},
|
|
1272
|
+
{
|
|
1273
|
+
value: "25",
|
|
1274
|
+
menuLabel: "25%",
|
|
1275
|
+
},
|
|
1276
|
+
{
|
|
1277
|
+
value: "50",
|
|
1278
|
+
menuLabel: "50%",
|
|
1279
|
+
},
|
|
1280
|
+
{
|
|
1281
|
+
value: "75",
|
|
1282
|
+
menuLabel: "75%",
|
|
1283
|
+
},
|
|
1284
|
+
{
|
|
1285
|
+
value: "100",
|
|
1286
|
+
menuLabel: "FOC",
|
|
1287
|
+
},
|
|
1288
|
+
];
|
|
1289
|
+
|
|
1290
|
+
export const textAreaStyles = {
|
|
1291
|
+
width: "100%", // Match container width
|
|
1292
|
+
padding: "8px", // Consistent padding
|
|
1293
|
+
border: "1px solid #ced4da", // Light gray border
|
|
1294
|
+
borderRadius: "4px", // Rounded corners
|
|
1295
|
+
fontSize: "1rem", // Same font size as MUI
|
|
1296
|
+
fontFamily: "Roboto, sans-serif", // Use Roboto font (MUI default)
|
|
1297
|
+
lineHeight: "1.5", // Standard line height
|
|
1298
|
+
color: "#212529", // Dark gray text color
|
|
1299
|
+
backgroundColor: "#fff", // White background
|
|
1300
|
+
transition: "border-color .15s ease-in-out, box-shadow .15s ease-in-out", // Smooth transitions
|
|
1301
|
+
":focus": {
|
|
1302
|
+
// Styles on focus
|
|
1303
|
+
borderColor: "#004c70", // Blue border on focus
|
|
1304
|
+
outline: 0,
|
|
1305
|
+
boxShadow: "0 0 0 0.2rem rgba(0,123,255,.25)", // Subtle blue shadow
|
|
1306
|
+
},
|
|
1307
|
+
":disabled": {
|
|
1308
|
+
// Styles for disabled state
|
|
1309
|
+
backgroundColor: "#e9ecef", // Light gray background
|
|
1310
|
+
opacity: 1, // Reset opacity for consistency
|
|
1311
|
+
},
|
|
1312
|
+
resize: "vertical", // Allow vertical resizing (or 'none' or 'both')
|
|
1313
|
+
};
|
|
1314
|
+
// Sidebar state constant
|
|
1315
|
+
export const MAIN_SIDEBAR_STATE = "main";
|
|
1316
|
+
export const MAIN_SHRINK_SIDEBAR_STATE = "main shrink";
|
|
1317
|
+
export const MAIN_RESPONSIVE_SHRINK_SIDEBAR_STATE = "main responsive-shrink";
|
|
1318
|
+
export const MAIN_HIDE_SIDEBAR_STATE = "main hide";
|
|
1319
|
+
|
|
1320
|
+
// Environment variables
|
|
1321
|
+
export const STAGING_ENVIRONMENT = "staging";
|
|
1322
|
+
export const questionTypeMapping = {
|
|
1323
|
+
TEXT: "TEXT",
|
|
1324
|
+
NUMERIC: "NUMERIC",
|
|
1325
|
+
SINGLE_CHOICE: "SINGLE CHOICE",
|
|
1326
|
+
MULTIPLE_CHOICE: "MULTIPLE CHOICE",
|
|
1327
|
+
CHECKLIST: "CHECKLIST",
|
|
1328
|
+
UPLOAD_FILE: "UPLOAD FILE",
|
|
1329
|
+
TEXT_AREA: "TEXT AREA",
|
|
1330
|
+
};
|
|
1331
|
+
export const YES = "yes";
|
|
1332
|
+
export const NO = "no";
|
|
1333
|
+
export const admissionStatus = [
|
|
1334
|
+
{ value: "PENDING", menuLabel: "Pending" },
|
|
1335
|
+
{ value: "ADMITTED", menuLabel: "Admitted" },
|
|
1336
|
+
{ value: "ON_HOLD", menuLabel: "On Hold" },
|
|
1337
|
+
{ value: "DISCHARGED", menuLabel: "Discharged" },
|
|
1338
|
+
{ value: "DENIED", menuLabel: "Denied" },
|
|
1339
|
+
];
|