diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 00000000..d054eb01 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,92 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## Project Overview + +AMRIT MMU (Mobile Medical Unit) UI — an Angular 16 healthcare application for the PSMRI AMRIT platform. Supports nurse, doctor, lab technician, pharmacist, radiologist, and oncologist workflows including patient registration, vitals capture, clinical examination, diagnosis, prescriptions, lab tests, drug dispensing, and offline data sync for van operations. + +## Build & Development Commands + +| Command | Purpose | +|---------|---------| +| `npm start` | Dev server on **port 4202** (`ng serve`) | +| `npm run build` | Production build | +| `npm run build-dev` | AOT dev build (increased heap) | +| `npm run build-prod` | AOT production build (increased heap) | +| `npm run build-ci` | CI build (generates `environment.ci.ts` from template + env vars) | +| `npm test` | Run tests (Karma + Jasmine) | +| `npm run lint` | ESLint | +| `npm run lint:fix` | ESLint with auto-fix | +| `npm run commit` | Commitizen conventional commit prompt | + +## Git Submodule: Common-UI + +`Common-UI/` is a git submodule from `https://github.com/PSMRI/Common-UI`. It provides: +- `registrar` module (patient registration + `SessionStorageService`) +- `feedback` module +- `tracking` module (Matomo analytics) + +Initialize with: +```bash +cd Common-UI && git submodule update --init --recursive && git checkout develop +``` + +Import paths use `Common-UI/src/...` (e.g., `Common-UI/src/registrar/registration.module`). + +## Architecture + +### Module Structure +- **AppModule** — root module with hash-based routing (`useHash: true`) +- **CoreModule** — singleton services, guards, shared components, directives. Uses `CoreModule.forRoot()` pattern +- **Feature modules** (lazy-loaded): `nurse-doctor`, `lab`, `pharmacist`, `data-sync`, `registrar` (from Common-UI), `feedback` (from Common-UI) +- **MaterialModule** — re-exports all Angular Material modules + +### State Management +No NgRx — uses Angular services with `BehaviorSubject`/`Subject` for reactive state. Key examples: +- `NurseService` — cross-component clinical state (RBS, NCD, IDRS, assessment) +- `HttpServiceService` — language/i18n state via `currentLangugae$` BehaviorSubject +- `SessionStorageService` (Common-UI) — encrypted sessionStorage via `ng-cryptostore`, key from `environment.encKey` + +### HTTP / Auth +- `HttpInterceptorService` — attaches auth tokens (`Authorization`, `ServerAuthorization`), manages spinner, handles 27-minute session timeout with warning dialog, auto-logout on 401/5002 +- Auth tokens stored in sessionStorage as `authenticationToken` and `isAuthenticated` +- `AuthGuard` protects clinical routes; `CanDeactivateGuardService` prevents navigation with unsaved changes + +### Key Services (core) +- `ConfirmationService` — alert/confirm/remarks dialogs via `CommonDialogComponent` + `MatDialog` +- `IotService` — Bluetooth device integration at `http://localhost:8085/ezdx-hub-connect-srv` +- `SpinnerService` — global loading indicator + +### Routing +Root routes: `login`, `service`, `servicePoint`, `registrar`, `nurse-doctor`, `lab`, `pharmacist`, `datasync` +Nurse-doctor sub-routes: role-specific worklists, patient workarea (`attendant/:attendant/patient/:beneficiaryRegID`), case sheet print, reports + +## Code Conventions + +- **License header**: All source files begin with the AMRIT GPL-3.0 license block +- **Component prefix**: `app` (kebab-case for components, camelCase for directives) +- **Commit convention**: Conventional Commits enforced via commitlint. Types: `feat`, `fix`, `build`, `chore`, `ci`, `docs`, `perf`, `refactor`, `revert`, `style`, `test` +- **Pre-commit hook**: `lint-staged` runs ESLint `--fix` on `src/**/*.ts` +- **Formatting**: Prettier — 2-space tabs, single quotes, semicolons, 80 char width, ES5 trailing commas +- **TypeScript**: strict mode, ES5 target, strict templates enabled + +## Environment Configuration + +Environment files in `src/environments/`. CI build uses EJS template (`environment.ci.ts.template`) with env vars for API endpoints, encryption keys, captcha config, and tracking config. Key environment properties: +- API base URLs: `commonAPI`, `mmuAPI`, `tmAPI`, `schedulerAPI`, etc. +- `encKey` — sessionStorage encryption key +- `siteKey` / `captchaChallengeUrl` — captcha configuration +- `tracking` — Matomo analytics config (siteId, trackerUrl, enabled) +- `isMMUOfflineSync` — enables offline data sync feature + +## Key Dependencies + +- Angular 16.2 + Angular Material 16.2 +- Bootstrap 5.3 (layout) + Font Awesome 4.7 (icons) +- RxJS 7.8, Moment.js 2.30 +- `ng-cryptostore` — encrypted sessionStorage +- `exceljs` + `file-saver` — Excel report generation +- `ngx-webcam` — webcam capture +- `ng2-charts` / `chart.js` — charts +- `recordrtc` — audio recording diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..49c95f95 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,96 @@ +# Contributing to MMU-UI + +## Prerequisites + +- **Node.js**: v18.10.0 or higher +- **Angular CLI**: v16.2.x (`npm install -g @angular/cli`) +- **Git**: v2.x or higher + +## Local Setup + +1. Clone the repository: + ```bash + git clone https://github.com/PSMRI/MMU-UI.git + cd MMU-UI + ``` + +2. Install dependencies: + ```bash + npm install + ``` + +3. Initialize Common-UI submodule: + ```bash + cd Common-UI && git submodule update --init --recursive && git checkout develop + ``` + +4. Start the dev server: + ```bash + npm start + ``` + Access at `http://localhost:4202/#/login` + +## Branch Naming + +Use prefixes for clarity: +- `feat/` — New features +- `fix/` — Bug fixes +- `chore/` — Dependencies, build, tooling +- `docs/` — Documentation updates +- `refactor/` — Code improvements + +Example: `feat/patient-registration-flow` + +## Commits + +Conventional Commits are **enforced** by Husky + commitlint: + +``` +type(scope): description + +Valid types: feat, fix, build, chore, ci, docs, perf, refactor, revert, style, test +Example: feat(vitals): add blood pressure validation +``` + +Use `npm run commit` for an interactive prompt. + +## PR Checklist + +Before submitting a PR: + +- [ ] `npm run lint:fix` — ESLint passes +- [ ] No `console.log()` in production code (only `console.warn/error` allowed) +- [ ] `npm test` — Tests pass +- [ ] Branch follows naming convention +- [ ] Commit messages follow Conventional Commits +- [ ] Code uses Angular services for state (BehaviorSubject pattern) + +## Code Standards + +### State Management +- Use `BehaviorSubject` in services for reactive state +- No NgRx — services manage component communication +- Example: `NurseService`, `HttpServiceService` + +### No Console Output +- Remove all `console.log()` from production code +- Only `console.warn()` and `console.error()` are allowed +- ESLint enforces this via `no-console` rule + +### TypeScript & Templates +- Strict mode enabled (`strict: true`) +- Strict templates enabled (`strictTemplates: true`) +- Use `any` only when unavoidable (rule disabled, but discouraged) + +## Running Tests + +```bash +npm test +``` + +Tests run in watch mode. Files are re-tested on change. + +## Questions? + +See [CLAUDE.md](CLAUDE.md) for detailed architecture notes. +File issues in the [main AMRIT repo](https://github.com/PSMRI/AMRIT/issues). diff --git a/Common-UI b/Common-UI index 2655965f..5b6fe408 160000 --- a/Common-UI +++ b/Common-UI @@ -1 +1 @@ -Subproject commit 2655965ffd9b17d342d2cd46c97e966e78978c6b +Subproject commit 5b6fe40846d39eb88b35bed20add07ae7e5b4077 diff --git a/README.md b/README.md index da58a362..efa7c656 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # AMRIT - Mobile Medical Unit (MMU) Service -[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) ![branch parameter](https://github.com/PSMRI/MMU-UI/actions/workflows/sast.yml/badge.svg) +[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) [![DeepWiki](https://img.shields.io/badge/DeepWiki-PSMRI%2FMMU--UI-blue)](https://deepwiki.com/PSMRI/MMU-UI) + The AMRIT Mobile Medical Unit (MMU) service provides essential medical assistance to individuals without requiring them to be admitted to a hospital. This service operates through a mobile unit equipped with a laboratory for conducting medical tests and the capability to dispense medicines. The MMU employs an internet-connected device to collect and transmit medical data to the AMRIT application. It supports various medical standards and incorporates a feature that allows data capture and synchronization even when an internet connection is unavailable. @@ -32,20 +33,37 @@ Ensure that the following prerequisites are met before building the MMU service: * JDK 17 * Maven -* Nodejs v18.10.0 +* Node.js v18.10.0 (use `nvm` to manage versions: `nvm install` picks up the version from `.nvmrc`) * MySQL ### Installation To install the MMU module, please follow these steps: -1. Clone the repository to your local machine. -2. Install the dependencies and build the module: - - Run the command `npm install`. - - Run the command `npm run build`. - - Run the command `mvn clean install`. - - Run the command `npm start`. -3. Open your browser and access `http://localhost:4200/#/login` to view the login page of module. +1. Clone the repository with submodules: + ```bash + git clone --recurse-submodules https://github.com/PSMRI/MMU-UI.git + cd MMU-UI + ``` + If you already cloned without `--recurse-submodules`, run: + ```bash + git submodule update --init --recursive + ``` + +2. Use the correct Node.js version: + ```bash + nvm install + nvm use + ``` + +3. Install dependencies and build the module: + ```bash + npm install + npm run build # or npm run build-dev for an AOT dev build + npm start # serves at http://localhost:4202 + ``` + +4. Open your browser and access `http://localhost:4202/#/login` to view the login page of the module. ### Building from source @@ -55,7 +73,7 @@ mvn -B package --file pom.xml -P ``` The available profiles include dev, local, test, and ci. -Refer to `src/environments/environment.ci.template` file and ensure that the right environment variables are set for the build. +Refer to `src/environments/environment.ci.ts.template` file and ensure that the right environment variables are set for the build. Packing with `ci` profile calls `build-ci` script in `package.json`. It creates a `environment.ci.ts` file with all environment variables used in the generated build. @@ -68,29 +86,19 @@ The MMU module offers comprehensive management capabilities for your application ### Initializing Submodule `Common-UI` -To initialize the `Common-UI` submodule, follow these steps: +The `Common-UI` submodule provides shared UI modules (registrar, feedback, tracking). -1. Clone the `mmu-ui` project: - ```bash - git clone https://github.com/PSMRI/MMU-UI - -2. Navigate to the project directory and pull the latest changes from the develop branch - cd mmu-ui - git checkout develop - git pull origin develop - -3. Open the integrated terminal for the common-ui submodule and initialize it - - cd Common-UI - git init - git remote add origin https://github.com/PSMRI/Common-UI - git submodule update --init --recursive +To initialize it: -4. Check the available branches and switch to the develop branch +```bash +# From the repo root, run: +git submodule update --init --recursive +cd Common-UI +git checkout develop +git pull origin develop +``` - git branch - git checkout develop - git pull origin develop +If you cloned with `--recurse-submodules`, the submodule is already initialized. ## Filing Issues @@ -100,4 +108,3 @@ If you encounter any issues, bugs, or have feature requests, please file them in We’d love to have you join our community discussions and get real-time support! Join our [Discord server](https://discord.gg/FVQWsf5ENS) to connect with contributors, ask questions, and stay updated. - diff --git a/angular.json b/angular.json index 9cbbb101..ef39285c 100644 --- a/angular.json +++ b/angular.json @@ -35,7 +35,10 @@ "node_modules/bootstrap/dist/css/bootstrap.min.css", "node_modules/font-awesome/css/font-awesome.min.css" ], - "scripts": [] + "scripts": [], + "allowedCommonJsDependencies": [ + "qrcode" + ] }, "configurations": { "production": { @@ -119,7 +122,8 @@ }, "defaultConfiguration": "development", "options": { - "port": 4202 + "port": 4202, + "host": "0.0.0.0" } }, "extract-i18n": { diff --git a/package-lock.json b/package-lock.json index 0895adf0..efec9352 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,6 +37,7 @@ "ngx-cookie-service": "^16.1.0", "ngx-pagination": "^6.0.3", "ngx-webcam": "^0.4.1", + "qrcode": "^1.5.4", "recordrtc": "^5.6.2", "rxjs": "^7.8.1", "tslib": "^2.3.0", @@ -55,6 +56,7 @@ "@commitlint/config-conventional": "^19.8.0", "@types/crypto-js": "^4.2.1", "@types/jasmine": "~5.1.4", + "@types/qrcode": "^1.5.6", "@types/recordrtc": "^5.6.14", "@typescript-eslint/eslint-plugin": "~5.59.11", "@typescript-eslint/parser": "~5.59.11", @@ -69,7 +71,7 @@ "karma-chrome-launcher": "~3.2.0", "karma-coverage": "~2.2.0", "karma-jasmine": "~5.1.0", - "karma-jasmine-html-reporter": "~2.1.0", + "karma-jasmine-html-reporter": "~2.2.0", "lint-staged": "^15.2.0", "prettier": "^3.5.3", "prettier-eslint": "^16.2.0", @@ -538,9 +540,9 @@ } }, "node_modules/@angular-eslint/eslint-plugin-template/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.0.tgz", + "integrity": "sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w==", "dev": true, "license": "MIT", "dependencies": { @@ -3404,10 +3406,11 @@ } }, "node_modules/@commitlint/load/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", "dev": true, + "license": "MIT", "dependencies": { "argparse": "^2.0.1" }, @@ -4053,9 +4056,9 @@ } }, "node_modules/@eslint/eslintrc/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz", + "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", "dev": true, "license": "MIT", "dependencies": { @@ -4093,9 +4096,9 @@ } }, "node_modules/@eslint/eslintrc/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", "dev": true, "license": "MIT", "dependencies": { @@ -5819,9 +5822,9 @@ } }, "node_modules/@sigstore/sign/node_modules/@tootallnate/once": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", - "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.1.tgz", + "integrity": "sha512-HqmEUIGRJ5fSXchkVgR5F7qn48bDBzv0kWj/Kfu5e6uci4UlEeng4331LnBkWffb++Ei3FOVLxo8JJWMFBDMeQ==", "dev": true, "license": "MIT", "engines": { @@ -5971,9 +5974,9 @@ } }, "node_modules/@tufjs/models/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.0.tgz", + "integrity": "sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w==", "dev": true, "license": "MIT", "dependencies": { @@ -5981,13 +5984,13 @@ } }, "node_modules/@tufjs/models/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz", + "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", "dev": true, "license": "ISC", "dependencies": { - "brace-expansion": "^2.0.1" + "brace-expansion": "^2.0.2" }, "engines": { "node": ">=16 || 14 >=14.17" @@ -6179,6 +6182,16 @@ "@types/node": "*" } }, + "node_modules/@types/qrcode": { + "version": "1.5.6", + "resolved": "https://registry.npmjs.org/@types/qrcode/-/qrcode-1.5.6.tgz", + "integrity": "sha512-te7NQcV2BOvdj2b1hCAHzAoMNuj65kNBMz0KBaxM6c3VGBOhU0dURQKOtH8CFNI/dsKkwlv32p26qYQTWoB5bw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/qs": { "version": "6.9.18", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.18.tgz", @@ -6567,9 +6580,9 @@ } }, "node_modules/@typescript-eslint/type-utils/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.0.tgz", + "integrity": "sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w==", "dev": true, "license": "MIT", "dependencies": { @@ -6740,9 +6753,9 @@ } }, "node_modules/@typescript-eslint/utils/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.0.tgz", + "integrity": "sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w==", "dev": true, "license": "MIT", "dependencies": { @@ -6750,13 +6763,13 @@ } }, "node_modules/@typescript-eslint/utils/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz", + "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", "dev": true, "license": "ISC", "dependencies": { - "brace-expansion": "^2.0.1" + "brace-expansion": "^2.0.2" }, "engines": { "node": ">=16 || 14 >=14.17" @@ -7328,7 +7341,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -7338,7 +7350,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, "license": "MIT", "dependencies": { "color-convert": "^2.0.1" @@ -7555,27 +7566,29 @@ } }, "node_modules/axios": { - "version": "1.8.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.8.4.tgz", - "integrity": "sha512-eBSYY4Y68NNlHbHBMdeDmKNtDgXWhQsJcGqzO3iLUM0GraQFSS9cVgPX5I9b3lbdFKyYoAEGAZF1DwhTaljNAw==", + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.18.1.tgz", + "integrity": "sha512-3nTvFlvpn9Zu/RkHUqtc7/+al4UpRW5az71ap5zccp6e8RAYEzhMTecX8Dz1wWDYrPpUoB1HAQEGEAEvUr7S9g==", "dev": true, "license": "MIT", "dependencies": { - "follow-redirects": "^1.15.6", - "form-data": "^4.0.0", - "proxy-from-env": "^1.1.0" + "follow-redirects": "^1.16.0", + "form-data": "^4.0.5", + "https-proxy-agent": "^5.0.1", + "proxy-from-env": "^2.1.0" } }, "node_modules/axios/node_modules/form-data": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.2.tgz", - "integrity": "sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", + "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", "dev": true, "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", "mime-types": "^2.1.12" }, "engines": { @@ -7828,24 +7841,24 @@ "license": "MIT" }, "node_modules/body-parser": { - "version": "1.20.3", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", - "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", + "version": "1.20.5", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.5.tgz", + "integrity": "sha512-3grm+/2tUOvu2cjJkvsIxrv/wVpfXQW4PsQHYm7yk4vfpu7Ekl6nEsYBoJUL6qDwZUx8wUhQ8tR2qz+ad9c9OA==", "dev": true, "license": "MIT", "dependencies": { - "bytes": "3.1.2", + "bytes": "~3.1.2", "content-type": "~1.0.5", "debug": "2.6.9", "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.13.0", - "raw-body": "2.5.2", + "destroy": "~1.2.0", + "http-errors": "~2.0.1", + "iconv-lite": "~0.4.24", + "on-finished": "~2.4.1", + "qs": "~6.15.1", + "raw-body": "~2.5.3", "type-is": "~1.6.18", - "unpipe": "1.0.0" + "unpipe": "~1.0.0" }, "engines": { "node": ">= 0.8", @@ -7862,6 +7875,27 @@ "ms": "2.0.0" } }, + "node_modules/body-parser/node_modules/http-errors": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "depd": "~2.0.0", + "inherits": "~2.0.4", + "setprototypeof": "~1.2.0", + "statuses": "~2.0.2", + "toidentifier": "~1.0.1" + }, + "engines": { + "node": ">= 0.8" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, "node_modules/body-parser/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -7869,6 +7903,32 @@ "dev": true, "license": "MIT" }, + "node_modules/body-parser/node_modules/qs": { + "version": "6.15.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.1.tgz", + "integrity": "sha512-6YHEFRL9mfgcAvql/XhwTvf5jKcOiiupt2FiJxHkiX1z4j7WL8J/jRHYLluORvc1XxB5rV20KoeK00gVJamspg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/body-parser/node_modules/statuses": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", + "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/bonjour-service": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/bonjour-service/-/bonjour-service-1.3.0.tgz", @@ -7907,9 +7967,9 @@ } }, "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz", + "integrity": "sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==", "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", @@ -8061,9 +8121,9 @@ } }, "node_modules/cacache/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.0.tgz", + "integrity": "sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w==", "dev": true, "license": "MIT", "dependencies": { @@ -8071,9 +8131,10 @@ } }, "node_modules/cacache/node_modules/glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", + "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", "dev": true, "license": "ISC", "dependencies": { @@ -8102,13 +8163,13 @@ } }, "node_modules/cacache/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz", + "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", "dev": true, "license": "ISC", "dependencies": { - "brace-expansion": "^2.0.1" + "brace-expansion": "^2.0.2" }, "engines": { "node": ">=16 || 14 >=14.17" @@ -8181,7 +8242,6 @@ "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -8462,7 +8522,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, "license": "MIT", "dependencies": { "color-name": "~1.1.4" @@ -8475,7 +8534,6 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, "license": "MIT" }, "node_modules/color-support": { @@ -8589,6 +8647,13 @@ "node": ">=12.0.0" } }, + "node_modules/commitizen/node_modules/inquirer/node_modules/lodash": { + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz", + "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==", + "dev": true, + "license": "MIT" + }, "node_modules/commitizen/node_modules/minimist": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", @@ -8663,9 +8728,9 @@ } }, "node_modules/compression": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/compression/-/compression-1.8.0.tgz", - "integrity": "sha512-k6WLKfunuqCYD3t6AsuPGvQWaKwuLLh2/xHNcX4qE+vIfDNXpSqnrhwA7O53R7WVQUnt8dVAIW+YHr7xTgOgGA==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/compression/-/compression-1.8.1.tgz", + "integrity": "sha512-9mAqGPHLakhCLeNyxPkK4xVo746zQ/czLH1Ky+vkitMnWfWZps8r0qXuwhwizagCRttsL4lfG4pIOvaWLpAP0w==", "dev": true, "license": "MIT", "dependencies": { @@ -8673,7 +8738,7 @@ "compressible": "~2.0.18", "debug": "2.6.9", "negotiator": "~0.6.4", - "on-headers": "~1.0.2", + "on-headers": "~1.1.0", "safe-buffer": "5.2.1", "vary": "~1.1.2" }, @@ -9002,9 +9067,9 @@ "license": "Python-2.0" }, "node_modules/cosmiconfig/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", "dev": true, "license": "MIT", "dependencies": { @@ -9324,9 +9389,9 @@ "license": "MIT" }, "node_modules/debug": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", - "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "dev": true, "license": "MIT", "dependencies": { @@ -9341,6 +9406,15 @@ } } }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/decimal.js": { "version": "10.5.0", "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.5.0.tgz", @@ -9593,6 +9667,12 @@ "dev": true, "license": "MIT" }, + "node_modules/dijkstrajs": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/dijkstrajs/-/dijkstrajs-1.0.3.tgz", + "integrity": "sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA==", + "license": "MIT" + }, "node_modules/dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -9859,7 +9939,6 @@ "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true, "license": "MIT" }, "node_modules/emojis-list": { @@ -9917,21 +9996,22 @@ } }, "node_modules/engine.io": { - "version": "6.6.4", - "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.6.4.tgz", - "integrity": "sha512-ZCkIjSYNDyGn0R6ewHDtXgns/Zre/NT6Agvq1/WobF7JXgFff4SeDroKiCO3fNJreU9YG429Sc81o4w5ok/W5g==", + "version": "6.6.9", + "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.6.9.tgz", + "integrity": "sha512-clKkw4C7nJ22mGgoVcCg6V/W/TxdNyIOTr89k2ONZu81qqkddPFDF0LXcbAwhzPD8DjkiRCjzuiO6Y+fkpD4vg==", "dev": true, "license": "MIT", "dependencies": { "@types/cors": "^2.8.12", "@types/node": ">=10.0.0", + "@types/ws": "^8.5.12", "accepts": "~1.3.4", "base64id": "2.0.0", "cookie": "~0.7.2", "cors": "~2.8.5", - "debug": "~4.3.1", + "debug": "~4.4.1", "engine.io-parser": "~5.2.1", - "ws": "~8.17.1" + "ws": "~8.21.0" }, "engines": { "node": ">=10.2.0" @@ -9947,28 +10027,10 @@ "node": ">=10.0.0" } }, - "node_modules/engine.io/node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/engine.io/node_modules/ws": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", - "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", + "version": "8.21.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.1.tgz", + "integrity": "sha512-+0NTnW77fFN/DjQi6k/Sq/Yvk4Sgajw7urW8V+asjXnRgDs9gyGkdb7EzgfhA4goXsRIZKE28fzIXBHEzhuiWw==", "dev": true, "license": "MIT", "engines": { @@ -10399,9 +10461,9 @@ } }, "node_modules/eslint/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz", + "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", "dev": true, "license": "MIT", "dependencies": { @@ -10486,9 +10548,9 @@ } }, "node_modules/eslint/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", "dev": true, "license": "MIT", "dependencies": { @@ -10742,40 +10804,40 @@ "license": "Apache-2.0" }, "node_modules/express": { - "version": "4.21.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz", - "integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==", + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.22.1.tgz", + "integrity": "sha512-F2X8g9P1X7uCPZMA3MVf9wcTqlyNp7IhH5qPCI0izhaOIYXaW9L535tGA3qmjRzpH+bZczqq7hVKxTR4NWnu+g==", "dev": true, "license": "MIT", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.3", - "content-disposition": "0.5.4", + "body-parser": "~1.20.3", + "content-disposition": "~0.5.4", "content-type": "~1.0.4", - "cookie": "0.7.1", - "cookie-signature": "1.0.6", + "cookie": "~0.7.1", + "cookie-signature": "~1.0.6", "debug": "2.6.9", "depd": "2.0.0", "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "etag": "~1.8.1", - "finalhandler": "1.3.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", + "finalhandler": "~1.3.1", + "fresh": "~0.5.2", + "http-errors": "~2.0.0", "merge-descriptors": "1.0.3", "methods": "~1.1.2", - "on-finished": "2.4.1", + "on-finished": "~2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.12", + "path-to-regexp": "~0.1.12", "proxy-addr": "~2.0.7", - "qs": "6.13.0", + "qs": "~6.14.0", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", - "send": "0.19.0", - "serve-static": "1.16.2", + "send": "~0.19.0", + "serve-static": "~1.16.2", "setprototypeof": "1.2.0", - "statuses": "2.0.1", + "statuses": "~2.0.1", "type-is": "~1.6.18", "utils-merge": "1.0.1", "vary": "~1.1.2" @@ -10788,16 +10850,6 @@ "url": "https://opencollective.com/express" } }, - "node_modules/express/node_modules/cookie": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", - "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, "node_modules/express/node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -11026,9 +11078,9 @@ } }, "node_modules/filelist/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.0.tgz", + "integrity": "sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w==", "dev": true, "license": "MIT", "dependencies": { @@ -11036,9 +11088,9 @@ } }, "node_modules/filelist/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "version": "5.1.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.9.tgz", + "integrity": "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==", "dev": true, "license": "ISC", "dependencies": { @@ -11147,7 +11199,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, "license": "MIT", "dependencies": { "locate-path": "^5.0.0", @@ -11198,16 +11249,16 @@ } }, "node_modules/flatted": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", - "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.2.tgz", + "integrity": "sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==", "dev": true, "license": "ISC" }, "node_modules/follow-redirects": { - "version": "1.15.9", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", - "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.0.tgz", + "integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==", "dev": true, "funding": [ { @@ -11251,15 +11302,16 @@ } }, "node_modules/form-data": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.3.tgz", - "integrity": "sha512-q5YBMeWy6E2Un0nMGWMgI65MAKtaylxfNJGJxpGh45YDciZB4epbWpaAfImil6CPAPTYB4sh0URQNDRIZG5F2w==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.4.tgz", + "integrity": "sha512-f0cRzm6dkyVYV3nPoooP8XlccPQukegwhAnpoLcXy+X+A8KfpGOoXwDr9FLZd3wzgLaBGQBE3lY93Zm/i1JvIQ==", "dev": true, "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", "mime-types": "^2.1.35" }, "engines": { @@ -11453,7 +11505,6 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, "license": "ISC", "engines": { "node": "6.* || 8.* || >= 10.*" @@ -12070,9 +12121,9 @@ } }, "node_modules/http-proxy-middleware": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.7.tgz", - "integrity": "sha512-fgVY8AV7qU7z/MmXJ/rxwbrtQH4jBQ9m7kp3llF0liB7glmFeVZFBepQb32T3y8n8k2+AEYuMPCpinYW+/CuRA==", + "version": "2.0.9", + "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.9.tgz", + "integrity": "sha512-c1IyJYLYppU574+YI7R4QyX2ystMtVXZwIdzazUIPIJsHuWNd+mho2j+bKoHftndicGj9yh+xjd+l0yj7VeT1Q==", "dev": true, "license": "MIT", "dependencies": { @@ -12214,9 +12265,9 @@ } }, "node_modules/ignore-walk/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.0.tgz", + "integrity": "sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w==", "dev": true, "license": "MIT", "dependencies": { @@ -12224,13 +12275,13 @@ } }, "node_modules/ignore-walk/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz", + "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", "dev": true, "license": "ISC", "dependencies": { - "brace-expansion": "^2.0.1" + "brace-expansion": "^2.0.2" }, "engines": { "node": ">=16 || 14 >=14.17" @@ -12260,9 +12311,9 @@ "license": "MIT" }, "node_modules/immutable": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.7.tgz", - "integrity": "sha512-1hqclzwYwjRDFLjcFxOM5AYkkG0rpFPpr1RLPMEuGczoS7YA8gLhy8SWXYRAA/XwfEHpfo3cw5JGioS32fnMRw==", + "version": "4.3.9", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.9.tgz", + "integrity": "sha512-ObHy4YN7ycwZOUCLI1/6svfyAFu7vL8RhAvVu/bh/RZW9EPlOyDaQ9jDQWCtdqzaXUjgXZCW1migtHE7YI7UGQ==", "dev": true, "license": "MIT" }, @@ -12898,9 +12949,9 @@ "license": "MIT" }, "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", + "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", "dev": true, "license": "MIT", "dependencies": { @@ -13211,13 +13262,13 @@ } }, "node_modules/karma-jasmine-html-reporter": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-2.1.0.tgz", - "integrity": "sha512-sPQE1+nlsn6Hwb5t+HHwyy0A1FNCVKuL1192b+XNauMYWThz2kweiBVW1DqloRpVvZIJkIoHVB7XRpK78n1xbQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-2.2.0.tgz", + "integrity": "sha512-J0laEC43Oy2RdR5V5R3bqmdo7yRIYySq6XHKbA+e5iSAgLjhR1oICLGeSREPlJXpeyNcdJf3J17YcdhD0mRssQ==", "dev": true, "license": "MIT", "peerDependencies": { - "jasmine-core": "^4.0.0 || ^5.0.0", + "jasmine-core": "^4.0.0 || ^5.0.0 || ^6.0.0", "karma": "^6.0.0", "karma-jasmine": "^5.0.0" } @@ -13705,7 +13756,6 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, "license": "MIT", "dependencies": { "p-locate": "^4.1.0" @@ -13722,9 +13772,9 @@ "license": "MIT" }, "node_modules/lodash-es": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz", - "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.18.1.tgz", + "integrity": "sha512-J8xewKD/Gk22OZbhpOVSwcs60zhd95ESDwezOFuA3/099925PdHJ7OFHNTGtajL3AlZkykD32HykiMo+BIBI8A==", "license": "MIT" }, "node_modules/lodash.camelcase": { @@ -14285,9 +14335,9 @@ } }, "node_modules/make-fetch-happen/node_modules/@tootallnate/once": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", - "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.1.tgz", + "integrity": "sha512-HqmEUIGRJ5fSXchkVgR5F7qn48bDBzv0kWj/Kfu5e6uci4UlEeng4331LnBkWffb++Ei3FOVLxo8JJWMFBDMeQ==", "dev": true, "license": "MIT", "engines": { @@ -14295,9 +14345,9 @@ } }, "node_modules/make-fetch-happen/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.0.tgz", + "integrity": "sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w==", "dev": true, "license": "MIT", "dependencies": { @@ -14394,9 +14444,9 @@ } }, "node_modules/make-fetch-happen/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "version": "5.1.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.9.tgz", + "integrity": "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==", "dev": true, "license": "ISC", "dependencies": { @@ -14670,9 +14720,9 @@ "license": "ISC" }, "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" @@ -15183,9 +15233,9 @@ "license": "MIT" }, "node_modules/node-forge": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", - "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.4.0.tgz", + "integrity": "sha512-LarFH0+6VfriEhqMMcLX2F7SwSXeWwnEAJEsYm5QKWchiVYVvJyV9v7UDvUv+w5HO23ZpQTXDv/GxdDdMyOuoQ==", "dev": true, "license": "(BSD-3-Clause OR GPL-2.0)", "engines": { @@ -15389,9 +15439,9 @@ } }, "node_modules/npm-registry-fetch/node_modules/@tootallnate/once": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", - "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.1.tgz", + "integrity": "sha512-HqmEUIGRJ5fSXchkVgR5F7qn48bDBzv0kWj/Kfu5e6uci4UlEeng4331LnBkWffb++Ei3FOVLxo8JJWMFBDMeQ==", "dev": true, "license": "MIT", "engines": { @@ -15787,9 +15837,9 @@ } }, "node_modules/on-headers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.1.0.tgz", + "integrity": "sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A==", "dev": true, "license": "MIT", "engines": { @@ -15895,7 +15945,6 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, "license": "MIT", "dependencies": { "p-try": "^2.0.0" @@ -15911,7 +15960,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, "license": "MIT", "dependencies": { "p-limit": "^2.2.0" @@ -15964,7 +16012,6 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -16129,7 +16176,6 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -16186,9 +16232,9 @@ "license": "ISC" }, "node_modules/path-to-regexp": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", - "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.13.tgz", + "integrity": "sha512-A/AGNMFN3c8bOlvV9RreMdrv7jsmF9XIfDeCd87+I8RNg6s78BhJxMu69NEMHBSJFxKidViTEdruRwEk/WIKqA==", "dev": true, "license": "MIT" }, @@ -16365,6 +16411,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/pngjs": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-5.0.0.tgz", + "integrity": "sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==", + "license": "MIT", + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/postcss": { "version": "8.4.31", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", @@ -16672,9 +16727,9 @@ } }, "node_modules/prettier-eslint/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.0.tgz", + "integrity": "sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w==", "dev": true, "license": "MIT", "dependencies": { @@ -16827,11 +16882,14 @@ } }, "node_modules/proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-2.1.0.tgz", + "integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==", "dev": true, - "license": "MIT" + "license": "MIT", + "engines": { + "node": ">=10" + } }, "node_modules/prr": { "version": "1.0.1", @@ -16881,14 +16939,97 @@ "node": ">=0.9" } }, + "node_modules/qrcode": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/qrcode/-/qrcode-1.5.4.tgz", + "integrity": "sha512-1ca71Zgiu6ORjHqFBDpnSMTR2ReToX4l1Au1VFLyVeBTFavzQnv5JxMFr3ukHVKpSrSA2MCk0lNJSykjUfz7Zg==", + "license": "MIT", + "dependencies": { + "dijkstrajs": "^1.0.1", + "pngjs": "^5.0.0", + "yargs": "^15.3.1" + }, + "bin": { + "qrcode": "bin/qrcode" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/qrcode/node_modules/cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "node_modules/qrcode/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/qrcode/node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "license": "ISC" + }, + "node_modules/qrcode/node_modules/yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "license": "MIT", + "dependencies": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/qrcode/node_modules/yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "license": "ISC", + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/qs": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", - "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", + "version": "6.14.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.2.tgz", + "integrity": "sha512-V/yCWTTF7VJ9hIh18Ugr2zhJMP01MY7c5kh4J870L7imm6/DIzBsNLTXzMwUA3yZ5b/KBqLx8Kp3uRvd7xSe3Q==", "dev": true, "license": "BSD-3-Clause", "dependencies": { - "side-channel": "^1.0.6" + "side-channel": "^1.1.0" }, "engines": { "node": ">=0.6" @@ -16946,17 +17087,48 @@ } }, "node_modules/raw-body": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", - "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.3.tgz", + "integrity": "sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA==", "dev": true, "license": "MIT", "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" + "bytes": "~3.1.2", + "http-errors": "~2.0.1", + "iconv-lite": "~0.4.24", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/raw-body/node_modules/http-errors": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "depd": "~2.0.0", + "inherits": "~2.0.4", + "setprototypeof": "~1.2.0", + "statuses": "~2.0.2", + "toidentifier": "~1.0.1" + }, + "engines": { + "node": ">= 0.8" }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/raw-body/node_modules/statuses": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", + "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", + "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8" } @@ -17010,9 +17182,9 @@ } }, "node_modules/read-package-json/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.0.tgz", + "integrity": "sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w==", "dev": true, "license": "MIT", "dependencies": { @@ -17020,9 +17192,10 @@ } }, "node_modules/read-package-json/node_modules/glob": { - "version": "10.4.5", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", - "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", + "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", "dev": true, "license": "ISC", "dependencies": { @@ -17051,13 +17224,13 @@ } }, "node_modules/read-package-json/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz", + "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", "dev": true, "license": "ISC", "dependencies": { - "brace-expansion": "^2.0.1" + "brace-expansion": "^2.0.2" }, "engines": { "node": ">=16 || 14 >=14.17" @@ -17100,18 +17273,18 @@ } }, "node_modules/readdir-glob/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.0.tgz", + "integrity": "sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w==", "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } }, "node_modules/readdir-glob/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "version": "5.1.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.9.tgz", + "integrity": "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==", "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" @@ -17245,7 +17418,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", - "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -17261,6 +17433,12 @@ "node": ">=0.10.0" } }, + "node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "license": "ISC" + }, "node_modules/require-relative": { "version": "0.8.7", "resolved": "https://registry.npmjs.org/require-relative/-/require-relative-0.8.7.tgz", @@ -17450,9 +17628,9 @@ } }, "node_modules/rollup": { - "version": "3.29.5", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.5.tgz", - "integrity": "sha512-GVsDdsbJzzy4S/v3dqWPJ7EfvZJfCHiDqe80IyrF59LYuP+e6U1LJoUqeuqRbwAWoMNoXivMNeNAOf5E22VA1w==", + "version": "3.30.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.30.0.tgz", + "integrity": "sha512-kQvGasUgN+AlWGliFn2POSajRQEsULVYFGTvOZmK06d7vCD+YhZztt70kGk3qaeAXeWYL5eO7zx+rAubBc55eA==", "dev": true, "license": "MIT", "bin": { @@ -17894,7 +18072,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", - "dev": true, "license": "ISC" }, "node_modules/setimmediate": { @@ -17980,14 +18157,14 @@ } }, "node_modules/side-channel-list": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", - "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.1.tgz", + "integrity": "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==", "dev": true, "license": "MIT", "dependencies": { "es-errors": "^1.3.0", - "object-inspect": "^1.13.3" + "object-inspect": "^1.13.4" }, "engines": { "node": ">= 0.4" @@ -18069,9 +18246,9 @@ } }, "node_modules/sigstore/node_modules/@tootallnate/once": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", - "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.1.tgz", + "integrity": "sha512-HqmEUIGRJ5fSXchkVgR5F7qn48bDBzv0kWj/Kfu5e6uci4UlEeng4331LnBkWffb++Ei3FOVLxo8JJWMFBDMeQ==", "dev": true, "license": "MIT", "engines": { @@ -18280,37 +18457,19 @@ } }, "node_modules/socket.io-parser": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz", - "integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==", + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.6.tgz", + "integrity": "sha512-asJqbVBDsBCJx0pTqw3WfesSY0iRX+2xzWEWzrpcH7L6fLzrhyF8WPI8UaeM4YCuDfpwA/cgsdugMsmtz8EJeg==", "dev": true, "license": "MIT", "dependencies": { "@socket.io/component-emitter": "~3.1.0", - "debug": "~4.3.1" + "debug": "~4.4.1" }, "engines": { "node": ">=10.0.0" } }, - "node_modules/socket.io-parser/node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/socket.io/node_modules/debug": { "version": "4.3.7", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", @@ -18637,7 +18796,6 @@ "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", @@ -18678,7 +18836,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -18688,7 +18845,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" @@ -18935,16 +19091,15 @@ } }, "node_modules/terser-webpack-plugin": { - "version": "5.3.14", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.14.tgz", - "integrity": "sha512-vkZjpUjb6OMS7dhV+tILUW6BhpDR7P2L/aQSAv+Uwk+m8KATX9EccViHTJR2qDtACKPIYndLGCyl3FMo+r2LMw==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.5.0.tgz", + "integrity": "sha512-UYhptBwhWvfIjKd/UuFo6D8uq9xpGLDK+z8EDsj/zWhrTaH34cKEbrkMKfV5YWqGBvAYA3tlzZbs2R+qYrbQJA==", "dev": true, "license": "MIT", "dependencies": { "@jridgewell/trace-mapping": "^0.3.25", "jest-worker": "^27.4.5", "schema-utils": "^4.3.0", - "serialize-javascript": "^6.0.2", "terser": "^5.31.1" }, "engines": { @@ -19251,9 +19406,9 @@ } }, "node_modules/tuf-js/node_modules/@tootallnate/once": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", - "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.1.tgz", + "integrity": "sha512-HqmEUIGRJ5fSXchkVgR5F7qn48bDBzv0kWj/Kfu5e6uci4UlEeng4331LnBkWffb++Ei3FOVLxo8JJWMFBDMeQ==", "dev": true, "license": "MIT", "engines": { @@ -20117,9 +20272,9 @@ } }, "node_modules/webpack/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz", + "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", "dev": true, "license": "MIT", "dependencies": { @@ -20194,9 +20349,9 @@ } }, "node_modules/websocket-driver": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz", - "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==", + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.5.tgz", + "integrity": "sha512-ZL2+3c7kMBdIRCMz6l8jQMHyGVxj+UL+xVk74Ombiciboca8rHa15L86B19E5oh1pL9Ii/uj54gtsIrZGMo6zA==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -20266,6 +20421,12 @@ "node": ">= 8" } }, + "node_modules/which-module": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", + "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", + "license": "ISC" + }, "node_modules/wide-align": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", @@ -20389,16 +20550,19 @@ "license": "ISC" }, "node_modules/yaml": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.1.tgz", - "integrity": "sha512-10ULxpnOCQXxJvBgxsn9ptjq6uviG/htZKk9veJGhlqn3w/DxQ631zFF+nlQXLwmImeS5amR2dl2U8sg6U9jsQ==", + "version": "2.8.4", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.4.tgz", + "integrity": "sha512-ml/JPOj9fOQK8RNnWojA67GbZ0ApXAUlN2UQclwv2eVgTgn7O9gg9o7paZWKMp4g0H3nTLtS9LVzhkpOFIKzog==", "dev": true, "license": "ISC", "bin": { "yaml": "bin.mjs" }, "engines": { - "node": ">= 14" + "node": ">= 14.6" + }, + "funding": { + "url": "https://github.com/sponsors/eemeli" } }, "node_modules/yargs": { diff --git a/package.json b/package.json index 21ef2245..1bf0e732 100644 --- a/package.json +++ b/package.json @@ -57,6 +57,7 @@ "ngx-cookie-service": "^16.1.0", "ngx-pagination": "^6.0.3", "ngx-webcam": "^0.4.1", + "qrcode": "^1.5.4", "recordrtc": "^5.6.2", "rxjs": "^7.8.1", "tslib": "^2.3.0", @@ -75,6 +76,7 @@ "@commitlint/config-conventional": "^19.8.0", "@types/crypto-js": "^4.2.1", "@types/jasmine": "~5.1.4", + "@types/qrcode": "^1.5.6", "@types/recordrtc": "^5.6.14", "@typescript-eslint/eslint-plugin": "~5.59.11", "@typescript-eslint/parser": "~5.59.11", @@ -89,7 +91,7 @@ "karma-chrome-launcher": "~3.2.0", "karma-coverage": "~2.2.0", "karma-jasmine": "~5.1.0", - "karma-jasmine-html-reporter": "~2.1.0", + "karma-jasmine-html-reporter": "~2.2.0", "lint-staged": "^15.2.0", "prettier": "^3.5.3", "prettier-eslint": "^16.2.0", diff --git a/pom.xml b/pom.xml index 77a6c790..88912600 100644 --- a/pom.xml +++ b/pom.xml @@ -4,8 +4,8 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 com.iemr.mmu-ui - mmu-ui - 3.8.0 + mmu-ui + 3.6.1 MMU-UI Piramal - mmu Module ui war diff --git a/scripts/ci-prebuild.js b/scripts/ci-prebuild.js index 2c2043b6..fb36aefa 100755 --- a/scripts/ci-prebuild.js +++ b/scripts/ci-prebuild.js @@ -41,7 +41,7 @@ const defaultEnvValues = { COMMON_API_BASE: '', COMMON_API_OPEN_SYNC: '', IDENTITY_API_BASE: '', - INVENTORY_UI_BASE: '', + INVENTORY_UI: '', TM_API_BASE: '', MMU_API_BASE: '', MMU_UI_BASE: '', diff --git a/src/app/app-modules/captcha/captcha.component.ts b/src/app/app-modules/captcha/captcha.component.ts index f0992877..10b83d03 100644 --- a/src/app/app-modules/captcha/captcha.component.ts +++ b/src/app/app-modules/captcha/captcha.component.ts @@ -33,7 +33,6 @@ export class CaptchaComponent implements AfterViewInit, OnDestroy { const captchaElement = this.captchaRef?.nativeElement; if (!captchaElement) { - console.error('CAPTCHA container element not found'); return; } @@ -45,7 +44,6 @@ export class CaptchaComponent implements AfterViewInit, OnDestroy { }); } } catch (error) { - console.error('Failed to initialize CAPTCHA:', error); } } diff --git a/src/app/app-modules/core/components/allergen-search/allergen-search.component.ts b/src/app/app-modules/core/components/allergen-search/allergen-search.component.ts index 2ebbe95a..e1234e42 100644 --- a/src/app/app-modules/core/components/allergen-search/allergen-search.component.ts +++ b/src/app/app-modules/core/components/allergen-search/allergen-search.component.ts @@ -42,7 +42,7 @@ export class AllergenSearchComponent implements OnInit, DoCheck { selectedComponent: any = null; selectedComponentNo: any; - message: string = ''; + message = ''; selectedItem: any; displayedColumns: any = ['ConceptID', 'term', 'empty']; @@ -74,7 +74,6 @@ export class AllergenSearchComponent implements OnInit, DoCheck { this.selectedComponent = null; this.selectedComponentNo = item; this.selectedComponent = component; - console.log('selectedComponent', this.selectedComponent); this.selectedItem = component; } submitComponentList() { @@ -84,7 +83,7 @@ export class AllergenSearchComponent implements OnInit, DoCheck { }; this.dialogRef.close(reqObj); } - showProgressBar: boolean = false; + showProgressBar = false; search(term: string, pageNo: any): void { if (term.length > 2) { this.showProgressBar = true; diff --git a/src/app/app-modules/core/components/app-footer/app-footer.component.ts b/src/app/app-modules/core/components/app-footer/app-footer.component.ts index 9788e702..1ee0e411 100644 --- a/src/app/app-modules/core/components/app-footer/app-footer.component.ts +++ b/src/app/app-modules/core/components/app-footer/app-footer.component.ts @@ -40,7 +40,6 @@ export class AppFooterComponent implements OnInit, DoCheck { this.assignSelectedLanguage(); this.today = new Date(); this.year = this.today.getFullYear(); - console.log('inside footer', this.year); setInterval(() => { this.status = navigator.onLine; }, 1000); diff --git a/src/app/app-modules/core/components/app-header/app-header.component.html b/src/app/app-modules/core/components/app-header/app-header.component.html index 0104645f..5fbe49f7 100644 --- a/src/app/app-modules/core/components/app-header/app-header.component.html +++ b/src/app/app-modules/core/components/app-header/app-header.component.html @@ -11,7 +11,10 @@ class="navbar-toggler ms-auto" type="button" data-bs-toggle="collapse" - data-bs-target="#top-navbar,#main-navbar"> + data-bs-target="#top-navbar,#main-navbar" + aria-controls="top-navbar main-navbar" + aria-expanded="false" + aria-label="Toggle navigation"> menu diff --git a/src/app/app-modules/core/components/app-header/app-header.component.ts b/src/app/app-modules/core/components/app-header/app-header.component.ts index a9c6a0a4..ce6bd6ac 100644 --- a/src/app/app-modules/core/components/app-header/app-header.component.ts +++ b/src/app/app-modules/core/components/app-header/app-header.component.ts @@ -113,7 +113,6 @@ export class AppHeaderComponent implements OnInit { if (this.isAuthenticated) { this.fetchLanguageSet(); } - console.log(this.filteredNavigation, 'filter'); this.status = this.sessionstorage.getItem('providerServiceID'); } @@ -131,7 +130,6 @@ export class AppHeaderComponent implements OnInit { this.getLanguage(); } }); - console.log('language array' + this.languageArray); } changeLanguage(language: any) { this.http_service @@ -141,14 +139,20 @@ export class AppHeaderComponent implements OnInit { if (response !== undefined && response !== null) { this.languageSuccessHandler(response, language); } else { - alert(this.currentLanguageSet.alerts.info.langNotDefinesd); + this.confirmationService.alert( + this.currentLanguageSet?.alerts?.info?.langNotDefinesd ?? + 'Selected language is not defined', + 'error' + ); } }, error => { - alert( - this.currentLanguageSet.alerts.info.comingUpWithThisLang + + this.confirmationService.alert( + (this.currentLanguageSet?.alerts?.info?.comingUpWithThisLang ?? + 'Selected language is coming up with') + ' ' + - language + language, + 'error' ); } ); @@ -162,9 +166,13 @@ export class AppHeaderComponent implements OnInit { } languageSuccessHandler(response: any, language: any) { - console.log('language is ', response); if (response === undefined) { - alert(this.currentLanguageSet.alerts.info.langNotDefinesd); + this.confirmationService.alert( + this.currentLanguageSet?.alerts?.info?.langNotDefinesd ?? + 'Selected language is not defined', + 'error' + ); + return; } if (response[language] !== undefined) { @@ -183,24 +191,24 @@ export class AppHeaderComponent implements OnInit { this.http_service.getCurrentLanguage(response[language]); this.rolenavigation(); } else { - alert( - this.currentLanguageSet.alerts.info.comingUpWithThisLang + + this.confirmationService.alert( + (this.currentLanguageSet?.alerts?.info?.comingUpWithThisLang ?? + 'Selected language is coming up with') + ' ' + - language + language, + 'error' ); } } logout() { this.auth.logout().subscribe(res => { - this.router - .navigate(['/feedback'], { queryParams: { sl: 'MMU' } }) - .then(result => { - if (result) { - this.changeLanguage('English'); - // this.sessionstorage.clear(); - sessionStorage.clear(); - } - }); + this.router.navigate(['/login']).then(result => { + if (result) { + this.changeLanguage('English'); + // this.sessionstorage.clear(); + sessionStorage.clear(); + } + }); }); } rolenavigation() { @@ -273,13 +281,10 @@ export class AppHeaderComponent implements OnInit { const commitDetailsPath: any = 'assets/git-version.json'; this.auth.getUIVersionAndCommitDetails(commitDetailsPath).subscribe( res => { - console.log('res', res); this.commitDetailsUI = res; this.versionUI = this.commitDetailsUI['version']; }, - err => { - console.log('err', err); - } + err => {} ); } showVersionAndCommitDetails() { diff --git a/src/app/app-modules/core/components/beneficiary-details/beneficiary-details.component.html b/src/app/app-modules/core/components/beneficiary-details/beneficiary-details.component.html index 35b5a17d..51199770 100644 --- a/src/app/app-modules/core/components/beneficiary-details/beneficiary-details.component.html +++ b/src/app/app-modules/core/components/beneficiary-details/beneficiary-details.component.html @@ -17,6 +17,34 @@ {{ beneficiary?.beneficiaryName }} + + + + {{ current_language_set?.bendetails?.fatherName }}: + + + + {{ beneficiary?.fatherName }} + + + + + + {{ current_language_set?.bendetails?.lastName }}: + + + + {{ beneficiary?.lastName }} + + + + + {{ current_language_set?.bendetails?.phoneNo }}: + + + {{ beneficiary?.preferredPhoneNum }} + + {{ current_language_set?.bendetails?.gender }} / diff --git a/src/app/app-modules/core/components/calibration/calibration.component.ts b/src/app/app-modules/core/components/calibration/calibration.component.ts index 19517ce7..2348202b 100644 --- a/src/app/app-modules/core/components/calibration/calibration.component.ts +++ b/src/app/app-modules/core/components/calibration/calibration.component.ts @@ -38,11 +38,11 @@ import { MatTableDataSource } from '@angular/material/table'; }) export class CalibrationComponent implements OnInit, DoCheck { searchTerm: any; - pageNo: number = 0; - message: string = ''; + pageNo = 0; + message = ''; pageCount: any; selectedComponentsList = []; - currentPage: number = 1; + currentPage = 1; pager: any = { totalItems: 0, currentPage: 0, @@ -96,7 +96,6 @@ export class CalibrationComponent implements OnInit, DoCheck { this.components.data = res.data.calibrationData; this.dataList = res.data.calibrationData; this.components.paginator = this.paginator; - console.log('component', this.components.data); } else { this.message = this.current_language_set.common.noRecordFound; this.components.data = []; @@ -149,7 +148,6 @@ export class CalibrationComponent implements OnInit, DoCheck { } filterPreviousData(searchTerm: any) { - console.log('searchTerm', searchTerm); if (!searchTerm) { this.components.data = this.dataList; this.components.paginator = this.paginator; diff --git a/src/app/app-modules/core/components/camera-dialog/camera-dialog.component.ts b/src/app/app-modules/core/components/camera-dialog/camera-dialog.component.ts index 6b9142fe..8c1e940b 100644 --- a/src/app/app-modules/core/components/camera-dialog/camera-dialog.component.ts +++ b/src/app/app-modules/core/components/camera-dialog/camera-dialog.component.ts @@ -34,11 +34,10 @@ import { MatDialogRef } from '@angular/material/dialog'; import { HttpServiceService } from '../../services/http-service.service'; import { ConfirmationService } from '../../services'; import { SetLanguageComponent } from '../set-language.component'; -import { Subject } from 'rxjs/internal/Subject'; import { ChartData, ChartType } from 'chart.js'; import html2canvas from 'html2canvas'; import { WebcamImage, WebcamInitError } from 'ngx-webcam'; -import { Observable } from 'rxjs'; +import { Observable, Subject } from 'rxjs'; import { saveAs } from 'file-saver'; import { SessionStorageService } from 'Common-UI/src/registrar/services/session-storage.service'; @@ -111,20 +110,14 @@ export class CameraDialogComponent implements OnInit, DoCheck, AfterViewInit { }; } - onSuccess(stream: any) { - console.log('capturing video stream'); - } + onSuccess(stream: any) {} - onError(err: any) { - console.log(err); - } + onError(err: any) {} ngOnInit() { this.assignSelectedLanguage(); this.loaded = false; this.status = this.current_language_set.capture; - console.log('annoate', this.annotate); - console.log('availablePoints', this.availablePoints); if (this.availablePoints?.markers) this.pointsToWrite = this.availablePoints.markers; } @@ -135,7 +128,6 @@ export class CameraDialogComponent implements OnInit, DoCheck, AfterViewInit { this.sysImage = webcamImage?.imageAsDataUrl; this.captured = true; this.status = this.current_language_set.capture; - console.info('got webcam image', this.sysImage); } else { this.captured = false; this.status = this.current_language_set.capture; @@ -176,7 +168,6 @@ export class CameraDialogComponent implements OnInit, DoCheck, AfterViewInit { public getSnapshot(): void { this.trigger.next(); - console.info('image type with base64 ', this.webcamImage); } public get triggerObservable(): Observable { diff --git a/src/app/app-modules/core/components/data-sync-login/data-sync-login.component.css b/src/app/app-modules/core/components/data-sync-login/data-sync-login.component.css index f9a74dc0..2e564a85 100644 --- a/src/app/app-modules/core/components/data-sync-login/data-sync-login.component.css +++ b/src/app/app-modules/core/components/data-sync-login/data-sync-login.component.css @@ -53,23 +53,6 @@ mat-card { padding: unset; } -.prefix-icon { - padding-top: 16px; - color: gray; -} - -.input-full-width { - width: 100%; -} - - -.m-t-20 { - margin-top: 20px; -} - -.m-b-20 { - margin-bottom: 20px; -} .overlay { height: 100%; width: 100%; @@ -99,4 +82,5 @@ mat-card { button.submit { background: #0277bd; -} \ No newline at end of file +} + diff --git a/src/app/app-modules/core/components/data-sync-login/data-sync-login.component.ts b/src/app/app-modules/core/components/data-sync-login/data-sync-login.component.ts index c38fc75c..b68c1ff9 100644 --- a/src/app/app-modules/core/components/data-sync-login/data-sync-login.component.ts +++ b/src/app/app-modules/core/components/data-sync-login/data-sync-login.component.ts @@ -24,7 +24,7 @@ import { Component, OnInit, Injector, DoCheck } from '@angular/core'; import { Router } from '@angular/router'; import * as CryptoJS from 'crypto-js'; -import { FormBuilder } from '@angular/forms'; +import { FormBuilder, Validators } from '@angular/forms'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { SetLanguageComponent } from '../set-language.component'; import { ConfirmationService } from '../../services'; @@ -69,8 +69,8 @@ export class DataSyncLoginComponent implements OnInit, DoCheck { } loginForm = this.fb.group({ - userName: [''], - password: [''], + userName: ['', Validators.required], + password: ['', Validators.required], }); ngOnInit() { @@ -143,17 +143,13 @@ export class DataSyncLoginComponent implements OnInit, DoCheck { added a concurrent login changes */ dataSyncLogin() { - this.showProgressBar = true; - const userName: any = this.loginForm.controls['userName'].value; - const encriptPassword = this.encrypt( - this.Key_IV, - this.loginForm.controls['password'].value - ); - - if ( - this.loginForm.controls['userName'].value && - this.loginForm.controls['password'].value - ) { + if (this.loginForm.valid) { + this.showProgressBar = true; + const userName: any = this.loginForm.controls['userName'].value; + const encriptPassword = this.encrypt( + this.Key_IV, + this.loginForm.controls['password'].value + ); this.dataSyncService .dataSyncLogin( this.loginForm.controls['userName'].value, @@ -292,6 +288,23 @@ export class DataSyncLoginComponent implements OnInit, DoCheck { //added get datasync data on login to a new method getDataSyncMMU(res: any) { + const sessionUserID = this.sessionstorage.getItem('userID'); + const dataSyncUserID = res.data.userID; + + if ( + sessionUserID && + dataSyncUserID && + String(dataSyncUserID) !== String(sessionUserID) + ) { + this.showProgressBar = false; + sessionStorage.removeItem('serverKey'); + this.confirmationService.alert( + 'Sync user is not valid. Please login with the correct credentials.', + 'error' + ); + return; + } + const mmuService = res.data.previlegeObj.filter((item: any) => { return item.serviceName === 'MMU'; }); @@ -309,8 +322,6 @@ export class DataSyncLoginComponent implements OnInit, DoCheck { ) { if (this.data.provideAuthorizationToViewTmCS) { sessionStorage.setItem('authorizeToViewTMcasesheet', 'Authorized'); - } else { - console.log('normal flow'); } this.dialogRef.close(true); } else { diff --git a/src/app/app-modules/core/components/iot-bluetooth/iot-bluetooth.component.ts b/src/app/app-modules/core/components/iot-bluetooth/iot-bluetooth.component.ts index 00dbc6fa..e1da50f5 100644 --- a/src/app/app-modules/core/components/iot-bluetooth/iot-bluetooth.component.ts +++ b/src/app/app-modules/core/components/iot-bluetooth/iot-bluetooth.component.ts @@ -40,9 +40,9 @@ export class IotBluetoothComponent implements OnInit, DoCheck { private confirmationService: ConfirmationService ) {} - apiAvailable: boolean = false; - deviceConnected: boolean = false; - deviceSearching: boolean = false; + apiAvailable = false; + deviceConnected = false; + deviceSearching = false; infoDetails!: any[]; errMsg: any; bluetoothDevices!: string[]; @@ -152,12 +152,6 @@ export class IotBluetoothComponent implements OnInit, DoCheck { this.deviceConnected = false; this.spinner = false; this.errMsg = undefined; - console.log('disconnect log', JSON.parse(res['_body'])); - const body = JSON.parse(res['_body']); - console.log( - 'disconnect log device connected', - body['deviceConnected'] - ); } else { this.errMsg = res['message']; } diff --git a/src/app/app-modules/core/components/iotcomponent/iotcomponent.component.ts b/src/app/app-modules/core/components/iotcomponent/iotcomponent.component.ts index 73a251bc..fe99cc43 100644 --- a/src/app/app-modules/core/components/iotcomponent/iotcomponent.component.ts +++ b/src/app/app-modules/core/components/iotcomponent/iotcomponent.component.ts @@ -47,11 +47,11 @@ export class IotcomponentComponent implements OnInit, DoCheck { current_language_set: any; procedure: any; stripCode: any; - msgCalibration: boolean = false; - startedCalibration: boolean = false; - stoppedCalibration: boolean = false; - statusCalibration: boolean = false; - stripShowMsg: boolean = false; + msgCalibration = false; + startedCalibration = false; + stoppedCalibration = false; + statusCalibration = false; + stripShowMsg = false; constructor( @Inject(MAT_DIALOG_DATA) public input: any, @@ -71,7 +71,6 @@ export class IotcomponentComponent implements OnInit, DoCheck { this.statusCalibration = false; this.stoppedCalibration = false; this.errorMsg = undefined; - console.log('input', this.input); this.startAPI = this.input['startAPI']; this.output = this.input['output']; this.procedure = this.input['procedure']; @@ -91,7 +90,6 @@ export class IotcomponentComponent implements OnInit, DoCheck { }); dialogRef.afterClosed().subscribe(result => { - console.log('calibration', result); if (result !== null) { this.stripCode = result; this.msgCalibration = true; @@ -115,7 +113,6 @@ export class IotcomponentComponent implements OnInit, DoCheck { try { this.service.startAPI(this.procedure.value.calibrationStartAPI).subscribe( (res: any) => { - console.log('dfasdas', res); if (res.status === 202) { this.progressMsg = res['_body']['message']; this.startedCalibration = true; @@ -144,7 +141,6 @@ export class IotcomponentComponent implements OnInit, DoCheck { ); this.service.statusAPI(statusAPI).subscribe( (res: any) => { - console.log('dfasdas', res); if (res.status === 202 || res.status === 200) { this.stripShowMsg = false; this.statusCalibration = true; @@ -195,7 +191,6 @@ export class IotcomponentComponent implements OnInit, DoCheck { try { this.service.startAPI(this.startAPI).subscribe( (res: any) => { - console.log('dfasdas', res); if (res.status === 202) { this.progressMsg = res['_body']['message']; this.getstatus(); @@ -222,7 +217,6 @@ export class IotcomponentComponent implements OnInit, DoCheck { getstatus() { this.service.statusAPI(this.startAPI + '/status').subscribe( (res: any) => { - console.log('dfasdas', res); if (res.status === 200) { clearTimeout(this.statuscall); @@ -257,7 +251,6 @@ export class IotcomponentComponent implements OnInit, DoCheck { if (this.statuscall !== undefined) { clearTimeout(this.statuscall); this.service.endAPI(this.startAPI).subscribe((res: any) => { - console.log('dfasdas', res); if (res.status === 202) { //do something } else { @@ -276,7 +269,6 @@ export class IotcomponentComponent implements OnInit, DoCheck { .endCalibrationAPI(this.procedure.value.calibrationEndAPI) .subscribe( (res: any) => { - console.log('dfasdas', res); if (res.status === 202 || res.status === 200) { //do something this.stoppedCalibration = true; @@ -299,7 +291,6 @@ export class IotcomponentComponent implements OnInit, DoCheck { .endCalibrationAPI(this.procedure.value.calibrationEndAPI) .subscribe( (res: any) => { - console.log('dfasdas', res); if (res.status === 202 || res.status === 200) { //do something this.stoppedCalibration = true; diff --git a/src/app/app-modules/core/components/open-previous-visit-details/open-previous-visit-details.component.ts b/src/app/app-modules/core/components/open-previous-visit-details/open-previous-visit-details.component.ts index 81c95a06..4a6c339f 100644 --- a/src/app/app-modules/core/components/open-previous-visit-details/open-previous-visit-details.component.ts +++ b/src/app/app-modules/core/components/open-previous-visit-details/open-previous-visit-details.component.ts @@ -57,7 +57,6 @@ export class OpenPreviousVisitDetailsComponent implements OnInit { loadPreviousVisitDetails() { this.doctorService.getMMUHistory().subscribe( (data: any) => { - console.log('data', data); if (data.statusCode === 200) { this.previousVisitData = data.data; this.getEachVisitData(); @@ -98,16 +97,13 @@ export class OpenPreviousVisitDetailsComponent implements OnInit { page: this.previousHistoryActivePage, itemsPerPage: this.previousHistoryRowsPerPage, }); - console.log('previous data', this.previousVisitData); } previousHistoryPagedList: any = []; previousHistoryPageChanged(event: any): void { - console.log('called', event); for (let i = 0; i < 5 && i < this.previousVisitData.length; i++) { this.previousHistoryPagedList.push(this.previousVisitData[i]); } - console.log('list', this.previousHistoryPagedList); } filterHistory(searchTerm?: string) { diff --git a/src/app/app-modules/core/components/previous-details/previous-details.component.ts b/src/app/app-modules/core/components/previous-details/previous-details.component.ts index 656f240f..818bd62a 100644 --- a/src/app/app-modules/core/components/previous-details/previous-details.component.ts +++ b/src/app/app-modules/core/components/previous-details/previous-details.component.ts @@ -79,7 +79,6 @@ export class PreviousDetailsComponent implements OnInit, DoCheck { } filterPreviousData(searchTerm: any) { - console.log('searchTerm', searchTerm); if (!searchTerm) { this.filteredDataList.data = this.dataList; this.filteredDataList.paginator = this.paginator; diff --git a/src/app/app-modules/core/components/provisional-search/provisional-search.component.ts b/src/app/app-modules/core/components/provisional-search/provisional-search.component.ts index 00a7275e..686c3459 100644 --- a/src/app/app-modules/core/components/provisional-search/provisional-search.component.ts +++ b/src/app/app-modules/core/components/provisional-search/provisional-search.component.ts @@ -125,9 +125,8 @@ export class ProvisionalSearchComponent implements OnInit, DoCheck { submitDiagnosisList() { this.dialogRef.close(this.selectedDiagnosisList); } - showProgressBar: boolean = false; + showProgressBar = false; search(term: string, pageNo: any): void { - console.log(term); if (term.length > 2) { this.showProgressBar = true; this.masterdataService diff --git a/src/app/app-modules/core/components/set-language.component.ts b/src/app/app-modules/core/components/set-language.component.ts index 0b7bfb17..e7b46050 100644 --- a/src/app/app-modules/core/components/set-language.component.ts +++ b/src/app/app-modules/core/components/set-language.component.ts @@ -39,11 +39,9 @@ export class SetLanguageComponent { this.currentLanguageObject = languageResponse; }, (err: any) => { - console.log(err); + console.error(err); }, - () => { - console.log('completed'); - } + () => {} ); languageSubscription.unsubscribe(); } diff --git a/src/app/app-modules/core/directives/password/myPassword.directive.ts b/src/app/app-modules/core/directives/password/myPassword.directive.ts index fbf6f0e3..9007cbf0 100644 --- a/src/app/app-modules/core/directives/password/myPassword.directive.ts +++ b/src/app/app-modules/core/directives/password/myPassword.directive.ts @@ -43,16 +43,16 @@ export class MyPasswordDirective { @HostListener('keyup', ['$event']) onKeyUp(ev: any) { const result = this.passwordValidator(ev.target.value); if (result === 1) { - ev.target.nextSibling.nextElementSibling.innerHTML = 'Strong Password'; + ev.target.nextSibling.nextElementSibling.textContent = 'Strong Password'; ev.target.style.border = '2px solid green'; } if (result === 0) { - ev.target.nextSibling.nextElementSibling.innerHTML = 'Weak Password'; + ev.target.nextSibling.nextElementSibling.textContent = 'Weak Password'; ev.target.style.border = '2px solid yellow'; } if (result === -1) { - ev.target.nextSibling.nextElementSibling.innerHTML = + ev.target.nextSibling.nextElementSibling.textContent = 'password should be 8-12 characters long and must start with an alphabet and can have numbers alphabets and $%#@!&^*()-+{}[]'; ev.target.style.border = '2px solid red'; } diff --git a/src/app/app-modules/core/services/auth-guard.service.ts b/src/app/app-modules/core/services/auth-guard.service.ts index 4b446809..4719d6e0 100644 --- a/src/app/app-modules/core/services/auth-guard.service.ts +++ b/src/app/app-modules/core/services/auth-guard.service.ts @@ -1,28 +1,43 @@ +/* + * AMRIT – Accessible Medical Records via Integrated Technology + * Integrated EHR (Electronic Health Records) Solution + * + * Copyright (C) "Piramal Swasthya Management and Research Institute" + * + * This file is part of AMRIT. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + import { Injectable } from '@angular/core'; -import { CanActivate, Router, ActivatedRoute } from '@angular/router'; -import { tap } from 'rxjs'; -import { HttpServiceService } from '../../core/services/http-service.service'; +import { CanActivate, Router } from '@angular/router'; +import { map } from 'rxjs/operators'; import { AuthService } from './auth.service'; @Injectable() export class AuthGuard implements CanActivate { - current_language_set: any; constructor( private auth: AuthService, - private router: Router, - private route: ActivatedRoute, - private http_service: HttpServiceService + private router: Router ) {} canActivate(route: any, state: any) { - this.http_service.currentLangugae$.subscribe( - response => (this.current_language_set = response) - ); return this.auth.validateSessionKey().pipe( - tap((res: any) => { - if (!(res && res.statusCode === 200 && res.data)) { - this.router.navigate(['/login']); - } - }) + map((res: any) => + res && res.statusCode === 200 && res.data + ? true + : this.router.createUrlTree(['/login']) + ) ); } } diff --git a/src/app/app-modules/core/services/confirmation.service.ts b/src/app/app-modules/core/services/confirmation.service.ts index 9b4b9838..a4ce24f3 100644 --- a/src/app/app-modules/core/services/confirmation.service.ts +++ b/src/app/app-modules/core/services/confirmation.service.ts @@ -11,7 +11,7 @@ import { CommonDialogComponent } from '../components/common-dialog/common-dialog @Injectable() export class ConfirmationService { constructor( - private dialog: MatDialog, + public dialog: MatDialog, @Inject(DOCUMENT) doc: any ) {} diff --git a/src/app/app-modules/core/services/http-interceptor.service.ts b/src/app/app-modules/core/services/http-interceptor.service.ts index 5acd8bb1..dfcfe26a 100644 --- a/src/app/app-modules/core/services/http-interceptor.service.ts +++ b/src/app/app-modules/core/services/http-interceptor.service.ts @@ -9,10 +9,9 @@ import { HttpErrorResponse, HttpHeaders, } from '@angular/common/http'; -import { catchError, tap } from 'rxjs/operators'; -import { Observable, of } from 'rxjs'; +import { catchError, tap, finalize } from 'rxjs/operators'; +import { Observable, of, Subject, EMPTY, throwError } from 'rxjs'; import { Router } from '@angular/router'; -import { throwError } from 'rxjs/internal/observable/throwError'; import { SpinnerService } from './spinner.service'; import { ConfirmationService } from './confirmation.service'; import { environment } from 'src/environments/environment'; @@ -23,12 +22,17 @@ import { CookieService } from 'ngx-cookie-service'; providedIn: 'root', }) export class HttpInterceptorService implements HttpInterceptor { - timerRef: any; + private sessionTimeoutRef: any; + private pendingRequests = 0; + private isHandlingSessionExpiry = false; + private logoutMessageShown = false; + currentLanguageSet: any; donotShowSpinnerUrl = [ environment.syncDownloadProgressUrl, environment.ioturl, ]; + constructor( private spinnerService: SpinnerService, private router: Router, @@ -36,12 +40,23 @@ export class HttpInterceptorService implements HttpInterceptor { readonly sessionstorage: SessionStorageService, private http: HttpClient, private cookieService: CookieService - ) {} + ) { + // Reset state when navigating to login + this.router.events.subscribe((event: any) => { + if (event.url === '/login') { + this.resetSessionState(); + } + }); + } intercept( req: HttpRequest, next: HttpHandler ): Observable> { + const isLoginRequest = + req.url && req.url.toLowerCase().includes('user/userAuthenticate'); + + this.pendingRequests++; const key: any = sessionStorage.getItem('key'); const serverKey = this.sessionstorage.getItem('serverKey'); let modifiedReq = req; @@ -49,7 +64,6 @@ export class HttpInterceptorService implements HttpInterceptor { req.url && req.url.toLowerCase().includes('/platform-feedback'); if (isPlatformFeedback) { - // For platform-feedback: remove Authorization and force JSON content-type const headers = req.headers .delete('Authorization') .set('Content-Type', 'application/json'); @@ -68,107 +82,294 @@ export class HttpInterceptorService implements HttpInterceptor { }); } } + return next.handle(modifiedReq).pipe( tap((event: HttpEvent) => { - if (req.url !== undefined && !req.url.includes('cti/getAgentState')) + if (req.url !== undefined && !req.url.includes('cti/getAgentState')) { this.spinnerService.setLoading(true); + } if (event instanceof HttpResponse) { - console.log(event.body); + // Reset session expiry state on successful login + if (isLoginRequest && event.status === 200) { + this.resetSessionState(); + } this.onSuccess(req.url, event.body); - this.spinnerService.setLoading(false); return event.body; } }), catchError((error: HttpErrorResponse) => { - console.error(error); - this.spinnerService.setLoading(false); - let message = ''; - if (error.status === 401) { - if (error.error) { - if (typeof error.error === 'string') { - message = error.error; - } else if (error.error.message) { - message = error.error.message; - } - } + // Set flag IMMEDIATELY before any async operations + let sessionExpired = false; - if (!message) { - message = 'Invalid token. Please login again.'; + if (!this.isHandlingSessionExpiry) { + if (error.status === 401) { + this.isHandlingSessionExpiry = true; + sessionExpired = true; + this.handleSessionExpiry('Unauthorized: Session has expired.'); + } else if (error.status === 200 && error.error?.statusCode === 5002) { + this.isHandlingSessionExpiry = true; + sessionExpired = true; + // Extract error message properly, ensuring it's a string + const rawErrorMsg = + error.error?.errorMessage || + 'Session has expired. Please login again.'; + const errorMsg = this.getErrorMessage(rawErrorMsg); + this.handleSessionExpiry(errorMsg); } + } - this.confirmationService.alert(message, 'error'); - sessionStorage.clear(); - setTimeout(() => this.router.navigate(['/login']), 0); + // If session is expired, don't propagate the error to components + // If not session expiry, let components handle the error + this.spinnerService.setLoading(false); + + if (sessionExpired) { + // Return empty observable to prevent error from reaching components + return EMPTY; } return throwError(error); + }), + + finalize(() => { + this.pendingRequests--; + if (this.pendingRequests === 0) { + this.spinnerService.setLoading(false); + } }) ); } - private onSuccess(url: string, response: any): void { - if (this.timerRef) clearTimeout(this.timerRef); + /** + * Public method to check if session expiry is being handled + * Components should check this before showing error dialogs + */ + public isSessionExpiryInProgress(): boolean { + return this.isHandlingSessionExpiry; + } - if ( - response.statusCode === 5002 && - url.indexOf('user/userAuthenticate') < 0 - ) { - sessionStorage.clear(); - // this.sessionstorage.clear(); - setTimeout(() => this.router.navigate(['/login']), 0); - this.confirmationService.alert(response.errorMessage, 'error'); - } else { - this.startTimer(); + /** + * Convert error to string message, handling object errors + */ + private getErrorMessage(error: any): string { + try { + // If already a string, return it + if (typeof error === 'string') { + return error && error.trim().length > 0 + ? error + : 'Your session has expired. Please login again.'; + } + + // If it's an object with a message property + if (error && typeof error === 'object') { + if (error.message && typeof error.message === 'string') { + return error.message; + } + if (error.errorMessage && typeof error.errorMessage === 'string') { + return error.errorMessage; + } + if (error.error && typeof error.error === 'string') { + return error.error; + } + } + + // Default message + return 'Your session has expired. Please login again.'; + } catch (err) { + console.error('Error extracting message:', err); + return 'Your session has expired. Please login again.'; } } - startTimer() { - this.timerRef = setTimeout( - () => { - console.log('there', Date()); + /** + * Handle session expiry with atomic lock to prevent race conditions + */ + private handleSessionExpiry(errorMessage: string): void { + // Atomic check and set to prevent race conditions + if (this.isHandlingSessionExpiry) { + this.confirmationService.dialog.closeAll(); + this.confirmationService.alert( + 'Session has expired. Please login again.', + 'error' + ); + this.router.navigate(['/login']); + return; + } - if ( - sessionStorage.getItem('authenticationToken') && - sessionStorage.getItem('isAuthenticated') - ) { - this.confirmationService - .alert( - 'Your session is about to Expire. Do you need more time ? ', - 'sessionTimeOut' - ) - .afterClosed() - .subscribe((result: any) => { - if (result.action === 'continue') { - this.http.post(environment.extendSessionUrl, {}).subscribe( - (res: any) => {}, - (err: any) => {} - ); - } else if (result.action === 'timeout') { - clearTimeout(this.timerRef); - sessionStorage.clear(); - // this.sessionstorage.clear(); - this.confirmationService.alert( - this.currentLanguageSet.sessionExpired, - 'error' - ); - this.router.navigate(['/login']); - } else if (result.action === 'cancel') { - setTimeout(() => { - clearTimeout(this.timerRef); - sessionStorage.clear(); - // this.sessionstorage.clear(); - this.confirmationService.alert( - this.currentLanguageSet.sessionExpired, - 'error' + this.isHandlingSessionExpiry = true; + this.clearSessionTimeoutTimer(); + + // Clear all storage immediately + sessionStorage.clear(); + this.sessionstorage.clear(); + + // Ensure error message is a string + const displayMessage = this.getErrorMessage(errorMessage); + + // Navigate to login immediately with error handling + try { + this.router + .navigate(['/login']) + .then((navigated: boolean) => { + if (!navigated) { + console.error('Navigation to login failed'); + } + + // Show error dialog after navigation is complete + if (!this.logoutMessageShown) { + this.logoutMessageShown = true; + setTimeout(() => { + try { + this.confirmationService + .alert(displayMessage, 'error') + .afterClosed() + .subscribe( + () => { + // Dialog closed + console.log('Session expiry dialog closed'); + }, + (dialogError: any) => { + console.error('Error in dialog:', dialogError); + } ); - this.router.navigate(['/login']); - }, result.remainingTime * 1000); + } catch (dialogErr) { + console.error( + 'Failed to show session expiry dialog:', + dialogErr + ); } - }); - } + }, 300); + } + }) + .catch((navError: any) => { + console.error('Navigation error:', navError); + }); + } catch (err) { + console.error('Error during session expiry handling:', err); + } + } + + /** + * Reset session state when user successfully logs in or navigates to login + */ + private resetSessionState(): void { + this.isHandlingSessionExpiry = false; + this.logoutMessageShown = false; + this.clearSessionTimeoutTimer(); + } + + /** + * Handle successful responses and manage session timeout timer + */ + private onSuccess(url: string, response: any): void { + // Restart session timeout timer only for successful authenticated requests + if (this.isValidAuthenticatedResponse(response, url)) { + this.resetSessionTimeoutTimer(); + } + } + + /** + * Validate if response is from an authenticated request + */ + private isValidAuthenticatedResponse(response: any, url: string): boolean { + // Don't restart timer for login/authentication endpoints + if (url && url.indexOf('user/userAuthenticate') >= 0) { + return false; + } + + // Exclude platform-feedback and other public endpoints + if (url && url.toLowerCase().includes('/platform-feedback')) { + return false; + } + + return sessionStorage.getItem('authenticationToken') ? true : false; + } + + /** + * Reset the session timeout timer + * Clears existing timer and starts a new one + */ + private resetSessionTimeoutTimer(): void { + this.clearSessionTimeoutTimer(); + this.startSessionTimeoutTimer(); + } + + /** + * Clear the session timeout timer + */ + private clearSessionTimeoutTimer(): void { + if (this.sessionTimeoutRef) { + clearTimeout(this.sessionTimeoutRef); + this.sessionTimeoutRef = null; + } + } + + /** + * Start the session timeout timer (27 minutes) + * Shows a warning dialog when session is about to expire + */ + private startSessionTimeoutTimer(): void { + this.sessionTimeoutRef = setTimeout( + () => { + this.showSessionExpiryWarning(); }, 27 * 60 * 1000 - ); + ); // 27 minutes + } + + /** + * Show session expiry warning dialog + * Allows user to extend session or logout + */ + private showSessionExpiryWarning(): void { + if ( + !sessionStorage.getItem('authenticationToken') || + !sessionStorage.getItem('isAuthenticated') || + this.isHandlingSessionExpiry + ) { + return; + } + + this.confirmationService + .alert( + this.currentLanguageSet?.sessionTimeoutWarning || + 'Your session is about to expire. Do you need more time?', + 'sessionTimeOut' + ) + .afterClosed() + .subscribe((result: any) => { + if (result?.action === 'continue') { + // Extend session + this.extendSession(); + } else if ( + result?.action === 'timeout' || + result?.action === 'cancel' + ) { + // Handle logout + this.handleSessionExpiry( + this.currentLanguageSet?.sessionExpired || + 'Your session has expired. Please login again.' + ); + } + }); + } + + /** + * Extend the current session + */ + private extendSession(): void { + this.http + .post(environment.extendSessionUrl, {}) + .pipe( + catchError((error: any) => { + console.error('Failed to extend session:', error); + // On extension failure, let timeout happen naturally + return of(null); + }) + ) + .subscribe(() => { + // Reset timer for another 27 minutes + this.resetSessionTimeoutTimer(); + }); } } diff --git a/src/app/app-modules/core/services/http-service.service.ts b/src/app/app-modules/core/services/http-service.service.ts index 6e6b4aea..95f3d051 100644 --- a/src/app/app-modules/core/services/http-service.service.ts +++ b/src/app/app-modules/core/services/http-service.service.ts @@ -22,7 +22,10 @@ export class HttpServiceService { constructor( private _http: HttpClient, private http: HttpClient - ) {} + ) { + const storedLang = localStorage.getItem('appLanguage'); + this.language = storedLang ? JSON.parse(storedLang) : null; + } fetchLanguageSet() { console.log('Here i come'); @@ -32,10 +35,8 @@ export class HttpServiceService { return this._http.get(url); } getCurrentLanguage(response: any) { - console.log('here at one', response); this.language = response; - console.log('teste', this.language); + localStorage.setItem('appLanguage', JSON.stringify(response)); this.appCurrentLanguge.next(response); - console.log('here at two', this.appCurrentLanguge.value); } } diff --git a/src/app/app-modules/core/services/inventory.service.ts b/src/app/app-modules/core/services/inventory.service.ts index da8f3d75..ce6082d3 100644 --- a/src/app/app-modules/core/services/inventory.service.ts +++ b/src/app/app-modules/core/services/inventory.service.ts @@ -53,6 +53,8 @@ export class InventoryService { const parentAPI = this.getParentAPI(); if (authKey && protocol && host && facility) { + console.log('Facility ID: ', facility); + // uncomment later this.inventoryUrl = `${environment.INVENTORY_URL}protocol=${protocol}&host=${host}&user=${authKey}&app=${environment.app}&fallback=${environment.fallbackUrl}&back=${environment.redirInUrl}&facility=${facility}&ben=${benID}&visit=${visit}&flow=${flowID}®=${regID}&vanID=${vanID}&ppID=${ppID}&serviceName=${serviceName}&parentAPI=${parentAPI}¤tLanguage=${language}`; console.log(this.inventoryUrl); @@ -74,8 +76,8 @@ export class InventoryService { } getFacilityID() { - if (sessionStorage.getItem('facilityID')) { - return sessionStorage.getItem('facilityID'); + if (this.sessionstorage.getItem('facilityID')) { + return this.sessionstorage.getItem('facilityID'); } else { return undefined; } diff --git a/src/app/app-modules/data-sync/camp-hub-qr-code/camp-hub-qr-code.component.css b/src/app/app-modules/data-sync/camp-hub-qr-code/camp-hub-qr-code.component.css new file mode 100644 index 00000000..c1b5fc20 --- /dev/null +++ b/src/app/app-modules/data-sync/camp-hub-qr-code/camp-hub-qr-code.component.css @@ -0,0 +1,125 @@ +.qr-dialog-header { + display: flex; + align-items: center; + justify-content: space-between; + padding: 12px 10px 12px 24px; + background: linear-gradient(135deg, #0277bd, #01579b); + color: white; + border-radius: 4px 4px 0 0; +} + +.qr-dialog-title { + font-size: 18px; + font-weight: 500; + letter-spacing: 0.3px; +} + +.qr-close-btn { + background: rgba(0, 0, 0, 0.2); + border: none; + border-radius: 50%; + width: 32px; + height: 32px; + min-width: 32px; + padding: 0; + display: flex; + align-items: center; + justify-content: center; + cursor: pointer; + color: white; + flex-shrink: 0; + transition: background 0.2s ease; +} + +.qr-close-btn .material-icons { + font-size: 18px; + line-height: 1; +} + +.qr-close-btn:hover { + background: rgba(0, 0, 0, 0.35); +} + +.qr-dialog-content { + padding: 16px 24px 8px !important; + min-width: 420px; +} + +.qr-subtitle { + font-size: 13px; + color: #555; + margin-bottom: 8px; +} + +/* ── Detection status row ── */ + +.detect-row { + display: flex; + align-items: center; + gap: 8px; + padding: 8px 12px; + border-radius: 4px; + font-size: 13px; + color: #555; + margin-bottom: 4px; +} + +.detect-row.warn { + background: #fff8e1; + color: #6d4c00; +} + +.detect-row.ok { + background: #e8f5e9; + color: #1b5e20; +} + +.detect-text { + flex: 1; + line-height: 1.4; +} + +/* ── QR result ── */ + +.qr-result { + display: flex; + flex-direction: column; + align-items: center; + padding: 24px 0 8px; + gap: 16px; +} + +.url-chip { + display: inline-flex; + align-items: center; + gap: 6px; + background: #e3f2fd; + border-radius: 20px; + padding: 6px 16px; + font-size: 14px; + font-weight: 500; + color: #0b69b2; + word-break: break-all; +} + +.url-icon { + font-size: 18px; + flex-shrink: 0; +} + +.url-text { + font-family: monospace; +} + +.qr-image { + border: 2px solid #ddd; + border-radius: 4px; + padding: 8px; + background: #fff; +} + +.btn-icon { + vertical-align: middle; + font-size: 18px; + margin-right: 4px; +} diff --git a/src/app/app-modules/data-sync/camp-hub-qr-code/camp-hub-qr-code.component.html b/src/app/app-modules/data-sync/camp-hub-qr-code/camp-hub-qr-code.component.html new file mode 100644 index 00000000..ce918604 --- /dev/null +++ b/src/app/app-modules/data-sync/camp-hub-qr-code/camp-hub-qr-code.component.html @@ -0,0 +1,99 @@ + + +
+ Camp Hub QR Code + +
+ + +

Scan with the Stop TB Mobile app to connect over Wi-Fi.

+ + +
+ + Fetching Camp Hub server info… +
+ +
+ info + + Camp Hub server unreachable — enter the server URL manually below. + + +
+ +
+ check_circle + Server URL fetched — review below and click Generate. +
+ + +
+ + Camp Hub Server URL + + Format: http://<network-ip>:<port>/ + + URL is required + + + Must start with http:// or https:// + + + +
+ +
+
+ + +
+
+ wifi + {{ generatedUrl }} +
+ + Camp Hub QR Code + + +
+
diff --git a/src/app/app-modules/data-sync/camp-hub-qr-code/camp-hub-qr-code.component.ts b/src/app/app-modules/data-sync/camp-hub-qr-code/camp-hub-qr-code.component.ts new file mode 100644 index 00000000..9e1a8ab6 --- /dev/null +++ b/src/app/app-modules/data-sync/camp-hub-qr-code/camp-hub-qr-code.component.ts @@ -0,0 +1,119 @@ +/* + * AMRIT – Accessible Medical Records via Integrated Technology + * Integrated EHR (Electronic Health Records) Solution + * + * Copyright (C) "Piramal Swasthya Management and Research Institute" + * + * This file is part of AMRIT. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + +import { Component, OnInit, Injector } from '@angular/core'; +import { HttpClient } from '@angular/common/http'; +import { FormBuilder, Validators } from '@angular/forms'; +import { MatDialogRef } from '@angular/material/dialog'; +import * as QRCode from 'qrcode'; +import { environment } from 'src/environments/environment'; + +interface ConnectInfo { + ip: string; + port: 8080; +} + +@Component({ + selector: 'app-camp-hub-qr-code', + templateUrl: './camp-hub-qr-code.component.html', + styleUrls: ['./camp-hub-qr-code.component.css'], +}) +export class CampHubQrCodeComponent implements OnInit { + isDetecting = false; + detectionFailed = false; + isGenerating = false; + qrDataUrl: string | null = null; + generatedUrl: string | null = null; + + urlForm = this.fb.group({ + campHubUrl: [ + '', + [Validators.required, Validators.pattern(/^https?:\/\/.+/)], + ], + }); + + private dialogRef: MatDialogRef | null = null; + + constructor( + private fb: FormBuilder, + private http: HttpClient, + private injector: Injector + ) { + this.dialogRef = this.injector.get(MatDialogRef, null); + } + + close(): void { + this.dialogRef?.close(); + } + + ngOnInit(): void { + this.autoDetect(); + } + + autoDetect(): void { + this.isDetecting = true; + this.detectionFailed = false; + this.qrDataUrl = null; + + this.http.get(environment.campHubConnectInfoAPI).subscribe({ + next: res => { + this.urlForm.controls.campHubUrl.setValue(`http://${res.ip}:8080/`); + this.isDetecting = false; + this.generate(); + }, + error: () => { + this.detectionFailed = true; + this.isDetecting = false; + }, + }); + } + + generate(): void { + if (this.urlForm.invalid) return; + const url = (this.urlForm.value.campHubUrl ?? '').trim(); + this.isGenerating = true; + this.qrDataUrl = null; + + QRCode.toDataURL(url, { + width: 256, + margin: 2, + errorCorrectionLevel: 'H', + color: { dark: '#000000', light: '#ffffff' }, + }) + .then((dataUrl: string) => { + this.generatedUrl = url; + this.qrDataUrl = dataUrl; + this.isGenerating = false; + }) + .catch(() => { + this.isGenerating = false; + }); + } + + downloadQR(): void { + if (!this.qrDataUrl) return; + const link = document.createElement('a'); + link.download = 'camp-hub-server-url.png'; + link.href = this.qrDataUrl; + link.click(); + } +} diff --git a/src/app/app-modules/data-sync/dataSync.module.ts b/src/app/app-modules/data-sync/dataSync.module.ts index 266317aa..4a405d61 100644 --- a/src/app/app-modules/data-sync/dataSync.module.ts +++ b/src/app/app-modules/data-sync/dataSync.module.ts @@ -34,7 +34,6 @@ import { MasterDownloadComponent } from './master-download/master-download.compo // import { SharedModule } from '../core/shared/shared/shared.module'; import { DataSyncLoginComponent } from '../core/components/data-sync-login/data-sync-login.component'; import { SharedModule } from '../core/components/shared/shared.module'; - @NgModule({ imports: [ CommonModule, diff --git a/src/app/app-modules/data-sync/workarea/workarea.component.html b/src/app/app-modules/data-sync/workarea/workarea.component.html index dbfda1b6..30a8d067 100644 --- a/src/app/app-modules/data-sync/workarea/workarea.component.html +++ b/src/app/app-modules/data-sync/workarea/workarea.component.html @@ -57,8 +57,10 @@
@@ -68,16 +70,25 @@ hourglass_empty indeterminate_check_box + check_circle error @@ -90,9 +101,10 @@
  • -
    +

    {{ current_language_set?.coreComponents @@ -101,7 +113,25 @@

  • -
    +
    +

    + {{ + current_language_set?.coreComponents + ?.partialDataSync + }} +

    +
  • +
  • +
    +

    + {{ + current_language_set?.coreComponents + ?.errorForDataSync + }} +

    +
  • +
  • +

    {{ current_language_set?.coreComponents?.dataSynced diff --git a/src/app/app-modules/data-sync/workarea/workarea.component.ts b/src/app/app-modules/data-sync/workarea/workarea.component.ts index 1192da21..0bc299a7 100644 --- a/src/app/app-modules/data-sync/workarea/workarea.component.ts +++ b/src/app/app-modules/data-sync/workarea/workarea.component.ts @@ -48,8 +48,8 @@ export class WorkareaComponent generateBenIDForm!: FormGroup; current_language_set: any; blankTable: any[] = []; - showTable: boolean = false; - displaySyncBool: boolean = true; + showTable = false; + displaySyncBool = true; constructor( private router: Router, @@ -66,10 +66,8 @@ export class WorkareaComponent ngOnInit() { this.assignSelectedLanguage(); - if ( - this.sessionstorage.getItem('serverKey') !== null || - this.sessionstorage.getItem('serverKey') !== undefined - ) { + const serverKey = this.sessionstorage.getItem('serverKey'); + if (serverKey) { this.getDataSYNCGroup(); } else { this.router.navigate(['datasync/sync-login']); @@ -93,7 +91,6 @@ export class WorkareaComponent this.dataSyncService.getDataSYNCGroup().subscribe((res: any) => { if (res.statusCode === 200) { this.syncTableGroupList = this.createSyncActivity(res.data); - console.log('syncTableGroupList', this.syncTableGroupList); } }); } @@ -223,15 +220,10 @@ export class WorkareaComponent syncGroups() { this.dataSyncService.syncAllGroups().subscribe( (res: any) => { - console.log(res); if (res.statusCode === 200) { if (res.data.groupsProgress) { this.updateGroupStatus(res.data.groupsProgress); } - // Update group status for all groups as 'success' - this.syncTableGroupList.forEach((group: any) => { - group.status = 'success'; - }); this.confirmationService.alert(res.data.response, 'success'); } else { this.confirmationService.alert(res.data.response, 'error'); @@ -253,13 +245,16 @@ export class WorkareaComponent updateGroupStatus(groupsProgress: any[]) { this.syncTableGroupList.forEach((group: any) => { const progress = groupsProgress.find( - (item: any) => item.groupId === group.syncTableGroupID + (item: any) => item.syncTableGroupID === group.syncTableGroupID ); + if (progress) { if (progress.status === 'completed') { group.status = 'success'; } else if (progress.status === 'failed') { group.status = 'failed'; + } else if (progress.status === 'partial') { + group.status = 'partial'; } else { group.status = 'pending'; } @@ -351,9 +346,7 @@ export class WorkareaComponent this.dataSyncService .inventorySyncDownloadData(vanID) .subscribe((res: any) => { - if (res.statusCode === 200) { - console.log('Downloaded response'); - } else { + if (res.statusCode !== 200) { this.confirmationService.alert(res.errorMessage, 'error'); } }); diff --git a/src/app/app-modules/lab/worklist/worklist.component.html b/src/app/app-modules/lab/worklist/worklist.component.html index f17e4b5d..77187da6 100644 --- a/src/app/app-modules/lab/worklist/worklist.component.html +++ b/src/app/app-modules/lab/worklist/worklist.component.html @@ -10,7 +10,7 @@ name="filterTerm" [(ngModel)]="filterTerm" (keyup)="filterBeneficiaryList(filterTerm)" /> - diff --git a/src/app/app-modules/login/login.component.css b/src/app/app-modules/login/login.component.css index 56e05a21..d12fef08 100644 --- a/src/app/app-modules/login/login.component.css +++ b/src/app/app-modules/login/login.component.css @@ -153,4 +153,28 @@ input::-ms-clear { color: #666 !important; cursor: not-allowed; box-shadow: none !important; +} + +.qr-btn { + width: 93%; + margin: 4px 0 10px 16.5px; + height: 38px; + font-size: 14px; + font-weight: 500; + letter-spacing: 0.5px; + background: linear-gradient(135deg, #0277bd, #01579b); + color: white !important; + border-radius: 6px; + box-shadow: 0 2px 6px rgba(2, 119, 189, 0.4); + transition: box-shadow 0.2s ease; +} + +.qr-btn:hover { + box-shadow: 0 4px 12px rgba(2, 119, 189, 0.55); +} + +.qr-btn-icon { + font-size: 20px; + vertical-align: middle; + margin-right: 6px; } \ No newline at end of file diff --git a/src/app/app-modules/login/login.component.html b/src/app/app-modules/login/login.component.html index 20a733cb..32538186 100644 --- a/src/app/app-modules/login/login.component.html +++ b/src/app/app-modules/login/login.component.html @@ -116,6 +116,18 @@ > +

    +
    + +
    +
    diff --git a/src/app/app-modules/login/login.component.ts b/src/app/app-modules/login/login.component.ts index 817351fa..26bcdf10 100644 --- a/src/app/app-modules/login/login.component.ts +++ b/src/app/app-modules/login/login.component.ts @@ -20,7 +20,13 @@ * along with this program. If not, see https://www.gnu.org/licenses/. */ -import { Component, OnInit, ViewChild, ElementRef } from '@angular/core'; +import { + Component, + OnInit, + AfterViewInit, + ViewChild, + ElementRef, +} from '@angular/core'; import { MatDialog, MatDialogRef } from '@angular/material/dialog'; import { Router } from '@angular/router'; import * as CryptoJS from 'crypto-js'; @@ -31,6 +37,7 @@ import { import { FormBuilder, Validators } from '@angular/forms'; import { DataSyncLoginComponent } from '../core/components/data-sync-login/data-sync-login.component'; import { MasterDownloadComponent } from '../data-sync/master-download/master-download.component'; +import { CampHubQrCodeComponent } from '../data-sync/camp-hub-qr-code/camp-hub-qr-code.component'; import { SessionStorageService } from 'Common-UI/src/registrar/services/session-storage.service'; import { environment } from 'src/environments/environment'; import { CaptchaComponent } from '../captcha/captcha.component'; @@ -41,7 +48,7 @@ import { AmritTrackingService } from 'Common-UI/src/tracking'; templateUrl: './login.component.html', styleUrls: ['./login.component.css'], }) -export class LoginComponent implements OnInit { +export class LoginComponent implements OnInit, AfterViewInit { @ViewChild('captchaCmp') captchaCmp: CaptchaComponent | undefined; dynamictype = 'password'; encryptedVar: any; @@ -58,6 +65,7 @@ export class LoginComponent implements OnInit { captchaToken!: string; enableCaptcha = environment.enableCaptcha; + isMMUOfflineQRCode = environment.isMMUOfflineQRCode; constructor( private router: Router, @@ -88,7 +96,7 @@ export class LoginComponent implements OnInit { sessionStorage.clear(); } } - public AfterViewInit(): void { + ngAfterViewInit(): void { this.elementRef.nativeElement.focus(); } @@ -98,13 +106,10 @@ export class LoginComponent implements OnInit { this.loginForm.controls.password.value ); - if ( - this.loginForm.controls.userName.value && - this.loginForm.controls.password.value - ) { + if (this.loginForm.valid) { this.authService .login( - this.loginForm.controls.userName.value.trim(), + (this.loginForm.controls.userName.value ?? '').trim(), encryptPassword, false, this.enableCaptcha ? this.captchaToken : undefined @@ -259,12 +264,21 @@ export class LoginComponent implements OnInit { this.sessionstorage.setItem('userName', loginDataResponse.userName); this.sessionstorage.setItem('username', userName); this.sessionstorage.setItem('fullName', loginDataResponse.fullName); + this.sessionstorage.setItem( + 'providerServiceMapID', + loginDataResponse.previlegeObj[0].providerServiceMapID + ); const services: any = []; loginDataResponse.previlegeObj.map((item: any) => { if ( item.roles[0].serviceRoleScreenMappings[0].providerServiceMapping .serviceID === 2 ) { + this.sessionstorage.setItem( + 'currentServiceID', + item.roles[0].serviceRoleScreenMappings[0].providerServiceMapping + .serviceID + ); const service = { providerServiceID: item.serviceID, serviceName: item.serviceName, @@ -301,6 +315,13 @@ export class LoginComponent implements OnInit { this.dynamictype = 'password'; } + openQrDialog(): void { + this.dialog.open(CampHubQrCodeComponent, { + width: '500px', + disableClose: false, + }); + } + loginDialogRef!: MatDialogRef; openDialog() { this.loginDialogRef = this.dialog.open(DataSyncLoginComponent, { diff --git a/src/app/app-modules/nurse-doctor/anc/anc.component.ts b/src/app/app-modules/nurse-doctor/anc/anc.component.ts index 0c399556..cf9a1b52 100644 --- a/src/app/app-modules/nurse-doctor/anc/anc.component.ts +++ b/src/app/app-modules/nurse-doctor/anc/anc.component.ts @@ -130,6 +130,48 @@ export class AncComponent implements OnInit, DoCheck, OnChanges, OnDestroy { visitCode: this.sessionstorage.getItem('visitCode'), }; + const immunizationForm = patientANCDataForm.get( + 'patientANCImmunizationForm' + ); + + if (immunizationForm) { + const ttDateFields = [ + 'dateReceivedForTT_1', + 'dateReceivedForTT_2', + 'dateReceivedForTT_3', + ]; + + ttDateFields.forEach(field => { + const value = immunizationForm.get(field)?.value; + + if (value) { + immunizationForm.patchValue({ + [field]: this.normalizeToUTCMidnight(new Date(value)), + }); + } + }); + } + + const ancDetailsForm = patientANCDataForm.get('patientANCDetailsForm'); + + if (ancDetailsForm) { + const lmpDateValue = ancDetailsForm.get('lmpDate')?.value; + + if (lmpDateValue) { + ancDetailsForm.patchValue({ + lmpDate: this.normalizeToUTCMidnight(new Date(lmpDateValue)), + }); + } + + const expDelDtValue = ancDetailsForm.get('expDelDt')?.value; + + if (expDelDtValue) { + ancDetailsForm.patchValue({ + expDelDt: this.normalizeToUTCMidnight(new Date(expDelDtValue)), + }); + } + } + this.updateANCDetailsSubs = this.doctorService .updateANCDetails(patientANCDataForm, temp) .subscribe( @@ -217,4 +259,14 @@ export class AncComponent implements OnInit, DoCheck, OnChanges, OnDestroy { } }); } + + private normalizeToUTCMidnight(date: Date | null | undefined): string | null { + if (!date) return null; + + const d = new Date(date); + const utcDate = new Date( + Date.UTC(d.getFullYear(), d.getMonth(), d.getDate(), 0, 0, 0, 0) + ); + return utcDate.toISOString(); + } } diff --git a/src/app/app-modules/nurse-doctor/case-record/general-case-record/diagnosis/general-opd-diagnosis/general-opd-diagnosis.component.html b/src/app/app-modules/nurse-doctor/case-record/general-case-record/diagnosis/general-opd-diagnosis/general-opd-diagnosis.component.html index 674c9af9..dab42b34 100644 --- a/src/app/app-modules/nurse-doctor/case-record/general-case-record/diagnosis/general-opd-diagnosis/general-opd-diagnosis.component.html +++ b/src/app/app-modules/nurse-doctor/case-record/general-case-record/diagnosis/general-opd-diagnosis/general-opd-diagnosis.component.html @@ -8,7 +8,7 @@

    {{ current_language_set?.casesheet?.provisionalDiag }}*

    @@ -31,7 +31,6 @@

    {{ current_language_set?.casesheet?.provisionalDiag }}*

    Loading… End of results -
    diff --git a/src/app/app-modules/nurse-doctor/case-record/general-case-record/diagnosis/general-opd-diagnosis/general-opd-diagnosis.component.ts b/src/app/app-modules/nurse-doctor/case-record/general-case-record/diagnosis/general-opd-diagnosis/general-opd-diagnosis.component.ts index 84dcf09a..72cabd2e 100644 --- a/src/app/app-modules/nurse-doctor/case-record/general-case-record/diagnosis/general-opd-diagnosis/general-opd-diagnosis.component.ts +++ b/src/app/app-modules/nurse-doctor/case-record/general-case-record/diagnosis/general-opd-diagnosis/general-opd-diagnosis.component.ts @@ -95,38 +95,35 @@ export class GeneralOpdDiagnosisComponent implements OnChanges, DoCheck { }); } - getProvisionalDiagnosisList(): AbstractControl[] | null { - const provisionalDiagnosisListControl = this.generalDiagnosisForm.get( - 'provisionalDiagnosisList' + get provisionalDiagnosisControls(): AbstractControl[] { + return ( + (this.generalDiagnosisForm.get('provisionalDiagnosisList') as FormArray) + ?.controls || [] ); - return provisionalDiagnosisListControl instanceof FormArray - ? provisionalDiagnosisListControl.controls - : null; } patchDiagnosisDetails(diagnosis: any) { this.generalDiagnosisForm.patchValue(diagnosis); - const generalArray = this.generalDiagnosisForm.controls[ + const diagnosisArrayList = this.generalDiagnosisForm.controls[ 'provisionalDiagnosisList' ] as FormArray; const previousArray = diagnosis.provisionalDiagnosisList; - let j = 0; - if (previousArray !== undefined && previousArray.length > 0) { - previousArray.forEach((i: any) => { - generalArray.at(j).patchValue({ - conceptID: i.conceptID, - term: i.term, - provisionalDiagnosis: i.term, - }); - (generalArray.at(j)).controls[ - 'provisionalDiagnosis' - ].disable(); - if (generalArray.length < previousArray.length) { - this.addDiagnosis(); - } - j++; + + while (diagnosisArrayList.length < previousArray.length) { + diagnosisArrayList.push(this.utils.initProvisionalDiagnosisList()); + } + for (let i = 0; i < previousArray.length; i++) { + diagnosisArrayList.at(i).patchValue({ + viewProvisionalDiagnosisProvided: previousArray[i].term, + term: previousArray[i].term, + conceptID: previousArray[i].conceptID, + provisionalDiagnosis: previousArray[i].term, // <-- Add this line }); + diagnosisArrayList + .at(i) + .get('viewProvisionalDiagnosisProvided') + ?.disable(); } } @@ -202,7 +199,7 @@ export class GeneralOpdDiagnosisComponent implements OnChanges, DoCheck { } displayDiagnosis(diagnosis: any): string { - return diagnosis?.term || ''; + return typeof diagnosis === 'string' ? diagnosis : diagnosis?.Term || ''; } onDiagnosisSelected(selected: any, index: number) { @@ -214,7 +211,8 @@ export class GeneralOpdDiagnosisComponent implements OnChanges, DoCheck { // Set the nested and top-level fields diagnosisFormGroup.patchValue({ - viewProvisionalDiagnosisProvided: selected, + provisionalDiagnosis: selected?.term || null, + viewProvisionalDiagnosisProvided: selected?.term || null, conceptID: selected?.conceptID || null, term: selected?.term || null, }); diff --git a/src/app/app-modules/nurse-doctor/case-record/general-case-record/diagnosis/ncd-care-diagnosis/ncd-care-diagnosis.component.html b/src/app/app-modules/nurse-doctor/case-record/general-case-record/diagnosis/ncd-care-diagnosis/ncd-care-diagnosis.component.html index 62173eff..0e163c25 100644 --- a/src/app/app-modules/nurse-doctor/case-record/general-case-record/diagnosis/ncd-care-diagnosis/ncd-care-diagnosis.component.html +++ b/src/app/app-modules/nurse-doctor/case-record/general-case-record/diagnosis/ncd-care-diagnosis/ncd-care-diagnosis.component.html @@ -78,7 +78,7 @@

    {{ current_language_set?.casesheet?.provisionalDiag }}

    @@ -87,10 +87,10 @@

    {{ current_language_set?.casesheet?.provisionalDiag }}

    {{ current_language_set?.casesheet?.provisionalDiag }} - + diff --git a/src/app/app-modules/nurse-doctor/case-record/general-case-record/diagnosis/ncd-care-diagnosis/ncd-care-diagnosis.component.ts b/src/app/app-modules/nurse-doctor/case-record/general-case-record/diagnosis/ncd-care-diagnosis/ncd-care-diagnosis.component.ts index 07d37afe..b8dfad45 100644 --- a/src/app/app-modules/nurse-doctor/case-record/general-case-record/diagnosis/ncd-care-diagnosis/ncd-care-diagnosis.component.ts +++ b/src/app/app-modules/nurse-doctor/case-record/general-case-record/diagnosis/ncd-care-diagnosis/ncd-care-diagnosis.component.ts @@ -50,7 +50,7 @@ export class NcdCareDiagnosisComponent implements OnInit, DoCheck { ncdCareConditions: any; ncdCareTypes: any; - isNcdScreeningConditionOther: boolean = false; + isNcdScreeningConditionOther = false; temp: any = []; current_language_set: any; attendantType: any; @@ -112,13 +112,11 @@ export class NcdCareDiagnosisComponent implements OnInit, DoCheck { }); } - getProvisionalDiagnosisList(): AbstractControl[] | null { - const provisionalDiagnosisListControl = this.generalDiagnosisForm.get( - 'provisionalDiagnosisList' + get provisionalDiagnosisControls(): AbstractControl[] { + return ( + (this.generalDiagnosisForm.get('provisionalDiagnosisList') as FormArray) + ?.controls || [] ); - return provisionalDiagnosisListControl instanceof FormArray - ? provisionalDiagnosisListControl.controls - : null; } diagnosisSubscription: any; @@ -126,35 +124,63 @@ export class NcdCareDiagnosisComponent implements OnInit, DoCheck { this.diagnosisSubscription = this.doctorService .getCaseRecordAndReferDetails(beneficiaryRegID, visitID, visitCategory) .subscribe((res: any) => { - if (res?.statusCode === 200 && res?.data?.diagnosis) { + if (res && res.statusCode === 200 && res.data && res.data.diagnosis) { this.patchDiagnosisDetails(res.data.diagnosis); + if (res.data.diagnosis.provisionalDiagnosisList) { + this.patchProvisionalDiagnosisDetails( + res.data.diagnosis.provisionalDiagnosisList + ); + } } }); } patchDiagnosisDetails(diagnosis: any) { + if ( + diagnosis !== undefined && + diagnosis.ncdScreeningConditionArray !== undefined && + diagnosis.ncdScreeningConditionArray !== null + ) { + this.temp = diagnosis.ncdScreeningConditionArray; + } + if ( + diagnosis !== undefined && + diagnosis.ncdScreeningConditionOther !== undefined && + diagnosis.ncdScreeningConditionOther !== null + ) { + this.isNcdScreeningConditionOther = true; + } + const ncdCareType = this.ncdCareTypes.filter((item: any) => { + return item.ncdCareType === diagnosis.ncdCareType; + }); + if (ncdCareType.length > 0) diagnosis.ncdCareType = ncdCareType[0]; + this.generalDiagnosisForm.patchValue(diagnosis); - const generalArray = this.generalDiagnosisForm.controls[ + } + + patchProvisionalDiagnosisDetails(provisionalDiagnosis: any) { + const savedDiagnosisData = provisionalDiagnosis; + const diagnosisArrayList = this.generalDiagnosisForm.controls[ 'provisionalDiagnosisList' ] as FormArray; - - const previousArray = diagnosis.provisionalDiagnosisList; - let j = 0; - if (previousArray !== undefined && previousArray.length > 0) { - previousArray.forEach((i: any) => { - generalArray.at(j).patchValue({ - conceptID: i.conceptID, - term: i.term, - provisionalDiagnosis: i.term, + if ( + provisionalDiagnosis[0].term !== '' && + provisionalDiagnosis[0].conceptID !== '' + ) { + for (let i = 0; i < savedDiagnosisData.length; i++) { + diagnosisArrayList.at(i).patchValue({ + viewProvisionalDiagnosisProvided: savedDiagnosisData[i].term, + term: savedDiagnosisData[i].term, + conceptID: savedDiagnosisData[i].conceptID, }); - (generalArray.at(j)).controls[ - 'provisionalDiagnosis' + (diagnosisArrayList.at(i)).controls[ + 'viewProvisionalDiagnosisProvided' ].disable(); - if (generalArray.length < previousArray.length) { + + if (diagnosisArrayList.length < savedDiagnosisData.length) { this.addDiagnosis(); } - j++; - }); + } } } diff --git a/src/app/app-modules/nurse-doctor/case-record/general-case-record/diagnosis/ncd-screening-diagnosis/ncd-screening-diagnosis.component.html b/src/app/app-modules/nurse-doctor/case-record/general-case-record/diagnosis/ncd-screening-diagnosis/ncd-screening-diagnosis.component.html index 4dff7bae..6165896a 100644 --- a/src/app/app-modules/nurse-doctor/case-record/general-case-record/diagnosis/ncd-screening-diagnosis/ncd-screening-diagnosis.component.html +++ b/src/app/app-modules/nurse-doctor/case-record/general-case-record/diagnosis/ncd-screening-diagnosis/ncd-screening-diagnosis.component.html @@ -13,7 +13,7 @@

    @@ -22,7 +22,7 @@

    {{ current_language_set?.casesheet?.provisionalDiag }} diff --git a/src/app/app-modules/nurse-doctor/case-record/general-case-record/diagnosis/ncd-screening-diagnosis/ncd-screening-diagnosis.component.ts b/src/app/app-modules/nurse-doctor/case-record/general-case-record/diagnosis/ncd-screening-diagnosis/ncd-screening-diagnosis.component.ts index 703b7c96..20e3c787 100644 --- a/src/app/app-modules/nurse-doctor/case-record/general-case-record/diagnosis/ncd-screening-diagnosis/ncd-screening-diagnosis.component.ts +++ b/src/app/app-modules/nurse-doctor/case-record/general-case-record/diagnosis/ncd-screening-diagnosis/ncd-screening-diagnosis.component.ts @@ -103,15 +103,12 @@ export class NcdScreeningDiagnosisComponent this.assignSelectedLanguage(); } - getProvisionalDiagnosisList(): AbstractControl[] | null { - const provisionalDiagnosisListControl = this.generalDiagnosisForm.get( - 'provisionalDiagnosisList' + get provisionalDiagnosisControls(): AbstractControl[] { + return ( + (this.generalDiagnosisForm.get('provisionalDiagnosisList') as FormArray) + ?.controls || [] ); - return provisionalDiagnosisListControl instanceof FormArray - ? provisionalDiagnosisListControl.controls - : null; } - assignSelectedLanguage() { const getLanguageJson = new SetLanguageComponent(this.httpServiceService); getLanguageJson.setLanguage(); @@ -143,26 +140,18 @@ export class NcdScreeningDiagnosisComponent ] as FormArray; const previousArray = diagnosis.provisionalDiagnosisList; - let j = 0; - if ( - previousArray !== undefined && - previousArray !== null && - previousArray.length > 0 - ) { - previousArray.forEach((i: any) => { - generalArray.at(j).patchValue({ - conceptID: i.conceptID, - term: i.term, - provisionalDiagnosis: i.term, - }); - (generalArray.at(j)).controls[ - 'provisionalDiagnosis' - ].disable(); - if (generalArray.length < previousArray.length) { - this.addDiagnosis(); - } - j++; + + while (generalArray.length < previousArray.length) { + generalArray.push(this.utils.initProvisionalDiagnosisList()); + } + for (let i = 0; i < previousArray.length; i++) { + generalArray.at(i).patchValue({ + viewProvisionalDiagnosisProvided: previousArray[i].term, + term: previousArray[i].term, + conceptID: previousArray[i].conceptID, + provisionalDiagnosis: previousArray[i].term, // <-- Add this line }); + generalArray.at(i).get('viewProvisionalDiagnosisProvided')?.disable(); } } diff --git a/src/app/app-modules/nurse-doctor/case-record/general-case-record/diagnosis/pnc-diagnosis/pnc-diagnosis.component.html b/src/app/app-modules/nurse-doctor/case-record/general-case-record/diagnosis/pnc-diagnosis/pnc-diagnosis.component.html index c9c7ccde..3e410ef1 100644 --- a/src/app/app-modules/nurse-doctor/case-record/general-case-record/diagnosis/pnc-diagnosis/pnc-diagnosis.component.html +++ b/src/app/app-modules/nurse-doctor/case-record/general-case-record/diagnosis/pnc-diagnosis/pnc-diagnosis.component.html @@ -7,49 +7,30 @@

    {{ current_language_set?.casesheet?.provisionalDiag }}

    + " + class="row m-t-20"> - +
    - {{ - current_language_set?.casesheet?.provisionalDiag - }} - + {{ current_language_set?.casesheet?.provisionalDiag }} + - - - - {{ diag.term }} - - Loading… - End of results - + + + + {{ diag.term }} + +
    -
    +

    i !== 0 || (i === 0 && (diagnosis.touched || - diagnosis.get('provisionalDiagnosis')?.disabled)) + diagnosis.get('viewProvisionalDiagnosisProvided')?.disabled)) " (click)="removeProvisionalDiagnosis(i, diagnosis)"> close @@ -87,7 +68,7 @@

    {{ current_language_set?.common?.confirmDiagnosis }}

    {{ current_language_set?.common?.confirmDiagnosis }}

    - {{ - current_language_set?.common?.confirmDiagnosis - }} - + {{ current_language_set?.common?.confirmDiagnosis }} + - - - + + + {{ diag.term }} - Loading… - End of results
    -
    +
    -
    +
    \ No newline at end of file diff --git a/src/app/app-modules/nurse-doctor/case-record/general-case-record/diagnosis/pnc-diagnosis/pnc-diagnosis.component.ts b/src/app/app-modules/nurse-doctor/case-record/general-case-record/diagnosis/pnc-diagnosis/pnc-diagnosis.component.ts index c7000255..fbb90572 100644 --- a/src/app/app-modules/nurse-doctor/case-record/general-case-record/diagnosis/pnc-diagnosis/pnc-diagnosis.component.ts +++ b/src/app/app-modules/nurse-doctor/case-record/general-case-record/diagnosis/pnc-diagnosis/pnc-diagnosis.component.ts @@ -92,15 +92,21 @@ export class PncDiagnosisComponent caseRecordMode!: string; current_language_set: any; - getProvisionalDiagnosisList(): AbstractControl[] | null { - const provisionalDiagnosisListControl = this.generalDiagnosisForm.get( - 'provisionalDiagnosisList' + suggestedDiagnosisList: any = []; + suggestedConfirmatoryDiagnosisList: any = []; + get provisionalDiagnosisControls(): AbstractControl[] { + return ( + (this.generalDiagnosisForm.get('provisionalDiagnosisList') as FormArray) + ?.controls || [] ); - return provisionalDiagnosisListControl instanceof FormArray - ? provisionalDiagnosisListControl.controls - : null; } + get confirmatoryDiagnosisControls(): AbstractControl[] { + return ( + (this.generalDiagnosisForm.get('confirmatoryDiagnosisList') as FormArray) + ?.controls || [] + ); + } getConfirmatoryDiagnosisList(): AbstractControl[] | null { const confirmatoryDiagnosisListControl = this.generalDiagnosisForm.get( 'confirmatoryDiagnosisList' @@ -251,14 +257,16 @@ export class PncDiagnosisComponent const provisionalDiagnosisList = this.generalDiagnosisForm.controls[ 'provisionalDiagnosisList' ] as FormArray; + for (let i = 0; i < provisionalDiagnosisDataList.length; i++) { provisionalDiagnosisList.at(i).patchValue({ provisionalDiagnosis: provisionalDiagnosisDataList[i].term, term: provisionalDiagnosisDataList[i].term, conceptID: provisionalDiagnosisDataList[i].conceptID, + viewProvisionalDiagnosisProvided: provisionalDiagnosisDataList[i].term, }); (provisionalDiagnosisList.at(i)).controls[ - 'provisionalDiagnosis' + 'viewProvisionalDiagnosisProvided' ].disable(); if (provisionalDiagnosisList.length < provisionalDiagnosisDataList.length) this.addProvisionalDiagnosis(); @@ -296,6 +304,7 @@ export class PncDiagnosisComponent get isMaternalDeath() { return this.generalDiagnosisForm.controls['isMaternalDeath'].value; } + addConfirmatoryDiagnosis() { const confirmatoryDiagnosisArrayList = this.generalDiagnosisForm.controls[ 'confirmatoryDiagnosisList' @@ -353,180 +362,65 @@ export class PncDiagnosisComponent return true; } } - - displayDiagnosis(diagnosis: any): string { - return typeof diagnosis === 'string' ? diagnosis : diagnosis?.term || ''; - } - - displayConfirmatoryDiagnosis(diagnosis: any): string { - return typeof diagnosis === 'string' ? diagnosis : diagnosis?.term || ''; - } - - // --- Shared scroll state for both provisional + confirmatory --- - private readonly PAGE_BASE = 0; - private readonly BOOTSTRAP_MAX_PAGES = 3; - - state: any = { - provisional: { - suggested: [] as any[][], - lastQueryByIndex: [] as string[], - pageByIndex: [] as number[], - loadingMore: [] as boolean[], - noMore: [] as boolean[], - wantMore: [] as boolean[], - }, - confirmatory: { - suggested: [] as any[][], - lastQueryByIndex: [] as string[], - pageByIndex: [] as number[], - loadingMore: [] as boolean[], - noMore: [] as boolean[], - wantMore: [] as boolean[], - }, - }; - - // --- Keyup handler (shared) --- - onDiagnosisInputKeyup( - type: 'provisional' | 'confirmatory', - value: string, - index: number - ) { - const term = (value || '').trim(); - const s = this.state[type]; - - if (term.length >= 3) { - if (s.lastQueryByIndex[index] !== term) { - s.lastQueryByIndex[index] = term; - s.pageByIndex[index] = 0; - s.noMore[index] = false; - s.wantMore[index] = false; - s.suggested[index] = []; - } - this.fetchPage(type, index, false); + onDiagnosisInputKeyup(value: string, index: number) { + if (value.length >= 3) { + this.masterdataService + .searchDiagnosisBasedOnPageNo(value, index) + .subscribe((results: any) => { + this.suggestedDiagnosisList[index] = results?.data?.sctMaster; + }); } else { - s.lastQueryByIndex[index] = ''; - s.pageByIndex[index] = 0; - s.noMore[index] = false; - s.wantMore[index] = false; - s.suggested[index] = []; + this.suggestedDiagnosisList[index] = []; } } - // --- When user picks an option --- - onDiagnosisSelected( - type: 'provisional' | 'confirmatory', - selected: any, - index: number - ) { - const controlName = - type === 'provisional' - ? 'provisionalDiagnosisList' - : 'confirmatoryDiagnosisList'; - const formArray = this.generalDiagnosisForm.get(controlName) as FormArray; - const fg = formArray.at(index) as FormGroup; - - fg.patchValue({ - [type === 'provisional' - ? 'viewProvisionalDiagnosisProvided' - : 'confirmatoryDiagnosis']: selected, - conceptID: selected?.conceptID ?? null, - term: selected?.term ?? null, - }); - } - - // --- Autocomplete scroll hooks --- - onPanelReady( - type: 'provisional' | 'confirmatory', - index: number, - panelEl: HTMLElement - ) { - const s = this.state[type]; - if (panelEl.scrollHeight <= panelEl.clientHeight && !s.noMore[index]) { - this.bootstrapUntilScrollable(type, index, panelEl); + onConfirmatoryDiagnosisInputKeyup(value: string, index: number) { + if (value.length >= 3) { + this.masterdataService + .searchDiagnosisBasedOnPageNo(value, index) + .subscribe((results: any) => { + this.suggestedConfirmatoryDiagnosisList[index] = + results?.data?.sctMaster; + }); + } else { + this.suggestedConfirmatoryDiagnosisList[index] = []; } } - onAutoNearEnd(type: 'provisional' | 'confirmatory', index: number) { - const s = this.state[type]; - if (!s.loadingMore[index] && !s.noMore[index]) { - this.fetchPage(type, index, true); - } else if (s.loadingMore[index]) { - s.wantMore[index] = true; - } + displayDiagnosis(diagnosis: any): string { + return typeof diagnosis === 'string' ? diagnosis : diagnosis?.term || ''; } - private bootstrapUntilScrollable( - type: 'provisional' | 'confirmatory', - rowIndex: number, - panelEl: HTMLElement - ) { - const s = this.state[type]; - let fetched = 0; - const tryFill = () => { - const scrollable = panelEl.scrollHeight > panelEl.clientHeight; - if ( - scrollable || - s.noMore[rowIndex] || - fetched >= this.BOOTSTRAP_MAX_PAGES - ) - return; - if (s.loadingMore[rowIndex]) { - requestAnimationFrame(tryFill); - return; - } - fetched++; - this.fetchPage(type, rowIndex, true); - requestAnimationFrame(tryFill); - }; - if (s.lastQueryByIndex[rowIndex]?.length >= 3) tryFill(); + displayConfirmatoryDiagnosis(diagnosis: any): string { + return typeof diagnosis === 'string' ? diagnosis : diagnosis?.term || ''; } - private fetchPage( - type: 'provisional' | 'confirmatory', - index: number, - append = false - ) { - const s = this.state[type]; - const term = s.lastQueryByIndex[index]; - if (!term) return; - - const nextLogical = (s.pageByIndex[index] ?? 0) + (append ? 1 : 0); - const pageAtReq = nextLogical + this.PAGE_BASE; - if (s.loadingMore[index]) return; - s.loadingMore[index] = true; - - this.masterdataService - .searchDiagnosisBasedOnPageNo(term, pageAtReq) - .subscribe({ - next: (results: any) => { - if (s.lastQueryByIndex[index] !== term) return; - const list = results?.data?.sctMaster ?? []; - - if (append) { - const existing = new Set( - (s.suggested[index] ?? []).map( - (d: any) => d.id ?? d.code ?? d.term - ) - ); - s.suggested[index] = [ - ...(s.suggested[index] ?? []), - ...list.filter( - (d: any) => !existing.has(d.id ?? d.code ?? d.term) - ), - ]; - } else { - s.suggested[index] = list; - } + onDiagnosisSelected(selected: any, index: number) { + const diagnosisFormArray = this.generalDiagnosisForm.get( + 'provisionalDiagnosisList' + ) as FormArray; + const diagnosisFormGroup = diagnosisFormArray.at(index) as FormGroup; + + // Set the nested and top-level fields + diagnosisFormGroup.patchValue({ + provisionalDiagnosis: selected?.term || null, + viewProvisionalDiagnosisProvided: selected, + conceptID: selected?.conceptID || null, + term: selected?.term || null, + }); + } - s.pageByIndex[index] = nextLogical; - if (!list.length) s.noMore[index] = true; - }, - complete: () => { - const wantChain = s.wantMore[index] && !s.noMore[index]; - s.loadingMore[index] = false; - s.wantMore[index] = false; - if (wantChain) this.fetchPage(type, index, true); - }, - }); + onConfirmatoryDiagnosisSelected(selected: any, index: number) { + const diagnosisFormArray = this.generalDiagnosisForm.get( + 'confirmatoryDiagnosisList' + ) as FormArray; + const diagnosisFormGroup = diagnosisFormArray.at(index) as FormGroup; + + // Set the nested and top-level fields + diagnosisFormGroup.patchValue({ + ConfirmatoryDiagnosisProvided: selected, + conceptID: selected?.conceptID || null, + term: selected?.term || null, + }); } } diff --git a/src/app/app-modules/nurse-doctor/case-record/general-case-record/prescription/prescription.component.html b/src/app/app-modules/nurse-doctor/case-record/general-case-record/prescription/prescription.component.html index 01229058..9961dd8b 100644 --- a/src/app/app-modules/nurse-doctor/case-record/general-case-record/prescription/prescription.component.html +++ b/src/app/app-modules/nurse-doctor/case-record/general-case-record/prescription/prescription.component.html @@ -68,7 +68,6 @@ (keyup)="filterMedicine(tempDrugName)" (blur)="reEnterMedicine()" (focus)="trackFieldInteraction('Medicine')" - required [matAutocomplete]="autoGroup" /> + > @@ -113,7 +112,7 @@ [(ngModel)]="currentPrescription.frequency" [disabled]="!currentPrescription.drugID" (focus)="trackFieldInteraction('Frequency')" - required> + > @@ -136,7 +135,7 @@ [(ngModel)]="currentPrescription.duration" [disabled]="!currentPrescription.drugID" (focus)="trackFieldInteraction('Duration')" - required> + > {{ item }} @@ -154,7 +153,7 @@ [disabled]="!currentPrescription.drugID" (selectionChange)="trackFieldInteraction('Unit Selection')" - required> + > @@ -164,9 +163,8 @@ -
    + > diff --git a/src/app/app-modules/nurse-doctor/case-record/general-case-record/test-and-radiology/test-and-radiology.component.html b/src/app/app-modules/nurse-doctor/case-record/general-case-record/test-and-radiology/test-and-radiology.component.html index b8898211..8179a500 100644 --- a/src/app/app-modules/nurse-doctor/case-record/general-case-record/test-and-radiology/test-and-radiology.component.html +++ b/src/app/app-modules/nurse-doctor/case-record/general-case-record/test-and-radiology/test-and-radiology.component.html @@ -55,18 +55,10 @@ {{ current_language_set?.labTechnicianData?.componentName }} - - + +
    {{ component?.componentName }} - +
    @@ -77,9 +69,9 @@ mat-cell *matCellDef="let element" style="width: 110px; word-break: normal; vertical-align: middle"> - - {{ component?.testResultValue }} - +
    + {{ component.testResultValue }} +
    @@ -90,9 +82,9 @@ mat-cell *matCellDef="let element" style="width: 150px; word-break: normal; vertical-align: middle"> - +
    {{ component?.testResultUnit }} - +
    @@ -107,9 +99,9 @@ word-break: normal; vertical-align: middle; "> - +
    {{ component?.remarks }} - +
    diff --git a/src/app/app-modules/nurse-doctor/case-sheet/general-case-sheet/doctor-diagnosis-case-sheet/doctor-diagnosis-case-sheet.component.html b/src/app/app-modules/nurse-doctor/case-sheet/general-case-sheet/doctor-diagnosis-case-sheet/doctor-diagnosis-case-sheet.component.html index b5776ada..2a4993c1 100644 --- a/src/app/app-modules/nurse-doctor/case-sheet/general-case-sheet/doctor-diagnosis-case-sheet/doctor-diagnosis-case-sheet.component.html +++ b/src/app/app-modules/nurse-doctor/case-sheet/general-case-sheet/doctor-diagnosis-case-sheet/doctor-diagnosis-case-sheet.component.html @@ -1439,7 +1439,7 @@

    -
    +
     

    diff --git a/src/app/app-modules/nurse-doctor/case-sheet/general-case-sheet/doctor-diagnosis-case-sheet/doctor-diagnosis-case-sheet.component.ts b/src/app/app-modules/nurse-doctor/case-sheet/general-case-sheet/doctor-diagnosis-case-sheet/doctor-diagnosis-case-sheet.component.ts index 263a79ce..c4c66b5c 100644 --- a/src/app/app-modules/nurse-doctor/case-sheet/general-case-sheet/doctor-diagnosis-case-sheet/doctor-diagnosis-case-sheet.component.ts +++ b/src/app/app-modules/nurse-doctor/case-sheet/general-case-sheet/doctor-diagnosis-case-sheet/doctor-diagnosis-case-sheet.component.ts @@ -30,6 +30,8 @@ import { import { HttpServiceService } from 'src/app/app-modules/core/services/http-service.service'; import * as moment from 'moment'; import { SessionStorageService } from 'Common-UI/src/registrar/services/session-storage.service'; +import { get } from 'jquery'; +import { map, Observable } from 'rxjs'; @Component({ selector: 'app-doctor-diagnosis-case-sheet', @@ -55,20 +57,20 @@ export class DoctorDiagnosisCaseSheetComponent caseRecords: any; ancDetails: any; symptomsList: any = []; - symptomFlag: boolean = false; + symptomFlag = false; contactList: any = []; - contactFlag: boolean = false; + contactFlag = false; travelStatus: any; - travelFlag: boolean = false; - suspectedFlag: boolean = false; + travelFlag = false; + suspectedFlag = false; suspected: any; - recFlag: boolean = false; + recFlag = false; recommendation: any = []; temp: any = []; recommendationText!: string; tempComp!: string; indexComplication!: number; - tempComplication: boolean = false; + tempComplication = false; newComp!: string; idrsDetailsHistory: any = []; suspect: any = []; @@ -77,14 +79,14 @@ export class DoctorDiagnosisCaseSheetComponent severityValue: any; cough_pattern_Value: any; - enableResult: boolean = false; + enableResult = false; severity: any; cough_pattern: any; cough_severity_score: any; record_duration: any; idrsScore: any; - enableTCReferredMMUData: boolean = false; + enableTCReferredMMUData = false; showHRP!: string; tmCaseSheet: any; imgUrl!: string | ArrayBuffer; @@ -99,8 +101,9 @@ export class DoctorDiagnosisCaseSheetComponent serviceList = ''; referralReasonList = ''; MMUReferDetails: any; - mmuServiceList: string = ''; + mmuServiceList = ''; isCovidVaccinationStatusVisible = false; + userName: any; constructor( private doctorService: DoctorService, @@ -178,6 +181,7 @@ export class DoctorDiagnosisCaseSheetComponent .filter((name: any) => name !== null && name !== '') .join(','); } + this.userName = this.MMUcaseRecords?.diagnosis?.createdBy; } if (this.mmuCaseSheetData?.doctorData) { @@ -201,6 +205,8 @@ export class DoctorDiagnosisCaseSheetComponent ngOnChanges() { this.ncdScreeningCondition = null; if (this.caseSheetData) { + this.userName = this.caseSheetData?.doctorData?.diagnosis?.createdBy; + const temp2 = this.caseSheetData.nurseData.covidDetails; const t = new Date(); this.date = @@ -423,26 +429,26 @@ export class DoctorDiagnosisCaseSheetComponent ].join('/'); } - this.downloadSign(); + if (this.caseSheetData?.BeneficiaryData?.doctorSignatureFlag) { + this.downloadSign(); + } this.getVaccinationTypeAndDoseMaster(); } } downloadSign() { - if (this.beneficiaryDetails?.tCSpecialistUserID) { - const tCSpecialistUserID = this.beneficiaryDetails.tCSpecialistUserID; - this.doctorService.downloadSign(tCSpecialistUserID).subscribe( + this.getUserId().subscribe(userId => { + const userIdToUse = this.beneficiaryDetails?.tCSpecialistUserID ?? userId; + this.doctorService.downloadSign(userIdToUse).subscribe( (response: any) => { const blob = new Blob([response], { type: response.type }); this.showSign(blob); }, (err: any) => { - console.log('error'); + console.error('Error downloading signature:', err); } ); - } else { - console.log('No tCSpecialistUserID found'); - } + }); } showSign(blob: any) { const reader = new FileReader(); @@ -571,4 +577,10 @@ export class DoctorDiagnosisCaseSheetComponent } }); } + + getUserId(): Observable { + return this.doctorService + .getUserId(this.userName) + .pipe(map((res: any) => res?.userId || null)); + } } diff --git a/src/app/app-modules/nurse-doctor/doctor-worklist/doctor-worklist.component.html b/src/app/app-modules/nurse-doctor/doctor-worklist/doctor-worklist.component.html index 2561d7c1..0a211fb5 100644 --- a/src/app/app-modules/nurse-doctor/doctor-worklist/doctor-worklist.component.html +++ b/src/app/app-modules/nurse-doctor/doctor-worklist/doctor-worklist.component.html @@ -10,7 +10,7 @@ name="filterTerm" [(ngModel)]="filterTerm" (keyup)="filterBeneficiaryList(filterTerm)" /> -

    diff --git a/src/app/app-modules/nurse-doctor/doctor-worklist/doctor-worklist.component.ts b/src/app/app-modules/nurse-doctor/doctor-worklist/doctor-worklist.component.ts index 46ccef3e..46c673ea 100644 --- a/src/app/app-modules/nurse-doctor/doctor-worklist/doctor-worklist.component.ts +++ b/src/app/app-modules/nurse-doctor/doctor-worklist/doctor-worklist.component.ts @@ -144,6 +144,9 @@ export class DoctorWorklistComponent implements OnInit, OnDestroy, DoCheck { } else this.confirmationService.alert(data.errorMessage, 'error'); }, err => { + if (err?.handled) { + return; + } this.confirmationService.alert(err, 'error'); } ); @@ -296,6 +299,7 @@ export class DoctorWorklistComponent implements OnInit, OnDestroy, DoCheck { this.sessionstorage.setItem('doctorFlag', beneficiary.doctorFlag); this.sessionstorage.setItem('nurseFlag', beneficiary.nurseFlag); this.sessionstorage.setItem('pharmacist_flag', beneficiary.pharmacist_flag); + this.sessionstorage.setItem('phnum', beneficiary.preferredPhoneNum); return true; } diff --git a/src/app/app-modules/nurse-doctor/examination/cancer-examination/cancer-examination.component.html b/src/app/app-modules/nurse-doctor/examination/cancer-examination/cancer-examination.component.html index 92410948..380e00c7 100644 --- a/src/app/app-modules/nurse-doctor/examination/cancer-examination/cancer-examination.component.html +++ b/src/app/app-modules/nurse-doctor/examination/cancer-examination/cancer-examination.component.html @@ -59,6 +59,7 @@
    diff --git a/src/app/app-modules/nurse-doctor/examination/cancer-examination/cancer-examination.component.ts b/src/app/app-modules/nurse-doctor/examination/cancer-examination/cancer-examination.component.ts index cbd2a029..f749f69b 100644 --- a/src/app/app-modules/nurse-doctor/examination/cancer-examination/cancer-examination.component.ts +++ b/src/app/app-modules/nurse-doctor/examination/cancer-examination/cancer-examination.component.ts @@ -63,7 +63,7 @@ export class CancerExaminationComponent constructor( private httpServiceService: HttpServiceService, - private doctorService: DoctorService, + public doctorService: DoctorService, private confirmationService: ConfirmationService, readonly sessionstorage: SessionStorageService, private beneficiaryDetailsService: BeneficiaryDetailsService @@ -206,6 +206,42 @@ export class CancerExaminationComponent return image; } + getMergedLymphNodeValues(apiNodes: any[]): any[] { + const serviceLineDetailsParsed = JSON.parse( + this.sessionstorage.getItem('serviceLineDetails') + ); + const lymphNodesArray = (( + (this.cancerForm.controls['signsForm']).controls['lymphNodes'] + )).controls; + + return lymphNodesArray.map(baseNode => { + const matches = apiNodes.filter( + apiNode => + apiNode.lymphNodeName.trim().toLowerCase() === + baseNode.value.lymphNodeName.trim().toLowerCase() + ); + + const valid = matches.find( + node => + node.size_Left !== null || + node.size_Right !== null || + node.mobility_Left !== null || + node.mobility_Right !== null + ); + + return { + lymphNodeName: baseNode.value.lymphNodeName, + size_Left: valid?.size_Left ?? null, + mobility_Left: valid?.mobility_Left ?? null, + size_Right: valid?.size_Right ?? null, + mobility_Right: valid?.mobility_Right ?? null, + vanID: valid?.vanID ?? serviceLineDetailsParsed.vanID, + parkingPlaceID: + valid?.parkingPlaceID ?? serviceLineDetailsParsed.parkingPlaceID, + }; + }); + } + patchExaminationDetails(examinationDetails: any) { if (examinationDetails.signsAndSymptoms) { const signFormDetails = Object.assign( @@ -218,10 +254,15 @@ export class CancerExaminationComponent 'lymphNodes' ] )).controls; + console.log(' signFormDetails.lymphNodes.slice()'); - const lymphNodes = signFormDetails.lymphNodes.slice(); + // const lymphNodes = signFormDetails.lymphNodes.slice(); + const lymphNodes = this.getMergedLymphNodeValues( + examinationDetails.BenCancerLymphNodeDetails + ); delete signFormDetails.lymphNodes; this.cancerForm.controls['signsForm'].patchValue(signFormDetails); + console.log('lymphNodes from res', lymphNodes); lymphNodes.forEach((element: any) => { const temp = lymphNodesFormArray.filter((lymphForm: any) => { @@ -305,6 +346,8 @@ export class CancerExaminationComponent } if (examinationDetails.gynecologicalExamination) { + this.doctorService.gynecologicalFiles = + examinationDetails.gynecologicalExamination.files; const image = this.filterAnnotatedImageList( examinationDetails.imageCoordinates, 4 diff --git a/src/app/app-modules/nurse-doctor/examination/cancer-examination/gynecological-examination/gynecological-examination.component.css b/src/app/app-modules/nurse-doctor/examination/cancer-examination/gynecological-examination/gynecological-examination.component.css index 9e121455..fdc07366 100644 --- a/src/app/app-modules/nurse-doctor/examination/cancer-examination/gynecological-examination/gynecological-examination.component.css +++ b/src/app/app-modules/nurse-doctor/examination/cancer-examination/gynecological-examination/gynecological-examination.component.css @@ -28,5 +28,18 @@ img { height: 60px; } .cell_postion{ - padding-top: 8px !important; + padding-top: 10px !important; +} +.chipEdit{ + background-color: #99cc00; +} +.span-style { + visibility: hidden; + position: absolute; + overflow: hidden; + width: 0px; + height:0px; + border:none; + margin:0; + padding:0; } \ No newline at end of file diff --git a/src/app/app-modules/nurse-doctor/examination/cancer-examination/gynecological-examination/gynecological-examination.component.html b/src/app/app-modules/nurse-doctor/examination/cancer-examination/gynecological-examination/gynecological-examination.component.html index fec5750f..b66301c2 100644 --- a/src/app/app-modules/nurse-doctor/examination/cancer-examination/gynecological-examination/gynecological-examination.component.html +++ b/src/app/app-modules/nurse-doctor/examination/cancer-examination/gynecological-examination/gynecological-examination.component.html @@ -1,7 +1,7 @@
    -
    +
    {{ currentLanguageSet?.ExaminationData?.cancerScreeningExamination ?.gynecological?.appearanceunderAceticAcid @@ -21,7 +21,7 @@
    -
    +
    {{ currentLanguageSet?.ExaminationData?.cancerScreeningExamination ?.gynecological?.typeoflesion @@ -149,7 +149,7 @@
    {{ currentLanguageSet?.ExaminationData?.cancerScreeningExamination @@ -178,18 +178,65 @@
    -
    +
    + +
    +
    + + + (change)="uploadFile($event)" + /> + + +
    +
    + +
    +
    + +
    +
    + + + {{ file.fileName }} + cancel + + +
    +
    +
    + + +
    diff --git a/src/app/app-modules/nurse-doctor/examination/cancer-examination/gynecological-examination/gynecological-examination.component.ts b/src/app/app-modules/nurse-doctor/examination/cancer-examination/gynecological-examination/gynecological-examination.component.ts index ebb22ba7..1060d88e 100644 --- a/src/app/app-modules/nurse-doctor/examination/cancer-examination/gynecological-examination/gynecological-examination.component.ts +++ b/src/app/app-modules/nurse-doctor/examination/cancer-examination/gynecological-examination/gynecological-examination.component.ts @@ -27,11 +27,18 @@ import { ViewChild, ElementRef, DoCheck, + EventEmitter, } from '@angular/core'; -import { FormGroup } from '@angular/forms'; +import { FormBuilder, FormControl, FormGroup } from '@angular/forms'; import { CameraService } from '../../../../core/services/camera.service'; import { HttpServiceService } from 'src/app/app-modules/core/services/http-service.service'; import { SetLanguageComponent } from 'src/app/app-modules/core/components/set-language.component'; +import { DoctorService, NurseService } from '../../../shared/services'; +import { LabService } from 'src/app/app-modules/lab/shared/services'; +import { ConfirmationService } from 'src/app/app-modules/core/services'; +import { SessionStorageService } from 'Common-UI/src/registrar/services/session-storage.service'; +import { ViewRadiologyUploadedFilesComponent } from 'src/app/app-modules/core/components/view-radiology-uploaded-files/view-radiology-uploaded-files.component'; +import { MatDialog } from '@angular/material/dialog'; @Component({ selector: 'app-doctor-gynecological-examination', @@ -42,14 +49,34 @@ export class GynecologicalExaminationComponent implements OnInit, DoCheck { @Input() gynecologicalExaminationForm!: FormGroup; + @Input() + patientFileUploadDetailsForm!: FormGroup; + @Input() + viewFiles: any[] = []; + @ViewChild('gynaecologicalImage') private gynaecologicalImage!: ElementRef; imagePoints: any; currentLanguageSet: any; + uploadedFiles: File[] = []; + fileDataChange: any = new EventEmitter(); + fileObj: any = []; + savedFileData: any = []; + fileIDs: any = []; + fileList!: FileList; + fileData: any[] = []; + constructor( private cameraService: CameraService, - public httpServiceService: HttpServiceService + public httpServiceService: HttpServiceService, + private fb: FormBuilder, + private nurseService: NurseService, + private labService: LabService, + private confirmationService: ConfirmationService, + readonly sessionstorage: SessionStorageService, + private doctorService: DoctorService, + private dialog: MatDialog ) {} ngOnInit() { @@ -77,19 +104,149 @@ export class GynecologicalExaminationComponent implements OnInit, DoCheck { return this.gynecologicalExaminationForm.get('observation'); } - selectedFiles(event: any) { - const filesObject = event.target.files; - const fileList = []; + uploadFile(event: any) { + this.fileList = event.target.files; + if (this.fileList.length > 0) { + this.file = this.fileList[0]; - for (const file of filesObject) { - fileList.push(file); + const fileNameExtension = this.file.name.split('.'); + const fileName = fileNameExtension[0]; + if (fileName !== undefined && fileName !== null && fileName !== '') { + const validFormat = this.checkExtension(this.file); + if (!validFormat) { + this.confirmationService.alert( + this.currentLanguageSet.invalidFileExtensionSupportedFileFormats, + 'error' + ); + } else { + if (this.fileList[0].size / 1000 / 1000 > this.maxFileSize) { + this.confirmationService.alert( + this.currentLanguageSet.fileSizeShouldNotExceed + + ' ' + + this.maxFileSize + + ' ' + + this.currentLanguageSet.mb, + 'error' + ); + } else if (this.file) { + const reader = new FileReader(); + reader.onloadend = () => { + const fileContent = reader.result as string; + const fileObj = { + fileName: this.file?.name, + fileExtension: '.' + this.file?.name.split('.').pop(), + fileContent: fileContent.split(',')[1], + isUploaded: false, + }; + this.fileData.push(fileObj); + this.fileDataChange.emit(this.fileData); // emit change + }; + reader.readAsDataURL(this.file); + } + } + } else + this.confirmationService.alert( + this.currentLanguageSet.invalidFileName, + 'error' + ); } + } - this.gynecologicalExaminationForm.patchValue({ - filePath: fileList, - }); + checkForDuplicateUpload() { + if (this.fileData !== undefined) { + if (this.savedFileData !== undefined) { + if (this.fileData.length > this.savedFileData.length) { + const result = this.fileData.filter((uniqueFileName: any) => { + const arrNames = this.savedFileData.filter((savedFileName: any) => { + if (uniqueFileName.isUploaded === savedFileName.isUploaded) { + return true; + } else { + return false; + } + }); + if (arrNames.length === 0) { + return true; + } else { + return false; + } + }); + if (result && result.length > 0) { + this.fileObj = result; + + this.saveUploadDetails(result); + } else { + this.confirmationService.alert( + this.currentLanguageSet.alerts.info.pleaseselectfiletoupload, + 'info' + ); + } + } else { + this.confirmationService.alert( + this.currentLanguageSet.alerts.info.pleaseselectfiletoupload, + 'info' + ); + } + } else { + this.saveUploadDetails(this.fileObj); + } + } else { + this.confirmationService.alert( + this.currentLanguageSet.alerts.info.pleaseselectfiletoupload, + 'info' + ); + } } + saveUploadDetails(fileObj: any) { + this.labService.saveFile(fileObj).subscribe( + (res: any) => { + if (res.statusCode === 200) { + res.data.forEach((file: any) => { + this.savedFileData.push(file); + this.fileIDs.push(file.filePath); + + this.gynecologicalExaminationForm.markAsDirty(); + this.gynecologicalExaminationForm.updateValueAndValidity(); + this.confirmationService.alert( + 'File Uploaded successfully', + 'success' + ); + }); + this.fileObj.map((file: any) => { + file.isUploaded = true; + }); + this.savedFileData.map((file: any) => { + file.isUploaded = true; + }); + } + }, + err => { + this.confirmationService.alert(err.errorMessage, 'err'); + } + ); + if (this.viewFiles && this.viewFiles.length > 0) { + this.viewFiles.forEach((file: any) => { + this.fileIDs.push(file.filePath); + }); + } + + if (this.fileIDs !== null) { + this.gynecologicalExaminationForm.patchValue({ + fileIDs: this.fileIDs, + }); + } else { + this.gynecologicalExaminationForm.patchValue({ + fileIDs: [], + }); + } + + this.nurseService.fileData = null; + } + + onLoadFileCallback = (event: any) => { + const fileContent = event.currentTarget.result; + }; + annotateImage() { this.cameraService .annotate( @@ -108,4 +265,63 @@ export class GynecologicalExaminationComponent implements OnInit, DoCheck { } }); } + + maxFileSize = 5; // MB + file: File | undefined; + + removeFile(index: number): void { + this.fileData.splice(index, 1); + this.updateFormFileIDs(); + } + + updateFormFileIDs(): void { + const fileNames = this.fileData.map(f => f.name); // or server-generated IDs + this.gynecologicalExaminationForm.patchValue({ fileIDs: fileNames }); + } + + checkExtension(file: File): boolean { + const allowedExtensions = ['pdf', 'docx', 'jpg', 'png']; // add your valid extensions + const extension = file.name.split('.').pop()?.toLowerCase(); + return allowedExtensions.includes(extension || ''); + } + + showError(message: string): void { + this.confirmationService.alert(message, 'error'); + } + + triggerLog(event: any) { + if (event.clientX !== 0) { + const x = document.getElementById('files'); + x?.click(); + } + } + + viewNurseSelectedFiles() { + const ViewTestReport = this.dialog.open( + ViewRadiologyUploadedFilesComponent, + { + width: '40%', + data: { + filesDetails: this.viewFiles, + // width: 0.8 * window.innerWidth + "px", + panelClass: 'dialog-width', + disableClose: false, + }, + } + ); + ViewTestReport.afterClosed().subscribe(result => { + if (result) { + this.labService.viewFileContent(result).subscribe((res: any) => { + const blob = new Blob([res], { type: res.type }); + const url = window.URL.createObjectURL(blob); + const a = document.createElement('a'); + a.href = url; + a.download = result.fileName; + document.body.appendChild(a); + a.click(); + document.body.removeChild(a); + }); + } + }); + } } diff --git a/src/app/app-modules/nurse-doctor/examination/cancer-examination/signs-and-symptoms/signs-and-symptoms.component.html b/src/app/app-modules/nurse-doctor/examination/cancer-examination/signs-and-symptoms/signs-and-symptoms.component.html index 83b3eb27..ae589d6b 100644 --- a/src/app/app-modules/nurse-doctor/examination/cancer-examination/signs-and-symptoms/signs-and-symptoms.component.html +++ b/src/app/app-modules/nurse-doctor/examination/cancer-examination/signs-and-symptoms/signs-and-symptoms.component.html @@ -254,16 +254,17 @@
    -
    +
    {{ currentLanguageSet?.ExaminationData?.cancerScreeningExamination?.symptoms ?.breastEnlargement }}
    -
    +
    + formControlName="breastEnlargement" + > {{ currentLanguageSet?.common?.yes }} @@ -358,13 +359,15 @@ {{ currentLanguageSet?.common?.left }} - - < 3 - 3-6 cm + + + < 3 + 3-6 cm 6 cm + @@ -380,12 +383,14 @@ }} - + + - + @@ -401,7 +406,9 @@ }} - {{ element.value.lymphNodeName }} + + {{ element.value.lymphNodeName }} + @@ -417,12 +424,14 @@ }} - - + - - + + + + + - + @@ -435,13 +444,15 @@ {{ currentLanguageSet?.common?.right }} - - < 3 - 3-6 cm - 6 cm - + + + < 3 + 3-6 cm + 6 cm + + diff --git a/src/app/app-modules/nurse-doctor/examination/cancer-examination/signs-and-symptoms/signs-and-symptoms.component.ts b/src/app/app-modules/nurse-doctor/examination/cancer-examination/signs-and-symptoms/signs-and-symptoms.component.ts index b99765c8..904eaa09 100644 --- a/src/app/app-modules/nurse-doctor/examination/cancer-examination/signs-and-symptoms/signs-and-symptoms.component.ts +++ b/src/app/app-modules/nurse-doctor/examination/cancer-examination/signs-and-symptoms/signs-and-symptoms.component.ts @@ -78,6 +78,7 @@ export class SignsAndSymptomsComponent implements OnInit, DoCheck, OnDestroy { ngOnInit() { this.getBeneficiaryDetails(); this.fetchLanguageResponse(); + this.checkLymph(this.lymphNode_Enlarged); } ngOnDestroy() { @@ -85,7 +86,6 @@ export class SignsAndSymptomsComponent implements OnInit, DoCheck, OnDestroy { } getLymphNodes(): AbstractControl[] | null { - console.log('getLymnNodes', this.signsForm); const lymphNodesControl = this.signsForm.get('lymphNodes'); return lymphNodesControl instanceof FormArray ? lymphNodesControl.controls diff --git a/src/app/app-modules/nurse-doctor/history/general-opd-history/personal-history/personal-history.component.ts b/src/app/app-modules/nurse-doctor/history/general-opd-history/personal-history/personal-history.component.ts index b28a601e..bc5b003d 100644 --- a/src/app/app-modules/nurse-doctor/history/general-opd-history/personal-history/personal-history.component.ts +++ b/src/app/app-modules/nurse-doctor/history/general-opd-history/personal-history/personal-history.component.ts @@ -78,8 +78,8 @@ export class GeneralPersonalHistoryComponent alcoholMasterData: any; previousSelectedAlcoholList: any = []; alcoholSelectList: any = []; - componentFlag: boolean = false; - enableAlert: boolean = true; + componentFlag = false; + enableAlert = true; allergyMasterData = [ { @@ -100,7 +100,7 @@ export class GeneralPersonalHistoryComponent snomedTerm: any; snomedCode: any; selectedSnomedTerm: any; - countForSearch: number = -1; + countForSearch = -1; currentLanguageSet: any; constructor( @@ -200,6 +200,15 @@ export class GeneralPersonalHistoryComponent history.data.PersonalHistory ) { this.personalHistoryData = history.data.PersonalHistory; + if ( + this.personalHistoryData && + this.personalHistoryData.riskySexualPracticesStatus !== null + ) { + this.personalHistoryData.riskySexualPracticesStatus = + this.personalHistoryData.riskySexualPracticesStatus == '1' + ? true + : false; + } this.generalPersonalHistoryForm.patchValue(this.personalHistoryData); this.handlePersonalTobaccoHistoryData(); this.handlePersonalAlcoholHistoryData(); @@ -252,9 +261,7 @@ export class GeneralPersonalHistoryComponent this.allerySelectList.push(resultAllergy.slice()); } - allergicList.push(this.initAllergyList()); - if ( this.personalHistoryData !== null && this.personalHistoryData !== undefined @@ -311,6 +318,7 @@ export class GeneralPersonalHistoryComponent ); this.alcoholSelectList.push(resultAlcohol.slice()); } + alcoholList.push(this.initAlcoholList()); if ( @@ -325,12 +333,23 @@ export class GeneralPersonalHistoryComponent const formArray = this.generalPersonalHistoryForm.controls[ 'tobaccoList' ] as FormArray; + if (this.personalHistoryData && this.personalHistoryData.tobaccoList) { const temp = this.personalHistoryData.tobaccoList.slice(); + // Ensure form array length matches data + while (formArray.length < temp.length) { + formArray.push(this.initTobaccoList()); + } + while (formArray.length > temp.length) { + formArray.removeAt(formArray.length - 1); + } for (let i = 0; i < temp.length; i++) { const tobaccoType = this.tobaccoMasterData.filter((item: any) => { - return item.habitValue === temp[i].tobaccoUseType; + return typeof temp[i].tobaccoUseType === 'string' + ? item.habitValue === temp[i].tobaccoUseType + : item.personalHabitTypeID === + temp[i].tobaccoUseType.personalHabitTypeID; }); if (tobaccoType.length > 0) { @@ -350,26 +369,32 @@ export class GeneralPersonalHistoryComponent } } - if (temp[i].tobaccoUseType) { - const k: any = formArray.get('' + i); + const k: any = formArray.get('' + i); + k.reset(); + k?.get('number')?.disable(); + k?.get('perDay')?.disable(); + k?.get('duration')?.disable(); + k?.get('durationUnit')?.disable(); + k?.markAsUntouched(); + if (k) { k.patchValue(temp[i]); k.markAsDirty(); k.markAsTouched(); this.filterTobaccoList(temp[i].tobaccoUseType, i); + if ( k?.get('number')?.value !== null && k?.get('perDay')?.value !== null && k?.get('duration')?.value !== null && k?.get('durationUnit')?.value !== null ) { - k?.get('number')?.enable(); - k?.get('perDay')?.enable(); - k?.get('duration')?.enable(); - k?.get('durationUnit')?.enable(); + k.get('number')?.enable(); + k.get('perDay')?.enable(); + k.get('duration')?.enable(); + k.get('durationUnit')?.enable(); } } - - if (i + 1 < temp.length) this.addTobacco(); + if (i + 1 < temp.length) this.addTobacco(true); } } } @@ -381,6 +406,14 @@ export class GeneralPersonalHistoryComponent if (this.personalHistoryData && this.personalHistoryData.alcoholList) { const temp = this.personalHistoryData.alcoholList.slice(); + while (formArray.length < temp.length) { + formArray.push(this.initAlcoholList()); + } + // Optionally, remove extra FormGroups if any + while (formArray.length > temp.length) { + formArray.removeAt(formArray.length - 1); + } + for (let i = 0; i < temp.length; i++) { const alcoholType = this.alcoholMasterData.filter((item: any) => { return item.habitValue === temp[i].alcoholType; @@ -414,7 +447,7 @@ export class GeneralPersonalHistoryComponent } } - if (i + 1 < temp.length) this.addAlcohol(); + if (i + 1 < temp.length) this.addAlcohol(true); } } } @@ -423,9 +456,21 @@ export class GeneralPersonalHistoryComponent const formArray = this.generalPersonalHistoryForm.controls[ 'allergicList' ] as FormArray; + if (this.personalHistoryData && this.personalHistoryData.allergicList) { const temp = this.personalHistoryData.allergicList.slice(); + while (formArray.length > 0) { + formArray.removeAt(0); + } + + for (let i = 0; i < temp.length; i++) { + formArray.push(this.initAllergyList()); + } + + this.allerySelectList = []; + this.previousSelectedAlleryList = []; + for (let i = 0; i < temp.length; i++) { const allergyType = this.allergyMasterData.filter(item => { return item.allergyType === temp[i].allergyType; @@ -444,19 +489,35 @@ export class GeneralPersonalHistoryComponent if (temp[i].otherAllergicReaction) temp[i].enableOtherAllergy = true; + const selectedAllergies = temp + .filter((t: any, idx: any) => idx !== i && t.allergyType) + .map((t: any) => t.allergyType.allergyType); + + const availableAllergies = this.allergyMasterData.filter( + item => !selectedAllergies.includes(item.allergyType) + ); + + this.allerySelectList.push(availableAllergies.slice()); + if (temp[i].allergyType) { - const k: any = formArray.get('' + i); + this.previousSelectedAlleryList[i] = temp[i].allergyType; + } + + const k: any = formArray.get('' + i); + if (k) { k.patchValue(temp[i]); k.markAsTouched(); - this.filterAlleryList(temp[i].allergyType, i); - } - if (i + 1 < temp.length) this.addAllergy(); + if (temp[i].allergyType) { + k.get('snomedTerm')?.enable(); + k.get('typeOfAllergicReactions')?.enable(); + } + } } } } - addTobacco() { + addTobacco(avoidNullValue?: boolean) { const tobaccoList = ( this.generalPersonalHistoryForm.controls['tobaccoList'] ); @@ -474,7 +535,9 @@ export class GeneralPersonalHistoryComponent }); this.tobaccoSelectList.push(result.slice()); } - tobaccoList.push(this.initTobaccoList()); + if (!avoidNullValue) { + tobaccoList.push(this.initTobaccoList()); + } } filterTobaccoList( @@ -496,13 +559,12 @@ export class GeneralPersonalHistoryComponent } }); } - this.tobaccoSelectList.map((item: any, t: any) => { const index = item.indexOf(tobacco); - if (index !== -1 && t !== i && tobacco.tobaccoUseType !== 'Other') + if (index !== -1 && t !== i && tobacco.tobaccoUseType !== 'Other') { item = item.splice(index, 1); + } }); - this.previousSelectedTobaccoList[i] = tobacco; //To disable the fields if (tobaccoForm?.value?.tobaccoUseType) { @@ -555,7 +617,7 @@ export class GeneralPersonalHistoryComponent this.generalPersonalHistoryForm.markAsDirty(); } - addAlcohol() { + addAlcohol(avoidNullValue?: boolean) { const alcoholList = ( this.generalPersonalHistoryForm.controls['alcoholList'] ); @@ -572,7 +634,9 @@ export class GeneralPersonalHistoryComponent }); this.alcoholSelectList.push(result.slice()); } - alcoholList.push(this.initAlcoholList()); + if (!avoidNullValue) { + alcoholList.push(this.initAlcoholList()); + } } filterAlcoholList( @@ -651,7 +715,7 @@ export class GeneralPersonalHistoryComponent }); } - addAllergy() { + addAllergy(avoidNullValue?: boolean) { this.selectedSnomedTerm = null; const allergicList = ( this.generalPersonalHistoryForm.controls['allergicList'] @@ -670,7 +734,9 @@ export class GeneralPersonalHistoryComponent }); this.allerySelectList.push(result.slice()); } - allergicList.push(this.initAllergyList()); + if (!avoidNullValue) { + allergicList.push(this.initAllergyList()); + } } } diff --git a/src/app/app-modules/nurse-doctor/nurse-doctor.module.ts b/src/app/app-modules/nurse-doctor/nurse-doctor.module.ts index c96abce1..6c18ad2b 100644 --- a/src/app/app-modules/nurse-doctor/nurse-doctor.module.ts +++ b/src/app/app-modules/nurse-doctor/nurse-doctor.module.ts @@ -51,7 +51,6 @@ import { SymptomsComponent } from './visit-details/symptoms/symptoms.component'; import { ContactHistoryComponent } from './visit-details/contact-history/contact-history.component'; import { TravelHistoryComponent } from './visit-details/travel-history/travel-history.component'; import { UploadFilesComponent } from './visit-details/upload-files/upload-files.component'; -import { MatChipsModule } from '@angular/material/chips'; import { DiseaseconfirmationComponent } from './visit-details/diseaseconfirmation/diseaseconfirmation.component'; import { AncDetailsComponent } from './anc/anc-details/anc-details.component'; import { AncComponent } from './anc/anc.component'; @@ -149,6 +148,9 @@ import { ReportsComponent } from './reports/reports.component'; import { NgxPaginationModule } from 'ngx-pagination'; import { DoctorInvestigationsComponent } from './case-record/general-case-record/doctor-investigations/doctor-investigations.component'; import { SharedModule } from '../core/components/shared/shared.module'; +import { SmsNotificationComponent } from './sms-notification/sms-notification.component'; +import { MatChipsModule } from '@angular/material/chips'; +import { MatToolbarModule } from '@angular/material/toolbar'; import { AutocompleteScrollerDirective } from './shared/utility/autocomplete-scroller.directive'; @NgModule({ @@ -168,6 +170,8 @@ import { AutocompleteScrollerDirective } from './shared/utility/autocomplete-scr MatDatepickerModule, NgxPaginationModule, SharedModule, + MatChipsModule, + MatToolbarModule, ], declarations: [ NurseWorklistComponent, @@ -278,6 +282,7 @@ import { AutocompleteScrollerDirective } from './shared/utility/autocomplete-scr TmVisitDetailsComponent, PrescribeTmMedicineComponent, CovidVaccinationStatusComponent, + SmsNotificationComponent, AutocompleteScrollerDirective, ], diff --git a/src/app/app-modules/nurse-doctor/nurse-worklist-tabs/nurse-reffered-worklist/nurse-reffered-worklist.component.ts b/src/app/app-modules/nurse-doctor/nurse-worklist-tabs/nurse-reffered-worklist/nurse-reffered-worklist.component.ts index 52fc5bc8..72bf130d 100644 --- a/src/app/app-modules/nurse-doctor/nurse-worklist-tabs/nurse-reffered-worklist/nurse-reffered-worklist.component.ts +++ b/src/app/app-modules/nurse-doctor/nurse-worklist-tabs/nurse-reffered-worklist/nurse-reffered-worklist.component.ts @@ -42,7 +42,7 @@ import { SessionStorageService } from 'Common-UI/src/registrar/services/session- }) export class NurseRefferedWorklistComponent implements OnInit, DoCheck { currentLanguageSet: any; - currentPage: number = 0; + currentPage = 0; displayedColumns: any = [ 'sno', 'beneficiaryID', @@ -190,10 +190,10 @@ export class NurseRefferedWorklistComponent implements OnInit, DoCheck { } else { this.confirmationService.alert(res.errorMessage, 'error'); } - }, - err => { - this.confirmationService.alert(err, 'error'); } + // err => { + // this.confirmationService.alert(err, 'error'); + // } ); console.log( 'filtered Beneficiary List', diff --git a/src/app/app-modules/nurse-doctor/nurse-worklist/nurse-worklist.component.ts b/src/app/app-modules/nurse-doctor/nurse-worklist/nurse-worklist.component.ts index 0c4ed42f..10077e9a 100644 --- a/src/app/app-modules/nurse-doctor/nurse-worklist/nurse-worklist.component.ts +++ b/src/app/app-modules/nurse-doctor/nurse-worklist/nurse-worklist.component.ts @@ -55,7 +55,7 @@ export class NurseWorklistComponent implements OnInit, DoCheck, OnDestroy { filteredBeneficiaryList: any = []; filterTerm: any; currentLanguageSet: any; - currentPage: number = 0; + currentPage = 0; displayedColumns: any = [ 'sno', 'beneficiaryID', @@ -144,6 +144,9 @@ export class NurseWorklistComponent implements OnInit, DoCheck, OnDestroy { } }, err => { + if (err?.handled) { + return; + } this.confirmationService.alert(err, 'error'); } ); diff --git a/src/app/app-modules/nurse-doctor/pnc/pnc.component.ts b/src/app/app-modules/nurse-doctor/pnc/pnc.component.ts index 7aaa0218..03eea2a5 100644 --- a/src/app/app-modules/nurse-doctor/pnc/pnc.component.ts +++ b/src/app/app-modules/nurse-doctor/pnc/pnc.component.ts @@ -209,7 +209,9 @@ export class PncComponent implements OnInit, DoCheck, OnChanges, OnDestroy { })[0]; } - tempPNCData.dDate = new Date(tempPNCData.dateOfDelivery); + tempPNCData.dDate = this.normalizeToUTCMidnight( + new Date(tempPNCData.dateOfDelivery) + ); const patchPNCdata = Object.assign({}, tempPNCData); this.patientPNCDataForm.patchValue(tempPNCData); @@ -225,6 +227,14 @@ export class PncComponent implements OnInit, DoCheck, OnChanges, OnDestroy { visitCode: this.sessionstorage.getItem('visitCode'), }; + const dDate = patientPNCDataForm.get('dDate')?.value; + if (dDate) { + patientPNCDataForm.patchValue({ + dateOfDelivery: this.normalizeToUTCMidnight(new Date(dDate)), + dDate: this.normalizeToUTCMidnight(new Date(dDate)), + }); + } + this.doctorService.updatePNCDetails(patientPNCDataForm, temp).subscribe( (res: any) => { if (res.statusCode === 200 && res.data !== null) { @@ -358,4 +368,14 @@ export class PncComponent implements OnInit, DoCheck, OnChanges, OnDestroy { get otherPostNatalComplication() { return this.patientPNCDataForm.controls['otherPostNatalComplication'].value; } + + private normalizeToUTCMidnight(date: Date | null | undefined): string | null { + if (!date) return null; + + const d = new Date(date); + const utcDate = new Date( + Date.UTC(d.getFullYear(), d.getMonth(), d.getDate(), 0, 0, 0, 0) + ); + return utcDate.toISOString(); + } } diff --git a/src/app/app-modules/nurse-doctor/quick-consult/quick-consult.component.html b/src/app/app-modules/nurse-doctor/quick-consult/quick-consult.component.html index f0606133..7fb110a5 100644 --- a/src/app/app-modules/nurse-doctor/quick-consult/quick-consult.component.html +++ b/src/app/app-modules/nurse-doctor/quick-consult/quick-consult.component.html @@ -372,7 +372,7 @@

    - + {{ currentLanguageSet?.vitalsDetails?.vitalsCancerscreening_QC ?.BloodGlucoseRandom @@ -411,8 +411,7 @@

    + class="col-xs-12 col-sm-6 col-md-3 col-lg-3"> Random Glucose Test
    @@ -835,8 +834,8 @@

    {{ currentLanguageSet?.casesheet?.prescribe }}

    class="col-md-2" *ngIf=" currentPrescription.formID && - currentPrescription.formID !== '1' && - currentPrescription.formID !== '2' + currentPrescription.formID !== 1 && + currentPrescription.formID !== 2 "> {{ @@ -858,11 +857,11 @@

    {{ currentLanguageSet?.casesheet?.prescribe }}

    diff --git a/src/app/app-modules/nurse-doctor/quick-consult/quick-consult.component.ts b/src/app/app-modules/nurse-doctor/quick-consult/quick-consult.component.ts index aaba8ec3..b4cdc06e 100644 --- a/src/app/app-modules/nurse-doctor/quick-consult/quick-consult.component.ts +++ b/src/app/app-modules/nurse-doctor/quick-consult/quick-consult.component.ts @@ -703,6 +703,7 @@ export class QuickConsultComponent prescriptionID: diagnosis.prescriptionID, }); } + if (diagnosis && diagnosis.provisionalDiagnosisList) { const generalArray = this.patientQuickConsultForm.controls[ 'provisionalDiagnosisList' @@ -712,6 +713,7 @@ export class QuickConsultComponent if (previousArray.length > 0) { previousArray.forEach((i: any) => { generalArray.at(j).patchValue({ + provisionalDiagnosis: i.term, // Add this line to show the value in input conceptID: i.conceptID, term: i.term, viewProvisionalDiagnosisProvided: i.term, @@ -719,6 +721,7 @@ export class QuickConsultComponent (generalArray.at(j)).controls[ 'provisionalDiagnosis' ].disable(); + // Instead of disabling provisionalDiagnosis, keep it enabled but read-only via the view if (generalArray.length < previousArray.length) { this.addDiagnosis(); } @@ -726,6 +729,7 @@ export class QuickConsultComponent }); } } + this.patchPrescriptionDetails(response.prescription); } } diff --git a/src/app/app-modules/nurse-doctor/shared/services/doctor.service.ts b/src/app/app-modules/nurse-doctor/shared/services/doctor.service.ts index 17b619e6..10becdbe 100644 --- a/src/app/app-modules/nurse-doctor/shared/services/doctor.service.ts +++ b/src/app/app-modules/nurse-doctor/shared/services/doctor.service.ts @@ -30,7 +30,8 @@ import { environment } from 'src/environments/environment'; @Injectable() export class DoctorService { fileIDs: any; // To store fileIDs - enableCovidVaccinationButton: boolean = false; + gynecologicalFiles: any; // To store gynecological examination files + enableCovidVaccinationButton = false; prescribedDrugData: any; covidVaccineAgeGroup: any; @@ -72,9 +73,7 @@ export class DoctorService { return this.http.get( environment.specialistWorkListURL + this.sessionstorage.getItem('providerServiceID') + - `/${this.sessionstorage.getItem( - 'serviceID' - )}/${this.sessionstorage.getItem('userID')}` + `/${this.sessionstorage.getItem('serviceID')}` ); } @@ -90,9 +89,7 @@ export class DoctorService { return this.http.get( environment.specialistFutureWorkListURL + this.sessionstorage.getItem('providerServiceID') + - `/${this.sessionstorage.getItem( - 'serviceID' - )}/${this.sessionstorage.getItem('userID')}` + `/${this.sessionstorage.getItem('serviceID')}` ); } @@ -154,7 +151,11 @@ export class DoctorService { ****************************CANCER SCREENING*********************************** */ - postDoctorCancerVisitDetails(cancerForm: any, tcRequest: any) { + postDoctorCancerVisitDetails( + cancerForm: any, + tcRequest: any, + doctorSignatureFlag: any + ) { const serviceLineDetails: any = this.sessionstorage.getItem('serviceLineDetails'); const vanID = JSON.parse(serviceLineDetails).vanID; @@ -188,6 +189,7 @@ export class DoctorService { const cancerRequest = Object.assign({ tcRequest: tcRequest, diagnosis: diagnosis, + doctorSignatureFlag: doctorSignatureFlag, }); console.log( 'Doctor Cancer visit Details', @@ -483,7 +485,11 @@ export class DoctorService { **************************GENERAL OPD QUICK CONSULT************************** */ - postQuickConsultDetails(consultationData: any, tcRequest: any) { + postQuickConsultDetails( + consultationData: any, + tcRequest: any, + doctorSignatureFlag: any + ) { const serviceLineDetails: any = this.sessionstorage.getItem('serviceLineDetails'); const vanID = JSON.parse(serviceLineDetails).vanID; @@ -508,7 +514,8 @@ export class DoctorService { const quickConsultation = Object.assign( {}, consultationData.quickConsultation, - temp + temp, + { doctorSignatureFlag: doctorSignatureFlag } ); console.log('qc', JSON.stringify(quickConsultation, null, 4)); @@ -521,7 +528,8 @@ export class DoctorService { updateQuickConsultDetails( consultationData: any, tcRequest: any, - isSpecialist: any + isSpecialist: any, + doctorSignatureFlag: any ) { const serviceLineDetails: any = this.sessionstorage.getItem('serviceLineDetails'); @@ -544,6 +552,7 @@ export class DoctorService { vanID: vanID, tcRequest: tcRequest, isSpecialist: isSpecialist, + doctorSignatureFlag: doctorSignatureFlag, }; const quickConsultation = Object.assign( {}, @@ -659,7 +668,8 @@ export class DoctorService { postDoctorANCDetails( patientMedicalForm: any, otherDetails: any, - tcRequest: any + tcRequest: any, + doctorSignatureFlag: any ) { const serviceLineDetails: any = this.sessionstorage.getItem('serviceLineDetails'); @@ -707,6 +717,7 @@ export class DoctorService { serviceID: this.sessionstorage.getItem('serviceID'), createdBy: this.sessionstorage.getItem('userName'), tcRequest: tcRequest, + doctorSignatureFlag: doctorSignatureFlag, }; console.log( @@ -793,7 +804,8 @@ export class DoctorService { postDoctorGeneralOPDDetails( patientMedicalForm: any, otherDetails: any, - tcRequest: any + tcRequest: any, + doctorSignatureFlag: any ) { const serviceLineDetails: any = this.sessionstorage.getItem('serviceLineDetails'); @@ -843,6 +855,7 @@ export class DoctorService { serviceID: this.sessionstorage.getItem('serviceID'), createdBy: this.sessionstorage.getItem('userName'), tcRequest: tcRequest, + doctorSignatureFlag: doctorSignatureFlag, }; console.log( @@ -867,7 +880,8 @@ export class DoctorService { postDoctorNCDCareDetails( patientMedicalForm: any, otherDetails: any, - tcRequest: any + tcRequest: any, + doctorSignatureFlag: any ) { const serviceLineDetails: any = this.sessionstorage.getItem('serviceLineDetails'); @@ -917,6 +931,7 @@ export class DoctorService { serviceID: this.sessionstorage.getItem('serviceID'), createdBy: this.sessionstorage.getItem('userName'), tcRequest: tcRequest, + doctorSignatureFlag: doctorSignatureFlag, }; console.log( @@ -1002,8 +1017,10 @@ export class DoctorService { postDoctorNCDScreeningDetails( patientMedicalForm: any, otherDetails: any, - tcRequest: any + tcRequest: any, + doctorSignatureFlag: any ) { + const visitCategory = this.sessionstorage.getItem('visitCategory'); const serviceLineDetails: any = this.sessionstorage.getItem('serviceLineDetails'); const vanID = JSON.parse(serviceLineDetails).vanID; @@ -1023,6 +1040,11 @@ export class DoctorService { const referForm = patientMedicalForm.controls['patientReferForm']; const NCDScreeningDetails = { + visitDetails: this.postGenericVisitDetailForm( + patientMedicalForm.controls.patientVisitForm, + null, + visitCategory + ), findings: this.postGeneralCaseRecordFindings(findingForm, otherDetails), diagnosis: this.postNCDscreeningCaseRecordDiagnosis( diagnosisForm, @@ -1052,6 +1074,7 @@ export class DoctorService { serviceID: this.sessionstorage.getItem('serviceID'), createdBy: this.sessionstorage.getItem('userName'), tcRequest: tcRequest, + doctorSignatureFlag: doctorSignatureFlag, }; console.log( @@ -2280,7 +2303,8 @@ export class DoctorService { postDoctorPNCDetails( patientMedicalForm: any, otherDetails: any, - tcRequest: any + tcRequest: any, + doctorSignatureFlag: any ) { const serviceLineDetails: any = this.sessionstorage.getItem('serviceLineDetails'); @@ -2327,6 +2351,7 @@ export class DoctorService { serviceID: this.sessionstorage.getItem('serviceID'), createdBy: this.sessionstorage.getItem('userName'), tcRequest: tcRequest, + doctorSignatureFlag: doctorSignatureFlag, }; console.log( @@ -2475,7 +2500,8 @@ export class DoctorService { patientMedicalForm: any, visitCategory: any, otherDetails: any, - tcRequest: any + tcRequest: any, + doctorSignatureFlag: any ): Observable { const serviceLineDetails: any = this.sessionstorage.getItem('serviceLineDetails'); @@ -2527,6 +2553,7 @@ export class DoctorService { createdBy: this.sessionstorage.getItem('userName'), tcRequest: tcRequest, isSpecialist: otherDetails.isSpecialist, + doctorSignatureFlag: doctorSignatureFlag, }; console.log( @@ -2680,7 +2707,8 @@ export class DoctorService { // } saveSpecialistCancerObservation( specialistDiagonosis: any, - otherDetails: any + otherDetails: any, + doctorSignatureFlag: any ) { const diagnosisDetails = specialistDiagonosis.controls.patientCaseRecordForm.value; @@ -2692,7 +2720,8 @@ export class DoctorService { {}, referDetails, diagnosisDetails, - otherDetails + otherDetails, + { doctorSignatureFlag: doctorSignatureFlag } ); console.log( 'saveSpecialistCancerObservation', @@ -2875,10 +2904,16 @@ export class DoctorService { } /* Doctor Signature download */ + downloadSign(userID: any) { - return this.http - .get(environment.downloadSignUrl + userID, { responseType: 'blob' }) - .pipe(map((res: any) => res.blob())); + return this.http.get(environment.downloadSignUrl + userID, { + responseType: 'blob' as 'json', + }); + } + + /* Get UserID using UserName */ + getUserId(userName: any) { + return this.http.get(environment.getUserId + userName); } enableButton: any = false; @@ -2903,4 +2938,36 @@ export class DoctorService { setCapturedHistoryByNurse(historyResponse: any) { this.populateHistoryResponse.next(historyResponse); } + + postGenericVisitDetailForm( + patientVisitForm: any, + benVisitID: any, + visitCategory: any + ): Observable { + if (visitCategory === 'NCD screening') { + const visitDeatilsData: any = { + visitDetails: this.postPatientVisitDetails( + patientVisitForm.controls.patientVisitDetailsForm.value, + patientVisitForm.controls.patientFileUploadDetailsForm.value + ), + }; + return visitDeatilsData; + } + return new Observable(observer => { + observer.complete(); + }); + } + + postPatientVisitDetails(visitForm: any, files: any) { + const patientVisitDetails = Object.assign({}, visitForm, files, { + beneficiaryRegID: this.sessionstorage.getItem('beneficiaryRegID'), + providerServiceMapID: this.sessionstorage.getItem('providerServiceID'), + createdBy: this.sessionstorage.getItem('userName'), + }); + return patientVisitDetails; + } + + checkUsersignatureExist(userID: any) { + return this.http.get(environment.checkUsersignExistUrl + userID); + } } diff --git a/src/app/app-modules/nurse-doctor/shared/services/nurse.service.ts b/src/app/app-modules/nurse-doctor/shared/services/nurse.service.ts index 324b67fb..1789777f 100644 --- a/src/app/app-modules/nurse-doctor/shared/services/nurse.service.ts +++ b/src/app/app-modules/nurse-doctor/shared/services/nurse.service.ts @@ -31,11 +31,11 @@ import { SessionStorageService } from 'Common-UI/src/registrar/services/session- @Injectable() export class NurseService { - temp: boolean = false; + temp = false; private _listners = new Subject(); ncdTemp = new BehaviorSubject(this.temp); ncdTemp$ = this.ncdTemp.asObservable(); - rbsSelectedInvestigation: boolean = false; + rbsSelectedInvestigation = false; rbsSelectedInInvestigation = new BehaviorSubject( this.rbsSelectedInvestigation ); @@ -44,7 +44,7 @@ export class NurseService { rbsCurrentTestResult: any = null; rbsTestResultCurrent = new BehaviorSubject(this.rbsCurrentTestResult); rbsTestResultCurrent$ = this.rbsTestResultCurrent.asObservable(); - isAssessmentDone: boolean = false; + isAssessmentDone = false; enableLAssessment = new BehaviorSubject(this.temp); enableLAssessment$ = this.enableLAssessment.asObservable(); enableProvisionalDiag = new BehaviorSubject(this.temp); @@ -66,7 +66,21 @@ export class NurseService { readonly sessionstorage: SessionStorageService ) {} + private normalizeToUTCMidnight(date: Date | null | undefined): string | null { + if (!date) return null; + + const d = new Date(date); + + const utcDate = new Date( + Date.UTC(d.getFullYear(), d.getMonth(), d.getDate(), 0, 0, 0, 0) + ); + return utcDate.toISOString(); + } + getNurseWorklist() { + const testDate = new Date('2025-10-07T00:00:00'); + console.log('Test normalization:', this.normalizeToUTCMidnight(testDate)); + console.log( 'getNurseWorklistUrl', this.sessionstorage.getItem('providerServiceID') @@ -679,12 +693,17 @@ export class NurseService { const obstetricFormula = JSON.parse( JSON.stringify(patientANCForm.controls.obstetricFormulaForm.value) ); + if (detailedANC.lmpDate) { - const lmpDate = new Date(detailedANC.lmpDate); - const adjustedDate = new Date( - lmpDate.getTime() - lmpDate.getTimezoneOffset() * 60000 + detailedANC.lmpDate = this.normalizeToUTCMidnight( + new Date(detailedANC.lmpDate) + ); + } + + if (detailedANC.expDelDt) { + detailedANC.expDelDt = this.normalizeToUTCMidnight( + new Date(detailedANC.expDelDt) ); - detailedANC.lmpDate = adjustedDate.toISOString(); } const combinedANCForm = Object.assign({}, detailedANC, { @@ -705,7 +724,28 @@ export class NurseService { } postANCImmunizationForm(patientANCImmunizationForm: any, benVisitID: any) { - const immunizationForm = Object.assign({}, patientANCImmunizationForm, { + const immunizationFormValue = JSON.parse( + JSON.stringify(patientANCImmunizationForm) + ); + + if (immunizationFormValue.dateReceivedForTT_1) { + immunizationFormValue.dateReceivedForTT_1 = this.normalizeToUTCMidnight( + new Date(immunizationFormValue.dateReceivedForTT_1) + ); + } + + if (immunizationFormValue.dateReceivedForTT_2) { + immunizationFormValue.dateReceivedForTT_2 = this.normalizeToUTCMidnight( + new Date(immunizationFormValue.dateReceivedForTT_2) + ); + } + + if (immunizationFormValue.dateReceivedForTT_3) { + immunizationFormValue.dateReceivedForTT_3 = this.normalizeToUTCMidnight( + new Date(immunizationFormValue.dateReceivedForTT_3) + ); + } + const immunizationForm = Object.assign({}, immunizationFormValue, { beneficiaryRegID: this.sessionstorage.getItem('beneficiaryRegID'), benVisitID: benVisitID, providerServiceMapID: this.sessionstorage.getItem('providerServiceID'), @@ -1278,13 +1318,8 @@ export class NurseService { if (!temp.lMPDate) { temp.lMPDate = undefined; } else { - const lmpDate = new Date(temp.lMPDate); - const adjustedDate = new Date( - lmpDate.getTime() - lmpDate.getTimezoneOffset() * 60000 - ); - temp.lMPDate = adjustedDate.toISOString(); + temp.lMPDate = this.normalizeToUTCMidnight(new Date(temp.lMPDate)); } - const menstrualHistoryData = Object.assign({}, temp, otherDetails); // console.log("Menstrual History Data", JSON.stringify(menstrualHistoryData, null, 4)); @@ -1990,9 +2025,10 @@ export class NurseService { temp.newBornHealthStatus.newBornHealthStatusID; temp.newBornHealthStatus = temp.newBornHealthStatus.newBornHealthStatus; } - // if (!temp.dateOfDelivery) { - // temp.dateOfDelivery = undefined; - // } + if (temp.dDate) { + temp.dateOfDelivery = this.normalizeToUTCMidnight(new Date(temp.dDate)); + temp.dDate = temp.dateOfDelivery; + } const patientPNCDetails = Object.assign({}, temp, { beneficiaryRegID: this.sessionstorage.getItem('beneficiaryRegID'), diff --git a/src/app/app-modules/nurse-doctor/shared/utility/cancer-utility.ts b/src/app/app-modules/nurse-doctor/shared/utility/cancer-utility.ts index 8237e2c2..dacd5ab0 100644 --- a/src/app/app-modules/nurse-doctor/shared/utility/cancer-utility.ts +++ b/src/app/app-modules/nurse-doctor/shared/utility/cancer-utility.ts @@ -232,7 +232,7 @@ export class CancerUtils { sufferedFromRTIOrSTI: null, rTIOrSTIDetail: null, image: null, - filePath: null, + fileIDs: null, experiencedPostCoitalBleeding: null, observation: null, vanID: JSON.parse(serviceLineDetails).vanID, @@ -346,15 +346,20 @@ export class CancerUtils { vanID: JSON.parse(serviceLineDetails).vanID, parkingPlaceID: JSON.parse(serviceLineDetails).parkingPlaceID, lymphNodes: this.fb.array( - this.lymphNodesArray.map(item => ({ - ...item, - vanID: JSON.parse(serviceLineDetails).vanID, - parkingPlaceID: JSON.parse(serviceLineDetails).parkingPlaceID, - })) + this.lymphNodesArray.map(item => + this.fb.group({ + lymphNodeName: [item.lymphNodeName], + size_Left: [item.size_Left], + mobility_Left: [item.mobility_Left], + size_Right: [item.size_Right], + mobility_Right: [item.mobility_Right], + vanID: [JSON.parse(serviceLineDetails).vanID], + parkingPlaceID: [JSON.parse(serviceLineDetails).parkingPlaceID], + }) + ) ), }); } - createCancerReferForm() { const serviceLineDetails: any = this.sessionstorage.getItem('serviceLineDetails'); diff --git a/src/app/app-modules/nurse-doctor/shared/utility/general-utility.ts b/src/app/app-modules/nurse-doctor/shared/utility/general-utility.ts index 847a708e..0eda71f4 100644 --- a/src/app/app-modules/nurse-doctor/shared/utility/general-utility.ts +++ b/src/app/app-modules/nurse-doctor/shared/utility/general-utility.ts @@ -461,7 +461,7 @@ export class GeneralUtils { }); } - createMenstrualHistoryForm(disableFlag: boolean = true) { + createMenstrualHistoryForm(disableFlag = true) { const serviceLineDetails: any = this.sessionstorage.getItem('serviceLineDetails'); return this.fb.group({ @@ -643,7 +643,8 @@ export class GeneralUtils { return this.fb.group({ conceptID: [null, Validators.required], term: [null, Validators.required], - provisionalDiagnosis: [null], + provisionalDiagnosis: [null, Validators.required], + viewProvisionalDiagnosisProvided: [null], }); } initConfirmatoryDiagnosisList() { diff --git a/src/app/app-modules/nurse-doctor/sms-notification/sms-notification.component.css b/src/app/app-modules/nurse-doctor/sms-notification/sms-notification.component.css new file mode 100644 index 00000000..91aecbef --- /dev/null +++ b/src/app/app-modules/nurse-doctor/sms-notification/sms-notification.component.css @@ -0,0 +1,133 @@ +::ng-deep .mat-dialog-container { + min-width: 900px !important; + max-width: 95vw !important; /* prevents overflow on small screens */ + padding: 0 !important; +} +/* Ensure dialog width */ +section.container-fluid { + min-width: 900px; + background: #fff; + border-radius: 8px; + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12); +} + +/* Toolbar / Header */ +mat-toolbar { + background-color: #0277bd !important; + color: #fff !important; + border-color: unset !important; + font-weight: 600; + font-size: 18px; + /* border-top-left-radius: 8px; + border-top-right-radius: 8px; */ +} + +/* Dialog content padding */ +mat-dialog-content { + padding: 24px !important; +} + +/* Table styling */ +table { + width: 100%; + border-collapse: collapse; + margin-top: 16px; +} + +th { + background: #f3f4f6; /* light gray */ + font-weight: 600; + text-align: left; + padding: 10px; + border-bottom: 2px solid #ddd; +} + +td { + padding: 10px; + border-bottom: 1px solid #eee; +} + +tr:hover { + background: #f9fafb; /* subtle hover */ +} + +/* COMPONENT STYLES */ + +/* container: checkbox + form-field on one line, vertically centered */ +.sms-section { + display: flex; + align-items: center; /* centers both checkbox and input vertically */ + gap: 0.75rem; + margin-top: 1rem; +} + +/* make the checkbox occupy same vertical space so baseline aligns */ +.sms-section .mat-checkbox { + display: flex; + align-items: center; + height: 56px; /* match material form-field height for outline appearance */ + margin: 0; /* remove extra margins */ +} + +/* constrain the phone field width and remove extra margin */ +.sms-section .alt-phone-field { + margin-top: 10px; + margin: 0; + width: 260px; /* adjust as needed */ + min-width: 180px;/* responsive fallback */ +} + +/* force the internal infix to center label/input vertically + ::ng-deep is needed to override mat-form-field internals */ +::ng-deep .sms-section .mat-form-field .mat-form-field-infix { + display: flex; + align-items: center; + min-height: 56px; /* keeps label from overlapping the input */ + padding: 0 12px; /* consistent left/right padding */ + box-sizing: border-box; +} + +/* ensure the actual native input doesn't have extra top padding + and has a sensible height so the floating label clears correctly */ +::ng-deep .sms-section input.mat-input-element { + padding: 0; + height: 36px; + line-height: 1.25; + box-sizing: border-box; +} + + +/* Action Buttons (bottom row) */ +.action-row { + display: flex; + justify-content: flex-end; + margin-top: 24px; +} + +/* Send SMS button */ +button.send-btn { + background-color: #0277bd !important; + color: #fff !important; + border-color: unset !important; + padding: 8px 24px; + font-size: 14px; + font-weight: 500; + border-radius: 6px; + box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2); + transition: background 0.2s ease-in-out; +} + +button.send-btn:hover { + background-color: #72b6dd !important; /* darker blue */ +} + +.close-btn { + margin-left: auto; + border-radius: 50%; + background: #0277bd !important; + color: white; + border: none; +} +.close-btn:hover { + background: #b0c3e7 !important; +} diff --git a/src/app/app-modules/nurse-doctor/sms-notification/sms-notification.component.html b/src/app/app-modules/nurse-doctor/sms-notification/sms-notification.component.html new file mode 100644 index 00000000..eda42b5b --- /dev/null +++ b/src/app/app-modules/nurse-doctor/sms-notification/sms-notification.component.html @@ -0,0 +1,79 @@ + + + + Send Prescription to Beneficiary + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + +
    Prescription IDDrugStrengthFrequencyNo. of DaysRemarks
    + {{ p.prescribedDrugID }} + {{ p.drugName }}{{ p.dosage }}{{ p.frequency }}{{ p.noOfDays }} + {{ data.remarks }} +
    + +
    + + + + + + +
    + + {{ currentLanguageSet?.alternateNumber }} + + + + {{ currentLanguageSet?.mobileNumber }} + + + + {{ currentLanguageSet?.enterTenDigitMobileNumber }} + + +
    + + + + +
    + +
    +
    + \ No newline at end of file diff --git a/src/app/app-modules/nurse-doctor/sms-notification/sms-notification.component.spec.ts b/src/app/app-modules/nurse-doctor/sms-notification/sms-notification.component.spec.ts new file mode 100644 index 00000000..2e9261c4 --- /dev/null +++ b/src/app/app-modules/nurse-doctor/sms-notification/sms-notification.component.spec.ts @@ -0,0 +1,21 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { SmsNotificationComponent } from './sms-notification.component'; + +describe('SmsNotificationComponent', () => { + let component: SmsNotificationComponent; + let fixture: ComponentFixture; + + beforeEach(() => { + TestBed.configureTestingModule({ + declarations: [SmsNotificationComponent], + }); + fixture = TestBed.createComponent(SmsNotificationComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/app-modules/nurse-doctor/sms-notification/sms-notification.component.ts b/src/app/app-modules/nurse-doctor/sms-notification/sms-notification.component.ts new file mode 100644 index 00000000..63bf3f06 --- /dev/null +++ b/src/app/app-modules/nurse-doctor/sms-notification/sms-notification.component.ts @@ -0,0 +1,165 @@ +import { Component, Inject, ViewChild } from '@angular/core'; +import { + MAT_DIALOG_DATA, + MatDialogRef, + MatDialog, +} from '@angular/material/dialog'; +import { SmsTemplateService } from '../smsTemplate/sms-template.service'; +import { ConfirmationService } from '../../core/services'; +import { HttpServiceService } from '../../core/services/http-service.service'; +import { SetLanguageComponent } from 'src/app/app-modules/core/components/set-language.component'; +import { map, switchMap } from 'rxjs'; +import { SessionStorageService } from 'Common-UI/src/registrar/services/session-storage.service'; +import { MatSnackBar } from '@angular/material/snack-bar'; +import { MatTableDataSource } from '@angular/material/table'; +import { MatPaginator } from '@angular/material/paginator'; + +@Component({ + selector: 'app-sms-notification', + templateUrl: './sms-notification.component.html', + styleUrls: ['./sms-notification.component.css'], +}) +export class SmsNotificationComponent { + altNum = false; + mobileNumber: any; + smsFlag = false; + beneficiaryDetails: any; + beneficiaryRegID: any; + current_campaign: any; + currentLanguageSet: any; + + constructor( + @Inject(MAT_DIALOG_DATA) public data: any, + public dialog: MatDialog, + private snackBar: MatSnackBar, + private _smsService: SmsTemplateService, + private alertMessage: ConfirmationService, + public dialogRef: MatDialogRef, + public httpServices: HttpServiceService, + readonly sessionstorage: SessionStorageService + ) {} + + displayedColumns: string[] = [ + 'prescriptionID', + 'diagnosisProvided', + 'drug', + 'strength', + 'frequency', + 'noOfDays', + 'remarks', + ]; + + dataSource!: MatTableDataSource; + ngOnInit() { + this.dataSource = new MatTableDataSource(this.data.prescribedDrugs); + this.assignSelectedLanguage(); + } + + ngDoCheck() { + this.assignSelectedLanguage(); + } + + assignSelectedLanguage() { + const getLanguageJson = new SetLanguageComponent(this.httpServices); + getLanguageJson.setLanguage(); + this.currentLanguageSet = getLanguageJson.currentLanguageObject; + } + + validNumber: any = false; + + mobileNum(value: any) { + if (value.length == 10) { + this.validNumber = true; + } else { + this.validNumber = false; + } + } + + sendSMS() { + const currentServiceID = this.sessionstorage.getItem('currentServiceID'); + if (currentServiceID != undefined) { + this._smsService + .getSMStypes(currentServiceID) + .pipe( + map( + (res: any) => + res?.data?.find((t: any) => t.smsType === 'MMUPrescription SMS') + ?.smsTypeID + ), + switchMap((smsTypeID: string | null) => { + if (!smsTypeID) throw new Error('Prescription SMS type not found'); + return this._smsService + .getSMStemplates( + this.sessionstorage.getItem('providerServiceMapID'), + smsTypeID + ) + .pipe( + map((res: any) => ({ + smsTemplateID: res?.data?.find((tpl: any) => !tpl.deleted) + ?.smsTemplateID, + smsTemplateTypeID: smsTypeID, + })) + ); + }), + switchMap(({ smsTemplateID, smsTemplateTypeID }) => { + if (!smsTemplateID) throw new Error('Valid SMS template not found'); + const req_arr = []; + const preferredPhoneNum = this.sessionstorage.getItem('phnum'); + const phoneNumber = + preferredPhoneNum == 'Not Available' + ? this.mobileNumber + : preferredPhoneNum; + for (let i = 0; i < this.data.prescribedDrugs.length; i++) { + const Obj = { + alternateNo: phoneNumber, + beneficiaryRegID: this.data.prescribedDrugs[i].beneficiaryRegID, + prescribedDrugID: this.data.prescribedDrugs[i].prescribedDrugID, + createdBy: this.sessionstorage.getItem('userName'), + is1097: false, + providerServiceMapID: + this.sessionstorage.getItem('providerServiceID'), + smsTemplateID: smsTemplateID, + smsTemplateTypeID: smsTemplateTypeID, + }; + + req_arr.push(Obj); + } + return this._smsService.sendSMS(req_arr); + }) + ) + .subscribe({ + next: () => { + this.snackBar.open('SMS sent successfully', 'Close', { + duration: 3000, + verticalPosition: 'top', + panelClass: ['snackbar-success'], + }); + this.alertMessage.alert('Data saved successfully', 'success'); + }, + error: err => { + console.error('Error sending SMS:', err); + this.snackBar.open('SMS not sent', 'Close', { + duration: 3000, + verticalPosition: 'top', + panelClass: ['snackbar-error'], + }); + }, + }); + + this.dialogRef.close(); + } + } + + allowOnlyNumbers(event: KeyboardEvent) { + const charCode = event.which ? event.which : event.keyCode; + console.log('charCode', charCode); + + if (charCode < 48 || charCode > 57) { + event.preventDefault(); + } + } + + onClose(): void { + this.dialogRef.close(); // closes the dialog + } +} diff --git a/src/app/app-modules/nurse-doctor/smsTemplate/sms-template.service.spec.ts b/src/app/app-modules/nurse-doctor/smsTemplate/sms-template.service.spec.ts new file mode 100644 index 00000000..ca9bad6f --- /dev/null +++ b/src/app/app-modules/nurse-doctor/smsTemplate/sms-template.service.spec.ts @@ -0,0 +1,38 @@ +/* + * AMRIT – Accessible Medical Records via Integrated Technology + * Integrated EHR (Electronic Health Records) Solution + * + * Copyright (C) "Piramal Swasthya Management and Research Institute" + * + * This file is part of AMRIT. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + +import { TestBed } from '@angular/core/testing'; + +import { SmsTemplateService } from './sms-template.service'; + +describe('SmsTemplateService', () => { + let service: SmsTemplateService; + + beforeEach(() => { + TestBed.configureTestingModule({}); + service = TestBed.inject(SmsTemplateService); + }); + + it('should be created', () => { + expect(service).toBeTruthy(); + }); +}); diff --git a/src/app/app-modules/nurse-doctor/smsTemplate/sms-template.service.ts b/src/app/app-modules/nurse-doctor/smsTemplate/sms-template.service.ts new file mode 100644 index 00000000..fda01e12 --- /dev/null +++ b/src/app/app-modules/nurse-doctor/smsTemplate/sms-template.service.ts @@ -0,0 +1,59 @@ +/* + * AMRIT – Accessible Medical Records via Integrated Technology + * Integrated EHR (Electronic Health Records) Solution + * + * Copyright (C) "Piramal Swasthya Management and Research Institute" + * + * This file is part of AMRIT. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see https://www.gnu.org/licenses/. + */ + +import { HttpClient } from '@angular/common/http'; +import { Injectable } from '@angular/core'; +import { environment } from 'src/environments/environment'; +// Update the import path if the file is located elsewhere, for example: +import { HttpServiceService } from '../../core/services/http-service.service'; +// Or ensure that '../http-interceptor/http-interceptor.service.ts' exists and is correctly named. +@Injectable({ + providedIn: 'root', +}) +export class SmsTemplateService { + constructor( + private httpIntercept: HttpServiceService, + private http: HttpClient + ) {} + + getSMStemplates(providerServiceMapID: any, smsTypeID?: any) { + return this.http.post(environment.getSMStemplates_url, { + providerServiceMapID: providerServiceMapID, + smsTemplateTypeID: smsTypeID ? smsTypeID : undefined, + }); + } + + getSMSTemplates(providerServiceMapID: any) { + return this.http.post(environment.getSMStemplates_url, { + providerServiceMapID: providerServiceMapID, + }); + } + + getSMStypes(serviceID: any) { + return this.http.post(environment.getSMStypes_url, { + serviceID: serviceID, + }); + } + sendSMS(obj: any) { + return this.http.post(environment.sendSMS_url, obj); + } +} diff --git a/src/app/app-modules/nurse-doctor/vitals/general-patient-vitals/general-patient-vitals.component.ts b/src/app/app-modules/nurse-doctor/vitals/general-patient-vitals/general-patient-vitals.component.ts index a8346a4a..18811605 100644 --- a/src/app/app-modules/nurse-doctor/vitals/general-patient-vitals/general-patient-vitals.component.ts +++ b/src/app/app-modules/nurse-doctor/vitals/general-patient-vitals/general-patient-vitals.component.ts @@ -1264,7 +1264,7 @@ export class GeneralPatientVitalsComponent } trackFieldInteraction(fieldName: string) { - this.trackingService.trackFieldInteraction(fieldName, 'Visit Details'); + this.trackingService.trackFieldInteraction(fieldName, 'Vitals'); } //--End-- diff --git a/src/app/app-modules/nurse-doctor/workarea/workarea.component.ts b/src/app/app-modules/nurse-doctor/workarea/workarea.component.ts index 43a88280..acfb624a 100644 --- a/src/app/app-modules/nurse-doctor/workarea/workarea.component.ts +++ b/src/app/app-modules/nurse-doctor/workarea/workarea.component.ts @@ -55,6 +55,7 @@ import { environment } from 'src/environments/environment'; import { CanComponentDeactivate } from '../../core/services/can-deactivate-guard.service'; import { OpenPreviousVisitDetailsComponent } from '../../core/components/open-previous-visit-details/open-previous-visit-details.component'; import { SessionStorageService } from 'Common-UI/src/registrar/services/session-storage.service'; +import { SmsNotificationComponent } from '../sms-notification/sms-notification.component'; @Component({ selector: 'app-workarea', @@ -83,7 +84,7 @@ export class WorkareaComponent referMode: any; ncdScreeningMode: any; quickConsultMode: any; - newLookupMode: boolean = false; + newLookupMode = false; visitCategory: any; visitCategoryList: any; @@ -114,18 +115,18 @@ export class WorkareaComponent patientMedicalForm!: FormGroup; - tm: boolean = false; + tm = false; schedulerData: any; attendantType: any; - enableIDRSUpdate: boolean = true; + enableIDRSUpdate = true; visualAcuityMandatory!: number; diabetesSelected!: number; rbsPresent: any = 0; visualAcuityPresent: any = 0; heamoglobinPresent: any = 0; - ncdTemperature: boolean = false; + ncdTemperature = false; specialistFlag: any; - dontEnableComponent: boolean = false; + dontEnableComponent = false; beneficiaryAge: any; currentLanguageSet: any; tmcSubmitSubscription!: Subscription; @@ -136,12 +137,12 @@ export class WorkareaComponent visualAcuityMandatorySubscription!: Subscription; ncdTempSubscription!: Subscription; enableVitalsButtonSubscription!: Subscription; - enableUpdateButtonInVitals: boolean = false; - enableCovidVaccinationSaveButton: boolean = false; - disableSubmitButton: boolean = false; - showProgressBar: boolean = false; - enableLungAssessment: boolean = false; - enableProvisionalDiag: boolean = false; + enableUpdateButtonInVitals = false; + enableCovidVaccinationSaveButton = false; + disableSubmitButton = false; + showProgressBar = false; + enableLungAssessment = false; + enableProvisionalDiag = false; patientVisitForm!: FormGroup; patientANCForm!: FormGroup; patientPNCForm!: FormGroup; @@ -169,9 +170,11 @@ export class WorkareaComponent private idrsScoreService: IdrsscoreService, private languageComponent: SetLanguageComponent ) {} - isSpecialist: boolean = false; + isSpecialist = false; doctorUpdateAndTCSubmit: any; - tmcDisable: boolean = false; + tmcDisable = false; + doctorSignatureFlag = false; + ngOnInit() { this.enableUpdateButtonInVitals = false; this.enableCovidVaccinationSaveButton = false; @@ -256,6 +259,14 @@ export class WorkareaComponent this.enableProvisionalDiag = false; } }); + + this.doctorService + .checkUsersignatureExist(this.sessionstorage.getItem('userID')) + .subscribe((res: any) => { + if (res.statusCode === 200 && res.data !== null) { + this.doctorSignatureFlag = res.data.signStatus; + } + }); } setVitalsUpdateButtonValue() { @@ -985,7 +996,7 @@ export class WorkareaComponent submitDoctorDiagnosisForm() { this.disableSubmitButton = true; - this.showProgressBar = true; + // this.showProgressBar = true; if (this.visitCategory === 'Cancer Screening') this.submitCancerDiagnosisForm(); @@ -1047,18 +1058,30 @@ export class WorkareaComponent isSpecialist: this.isSpecialist, }; + const prescribedDrugs = this.getLabandPrescriptionData(); + if (visitCategory === 'Cancer Screening') { if (this.checkCancerRequiredData(this.patientMedicalForm)) { this.doctorService .saveSpecialistCancerObservation( this.patientMedicalForm, - otherDetails + otherDetails, + this.doctorSignatureFlag ) .subscribe( (res: any) => { if (res.statusCode === 200 && res.data !== null) { this.patientMedicalForm.reset(); - this.confirmationService.alert(res.data.response, 'success'); + this.confirmationService.alert(res.data.message, 'success'); + // if (prescribedDrugs.length > 0) { + // const prescriptionSmsObject = this.SMSObjectCreation( + // [], + // prescribedDrugs, + // res.data.prescribedDrugIDs + // ); + // this.sendPrescriptionSms(prescriptionSmsObject); + // } + this.confirmationService.alert(res.data.message, 'success'); if (this.isSpecialist) { this.router.navigate(['/common/tcspecialist-worklist']); } else { @@ -1082,7 +1105,8 @@ export class WorkareaComponent this.patientMedicalForm, visitCategory, otherDetails, - this.schedulerData + this.schedulerData, + this.doctorSignatureFlag ) .subscribe( (res: any) => { @@ -1090,12 +1114,22 @@ export class WorkareaComponent this.patientMedicalForm.reset(); sessionStorage.removeItem('instFlag'); sessionStorage.removeItem('suspectFlag'); - this.confirmationService.alert(res.data.response, 'success'); + + // if (prescribedDrugs.length > 0) { + // const prescriptionSmsObject = this.SMSObjectCreation( + // [], + // prescribedDrugs, + // res.data.prescribedDrugIDs + // ); + // this.sendPrescriptionSms(prescriptionSmsObject); + // } else { + this.confirmationService.alert(res.data.message, 'success'); if (this.isSpecialist) { this.router.navigate(['/common/tcspecialist-worklist']); } else { this.router.navigate(['/nurse-doctor/doctor-worklist']); } + // } } else { this.resetSpinnerandEnableTheSubmitButton(); this.confirmationService.alert(res.errorMessage, 'error'); @@ -1114,18 +1148,29 @@ export class WorkareaComponent this.patientMedicalForm, visitCategory, otherDetails, - this.schedulerData + this.schedulerData, + this.doctorSignatureFlag ) .subscribe( (res: any) => { if (res.statusCode === 200 && res.data !== null) { this.patientMedicalForm.reset(); - this.confirmationService.alert(res.data.response, 'success'); + + // if (prescribedDrugs.length > 0) { + // const prescriptionSmsObject = this.SMSObjectCreation( + // [], + // prescribedDrugs, + // res.data.prescribedDrugIDs + // ); + // this.sendPrescriptionSms(prescriptionSmsObject); + // } else { + this.confirmationService.alert(res.data.message, 'success'); if (this.isSpecialist) { this.router.navigate(['/common/tcspecialist-worklist']); } else { this.router.navigate(['/nurse-doctor/doctor-worklist']); } + // } } else { this.resetSpinnerandEnableTheSubmitButton(); this.confirmationService.alert(res.errorMessage, 'error'); @@ -1139,6 +1184,7 @@ export class WorkareaComponent } } } + idrsChange(value: any) { this.enableIDRSUpdate = value; console.log('enableIDRSUpdate', this.enableIDRSUpdate); @@ -1262,14 +1308,15 @@ export class WorkareaComponent this.doctorService .postDoctorCancerVisitDetails( this.patientMedicalForm, - this.schedulerData + this.schedulerData, + this.doctorSignatureFlag ) .subscribe( (res: any) => { if (res.statusCode === 200 && res.data !== null) { this.patientMedicalForm.reset(); this.removeBeneficiaryDataForDoctorVisit(); - this.confirmationService.alert(res.data.response, 'success'); + this.confirmationService.alert(res.data.message, 'success'); this.router.navigate(['/nurse-doctor/doctor-worklist']); } else { this.resetSpinnerandEnableTheSubmitButton(); @@ -1414,7 +1461,7 @@ export class WorkareaComponent ); if (this.attendantType === 'nurse') { if (pregForm2.controls) { - const score1: number = Number(pregForm2.controls['length']); + const score1 = Number(pregForm2.controls['length']); for (let i = 0; i < score1; i++) { const pregForm3 = pregForm2.controls[i]; if ( @@ -1549,6 +1596,11 @@ export class WorkareaComponent diagForm1.controls['provisionalDiagnosisList'] ); const diagForm3 = diagForm2.controls[0]; + if (diagForm3.controls['provisionalDiagnosis'].errors) { + required.push( + this.currentLanguageSet.DiagnosisDetails.provisionaldiagnosis + ); + } if (!diagForm3.controls['provisionalDiagnosis'].errors) { diagForm2.value.filter((item: any) => { @@ -1777,6 +1829,36 @@ export class WorkareaComponent } } + // Ensure doctor has added at least one prescription + if (this.attendantType === 'doctor') { + try { + const caseRecordForm = ( + medicalForm.controls['patientCaseRecordForm'] + ); + const drugPrescriptionForm = ( + (caseRecordForm && caseRecordForm.controls + ? caseRecordForm.controls['drugPrescriptionForm'] + : null) + ); + if (drugPrescriptionForm) { + let prescribedDrugs = + drugPrescriptionForm.value && + drugPrescriptionForm.value.prescribedDrugs + ? drugPrescriptionForm.value.prescribedDrugs + : []; + prescribedDrugs = prescribedDrugs.filter((d: any) => !!d.createdBy); + if (!prescribedDrugs || prescribedDrugs.length === 0) { + required.push( + this.currentLanguageSet?.Prescription?.prescriptionRequired || + 'Please add at least one prescription' + ); + } + } + } catch (err) { + console.warn('Error validating prescription presence', err); + } + } + if (required.length) { this.confirmationService.notify( this.currentLanguageSet.alerts.info.mandatoryFields, @@ -2325,6 +2407,37 @@ export class WorkareaComponent } } + // For quick consult doctor flow, ensure at least one prescription exists + if (this.attendantType === 'doctor') { + try { + const quickConsultCaseRecordForm = ( + this.patientMedicalForm.controls['patientCaseRecordForm'] + ); + const prescription = + quickConsultCaseRecordForm && quickConsultCaseRecordForm.controls + ? quickConsultCaseRecordForm.controls['drugPrescriptionForm'] + : null; + if (prescription) { + let prescribedDrugs = + prescription.value && prescription.value.prescribedDrugs + ? prescription.value.prescribedDrugs + : []; + prescribedDrugs = prescribedDrugs.filter((d: any) => !!d.createdBy); + if (!prescribedDrugs || prescribedDrugs.length === 0) { + required.push( + this.currentLanguageSet?.Prescription?.prescriptionRequired || + 'Please add at least one prescription' + ); + } + } + } catch (err) { + console.warn( + 'Error validating quick consult prescription presence', + err + ); + } + } + if (required.length) { this.confirmationService.notify( this.currentLanguageSet.alerts.info.mandatoryFields, @@ -2388,6 +2501,7 @@ export class WorkareaComponent patientQuickConsultFormValue.radiology ); } + patientQuickConsultFormValue.labTestOrders = labTestOrders; patientQuickConsultFormValue.test = undefined; patientQuickConsultFormValue.radiology = undefined; @@ -2399,15 +2513,25 @@ export class WorkareaComponent this.doctorService .postQuickConsultDetails( { quickConsultation: patientQuickConsultFormValue }, - this.schedulerData + this.schedulerData, + this.doctorSignatureFlag ) .subscribe( (res: any) => { if (res.statusCode === 200 && res.data !== null) { this.patientMedicalForm.reset(); this.removeBeneficiaryDataForDoctorVisit(); - this.confirmationService.alert(res.data.response, 'success'); + // if (prescribedDrugs.length > 0) { + // const prescriptionSmsObject = this.SMSObjectCreation( + // [], + // prescribedDrugs, + // res.data.prescribedDrugIDs + // ); + // this.sendPrescriptionSms(prescriptionSmsObject); + // } else { + this.confirmationService.alert(res.data.message, 'success'); this.router.navigate(['/nurse-doctor/doctor-worklist']); + // } } else { this.resetSpinnerandEnableTheSubmitButton(); this.confirmationService.alert(res.errorMessage, 'error'); @@ -2421,25 +2545,69 @@ export class WorkareaComponent } } + SMSObjectCreation( + diagnosisList: any, + prescriptions: any, + prescribedDrugIDs: any + ) { + return { + diagnosisProvided: diagnosisList?.map((d: any) => d.term).join(', '), + prescribedDrugs: prescriptions?.map((p: any, index: number) => ({ + beneficiaryRegID: this.beneficiaryRegID, + prescribedDrugID: prescribedDrugIDs[index], + drugName: p.drugName, + dosage: `${p.dose} (${p.drugStrength})`, + frequency: p.frequency, + noOfDays: p.duration, + })), + }; + } + + sendPrescriptionSms(prescriptionSmsObject: any) { + const dialogRef = this.mdDialog.open(SmsNotificationComponent, { + width: '900px', + disableClose: true, + data: prescriptionSmsObject, + }); + + dialogRef.afterClosed().subscribe(result => { + if (this.isSpecialist) { + this.router.navigate(['/common/tcspecialist-worklist']); + } else { + this.router.navigate(['/nurse-doctor/doctor-worklist']); + } + }); + } + updateQuickConsultDiagnosisForm() { const patientQuickConsultDetails = this.mapDoctorQuickConsultDetails(); - + const prescribedDrugs = patientQuickConsultDetails.prescription || []; this.doctorService .updateQuickConsultDetails( { quickConsultation: patientQuickConsultDetails }, this.schedulerData, - this.isSpecialist + this.isSpecialist, + this.doctorSignatureFlag ) .subscribe( (res: any) => { if (res.statusCode === 200 && res.data !== null) { this.patientMedicalForm.reset(); - this.confirmationService.alert(res.data.response, 'success'); + // if (prescribedDrugs.length > 0) { + // const prescriptionSmsObject = this.SMSObjectCreation( + // [], + // prescribedDrugs, + // res.data.prescribedDrugIDs + // ); + // this.sendPrescriptionSms(prescriptionSmsObject); + // } else { + this.confirmationService.alert(res.data.message, 'success'); if (this.isSpecialist) { this.router.navigate(['/common/tcspecialist-worklist']); } else { this.router.navigate(['/nurse-doctor/doctor-worklist']); } + // } } else { this.resetSpinnerandEnableTheSubmitButton(); this.confirmationService.alert(res.errorMessage, 'error'); @@ -2564,16 +2732,30 @@ export class WorkareaComponent providerServiceMapID: this.sessionstorage.getItem('providerServiceID'), createdBy: this.sessionstorage.getItem('userName'), }; - + const prescribedDrugs = this.getLabandPrescriptionData(); this.doctorService - .postDoctorANCDetails(this.patientMedicalForm, temp, this.schedulerData) + .postDoctorANCDetails( + this.patientMedicalForm, + temp, + this.schedulerData, + this.doctorSignatureFlag + ) .subscribe( (res: any) => { if (res.statusCode === 200 && res.data !== null) { this.patientMedicalForm.reset(); this.removeBeneficiaryDataForDoctorVisit(); - this.confirmationService.alert(res.data.response, 'success'); + // if (prescribedDrugs.length > 0) { + // const prescriptionSmsObject = this.SMSObjectCreation( + // [], + // prescribedDrugs, + // res.data.prescribedDrugIDs + // ); + // this.sendPrescriptionSms(prescriptionSmsObject); + // } else { + this.confirmationService.alert(res.data.message, 'success'); this.router.navigate(['/nurse-doctor/doctor-worklist']); + // } } else { this.resetSpinnerandEnableTheSubmitButton(); this.confirmationService.alert(res.errorMessage, 'error'); @@ -2686,19 +2868,42 @@ export class WorkareaComponent createdBy: this.sessionstorage.getItem('userName'), }; + const patientVisitForm = ( + this.patientMedicalForm.controls['patientCaseRecordForm'] + ); + const prescribedDrugs = this.getLabandPrescriptionData(); + this.doctorService .postDoctorNCDCareDetails( this.patientMedicalForm, temp, - this.schedulerData + this.schedulerData, + this.doctorSignatureFlag ) .subscribe( (res: any) => { if (res.statusCode === 200 && res.data !== null) { this.patientMedicalForm.reset(); this.removeBeneficiaryDataForDoctorVisit(); - this.confirmationService.alert(res.data.response, 'success'); + // if (prescribedDrugs.length > 0) { + // const prescriptionSmsObject = this.SMSObjectCreation( + // JSON.parse( + // JSON.stringify( + // ( + // patientVisitForm.get( + // 'generalDiagnosisForm.provisionalDiagnosisList' + // ) as FormArray + // ).value + // ) + // ), + // prescribedDrugs, + // res.data.prescribedDrugIDs + // ); + // this.sendPrescriptionSms(prescriptionSmsObject); + // } else { + this.confirmationService.alert(res.data.message, 'success'); this.router.navigate(['/nurse-doctor/doctor-worklist']); + // } } else { this.resetSpinnerandEnableTheSubmitButton(); this.confirmationService.alert(res.errorMessage, 'error'); @@ -2722,6 +2927,10 @@ export class WorkareaComponent createdBy: this.sessionstorage.getItem('userName'), }; + const patientVisitForm = ( + this.patientMedicalForm.controls['patientCaseRecordForm'] + ); + this.doctorService .postDoctorCovidCareDetails( this.patientMedicalForm, @@ -2757,11 +2966,18 @@ export class WorkareaComponent createdBy: this.sessionstorage.getItem('userName'), }; + const patientVisitForm = ( + this.patientMedicalForm.controls['patientCaseRecordForm'] + ); + + const prescribedDrugs = this.getLabandPrescriptionData(); + this.doctorService .postDoctorNCDScreeningDetails( this.patientMedicalForm, temp, - this.schedulerData + this.schedulerData, + this.doctorSignatureFlag ) .subscribe( (res: any) => { @@ -2770,8 +2986,25 @@ export class WorkareaComponent this.removeBeneficiaryDataForDoctorVisit(); sessionStorage.removeItem('instFlag'); sessionStorage.removeItem('suspectFlag'); - this.confirmationService.alert(res.data.response, 'success'); + // if (prescribedDrugs.length > 0) { + // const prescriptionSmsObject = this.SMSObjectCreation( + // JSON.parse( + // JSON.stringify( + // ( + // patientVisitForm.get( + // 'generalDiagnosisForm.provisionalDiagnosisList' + // ) as FormArray + // ).value + // ) + // ), + // prescribedDrugs, + // res.data.prescribedDrugIDs + // ); + // this.sendPrescriptionSms(prescriptionSmsObject); + // } else { + this.confirmationService.alert(res.data.message, 'success'); this.router.navigate(['/nurse-doctor/doctor-worklist']); + // } } else { this.resetSpinnerandEnableTheSubmitButton(); this.confirmationService.alert(res.errorMessage, 'error'); @@ -2857,25 +3090,43 @@ export class WorkareaComponent providerServiceMapID: this.sessionstorage.getItem('providerServiceID'), createdBy: this.sessionstorage.getItem('userName'), }; + const patientVisitForm = ( + this.patientMedicalForm.controls['patientCaseRecordForm'] + ); - console.log('This is Patient medical form:'); - console.log(this.patientMedicalForm); - console.log('THis is Scheduler data here'); - console.log(this.schedulerData); + const prescribedDrugs = this.getLabandPrescriptionData(); this.doctorService .postDoctorGeneralOPDDetails( this.patientMedicalForm, temp, - this.schedulerData + this.schedulerData, + this.doctorSignatureFlag ) .subscribe( (res: any) => { if (res.statusCode === 200 && res.data !== null) { this.patientMedicalForm.reset(); this.removeBeneficiaryDataForDoctorVisit(); - this.confirmationService.alert(res.data.response, 'success'); + // if (prescribedDrugs.length > 0) { + // const prescriptionSmsObject = this.SMSObjectCreation( + // JSON.parse( + // JSON.stringify( + // ( + // patientVisitForm.get( + // 'generalDiagnosisForm.provisionalDiagnosisList' + // ) as FormArray + // ).value + // ) + // ), + // prescribedDrugs, + // res.data.prescribedDrugIDs + // ); + // this.sendPrescriptionSms(prescriptionSmsObject); + // } else { + this.confirmationService.alert(res.data.message, 'success'); this.router.navigate(['/nurse-doctor/doctor-worklist']); + // } } else { this.resetSpinnerandEnableTheSubmitButton(); this.confirmationService.alert(res.errorMessage, 'error'); @@ -2899,15 +3150,38 @@ export class WorkareaComponent createdBy: this.sessionstorage.getItem('userName'), }; + const prescribedDrugs = this.getLabandPrescriptionData(); this.doctorService - .postDoctorPNCDetails(this.patientMedicalForm, temp, this.schedulerData) + .postDoctorPNCDetails( + this.patientMedicalForm, + temp, + this.schedulerData, + this.doctorSignatureFlag + ) .subscribe( (res: any) => { if (res.statusCode === 200 && res.data !== null) { this.patientMedicalForm.reset(); this.removeBeneficiaryDataForDoctorVisit(); - this.confirmationService.alert(res.data.response, 'success'); + // if (prescribedDrugs.length > 0) { + // const prescriptionSmsObject = this.SMSObjectCreation( + // JSON.parse( + // JSON.stringify( + // ( + // this.patientVisitForm.get( + // 'generalDiagnosisForm.provisionalDiagnosisList' + // ) as FormArray + // ).value + // ) + // ), + // prescribedDrugs, + // res.data.prescribedDrugIDs + // ); + // this.sendPrescriptionSms(prescriptionSmsObject); + // } else { + this.confirmationService.alert(res.data.message, 'success'); this.router.navigate(['/nurse-doctor/doctor-worklist']); + // } } else { this.resetSpinnerandEnableTheSubmitButton(); this.confirmationService.alert(res.errorMessage, 'error'); @@ -2921,6 +3195,25 @@ export class WorkareaComponent } } + getLabandPrescriptionData() { + const patientVisitForm = ( + this.patientMedicalForm.controls['patientCaseRecordForm'] + ); + + let prescribedDrugs = JSON.parse( + JSON.stringify( + ( + patientVisitForm.get( + 'drugPrescriptionForm.prescribedDrugs' + ) as FormArray + ).value + ) + ); + + prescribedDrugs = prescribedDrugs.filter((item: any) => !!item.createdBy); + return prescribedDrugs; + } + /** * update patient data */ @@ -3012,7 +3305,7 @@ export class WorkareaComponent ); const required = []; if (pregForm2.controls) { - const score1: number = Number(pregForm2.controls['length']); + const score1 = Number(pregForm2.controls['length']); for (let i = 0; i < score1; i++) { const pregForm3 = pregForm2.controls[i]; if ( diff --git a/src/app/app-modules/pharmacist/worklist/worklist.component.html b/src/app/app-modules/pharmacist/worklist/worklist.component.html index 6a804687..3dec65a2 100644 --- a/src/app/app-modules/pharmacist/worklist/worklist.component.html +++ b/src/app/app-modules/pharmacist/worklist/worklist.component.html @@ -11,7 +11,7 @@ name="filterTerm" [(ngModel)]="filterTerm" (keyup)="filterBeneficiaryList(filterTerm)" /> - diff --git a/src/app/app-modules/registrar/registration/registration.component.ts b/src/app/app-modules/registrar/registration/registration.component.ts index 1c8eb795..39cf586c 100644 --- a/src/app/app-modules/registrar/registration/registration.component.ts +++ b/src/app/app-modules/registrar/registration/registration.component.ts @@ -39,8 +39,7 @@ import { RegistrationUtils } from '../shared/utility/registration-utility'; import { CanComponentDeactivate } from '../../core/services/can-deactivate-guard.service'; import { HttpServiceService } from '../../core/services/http-service.service'; import { SetLanguageComponent } from '../../core/components/set-language.component'; -import { Observable } from 'rxjs/internal/Observable'; -import { of } from 'rxjs'; +import { Observable, of } from 'rxjs'; import { RegistrarService } from '../shared/services/registrar.service'; import { SessionStorageService } from 'Common-UI/src/registrar/services/session-storage.service'; diff --git a/src/app/app-modules/registrar/shared/services/registrar.service.ts b/src/app/app-modules/registrar/shared/services/registrar.service.ts index 9682ca83..2550d697 100644 --- a/src/app/app-modules/registrar/shared/services/registrar.service.ts +++ b/src/app/app-modules/registrar/shared/services/registrar.service.ts @@ -22,7 +22,7 @@ import { HttpClient } from '@angular/common/http'; import { Injectable } from '@angular/core'; -import { BehaviorSubject } from 'rxjs/internal/BehaviorSubject'; +import { BehaviorSubject } from 'rxjs'; import { environment } from 'src/environments/environment'; @Injectable() diff --git a/src/app/app-modules/reset-password/reset-password.component.html b/src/app/app-modules/reset-password/reset-password.component.html index 4338821b..1b82f0be 100644 --- a/src/app/app-modules/reset-password/reset-password.component.html +++ b/src/app/app-modules/reset-password/reset-password.component.html @@ -25,9 +25,8 @@

    Account Support

    Enter User Name { resolve(route: ActivatedRouteSnapshot) { const serviceProviderId: any = this.sessionstorage.getItem('providerServiceID'); - const userId: any = this.sessionstorage.getItem('userID'); - return this.servicePointService - .getServicePoints(userId, serviceProviderId) - .pipe( - map((res: any) => { - if (res) { - return res; - } else { - this.router.navigate(['/service']); - return null; - } - }) - ); + return this.servicePointService.getServicePoints(serviceProviderId).pipe( + map((res: any) => { + if (res) { + return res; + } else { + this.router.navigate(['/service']); + return null; + } + }) + ); } } diff --git a/src/app/app-modules/service-point/service-point.component.ts b/src/app/app-modules/service-point/service-point.component.ts index 88683bb7..b3e40864 100644 --- a/src/app/app-modules/service-point/service-point.component.ts +++ b/src/app/app-modules/service-point/service-point.component.ts @@ -191,7 +191,7 @@ export class ServicePointComponent implements OnInit, DoCheck { JSON.stringify(serviceLineDetails) ); if (serviceLineDetails.facilityID) { - sessionStorage.setItem('facilityID', serviceLineDetails.facilityID); + this.sessionstorage.setItem('facilityID', serviceLineDetails.facilityID); } this.servicePointForm.controls.servicePointID.reset(); this.servicePointForm.controls.servicePointName.reset(); @@ -301,9 +301,8 @@ export class ServicePointComponent implements OnInit, DoCheck { ); const spID = spIDs; const spPSMID = this.sessionstorage.getItem('providerServiceID'); - const userId = this.sessionstorage.getItem('userID'); this.servicePointService - .getMMUDemographics(spID, spPSMID, userId) + .getMMUDemographics(spID, spPSMID) .subscribe((res: any) => { if (res && res.statusCode === 200) { this.saveDemographicsToStorage(res.data); diff --git a/src/app/app-modules/service-point/service-point.service.ts b/src/app/app-modules/service-point/service-point.service.ts index 9442fdf7..6f8338ac 100644 --- a/src/app/app-modules/service-point/service-point.service.ts +++ b/src/app/app-modules/service-point/service-point.service.ts @@ -34,14 +34,13 @@ export class ServicePointService { readonly sessionstorage: SessionStorageService ) {} - getServicePoints(userId: string, serviceProviderId: string) { + getServicePoints(serviceProviderId: string) { return this.http.post(environment.servicePointUrl, { - userID: userId, providerServiceMapID: serviceProviderId, }); } - getMMUDemographics(spID: any, spPSMID: any, userId: any) { + getMMUDemographics(spID: any, spPSMID: any) { // const spID = this.sessionstorage.getItem('servicePointID'); // const spPSMID = this.sessionstorage.getItem('providerServiceID'); // const userId = this.sessionstorage.getItem('userID'); @@ -49,7 +48,6 @@ export class ServicePointService { return this.http.post(environment.demographicsCurrentMasterUrl, { spID: spID, spPSMID: spPSMID, - userId: userId, }); } // getMMUDemographics() { diff --git a/src/app/app-modules/set-security-questions/set-security-questions.component.ts b/src/app/app-modules/set-security-questions/set-security-questions.component.ts index 8711b2c2..e41bef2d 100644 --- a/src/app/app-modules/set-security-questions/set-security-questions.component.ts +++ b/src/app/app-modules/set-security-questions/set-security-questions.component.ts @@ -75,11 +75,9 @@ export class SetSecurityQuestionsComponent implements OnInit { this.Q_array_one = response.data; this.Q_array_two = response.data; - console.log(this.questions); } handleError(response: any) { - console.log('error', this.questions); } switch() { @@ -113,11 +111,6 @@ export class SetSecurityQuestionsComponent implements OnInit { selectedQuestions: any = []; updateQuestions(selectedques: any, position: any) { - console.log('position', position, 'Selected Question', selectedques); - console.log( - 'before if else block, selected questions', - this.selectedQuestions - ); if (this.selectedQuestions.indexOf(selectedques) === -1) { this.selectedQuestions[position] = selectedques; @@ -130,7 +123,6 @@ export class SetSecurityQuestionsComponent implements OnInit { if (position === 2) { this.answer3 = ''; } - console.log('if block, selected questions', this.selectedQuestions); } else { if (this.selectedQuestions.indexOf(selectedques) !== position) { this.confirmationService.alert( @@ -197,9 +189,6 @@ export class SetSecurityQuestionsComponent implements OnInit { }, ]; - console.log('Request Array', this.dataArray); - console.log('selected questions', this.selectedQuestions); - this.switch(); } else { this.confirmationService.alert( diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 8d2492f8..e4f738d2 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -32,10 +32,11 @@ import { AudioRecordingService } from './app-modules/nurse-doctor/shared/service import { NgxPaginationModule } from 'ngx-pagination'; // import { SharedModule } from './app-modules/core/shared/shared/shared.module'; import { RegistrarService } from './app-modules/registrar/shared/services/registrar.service'; -import { DataSYNCModule } from './app-modules/data-sync/dataSync.module'; import { SharedModule } from './app-modules/core/components/shared/shared.module'; +import { CampHubQrCodeComponent } from './app-modules/data-sync/camp-hub-qr-code/camp-hub-qr-code.component'; import { CommonModule } from '@angular/common'; import { CaptchaComponent } from './app-modules/captcha/captcha.component'; +import { MatChipsModule } from '@angular/material/chips'; import { TrackingModule } from 'Common-UI/src/tracking'; @NgModule({ @@ -49,6 +50,7 @@ import { TrackingModule } from 'Common-UI/src/tracking'; ResetPasswordComponent, TmLogoutComponent, CaptchaComponent, + CampHubQrCodeComponent, ], imports: [ CommonModule, @@ -68,6 +70,7 @@ import { TrackingModule } from 'Common-UI/src/tracking'; NgxPaginationModule, SharedModule, CoreModule.forRoot(), + MatChipsModule, TrackingModule.forRoot(), ], schemas: [CUSTOM_ELEMENTS_SCHEMA], diff --git a/src/assets/Assamese.json b/src/assets/Assamese.json index 24fecce0..66c07fb3 100644 --- a/src/assets/Assamese.json +++ b/src/assets/Assamese.json @@ -1493,6 +1493,8 @@ "close": "ন্বন্ধ" }, "coreComponents": { + "errorForDataSync": "ডাটা ছিঙ্কত সমস্যা", + "partialDataSync": "আংশিকভাৱে সম্পূৰ্ণ হ’ল", "poweredByWipro": "দ্বাৰা চালিত: ৱাইপ্ৰো", "selectCallibrationStrip": "কলিব্ৰেচন ষ্ট্ৰিপ বাচি লওক", "inTableSearchStripCode": "ইন-টেবুল অনুসন্ধান (ষ্ট্ৰিপ কোড)", @@ -1718,6 +1720,25 @@ "abhaDetails": "আভাৰ বিৱৰণ", "abhaAddress": "আভা ঠিকনা", "abhaMode": "আভা মোড", - "abhaDetailsNotAvailable": "আভাৰ বিৱৰণ উপলব্ধ নহয়" + "abhaDetailsNotAvailable": "আভাৰ বিৱৰণ উপলব্ধ নহয়", + "enterMobileNumberToBeLinkedWithAbha": "Enter Phone number to be linked with ABHA", + "doYouWantToVerifyMobileOtpForAbha": "Your provided mobile number is not linked with Aadhaar, Do you want to verify it?", + "abhaCardAlreadyExists": "ABHA already exists for the Aadhaar Number", + "enterABHANumber": "Please Enter ABHA Number", + "enterABHAAddress": "Please Enter ABHA Address", + "enterAadhaarNumber": "Please Enter Aadhaar Number", + "enterMobileNumber": "Please Enter Mobile Number", + "enterCorrectAuthIdForAuthMode": "Please Enter correct Authentication ID for choosen AuthMode", + "abhaAddressFound" : "ABHA Address Found:", + "searchAndDownloadAbha": "Search and Download ABHA", + "abhaSearchMode": "ABHA Search Mode*", + "verifyAbha": "Verify ABHA", + "issueInAbhaCard": "Issue in printing ABHA Card", + "fileUploadedSuccessfully": "File Uploaded successfully", + "verifyMobileOtp": "Verify Mobile OTP", + "enterMobileOtp": "Enter Mobile OTP", + "verify": "Verify", + "abhaNumberAlreadyWith": "The Abha number is already linked with beneficiary ID - ", + "enterTenDigitMobileNumber": "মোবাইল নম্বৰ প্ৰবিষ্ট কৰক" } } \ No newline at end of file diff --git a/src/assets/English.json b/src/assets/English.json index dca88efe..a906a228 100644 --- a/src/assets/English.json +++ b/src/assets/English.json @@ -108,7 +108,7 @@ "district": "District / Village", "registrationDate": "Registration Date", "image": "Image", - "advanceSearch": "Advance Search", + "advanceSearch": "Advanced Search", "status": "Status", "visitCategory": "Visit Category / Visit No", "tcDate": "TC Date", @@ -310,7 +310,7 @@ "toTime": "To Time", "kindlyuploadthefiles": "Kindly upload the files", "clearslots": "Clear Slot", - "advanceBeneficiarySearch": "Advance Beneficiary Search", + "advanceBeneficiarySearch": "Advanced Beneficiary Search", "firstNameisrequired": "First Name is required", "pleaseprovideatleast2character": "Please provide atleast 2 character", "pleaseprovideatleastthreecharacter": "Please provide atleast 3 character", @@ -1503,6 +1503,8 @@ "close": "Close" }, "coreComponents": { + "errorForDataSync": "Error for Data Sync", + "partialDataSync":"Partially Successful", "poweredByWipro": "Powered by: WIPRO", "selectCallibrationStrip": "Select Callibration Strip", "inTableSearchStripCode": "In-Table Search (Strip Code)", @@ -1733,7 +1735,26 @@ "abhaDetails":"ABHA Details", "abhaAddress":"ABHA Address", "abhaMode":"ABHA Mode", - "abhaDetailsNotAvailable":"ABHA details not available" + "abhaDetailsNotAvailable":"ABHA details not available", + "enterMobileNumberToBeLinkedWithAbha": "Enter Phone number to be linked with ABHA", + "doYouWantToVerifyMobileOtpForAbha": "Your provided mobile number is not linked with Aadhaar, Do you want to verify it?", + "abhaCardAlreadyExists": "ABHA already exists for the Aadhaar Number", + "enterABHANumber": "Please Enter ABHA Number", + "enterABHAAddress": "Please Enter ABHA Address", + "enterAadhaarNumber": "Please Enter Aadhaar Number", + "enterMobileNumber": "Please Enter Mobile Number", + "enterCorrectAuthIdForAuthMode": "Please Enter correct Authentication ID for choosen AuthMode", + "abhaAddressFound" : "ABHA Address Found:", + "searchAndDownloadAbha": "Search and Download ABHA", + "abhaSearchMode": "ABHA Search Mode*", + "verifyAbha": "Verify ABHA", + "issueInAbhaCard": "Issue in printing ABHA Card", + "fileUploadedSuccessfully": "File Uploaded successfully", + "verifyMobileOtp": "Verify Mobile OTP", + "enterMobileOtp": "Enter Mobile OTP", + "verify": "Verify", + "abhaNumberAlreadyWith": "The Abha number is already linked with beneficiary ID - ", + "enterTenDigitMobileNumber": "Enter mobile number" } } diff --git a/src/assets/Hindi.json b/src/assets/Hindi.json index fa0e9a4a..a17f8ab0 100644 --- a/src/assets/Hindi.json +++ b/src/assets/Hindi.json @@ -1491,6 +1491,8 @@ "close": "बंद करें" }, "coreComponents": { + "errorForDataSync": "डेटा सिंक में समस्या", + "partialDataSync": "आंशिक रूप से पूरा हुआ", "poweredByWipro": "द्वारा संचालित: विप्रो", "selectCallibrationStrip": "Select Callibration Strip", "inTableSearchStripCode": "In-Table Search (Strip Code)", @@ -1721,7 +1723,27 @@ "abhaDetails":"ABHA Details", "abhaAddress":"ABHA Address", "abhaMode":"ABHA Mode", - "abhaDetailsNotAvailable":"ABHA details not available" + "abhaDetailsNotAvailable":"ABHA details not available", + "enterMobileNumberToBeLinkedWithAbha": "Enter Phone number to be linked with ABHA", + "doYouWantToVerifyMobileOtpForAbha": "Your provided mobile number is not linked with Aadhaar, Do you want to verify it?", + "abhaCardAlreadyExists": "ABHA already exists for the Aadhaar Number", + "enterABHANumber": "Please Enter ABHA Number", + "enterABHAAddress": "Please Enter ABHA Address", + "enterAadhaarNumber": "Please Enter Aadhaar Number", + "enterMobileNumber": "Please Enter Mobile Number", + "enterCorrectAuthIdForAuthMode": "Please Enter correct Authentication ID for choosen AuthMode", + "abhaAddressFound" : "ABHA Address Found:", + "searchAndDownloadAbha": "Search and Download ABHA", + "abhaSearchMode": "ABHA Search Mode*", + "verifyAbha": "Verify ABHA", + "issueInAbhaCard": "Issue in printing ABHA Card", + "fileUploadedSuccessfully": "File Uploaded successfully", + "verifyMobileOtp": "Verify Mobile OTP", + "enterMobileOtp": "Enter Mobile OTP", + "verify": "Verify", + "abhaNumberAlreadyWith": "The Abha number is already linked with beneficiary ID - ", + "enterTenDigitMobileNumber": "Enter mobile number" + } } diff --git a/src/environments/environment.ci.ts.template b/src/environments/environment.ci.ts.template index 0eccddf7..c1de5e62 100644 --- a/src/environments/environment.ci.ts.template +++ b/src/environments/environment.ci.ts.template @@ -50,6 +50,7 @@ const enableCaptcha = <%= ENABLE_CAPTCHA %>; export const environment = { production: true, isMMUOfflineSync: true, + isMMUOfflineQRCode: '<%= QRCODE_ENABLED %>', encKey: sessionStorageEncKey, tracking: { @@ -132,7 +133,7 @@ export const environment = { getprescribedTestDataUrl: `${MMU_API}labTechnician/get/prescribedProceduresList`, labSaveWork: `${MMU_API}labTechnician/save/LabTestResult`, - getEcgAbnormalitiesMasterUrl: `${MMU_API}/master/ecgAbnormalities`, + getEcgAbnormalitiesMasterUrl: `${MMU_API}master/ecgAbnormalities`, /** * Worklist Urls @@ -185,7 +186,7 @@ export const environment = { previousReferredHistoryUrl: `${MMU_API}common/getBenPreviousReferralHistoryDetails`, updateNCDScreeningDetails: `${MMU_API}NCD/update/nurseData`, updateNCDScreeningHistoryDetailsUrl: `${MMU_API}NCD/update/historyScreen`, - updateNCDScreeningDoctorDetails: `${MMU_API}/NCD/update/doctorData`, + updateNCDScreeningDoctorDetails: `${MMU_API}NCD/update/doctorData`, previousVisitDataUrl: `${MMU_API}common/getBenSymptomaticQuestionnaireDetails`, nurseWorklistTMreferred: `${MMU_API}common/getNurseWorklistTMreferred/`, /** @@ -406,7 +407,7 @@ export const environment = { startBloodGlucoseurl: '/api/v1/wbpoct_tests/blood_glucose', startRBSurl: '/api/v1/wbpoct_tests/blood_glucose', // Check availability of benIDs - getBenIDs: `${IDENTITY_API}identity-0.0.1/id/checkAvailablBenIDLocalServer`, + getBenIDs: `${IDENTITY_API}id/checkAvailablBenIDLocalServer`, generateBenID: `${MMU_API}dataSyncActivity/callCentralAPIToGenerateBenIDAndimportToLocal`, // Inventory Data Sync Download @@ -498,5 +499,18 @@ export const environment = { siteKey: siteKey, captchaChallengeURL: captchaChallengeURL, - enableCaptcha: enableCaptcha + enableCaptcha: enableCaptcha, + + // SMSTenplateURLS + getSMStemplates_url:`${COMMON_API}sms/getSMSTemplates`, + getSMStypes_url:`${COMMON_API}sms/getSMSTypes`, + sendSMS_url:`${COMMON_API}sms/sendSMS`, + + getUserId: `${COMMON_API}user/checkUserName/`, + checkUsersignExistUrl: `${ADMIN_API}signature1/signexist/`, + isEnableES: false, + campHubConnectInfoAPI: `${COMMON_API}public/connect/info`, + elasticSearchUrl: `${MMU_API}registrar/quickSearchES`, + advanceElasticSearchUrl: `${MMU_API}registrar/advancedSearchES`, + }; diff --git a/src/environments/environment.dev.ts b/src/environments/environment.dev.ts index 0388df9e..fc0b3ac8 100644 --- a/src/environments/environment.dev.ts +++ b/src/environments/environment.dev.ts @@ -56,17 +56,20 @@ const TM_API = `${tmIP}tmapi-v1.0/`; const COMMON_API_OPEN_SYNC = `${SERVER_IP}commonapi-v1.0/`; const SCHEDULER_API = `${schedulerIP}schedulerapi-v1.0/`; const FHIR_API = `${FHIRIP}/fhirapi-v1.0/`; -const IDENTITY_API = `${identityIP}identity-0.0.1/`; +const IDENTITY_API = `${identityIP}`; const mmuUICasesheet = `${mmuUI_IP}mmuui-v1.0`; const IOT_API = 'http://localhost:8085/ezdx-hub-connect-srv'; +const siteKey = ''; +const captchaChallengeURL = ''; +const enableCaptcha = false; + export const environment = { production: true, - encKey: sessionStorageEncKey, - isMMUOfflineSync: false, - + isMMUOfflineQRCode: false, + encKey: sessionStorageEncKey, tracking: { platform: 'matomo', siteId: 3, @@ -81,16 +84,16 @@ export const environment = { haemoglobinTest: `Haemoglobin Test`, parentAPI: `${MMU_API}`, - INVENTORY_URL: `${inventoryUI_IP}#/redirin?`, + INVENTORY_URL: `${inventoryUI_IP}inventory/#/redirin?`, fallbackUrl: `/pharmacist/redirfallback`, redirInUrl: `/pharmacist/redirin`, - TELEMEDICINE_URL: `${schedulerUI_IP}/scheduler/#/?`, + TELEMEDICINE_URL: `${schedulerUI_IP}scheduler/#/?`, fallbackMMUUrl: `/logout-tm`, redirInMMUUrl: `/common/tcspecialist-worklist`, licenseURL: `${COMMON_API}license.html`, getSessionExistsURL: `${COMMON_API}user/getLoginResponse`, - extendSessionUrl: `${MMU_API}common/extend/redisSession`, + extendSessionUrl: `${MMU_API}common/extehttps://amritwprdev.piramalswasthya.orgnd/redisSession`, /** * Login and Logout Urls */ @@ -98,6 +101,7 @@ export const environment = { loginUrl: `${COMMON_API_OPEN}user/userAuthenticate`, logoutUrl: `${COMMON_API_OPEN}user/userLogout`, userlogoutPreviousSessionUrl: `${COMMON_API_OPEN}user/logOutUserFromConcurrentSession`, + syncUserlogoutPreviousSessionUrl: `${COMMON_API_OPEN_SYNC}user/logOutUserFromConcurrentSession`, /** * Security Question and Forgot password Url @@ -125,7 +129,7 @@ export const environment = { /** * Master Data Urls */ - + getNCDScreeningIDRSDetails: `${MMU_API}NCD/getBenIdrsDetailsFrmNurse`, getDistrictListUrl: `${MMU_API}location/get/districtMaster/`, getSubDistrictListUrl: `${MMU_API}location/get/districtBlockMaster/`, getVillageListUrl: `${MMU_API}location/get/villageMasterFromBlockID/`, @@ -137,14 +141,15 @@ export const environment = { diagnosisSnomedCTRecordUrl: `${MMU_API}snomed/getSnomedCTRecordList`, getDistrictTalukUrl: `${MMU_API}location/get/DistrictTalukMaster/`, diagnosisSnomedCTRecordUrl1: `${COMMON_API}snomed/getSnomedCTRecordList`, + /** * Lab Data Urls */ getprescribedTestDataUrl: `${MMU_API}labTechnician/get/prescribedProceduresList`, labSaveWork: `${MMU_API}labTechnician/save/LabTestResult`, - getNCDScreeningIDRSDetails: `${MMU_API}NCD/getBenIdrsDetailsFrmNurse`, - getNCDScreeningDoctorDetails: `${MMU_API}NCD/getBenCaseRecordFromDoctorNCDScreening`, + getEcgAbnormalitiesMasterUrl: `${MMU_API}master/ecgAbnormalities`, + /** * Worklist Urls */ @@ -158,13 +163,12 @@ export const environment = { radiologistWorklist: `${MMU_API}common/getRadiologist-worklist-New/`, oncologistWorklist: `${MMU_API}common/getOncologist-worklist-New/`, pharmacistWorklist: `${MMU_API}common/getPharma-worklist-New/`, - previousVisitDataUrl: `${MMU_API}common/getBenSymptomaticQuestionnaireDetails`, // New API getBeneficiaryDetail: `${MMU_API}registrar/get/benDetailsByRegIDForLeftPanelNew`, getCompleteBeneficiaryDetail: `${MMU_API}registrar/get/beneficiaryDetails`, - updateNCDScreeningIDRSDetailsUrl: `${MMU_API}NCD/update/idrsScreen`, + // getBeneficiaryImage: `${MMU_API}registrar/get/beneficiaryImage`, // New API getBeneficiaryImage: `${MMU_API}registrar/getBenImage`, @@ -181,7 +185,8 @@ export const environment = { getStatesURL: `${MMU_API}location/get/stateMaster`, getDistrictsURL: `${MMU_API}location/get/districtMaster/`, countryId: 1, - + updateNCDScreeningIDRSDetailsUrl: `${MMU_API}NCD/update/idrsScreen`, + previousVisitDataUrl: `${MMU_API}common/getBenSymptomaticQuestionnaireDetails`, /** * NCD SCREENING API URLs */ @@ -191,6 +196,7 @@ export const environment = { getNCDScreeningDetails: `${MMU_API}NCD/get/nurseData`, getNCDScreeningHistoryDetails: `${MMU_API}NCD/getBenHistoryDetails`, getNCDSceeriningVitalDetails: `${MMU_API}NCD/getBenVitalDetailsFrmNurse`, + getNCDScreeningDoctorDetails: `${MMU_API}NCD/getBenCaseRecordFromDoctorNCDScreening`, previousPhyscialactivityHistoryUrl: `${MMU_API}common/getBenPhysicalHistory`, previousDiabetesHistoryUrl: `${MMU_API}common/getBenPreviousDiabetesHistoryDetails`, previousReferredHistoryUrl: `${MMU_API}common/getBenPreviousReferralHistoryDetails`, @@ -375,10 +381,10 @@ export const environment = { getNcdScreeningVisitCountUrl: `${MMU_API}NCD/getNcdScreeningVisitCount/`, getVanDetailsForMasterDownloadUrl: `${MMU_API}dataSyncActivity/getVanDetailsForMasterDownload`, - getMasterSpecializationUrl: `${SCHEDULER_API}/specialist/masterspecialization`, - getSpecialistUrl: `${SCHEDULER_API}/specialist/getSpecialist`, - getAvailableSlotUrl: `${SCHEDULER_API}/schedule/getavailableSlot`, - getSwymedMailUrl: `${SCHEDULER_API}/van/getvan`, + getMasterSpecializationUrl: `${SCHEDULER_API}specialist/masterspecialization`, + getSpecialistUrl: `${SCHEDULER_API}specialist/getSpecialist`, + getAvailableSlotUrl: `${SCHEDULER_API}schedule/getavailableSlot`, + getSwymedMailUrl: `${SCHEDULER_API}van/getvan`, updateBeneficiaryArrivalStatusUrl: `${MMU_API}tc/update/benArrivalStatus`, cancelBeneficiaryTCRequestUrl: `${MMU_API}tc/cancel/benTCRequest`, @@ -410,6 +416,7 @@ export const environment = { startBPurl: '/api/v1/physical_tests/blood_pressure', startHemoglobinurl: '/api/v1/wbpoct_tests/hemoglobin', startBloodGlucoseurl: '/api/v1/wbpoct_tests/blood_glucose', + startRBSurl: '/api/v1/wbpoct_tests/blood_glucose', // Check availability of benIDs getBenIDs: `${IDENTITY_API}id/checkAvailablBenIDLocalServer`, @@ -417,21 +424,36 @@ export const environment = { // Inventory Data Sync Download getInventorySyncData: `${MMU_API}dataSyncActivity/downloadTransactionToLocal`, + nurseWorklistTMreferred: `${MMU_API}common/getNurseWorklistTMreferred/`, + + //fetch TM Casesheet + getTMCasesheetData: `${MMU_API}common/get/Case-sheet/TMReferredprintData`, /*Load HRP Details */ loadHRPUrl: `${MMU_API}ANC/getHRPStatus`, /*Doctor signature download */ downloadSignUrl: `${COMMON_API}signature1/`, + // downloadSignUrl: `${COMMON_API}getSignClass/`, + //SH20094090,calibration integration,09-06-2021 - getCalibrationStrips: `${ADMIN_API}/fetchCalibrationStrips`, + getCalibrationStrips: `${ADMIN_API}fetchCalibrationStrips`, getLanguageList: `${COMMON_API}beneficiary/getLanguageList`, + calculateBmiStatus: `${TM_API}common/calculateBMIStatus`, + validateSecurityQuestionAndAnswerUrl: `${COMMON_API_OPEN}user/validateSecurityQuestionAndAnswer`, + getTransactionIdForChangePasswordUrl: `${COMMON_API_OPEN}user/getTransactionIdForChangePassword`, + /*Covid vaccination Urls */ vaccinationTypeAndDoseMasterUrl: `${COMMON_API}covid/master/VaccinationTypeAndDoseTaken`, saveCovidVaccinationDetailsUrl: `${COMMON_API}covid/saveCovidVaccinationDetails`, previousCovidVaccinationUrl: `${COMMON_API}covid/getCovidVaccinationDetails`, + /* SWAASA Urls*/ + getResultStatusURL: `${COMMON_API}lungAssessment/startAssesment`, + getAssessmentUrl: `${COMMON_API}lungAssessment/getAssesment`, + getAssessmentIdUrl: `${COMMON_API}swaalungAssessmentsa/getAssesmentDetails`, + /* Customization APIs*/ getAllRegistrationData: `${COMMON_API}customization/fetchAllData`, @@ -483,5 +505,28 @@ export const environment = { printPngCard: `${FHIR_API}abhaCreation/printAbhaCard`, printWebLoginPhrCard: `${FHIR_API}abhaCreation/printWebLoginPhrCard`, + /* ABHA Extension */ + abhaExtension: `@sbx`, // or '@abdm' based on your production environment + confirmAadharBio: `${FHIR_API}healthIDWithBio/confirmWithAadhaarBio`, + generateABHAForBio: `${FHIR_API}healthIDWithBio/verifyBio`, + generateABHAForBioMobileOTP: `${FHIR_API}healthIDWithBio/generateMobileOTP`, + getBenIdForhealthID: `${FHIR_API}healthID/getBenIdForhealthID`, + + siteKey: siteKey, + captchaChallengeURL: captchaChallengeURL, + enableCaptcha: enableCaptcha, + + // SMSTenplateURLS + getSMStemplates_url: `${COMMON_API}sms/getSMSTemplates`, + getSMStypes_url: `${COMMON_API}sms/getSMSTypes`, + sendSMS_url: `${COMMON_API}sms/sendSMS`, + + getUserId: `${COMMON_API}user/checkUserName/`, + checkUsersignExistUrl: `${ADMIN_API}signature1/signexist/`, + isEnableES: false, + elasticSearchUrl: `${MMU_API}registrar/quickSearchES`, + advanceElasticSearchUrl: `${MMU_API}registrar/advancedSearchES`, + isSMSFeatureEnabled: false, + campHubConnectInfoAPI: `${COMMON_API}public/connect/info`, }; diff --git a/src/environments/environment.local.ts b/src/environments/environment.local.ts index e88449e9..8173d6d6 100644 --- a/src/environments/environment.local.ts +++ b/src/environments/environment.local.ts @@ -64,14 +64,14 @@ const captchaChallengeURL = ''; const enableCaptcha = false; export const environment = { - production: false, - isMMUOfflineSync: true, + production: true, + isMMUOfflineSync: false, + isMMUOfflineQRCode: false, encKey: sessionStorageEncKey, - tracking: { platform: 'matomo', siteId: 3, - trackerUrl: '//127.0.0.1/', + trackerUrl: 'https://matomo.piramalswasthya.org/', trackingPlatform: 'local', enabled: true, }, @@ -82,16 +82,16 @@ export const environment = { haemoglobinTest: `Haemoglobin Test`, parentAPI: `${MMU_API}`, - INVENTORY_URL: `${inventoryUI_IP}:4201/#/redirin?`, + INVENTORY_URL: `${inventoryUI_IP}inventory/#/redirin?`, fallbackUrl: `/pharmacist/redirfallback`, redirInUrl: `/pharmacist/redirin`, - TELEMEDICINE_URL: `${schedulerUI_IP}:4208/#/?`, + TELEMEDICINE_URL: `${schedulerUI_IP}scheduler/#/?`, fallbackMMUUrl: `/logout-tm`, redirInMMUUrl: `/common/tcspecialist-worklist`, licenseURL: `${COMMON_API}license.html`, getSessionExistsURL: `${COMMON_API}user/getLoginResponse`, - extendSessionUrl: `${MMU_API}common/extend/redisSession`, + extendSessionUrl: `${MMU_API}common/extehttps://amritwprdev.piramalswasthya.orgnd/redisSession`, /** * Login and Logout Urls */ @@ -108,7 +108,7 @@ export const environment = { getSecurityQuestionUrl: `${COMMON_API_OPEN}user/getsecurityquetions`, saveUserSecurityQuestionsAnswerUrl: `${COMMON_API_OPEN}user/saveUserSecurityQuesAns`, setNewPasswordUrl: `${COMMON_API_OPEN}user/setForgetPassword`, - previousVisitDataUrl: `${MMU_API}common/getBenSymptomaticQuestionnaireDetails`, + servicePointUrl: `${MMU_API}user/getUserVanSpDetails`, servicePointVillages: `${MMU_API}user/getServicepointVillages`, @@ -127,9 +127,7 @@ export const environment = { /** * Master Data Urls */ - previousPhyscialactivityHistoryUrl: `${MMU_API}common/getBenPhysicalHistory`, - previousDiabetesHistoryUrl: `${MMU_API}common/getBenPreviousDiabetesHistoryDetails`, - previousReferredHistoryUrl: `${MMU_API}common/getBenPreviousReferralHistoryDetails`, + getNCDScreeningIDRSDetails: `${MMU_API}NCD/getBenIdrsDetailsFrmNurse`, getDistrictListUrl: `${MMU_API}location/get/districtMaster/`, getSubDistrictListUrl: `${MMU_API}location/get/districtBlockMaster/`, getVillageListUrl: `${MMU_API}location/get/villageMasterFromBlockID/`, @@ -140,12 +138,12 @@ export const environment = { snomedCTRecordURL: `${MMU_API}snomed/getSnomedCTRecord`, diagnosisSnomedCTRecordUrl: `${MMU_API}snomed/getSnomedCTRecordList`, getDistrictTalukUrl: `${MMU_API}location/get/DistrictTalukMaster/`, - snomedCTRecordListURL1: `${COMMON_API}snomed/getSnomedCTRecordList`, diagnosisSnomedCTRecordUrl1: `${COMMON_API}snomed/getSnomedCTRecordList`, + /** * Lab Data Urls */ - getNCDScreeningIDRSDetails: `${MMU_API}NCD/getBenIdrsDetailsFrmNurse`, + getprescribedTestDataUrl: `${MMU_API}labTechnician/get/prescribedProceduresList`, labSaveWork: `${MMU_API}labTechnician/save/LabTestResult`, getEcgAbnormalitiesMasterUrl: `${MMU_API}master/ecgAbnormalities`, @@ -185,7 +183,8 @@ export const environment = { getStatesURL: `${MMU_API}location/get/stateMaster`, getDistrictsURL: `${MMU_API}location/get/districtMaster/`, countryId: 1, - + updateNCDScreeningIDRSDetailsUrl: `${MMU_API}NCD/update/idrsScreen`, + previousVisitDataUrl: `${MMU_API}common/getBenSymptomaticQuestionnaireDetails`, /** * NCD SCREENING API URLs */ @@ -193,22 +192,22 @@ export const environment = { // getNCDScreeningVisitDetails: `${MMU_API}CS-cancerScreening/getBenDataFrmNurseToDocVisitDetailsScreen`, getNCDScreeningVisitDetails: `${MMU_API}NCD/getBenVisitDetailsFrmNurseNCDScreening`, getNCDScreeningDetails: `${MMU_API}NCD/get/nurseData`, - updateNCDScreeningDetails: `${MMU_API}NCD/update/nurseData`, - saveDoctorNCDScreeningDetails: `${MMU_API}NCD/save/doctorData`, getNCDScreeningHistoryDetails: `${MMU_API}NCD/getBenHistoryDetails`, getNCDSceeriningVitalDetails: `${MMU_API}NCD/getBenVitalDetailsFrmNurse`, - + getNCDScreeningDoctorDetails: `${MMU_API}NCD/getBenCaseRecordFromDoctorNCDScreening`, + previousPhyscialactivityHistoryUrl: `${MMU_API}common/getBenPhysicalHistory`, + previousDiabetesHistoryUrl: `${MMU_API}common/getBenPreviousDiabetesHistoryDetails`, + previousReferredHistoryUrl: `${MMU_API}common/getBenPreviousReferralHistoryDetails`, + updateNCDScreeningDetails: `${MMU_API}NCD/update/nurseData`, updateNCDScreeningHistoryDetailsUrl: `${MMU_API}NCD/update/historyScreen`, - updateNCDScreeningDoctorDetails: `${MMU_API}NCD/update/doctorData`, - updateNCDVitalsDetailsUrl: `${MMU_API}NCD/update/vitalScreen`, - updateNCDScreeningIDRSDetailsUrl: `${MMU_API}NCD/update/idrsScreen`, + updateNCDVitalsDetailsUrl: `${MMU_API}NCD/update/vitalScreen`, /** * GENERAL OPD QUICK CONSULT API URLs */ saveNurseGeneralQuickConsult: `${MMU_API}genOPD-QC-quickConsult/save/nurseData`, saveDoctorGeneralQuickConsult: `${MMU_API}genOPD-QC-quickConsult/save/doctorData`, - + saveDoctorNCDScreeningDetails: `${MMU_API}NCD/save/doctorData`, getGeneralOPDQuickConsultVisitDetails: `${MMU_API}genOPD-QC-quickConsult/getBenDataFrmNurseToDocVisitDetailsScreen`, getGeneralOPDQuickConsultVitalDetails: `${MMU_API}genOPD-QC-quickConsult/getBenVitalDetailsFrmNurse`, @@ -329,7 +328,6 @@ export const environment = { getPreviousSignificiantFindingUrl: `${MMU_API}common/getDoctorPreviousSignificantFindings`, getCancerScreeningDoctorDetails: `${MMU_API}CS-cancerScreening/getBenCaseRecordFromDoctorCS`, - getGeneralOPDQuickConsultDoctorDetails: `${MMU_API}genOPD-QC-quickConsult/getBenCaseRecordFromDoctorQuickConsult`, getANCDoctorDetails: `${MMU_API}ANC/getBenCaseRecordFromDoctorANC`, getGeneralOPDDoctorDetails: `${MMU_API}generalOPD/getBenCaseRecordFromDoctorGeneralOPD`, @@ -337,7 +335,7 @@ export const environment = { getPNCDoctorDetails: `${MMU_API}PNC/getBenCaseRecordFromDoctorPNC`, updateCancerScreeningDoctorDetails: `${MMU_API}CS-cancerScreening/update/doctorData`, - + updateNCDScreeningDoctorDetails: `${MMU_API}NCD/update/doctorData`, updateGeneralOPDQuickConsultDoctorDetails: `${MMU_API}genOPD-QC-quickConsult/update/doctorData`, updateANCDoctorDetails: `${MMU_API}ANC/update/doctorData`, updateGeneralOPDDoctorDetails: `${MMU_API}generalOPD/update/doctorData`, @@ -379,13 +377,12 @@ export const environment = { syncDataDownloadUrl: `${MMU_API}dataSyncActivity/startMasterDownload`, syncDownloadProgressUrl: `${MMU_API}dataSyncActivity/checkMastersDownloadProgress`, getNcdScreeningVisitCountUrl: `${MMU_API}NCD/getNcdScreeningVisitCount/`, - getNCDScreeningDoctorDetails: `${MMU_API}NCD/getBenCaseRecordFromDoctorNCDScreening`, getVanDetailsForMasterDownloadUrl: `${MMU_API}dataSyncActivity/getVanDetailsForMasterDownload`, - getMasterSpecializationUrl: `${SCHEDULER_API}/specialist/masterspecialization`, - getSpecialistUrl: `${SCHEDULER_API}/specialist/getSpecialist`, - getAvailableSlotUrl: `${SCHEDULER_API}/schedule/getavailableSlot`, - getSwymedMailUrl: `${SCHEDULER_API}/van/getvan`, + getMasterSpecializationUrl: `${SCHEDULER_API}specialist/masterspecialization`, + getSpecialistUrl: `${SCHEDULER_API}specialist/getSpecialist`, + getAvailableSlotUrl: `${SCHEDULER_API}schedule/getavailableSlot`, + getSwymedMailUrl: `${SCHEDULER_API}van/getvan`, updateBeneficiaryArrivalStatusUrl: `${MMU_API}tc/update/benArrivalStatus`, cancelBeneficiaryTCRequestUrl: `${MMU_API}tc/cancel/benTCRequest`, @@ -435,14 +432,13 @@ export const environment = { /*Doctor signature download */ downloadSignUrl: `${COMMON_API}signature1/`, + // downloadSignUrl: `${COMMON_API}getSignClass/`, - //calibration integration + //SH20094090,calibration integration,09-06-2021 getCalibrationStrips: `${ADMIN_API}fetchCalibrationStrips`, - getLanguageList: `${COMMON_API}beneficiary/getLanguageList`, calculateBmiStatus: `${TM_API}common/calculateBMIStatus`, - validateSecurityQuestionAndAnswerUrl: `${COMMON_API_OPEN}user/validateSecurityQuestionAndAnswer`, getTransactionIdForChangePasswordUrl: `${COMMON_API_OPEN}user/getTransactionIdForChangePassword`, @@ -454,7 +450,7 @@ export const environment = { /* SWAASA Urls*/ getResultStatusURL: `${COMMON_API}lungAssessment/startAssesment`, getAssessmentUrl: `${COMMON_API}lungAssessment/getAssesment`, - getAssessmentIdUrl: `${COMMON_API}lungAssessment/getAssesmentDetails`, + getAssessmentIdUrl: `${COMMON_API}swaalungAssessmentsa/getAssesmentDetails`, /* Customization APIs*/ getAllRegistrationData: `${COMMON_API}customization/fetchAllData`, @@ -506,7 +502,9 @@ export const environment = { verifyOtpForLogin: `${FHIR_API}abhaLogin/verifyAbhaLogin`, printPngCard: `${FHIR_API}abhaCreation/printAbhaCard`, printWebLoginPhrCard: `${FHIR_API}abhaCreation/printWebLoginPhrCard`, - abhaExtension: `@sbx`, + + /* ABHA Extension */ + abhaExtension: `@sbx`, // or '@abdm' based on your production environment confirmAadharBio: `${FHIR_API}healthIDWithBio/confirmWithAadhaarBio`, generateABHAForBio: `${FHIR_API}healthIDWithBio/verifyBio`, generateABHAForBioMobileOTP: `${FHIR_API}healthIDWithBio/generateMobileOTP`, @@ -516,4 +514,17 @@ export const environment = { siteKey: siteKey, captchaChallengeURL: captchaChallengeURL, enableCaptcha: enableCaptcha, + + // SMSTenplateURLS + getSMStemplates_url: `${COMMON_API}sms/getSMSTemplates`, + getSMStypes_url: `${COMMON_API}sms/getSMSTypes`, + sendSMS_url: `${COMMON_API}sms/sendSMS`, + + getUserId: `${COMMON_API}user/checkUserName/`, + checkUsersignExistUrl: `${ADMIN_API}signature1/signexist/`, + isEnableES: false, + elasticSearchUrl: `${MMU_API}registrar/quickSearchES`, + advanceElasticSearchUrl: `${MMU_API}registrar/advancedSearchES`, + isSMSFeatureEnabled: false, + campHubConnectInfoAPI: `${COMMON_API}public/connect/info`, }; diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index d384d05f..d4bda788 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -41,20 +41,16 @@ const adminIP = 'https://amritwprdev.piramalswasthya.org/'; const FHIRIP = 'https://amritwprdev.piramalswasthya.org'; const sessionStorageEncKey = ''; -const ADMIN_API = `${adminIP}/adminapi-v1.0/`; -// With API MAN Configuration -// const COMMON_API_OPEN = `http://${IP}:8080/apiman-gateway/IEMR/Common/open/`; -// const COMMON_API = `http://${IP}:8080/apiman-gateway/IEMR/Common/open/`; -// const MMU_API = `http://${IP}:8080/apiman-gateway/IEMR/MMU/1.0/`; - -// Without API MAN Configuration -const COMMON_API_OPEN = `${commonIP}commonapi-v1.0/`; -const COMMON_API = `${commonIP}commonapi-v1.0/`; -const MMU_API = `${mmuIP}mmuapi-v1.0/`; -const TM_API = `${tmIP}tmapi-v1.0/`; -const COMMON_API_OPEN_SYNC = `${SERVER_IP}commonapi-v1.0/`; -const SCHEDULER_API = `${schedulerIP}schedulerapi-v1.0/`; -const FHIR_API = `${FHIRIP}/fhirapi-v1.0/`; +const ADMIN_API = `${adminIP}admin-api/`; + +const COMMON_API_OPEN = `${commonIP}common-api/`; +const COMMON_API = `${commonIP}common-api/`; + +const MMU_API = `${mmuIP}mmu-api/`; +const TM_API = `${tmIP}tm-api/`; +const COMMON_API_OPEN_SYNC = `${SERVER_IP}common-api-v3.0/`; +const SCHEDULER_API = `${schedulerIP}scheduler-api/`; +const FHIR_API = `${FHIRIP}/fhir-api/`; const IDENTITY_API = `${identityIP}identity-0.0.1/`; const mmuUICasesheet = `${mmuUI_IP}mmuui-v1.0`; @@ -67,22 +63,23 @@ const enableCaptcha = false; export const environment = { production: true, isMMUOfflineSync: false, + isMMUOfflineQRCode: false, encKey: sessionStorageEncKey, - app: `MMU`, - RBSTest: `RBS Test`, - visualAcuityTest: `Visual Acuity Test`, - haemoglobinTest: `Haemoglobin Test`, - parentAPI: `${MMU_API}`, - tracking: { platform: 'matomo', siteId: 3, trackerUrl: 'https://matomo.piramalswasthya.org/', - trackingPlatform: 'production', + trackingPlatform: 'local', enabled: true, }, - INVENTORY_URL: `${inventoryUI_IP}#/redirin?`, + app: `MMU`, + RBSTest: `RBS Test`, + visualAcuityTest: `Visual Acuity Test`, + haemoglobinTest: `Haemoglobin Test`, + parentAPI: `${MMU_API}`, + + INVENTORY_URL: `${inventoryUI_IP}inventory/#/redirin?`, fallbackUrl: `/pharmacist/redirfallback`, redirInUrl: `/pharmacist/redirin`, @@ -91,7 +88,7 @@ export const environment = { redirInMMUUrl: `/common/tcspecialist-worklist`, licenseURL: `${COMMON_API}license.html`, getSessionExistsURL: `${COMMON_API}user/getLoginResponse`, - extendSessionUrl: `${MMU_API}common/extend/redisSession`, + extendSessionUrl: `${MMU_API}common/extehttps://amritwprdev.piramalswasthya.orgnd/redisSession`, /** * Login and Logout Urls */ @@ -432,6 +429,7 @@ export const environment = { /*Doctor signature download */ downloadSignUrl: `${COMMON_API}signature1/`, + // downloadSignUrl: `${COMMON_API}getSignClass/`, //SH20094090,calibration integration,09-06-2021 getCalibrationStrips: `${ADMIN_API}fetchCalibrationStrips`, @@ -513,4 +511,17 @@ export const environment = { siteKey: siteKey, captchaChallengeURL: captchaChallengeURL, enableCaptcha: enableCaptcha, + + // SMSTenplateURLS + getSMStemplates_url: `${COMMON_API}sms/getSMSTemplates`, + getSMStypes_url: `${COMMON_API}sms/getSMSTypes`, + sendSMS_url: `${COMMON_API}sms/sendSMS`, + + getUserId: `${COMMON_API}user/checkUserName/`, + checkUsersignExistUrl: `${ADMIN_API}signature1/signexist/`, + isEnableES: false, + elasticSearchUrl: `${MMU_API}registrar/quickSearchES`, + advanceElasticSearchUrl: `${MMU_API}registrar/advancedSearchES`, + isSMSFeatureEnabled: false, + campHubConnectInfoAPI: `${COMMON_API}public/connect/info`, }; diff --git a/src/environments/environment.test.ts b/src/environments/environment.test.ts index 61c1302c..d4bda788 100644 --- a/src/environments/environment.test.ts +++ b/src/environments/environment.test.ts @@ -20,11 +20,12 @@ * along with this program. If not, see https://www.gnu.org/licenses/. */ +// import { keys } from './enckey'; + // The file contents for the current environment will overwrite these during build. // The build system defaults to the dev environment which uses `environment.ts`, but if you do // `ng build --env=prod` then `environment.prod.ts` will be used instead. // The list of which env maps to which file can be found in `.angular-cli.json`. - const commonIP = 'https://amritwprdev.piramalswasthya.org/'; const tmIP = 'https://amritwprdev.piramalswasthya.org/'; const mmuIP = 'https://amritwprdev.piramalswasthya.org/'; @@ -36,39 +37,39 @@ const identityIP = 'https://amritwprdev.piramalswasthya.org/'; const SERVER_IP = 'https://amritwprdev.piramalswasthya.org/'; const SWYMED_IP = 'swymed://14.143.13.109'; -const adminIP = 'https://amritwprdev.piramalswasthya.org'; +const adminIP = 'https://amritwprdev.piramalswasthya.org/'; const FHIRIP = 'https://amritwprdev.piramalswasthya.org'; const sessionStorageEncKey = ''; -const ADMIN_API = `${adminIP}/adminapi-v1.0`; -// With API MAN Configuration -// const COMMON_API_OPEN = `http://${IP}:8080/apiman-gateway/IEMR/Common/open/`; -// const COMMON_API = `http://${IP}:8080/apiman-gateway/IEMR/Common/open/`; -// const MMU_API = `http://${IP}:8080/apiman-gateway/IEMR/MMU/1.0/`; - -// Without API MAN Configuration -const COMMON_API_OPEN = `${commonIP}commonapi-v1.0/`; -const COMMON_API = `${commonIP}commonapi-v1.0/`; -const MMU_API = `${mmuIP}mmuapi-v1.0/`; -const TM_API = `${tmIP}tmapi-v1.0/`; -const COMMON_API_OPEN_SYNC = `${SERVER_IP}commonapi-v1.0/`; -const SCHEDULER_API = `${schedulerIP}schedulerapi-v1.0/`; -const FHIR_API = `${FHIRIP}/fhirapi-v1.0/`; +const ADMIN_API = `${adminIP}admin-api/`; + +const COMMON_API_OPEN = `${commonIP}common-api/`; +const COMMON_API = `${commonIP}common-api/`; + +const MMU_API = `${mmuIP}mmu-api/`; +const TM_API = `${tmIP}tm-api/`; +const COMMON_API_OPEN_SYNC = `${SERVER_IP}common-api-v3.0/`; +const SCHEDULER_API = `${schedulerIP}scheduler-api/`; +const FHIR_API = `${FHIRIP}/fhir-api/`; const IDENTITY_API = `${identityIP}identity-0.0.1/`; const mmuUICasesheet = `${mmuUI_IP}mmuui-v1.0`; const IOT_API = 'http://localhost:8085/ezdx-hub-connect-srv'; +const siteKey = ''; +const captchaChallengeURL = ''; +const enableCaptcha = false; + export const environment = { production: true, isMMUOfflineSync: false, + isMMUOfflineQRCode: false, encKey: sessionStorageEncKey, - tracking: { platform: 'matomo', siteId: 3, - trackerUrl: '//127.0.0.1/', - trackingPlatform: 'test', + trackerUrl: 'https://matomo.piramalswasthya.org/', + trackingPlatform: 'local', enabled: true, }, @@ -78,16 +79,16 @@ export const environment = { haemoglobinTest: `Haemoglobin Test`, parentAPI: `${MMU_API}`, - INVENTORY_URL: `${inventoryUI_IP}/inventory/#/redirin?`, + INVENTORY_URL: `${inventoryUI_IP}inventory/#/redirin?`, fallbackUrl: `/pharmacist/redirfallback`, redirInUrl: `/pharmacist/redirin`, - TELEMEDICINE_URL: `${schedulerUI_IP}/schedulerui-v1.0/#/?`, + TELEMEDICINE_URL: `${schedulerUI_IP}scheduler/#/?`, fallbackMMUUrl: `/logout-tm`, redirInMMUUrl: `/common/tcspecialist-worklist`, licenseURL: `${COMMON_API}license.html`, getSessionExistsURL: `${COMMON_API}user/getLoginResponse`, - extendSessionUrl: `${MMU_API}common/extend/redisSession`, + extendSessionUrl: `${MMU_API}common/extehttps://amritwprdev.piramalswasthya.orgnd/redisSession`, /** * Login and Logout Urls */ @@ -104,7 +105,7 @@ export const environment = { getSecurityQuestionUrl: `${COMMON_API_OPEN}user/getsecurityquetions`, saveUserSecurityQuestionsAnswerUrl: `${COMMON_API_OPEN}user/saveUserSecurityQuesAns`, setNewPasswordUrl: `${COMMON_API_OPEN}user/setForgetPassword`, - previousVisitDataUrl: `${MMU_API}common/getBenSymptomaticQuestionnaireDetails`, + servicePointUrl: `${MMU_API}user/getUserVanSpDetails`, servicePointVillages: `${MMU_API}user/getServicepointVillages`, @@ -123,9 +124,7 @@ export const environment = { /** * Master Data Urls */ - previousPhyscialactivityHistoryUrl: `${MMU_API}common/getBenPhysicalHistory`, - previousDiabetesHistoryUrl: `${MMU_API}common/getBenPreviousDiabetesHistoryDetails`, - previousReferredHistoryUrl: `${MMU_API}common/getBenPreviousReferralHistoryDetails`, + getNCDScreeningIDRSDetails: `${MMU_API}NCD/getBenIdrsDetailsFrmNurse`, getDistrictListUrl: `${MMU_API}location/get/districtMaster/`, getSubDistrictListUrl: `${MMU_API}location/get/districtBlockMaster/`, getVillageListUrl: `${MMU_API}location/get/villageMasterFromBlockID/`, @@ -136,12 +135,12 @@ export const environment = { snomedCTRecordURL: `${MMU_API}snomed/getSnomedCTRecord`, diagnosisSnomedCTRecordUrl: `${MMU_API}snomed/getSnomedCTRecordList`, getDistrictTalukUrl: `${MMU_API}location/get/DistrictTalukMaster/`, - snomedCTRecordListURL1: `${COMMON_API}snomed/getSnomedCTRecordList`, diagnosisSnomedCTRecordUrl1: `${COMMON_API}snomed/getSnomedCTRecordList`, + /** * Lab Data Urls */ - getNCDScreeningIDRSDetails: `${MMU_API}NCD/getBenIdrsDetailsFrmNurse`, + getprescribedTestDataUrl: `${MMU_API}labTechnician/get/prescribedProceduresList`, labSaveWork: `${MMU_API}labTechnician/save/LabTestResult`, getEcgAbnormalitiesMasterUrl: `${MMU_API}master/ecgAbnormalities`, @@ -181,7 +180,8 @@ export const environment = { getStatesURL: `${MMU_API}location/get/stateMaster`, getDistrictsURL: `${MMU_API}location/get/districtMaster/`, countryId: 1, - + updateNCDScreeningIDRSDetailsUrl: `${MMU_API}NCD/update/idrsScreen`, + previousVisitDataUrl: `${MMU_API}common/getBenSymptomaticQuestionnaireDetails`, /** * NCD SCREENING API URLs */ @@ -189,22 +189,22 @@ export const environment = { // getNCDScreeningVisitDetails: `${MMU_API}CS-cancerScreening/getBenDataFrmNurseToDocVisitDetailsScreen`, getNCDScreeningVisitDetails: `${MMU_API}NCD/getBenVisitDetailsFrmNurseNCDScreening`, getNCDScreeningDetails: `${MMU_API}NCD/get/nurseData`, - updateNCDScreeningDetails: `${MMU_API}NCD/update/nurseData`, - saveDoctorNCDScreeningDetails: `${MMU_API}NCD/save/doctorData`, getNCDScreeningHistoryDetails: `${MMU_API}NCD/getBenHistoryDetails`, getNCDSceeriningVitalDetails: `${MMU_API}NCD/getBenVitalDetailsFrmNurse`, - + getNCDScreeningDoctorDetails: `${MMU_API}NCD/getBenCaseRecordFromDoctorNCDScreening`, + previousPhyscialactivityHistoryUrl: `${MMU_API}common/getBenPhysicalHistory`, + previousDiabetesHistoryUrl: `${MMU_API}common/getBenPreviousDiabetesHistoryDetails`, + previousReferredHistoryUrl: `${MMU_API}common/getBenPreviousReferralHistoryDetails`, + updateNCDScreeningDetails: `${MMU_API}NCD/update/nurseData`, updateNCDScreeningHistoryDetailsUrl: `${MMU_API}NCD/update/historyScreen`, - updateNCDScreeningDoctorDetails: `${MMU_API}NCD/update/doctorData`, - updateNCDVitalsDetailsUrl: `${MMU_API}NCD/update/vitalScreen`, - updateNCDScreeningIDRSDetailsUrl: `${MMU_API}NCD/update/idrsScreen`, + updateNCDVitalsDetailsUrl: `${MMU_API}NCD/update/vitalScreen`, /** * GENERAL OPD QUICK CONSULT API URLs */ saveNurseGeneralQuickConsult: `${MMU_API}genOPD-QC-quickConsult/save/nurseData`, saveDoctorGeneralQuickConsult: `${MMU_API}genOPD-QC-quickConsult/save/doctorData`, - + saveDoctorNCDScreeningDetails: `${MMU_API}NCD/save/doctorData`, getGeneralOPDQuickConsultVisitDetails: `${MMU_API}genOPD-QC-quickConsult/getBenDataFrmNurseToDocVisitDetailsScreen`, getGeneralOPDQuickConsultVitalDetails: `${MMU_API}genOPD-QC-quickConsult/getBenVitalDetailsFrmNurse`, @@ -325,7 +325,6 @@ export const environment = { getPreviousSignificiantFindingUrl: `${MMU_API}common/getDoctorPreviousSignificantFindings`, getCancerScreeningDoctorDetails: `${MMU_API}CS-cancerScreening/getBenCaseRecordFromDoctorCS`, - getGeneralOPDQuickConsultDoctorDetails: `${MMU_API}genOPD-QC-quickConsult/getBenCaseRecordFromDoctorQuickConsult`, getANCDoctorDetails: `${MMU_API}ANC/getBenCaseRecordFromDoctorANC`, getGeneralOPDDoctorDetails: `${MMU_API}generalOPD/getBenCaseRecordFromDoctorGeneralOPD`, @@ -333,7 +332,7 @@ export const environment = { getPNCDoctorDetails: `${MMU_API}PNC/getBenCaseRecordFromDoctorPNC`, updateCancerScreeningDoctorDetails: `${MMU_API}CS-cancerScreening/update/doctorData`, - + updateNCDScreeningDoctorDetails: `${MMU_API}NCD/update/doctorData`, updateGeneralOPDQuickConsultDoctorDetails: `${MMU_API}genOPD-QC-quickConsult/update/doctorData`, updateANCDoctorDetails: `${MMU_API}ANC/update/doctorData`, updateGeneralOPDDoctorDetails: `${MMU_API}generalOPD/update/doctorData`, @@ -375,13 +374,12 @@ export const environment = { syncDataDownloadUrl: `${MMU_API}dataSyncActivity/startMasterDownload`, syncDownloadProgressUrl: `${MMU_API}dataSyncActivity/checkMastersDownloadProgress`, getNcdScreeningVisitCountUrl: `${MMU_API}NCD/getNcdScreeningVisitCount/`, - getNCDScreeningDoctorDetails: `${MMU_API}NCD/getBenCaseRecordFromDoctorNCDScreening`, getVanDetailsForMasterDownloadUrl: `${MMU_API}dataSyncActivity/getVanDetailsForMasterDownload`, - getMasterSpecializationUrl: `${SCHEDULER_API}/specialist/masterspecialization`, - getSpecialistUrl: `${SCHEDULER_API}/specialist/getSpecialist`, - getAvailableSlotUrl: `${SCHEDULER_API}/schedule/getavailableSlot`, - getSwymedMailUrl: `${SCHEDULER_API}/van/getvan`, + getMasterSpecializationUrl: `${SCHEDULER_API}specialist/masterspecialization`, + getSpecialistUrl: `${SCHEDULER_API}specialist/getSpecialist`, + getAvailableSlotUrl: `${SCHEDULER_API}schedule/getavailableSlot`, + getSwymedMailUrl: `${SCHEDULER_API}van/getvan`, updateBeneficiaryArrivalStatusUrl: `${MMU_API}tc/update/benArrivalStatus`, cancelBeneficiaryTCRequestUrl: `${MMU_API}tc/cancel/benTCRequest`, @@ -431,14 +429,13 @@ export const environment = { /*Doctor signature download */ downloadSignUrl: `${COMMON_API}signature1/`, + // downloadSignUrl: `${COMMON_API}getSignClass/`, - //calibration integration - getCalibrationStrips: `${ADMIN_API}/fetchCalibrationStrips`, - + //SH20094090,calibration integration,09-06-2021 + getCalibrationStrips: `${ADMIN_API}fetchCalibrationStrips`, getLanguageList: `${COMMON_API}beneficiary/getLanguageList`, calculateBmiStatus: `${TM_API}common/calculateBMIStatus`, - validateSecurityQuestionAndAnswerUrl: `${COMMON_API_OPEN}user/validateSecurityQuestionAndAnswer`, getTransactionIdForChangePasswordUrl: `${COMMON_API_OPEN}user/getTransactionIdForChangePassword`, @@ -450,7 +447,7 @@ export const environment = { /* SWAASA Urls*/ getResultStatusURL: `${COMMON_API}lungAssessment/startAssesment`, getAssessmentUrl: `${COMMON_API}lungAssessment/getAssesment`, - getAssessmentIdUrl: `${COMMON_API}lungAssessment/getAssesmentDetails`, + getAssessmentIdUrl: `${COMMON_API}swaalungAssessmentsa/getAssesmentDetails`, /* Customization APIs*/ getAllRegistrationData: `${COMMON_API}customization/fetchAllData`, @@ -503,11 +500,28 @@ export const environment = { printPngCard: `${FHIR_API}abhaCreation/printAbhaCard`, printWebLoginPhrCard: `${FHIR_API}abhaCreation/printWebLoginPhrCard`, - // ABHA properties - abhaExtension: '@sbx', // or '@abdm' based on your environment + /* ABHA Extension */ + abhaExtension: `@sbx`, // or '@abdm' based on your production environment confirmAadharBio: `${FHIR_API}healthIDWithBio/confirmWithAadhaarBio`, generateABHAForBio: `${FHIR_API}healthIDWithBio/verifyBio`, generateABHAForBioMobileOTP: `${FHIR_API}healthIDWithBio/generateMobileOTP`, getBenIdForhealthID: `${FHIR_API}healthID/getBenIdForhealthID`, + + siteKey: siteKey, + captchaChallengeURL: captchaChallengeURL, + enableCaptcha: enableCaptcha, + + // SMSTenplateURLS + getSMStemplates_url: `${COMMON_API}sms/getSMSTemplates`, + getSMStypes_url: `${COMMON_API}sms/getSMSTypes`, + sendSMS_url: `${COMMON_API}sms/sendSMS`, + + getUserId: `${COMMON_API}user/checkUserName/`, + checkUsersignExistUrl: `${ADMIN_API}signature1/signexist/`, + isEnableES: false, + elasticSearchUrl: `${MMU_API}registrar/quickSearchES`, + advanceElasticSearchUrl: `${MMU_API}registrar/advancedSearchES`, + isSMSFeatureEnabled: false, + campHubConnectInfoAPI: `${COMMON_API}public/connect/info`, }; diff --git a/src/main.ts b/src/main.ts index 2d69eabf..602b8c14 100644 --- a/src/main.ts +++ b/src/main.ts @@ -3,4 +3,4 @@ import { AppModule } from './app/app.module'; platformBrowserDynamic() .bootstrapModule(AppModule) - .catch(err => console.error(err)); + .catch(() => {}); diff --git a/tsconfig.json b/tsconfig.json index bd06c947..57456f39 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -23,8 +23,9 @@ "ES2022", "dom" ], - "noImplicitReturns": false, - + "paths": { + "Common-UI/src/*": ["Common-UI/src/*"] + } }, "angularCompilerOptions": { "enableI18nLegacyMessageIdFormat": false,