From 6eeb6ce7dbc28b1999602bac118286470bbf5ffa Mon Sep 17 00:00:00 2001 From: Ancy Riju Date: Thu, 14 Mar 2024 00:47:38 +0530 Subject: [PATCH 001/188] registration login forget pass reset pass security service service point changes --- angular.json | 8 +- package-lock.json | 284 +- package.json | 14 +- .../allergen-search.component.css | 82 + .../allergen-search.component.html | 109 + .../allergen-search.component.spec.ts | 21 + .../allergen-search.component.ts | 119 + .../app-footer/app-footer.component.css | 38 + .../app-footer/app-footer.component.html | 58 + .../app-footer/app-footer.component.spec.ts | 46 + .../app-footer/app-footer.component.ts | 73 + .../app-header/app-header.component.css | 131 + .../app-header/app-header.component.html | 188 + .../app-header/app-header.component.spec.ts | 213 ++ .../app-header/app-header.component.ts | 310 ++ .../beneficiary-details.component.css | 15 + .../beneficiary-details.component.html | 94 + .../beneficiary-details.component.spec.ts | 46 + .../beneficiary-details.component.ts | 160 + .../calibration/calibration.component.css | 104 + .../calibration/calibration.component.html | 95 + .../calibration/calibration.component.spec.ts | 46 + .../calibration/calibration.component.ts | 156 + .../camera-dialog/camera-dialog.component.css | 38 + .../camera-dialog.component.html | 217 ++ .../camera-dialog.component.spec.ts | 46 + .../camera-dialog/camera-dialog.component.ts | 310 ++ .../common-dialog/common-dialog.component.css | 3 + .../common-dialog.component.html | 12 +- .../common-dialog/common-dialog.component.ts | 14 +- .../diagnosis-search.component.css | 78 + .../diagnosis-search.component.html | 108 + .../diagnosis-search.component.spec.ts | 46 + .../diagnosis-search.component.ts | 195 + .../health-id-display-modal.component.css | 57 + .../health-id-display-modal.component.html | 165 + .../health-id-display-modal.component.spec.ts | 46 + .../health-id-display-modal.component.ts | 328 ++ .../iot-bluetooth/iot-bluetooth.component.css | 60 + .../iot-bluetooth.component.html | 108 + .../iot-bluetooth.component.spec.ts | 46 + .../iot-bluetooth/iot-bluetooth.component.ts | 200 + .../iotcomponent/iotcomponent.component.css | 30 + .../iotcomponent/iotcomponent.component.html | 74 + .../iotcomponent.component.spec.ts | 46 + .../iotcomponent/iotcomponent.component.ts | 324 ++ .../mmu-rbs-details.component.css | 37 + .../mmu-rbs-details.component.html | 35 + .../mmu-rbs-details.component.spec.ts | 46 + .../mmu-rbs-details.component.ts | 50 + .../open-previous-visit-details.component.css | 21 + ...open-previous-visit-details.component.html | 306 ++ ...n-previous-visit-details.component.spec.ts | 46 + .../open-previous-visit-details.component.ts | 130 + .../previous-details.component.css | 37 + .../previous-details.component.html | 86 + .../previous-details.component.spec.ts | 46 + .../previous-details.component.ts | 170 + .../core/components/set-language.component.ts | 6 +- ...w-commit-and-version-details.component.css | 16 + ...-commit-and-version-details.component.html | 33 + ...mmit-and-version-details.component.spec.ts | 46 + ...ow-commit-and-version-details.component.ts | 54 + .../specialist-login.component.css | 12 + .../specialist-login.component.html | 20 + .../specialist-login.component.spec.ts | 46 + .../specialist-login.component.ts | 87 + .../components/spinner/spinner.component.css | 21 + .../components/spinner/spinner.component.html | 5 + .../spinner/spinner.component.spec.ts | 44 + .../components/spinner/spinner.component.ts | 60 + src/app/app-modules/core/core.module.ts | 185 +- .../MobileNumber/myMobileNumber.directive.ts | 49 + .../confirmatory-diagnosis.directive.ts | 119 + .../disableFormControl.directive.ts | 47 + .../directives/email/myEmail.directive.ts | 64 + .../myHealthId/myHealthId.directive.ts | 50 + .../core/directives/name/myName.directive.ts | 49 + .../null-default-value.directive.ts | 51 + .../directives/numberValidator.directive.ts | 66 + .../core/directives/open-modal.directive.ts | 120 + .../password/myPassword.directive.ts | 80 + .../provisionalDiagnosis.directive.ts | 86 + .../directives/stringValidator.directive.ts | 216 ++ src/app/app-modules/core/material.module.ts | 2 + .../mocks/beneficiary-details-service-stub.ts | 6 - .../core/services/auth-guard.service.ts | 43 +- .../app-modules/core/services/auth.service.ts | 36 +- .../services/beneficiary-details.service.ts | 20 +- .../core/services/camera.service.ts | 94 +- .../services/can-deactivate-guard.service.ts | 2 - .../core/services/common-services.service.ts | 8 - .../core/services/confirmation.service.ts | 48 +- .../services/global-error-handler.service.ts | 2 - .../core/services/http-interceptor.service.ts | 100 +- .../core/services/http-service.service.ts | 10 - .../core/services/inventory.service.ts | 37 +- .../app-modules/core/services/iot.service.ts | 10 +- .../core/services/spinner.service.ts | 9 + .../dashboard/dashboard.component.css | 1 + .../dashboard/dashboard.component.html | 5 + .../dashboard/dashboard.component.spec.ts | 46 + .../dashboard/dashboard.component.ts | 32 + .../data-sync-login.component.css | 104 + .../data-sync-login.component.html | 99 + .../data-sync-login.component.spec.ts | 46 + .../data-sync-login.component.ts | 314 ++ .../data-sync/dataSync-routing.module.ts | 57 + .../app-modules/data-sync/dataSync.module.ts | 53 + .../master-download.component.css | 36 + .../master-download.component.html | 67 + .../master-download.component.spec.ts | 46 + .../master-download.component.ts | 147 + .../shared/service/data-sync.service.spec.ts | 40 + .../shared/service/data-sync.service.ts | 69 + .../data-sync/workarea/workarea.component.css | 138 + .../workarea/workarea.component.html | 158 + .../workarea/workarea.component.spec.ts | 46 + .../data-sync/workarea/workarea.component.ts | 256 ++ .../lab/dashboard/dashboard.component.css | 1 + .../lab/dashboard/dashboard.component.html | 5 + .../lab/dashboard/dashboard.component.spec.ts | 46 + .../lab/dashboard/dashboard.component.ts | 32 + src/app/app-modules/lab/lab-routing.module.ts | 56 + src/app/app-modules/lab/lab.module.ts | 68 + .../app-modules/lab/shared/services/index.ts | 24 + .../lab/shared/services/lab.service.spec.ts | 37 + .../lab/shared/services/lab.service.ts | 50 + .../services/master-data.service.spec.ts | 40 + .../shared/services/master-data.service.ts | 38 + .../lab/shared/utility/lab-utility.ts | 153 + .../lab/view-file/view-file.component.css | 26 + .../lab/view-file/view-file.component.html | 26 + .../lab/view-file/view-file.component.spec.ts | 46 + .../lab/view-file/view-file.component.ts | 84 + ...iew-radiology-uploaded-files.component.css | 32 + ...ew-radiology-uploaded-files.component.html | 29 + ...radiology-uploaded-files.component.spec.ts | 46 + ...view-radiology-uploaded-files.component.ts | 64 + .../workarea/LabSubmissionDataManipulation.ts | 84 + .../workarea/workarea.canactivate.service.ts | 52 + .../lab/workarea/workarea.component.css | 263 ++ .../lab/workarea/workarea.component.html | 791 ++++ .../lab/workarea/workarea.component.spec.ts | 46 + .../lab/workarea/workarea.component.ts | 1044 ++++++ .../lab/worklist/worklist.component.css | 33 + .../lab/worklist/worklist.component.html | 253 ++ .../lab/worklist/worklist.component.spec.ts | 46 + .../lab/worklist/worklist.component.ts | 276 ++ .../login/login.component.css | 22 +- .../login/login.component.html | 25 +- .../app-modules/login/login.component.spec.ts | 46 + src/app/app-modules/login/login.component.ts | 307 ++ .../dashboard/dashboard.component.css | 0 .../dashboard/dashboard.component.html | 5 + .../dashboard/dashboard.component.spec.ts | 46 + .../dashboard/dashboard.component.ts | 32 + .../doctor-worklist.component.css | 183 + .../doctor-worklist.component.html | 325 ++ .../doctor-worklist.component.spec.ts | 46 + .../doctor-worklist.component.ts | 352 ++ .../nurse-doctor-routing.module.ts | 89 + .../nurse-doctor/nurse-doctor.module.ts | 90 + .../nurse-reffered-worklist.component.css | 58 + .../nurse-reffered-worklist.component.html | 252 ++ .../nurse-reffered-worklist.component.spec.ts | 46 + .../nurse-reffered-worklist.component.ts | 390 ++ .../nurse-worklist-tabs.component.css | 23 + .../nurse-worklist-tabs.component.html | 11 + .../nurse-worklist-tabs.component.spec.ts | 46 + .../nurse-worklist-tabs.component.ts | 52 + .../nurse-worklist.component.css | 88 + .../nurse-worklist.component.html | 271 ++ .../nurse-worklist.component.spec.ts | 92 + .../nurse-worklist.component.ts | 305 ++ .../oncologist-worklist.component.css | 33 + .../oncologist-worklist.component.html | 253 ++ .../oncologist-worklist.component.spec.ts | 46 + .../oncologist-worklist.component.ts | 267 ++ .../radiologist-worklist.component.css | 33 + .../radiologist-worklist.component.html | 253 ++ .../radiologist-worklist.component.spec.ts | 46 + .../radiologist-worklist.component.ts | 289 ++ .../services/audio-recording.service.ts | 142 + .../shared/services/doctor.service.ts | 2858 ++++++++++++++ .../shared/services/idrsscore.service.spec.ts | 40 + .../shared/services/idrsscore.service.ts | 314 ++ .../nurse-doctor/shared/services/index.ts | 25 + .../shared/services/masterdata.service.ts | 236 ++ .../shared/services/nurse.service.ts | 2141 +++++++++++ .../services/test-in-vitals.service.spec.ts | 40 + .../shared/services/test-in-vitals.service.ts | 58 + .../shared/utility/cancer-utility.ts | 367 ++ .../shared/utility/general-utility.ts | 878 +++++ .../nurse-doctor/shared/utility/index.ts | 27 + .../shared/utility/ncd-screening-utility.ts | 80 + .../shared/utility/quick-consult-utility.ts | 140 + .../shared/utility/validation-utility.ts | 67 + .../shared/utility/visit-detail-utility.ts | 202 + .../workarea/workarea-can-activate.service.ts | 69 + .../workarea/workarea.component.css | 96 + .../workarea/workarea.component.html | 499 +++ .../workarea/workarea.component.ts | 3325 +++++++++++++++++ .../dashboard/dashboard.component.css | 1 + .../dashboard/dashboard.component.html | 5 + .../dashboard/dashboard.component.spec.ts | 46 + .../dashboard/dashboard.component.ts | 32 + .../pharmacist/pharmacist-routing.module.ts | 60 + .../pharmacist/pharmacist.module.ts | 70 + .../redir-fallback.component.css | 13 + .../redir-fallback.component.html | 5 + .../redir-fallback.component.spec.ts | 46 + .../redir-fallback.component.ts | 72 + .../redir-in/redir-in.component.css | 13 + .../redir-in/redir-in.component.html | 5 + .../redir-in/redir-in.component.spec.ts | 46 + .../pharmacist/redir-in/redir-in.component.ts | 103 + .../services/pharmacist.service.spec.ts | 40 + .../shared/services/pharmacist.service.ts | 39 + .../worklist/worklist.component.css | 33 + .../worklist/worklist.component.html | 254 ++ .../worklist/worklist.component.spec.ts | 46 + .../pharmacist/worklist/worklist.component.ts | 303 ++ .../dashboard/dashboard.component.css | 3 + .../dashboard/dashboard.component.html | 7 + .../dashboard/dashboard.component.spec.ts | 46 + .../dashboard/dashboard.component.ts | 32 + .../quick-search/quick-search.component.css | 51 + .../quick-search/quick-search.component.html | 80 + .../quick-search.component.spec.ts | 46 + .../quick-search/quick-search.component.ts | 271 ++ .../registrar/registrar-routing.module.ts | 65 + .../app-modules/registrar/registrar.module.ts | 82 + .../editRegistration.component.spec.ts | 307 ++ .../editWrongRegistration.component.spec.ts | 226 ++ ...register-demographic-details.component.css | 6 + ...egister-demographic-details.component.html | 191 + ...ster-demographic-details.component.spec.ts | 46 + .../register-demographic-details.component.ts | 992 +++++ .../health-id-validatepopup.html | 81 + .../register-other-details.component.css | 66 + .../register-other-details.component.html | 462 +++ .../register-other-details.component.spec.ts | 270 ++ .../register-other-details.component.ts | 1709 +++++++++ .../view-health-id-card.component.css | 48 + .../view-health-id-card.component.html | 30 + .../view-health-id-card.component.spec.ts | 46 + .../view-health-id-card.component.ts | 147 + .../register-personal-details.component.css | 68 + .../register-personal-details.component.html | 439 +++ ...egister-personal-details.component.spec.ts | 433 +++ .../register-personal-details.component.ts | 886 +++++ .../registration/registration.component.css | 102 + .../registration/registration.component.html | 143 + .../registration.component.spec.ts | 238 ++ .../registration/registration.component.ts | 1680 +++++++++ .../search-dialog/search-dialog.component.css | 51 + .../search-dialog.component.html | 213 ++ .../search-dialog.component.spec.ts | 46 + .../search-dialog/search-dialog.component.ts | 245 ++ .../registrar/search/search.component.css | 162 + .../registrar/search/search.component.html | 426 +++ .../registrar/search/search.component.spec.ts | 530 +++ .../registrar/search/search.component.ts | 918 +++++ .../shared/services/rddevice.service.ts | 168 + .../shared/services/registrar.service.ts | 310 ++ .../shared/utility/registration-utility.ts | 154 + .../reset-password.component.css | 110 + .../reset-password.component.html | 126 + .../reset-password.component.spec.ts | 46 + .../reset-password.component.ts | 189 + .../service-point-resolve.service.ts | 52 + .../service-point/service-point.component.css | 42 + .../service-point.component.html | 155 + .../service-point/service-point.component.ts | 340 ++ .../service-point/service-point.service.ts | 61 + .../service/service.component.css | 45 +- .../service/service.component.html | 37 + .../service/service.component.spec.ts | 46 + .../service/service.component.ts | 97 +- .../set-password/set-password.component.css | 26 + .../set-password/set-password.component.html | 110 + .../set-password.component.spec.ts | 46 + .../set-password/set-password.component.ts | 166 + .../set-security-questions.component.css | 23 + .../set-security-questions.component.html | 234 ++ .../set-security-questions.component.spec.ts | 46 + .../set-security-questions.component.ts | 318 ++ .../tm-logout/tm-logout.component.css | 1 + .../tm-logout/tm-logout.component.html | 1 + .../tm-logout/tm-logout.component.spec.ts | 46 + .../tm-logout/tm-logout.component.ts | 39 + src/app/app-routing.module.ts | 121 +- src/app/app.component.ts | 34 +- src/app/app.module.ts | 41 +- .../user-login/login/login.component.spec.ts | 24 - src/app/user-login/login/login.component.ts | 271 -- .../user-login/service/service.component.html | 50 - .../service/service.component.spec.ts | 24 - src/app/user-login/user-login.module.ts | 20 - src/css/custom.css | 2 +- src/environments/environment.ci.ts | 422 +++ src/environments/environment.dev.ts | 417 +++ src/environments/environment.prod.ts | 18 +- ...ent.ci.ts.template => environment.test.ts} | 213 +- src/environments/environment.ts | 24 +- src/index.html | 26 +- src/polyfills.ts | 2 +- src/styles.css | 385 +- src/tsconfig.app.json | 2 +- 310 files changed, 46818 insertions(+), 1041 deletions(-) create mode 100644 src/app/app-modules/core/components/allergen-search/allergen-search.component.css create mode 100644 src/app/app-modules/core/components/allergen-search/allergen-search.component.html create mode 100644 src/app/app-modules/core/components/allergen-search/allergen-search.component.spec.ts create mode 100644 src/app/app-modules/core/components/allergen-search/allergen-search.component.ts create mode 100644 src/app/app-modules/core/components/app-footer/app-footer.component.css create mode 100644 src/app/app-modules/core/components/app-footer/app-footer.component.html create mode 100644 src/app/app-modules/core/components/app-footer/app-footer.component.spec.ts create mode 100644 src/app/app-modules/core/components/app-footer/app-footer.component.ts create mode 100644 src/app/app-modules/core/components/app-header/app-header.component.css create mode 100644 src/app/app-modules/core/components/app-header/app-header.component.html create mode 100644 src/app/app-modules/core/components/app-header/app-header.component.spec.ts create mode 100644 src/app/app-modules/core/components/app-header/app-header.component.ts create mode 100644 src/app/app-modules/core/components/beneficiary-details/beneficiary-details.component.css create mode 100644 src/app/app-modules/core/components/beneficiary-details/beneficiary-details.component.html create mode 100644 src/app/app-modules/core/components/beneficiary-details/beneficiary-details.component.spec.ts create mode 100644 src/app/app-modules/core/components/beneficiary-details/beneficiary-details.component.ts create mode 100644 src/app/app-modules/core/components/calibration/calibration.component.css create mode 100644 src/app/app-modules/core/components/calibration/calibration.component.html create mode 100644 src/app/app-modules/core/components/calibration/calibration.component.spec.ts create mode 100644 src/app/app-modules/core/components/calibration/calibration.component.ts create mode 100644 src/app/app-modules/core/components/camera-dialog/camera-dialog.component.css create mode 100644 src/app/app-modules/core/components/camera-dialog/camera-dialog.component.html create mode 100644 src/app/app-modules/core/components/camera-dialog/camera-dialog.component.spec.ts create mode 100644 src/app/app-modules/core/components/camera-dialog/camera-dialog.component.ts create mode 100644 src/app/app-modules/core/components/diagnosis-search/diagnosis-search.component.css create mode 100644 src/app/app-modules/core/components/diagnosis-search/diagnosis-search.component.html create mode 100644 src/app/app-modules/core/components/diagnosis-search/diagnosis-search.component.spec.ts create mode 100644 src/app/app-modules/core/components/diagnosis-search/diagnosis-search.component.ts create mode 100644 src/app/app-modules/core/components/health-id-display-modal/health-id-display-modal.component.css create mode 100644 src/app/app-modules/core/components/health-id-display-modal/health-id-display-modal.component.html create mode 100644 src/app/app-modules/core/components/health-id-display-modal/health-id-display-modal.component.spec.ts create mode 100644 src/app/app-modules/core/components/health-id-display-modal/health-id-display-modal.component.ts create mode 100644 src/app/app-modules/core/components/iot-bluetooth/iot-bluetooth.component.css create mode 100644 src/app/app-modules/core/components/iot-bluetooth/iot-bluetooth.component.html create mode 100644 src/app/app-modules/core/components/iot-bluetooth/iot-bluetooth.component.spec.ts create mode 100644 src/app/app-modules/core/components/iot-bluetooth/iot-bluetooth.component.ts create mode 100644 src/app/app-modules/core/components/iotcomponent/iotcomponent.component.css create mode 100644 src/app/app-modules/core/components/iotcomponent/iotcomponent.component.html create mode 100644 src/app/app-modules/core/components/iotcomponent/iotcomponent.component.spec.ts create mode 100644 src/app/app-modules/core/components/iotcomponent/iotcomponent.component.ts create mode 100644 src/app/app-modules/core/components/mmu-rbs-details/mmu-rbs-details.component.css create mode 100644 src/app/app-modules/core/components/mmu-rbs-details/mmu-rbs-details.component.html create mode 100644 src/app/app-modules/core/components/mmu-rbs-details/mmu-rbs-details.component.spec.ts create mode 100644 src/app/app-modules/core/components/mmu-rbs-details/mmu-rbs-details.component.ts create mode 100644 src/app/app-modules/core/components/open-previous-visit-details/open-previous-visit-details.component.css create mode 100644 src/app/app-modules/core/components/open-previous-visit-details/open-previous-visit-details.component.html create mode 100644 src/app/app-modules/core/components/open-previous-visit-details/open-previous-visit-details.component.spec.ts create mode 100644 src/app/app-modules/core/components/open-previous-visit-details/open-previous-visit-details.component.ts create mode 100644 src/app/app-modules/core/components/previous-details/previous-details.component.css create mode 100644 src/app/app-modules/core/components/previous-details/previous-details.component.html create mode 100644 src/app/app-modules/core/components/previous-details/previous-details.component.spec.ts create mode 100644 src/app/app-modules/core/components/previous-details/previous-details.component.ts create mode 100644 src/app/app-modules/core/components/show-commit-and-version-details/show-commit-and-version-details.component.css create mode 100644 src/app/app-modules/core/components/show-commit-and-version-details/show-commit-and-version-details.component.html create mode 100644 src/app/app-modules/core/components/show-commit-and-version-details/show-commit-and-version-details.component.spec.ts create mode 100644 src/app/app-modules/core/components/show-commit-and-version-details/show-commit-and-version-details.component.ts create mode 100644 src/app/app-modules/core/components/specialist-login/specialist-login.component.css create mode 100644 src/app/app-modules/core/components/specialist-login/specialist-login.component.html create mode 100644 src/app/app-modules/core/components/specialist-login/specialist-login.component.spec.ts create mode 100644 src/app/app-modules/core/components/specialist-login/specialist-login.component.ts create mode 100644 src/app/app-modules/core/components/spinner/spinner.component.css create mode 100644 src/app/app-modules/core/components/spinner/spinner.component.html create mode 100644 src/app/app-modules/core/components/spinner/spinner.component.spec.ts create mode 100644 src/app/app-modules/core/components/spinner/spinner.component.ts create mode 100644 src/app/app-modules/core/directives/MobileNumber/myMobileNumber.directive.ts create mode 100644 src/app/app-modules/core/directives/confirmatory-diagnosis.directive.ts create mode 100644 src/app/app-modules/core/directives/disableFormControl.directive.ts create mode 100644 src/app/app-modules/core/directives/email/myEmail.directive.ts create mode 100644 src/app/app-modules/core/directives/myHealthId/myHealthId.directive.ts create mode 100644 src/app/app-modules/core/directives/name/myName.directive.ts create mode 100644 src/app/app-modules/core/directives/null-default-value.directive.ts create mode 100644 src/app/app-modules/core/directives/numberValidator.directive.ts create mode 100644 src/app/app-modules/core/directives/open-modal.directive.ts create mode 100644 src/app/app-modules/core/directives/password/myPassword.directive.ts create mode 100644 src/app/app-modules/core/directives/provisionalDiagnosis.directive.ts create mode 100644 src/app/app-modules/core/directives/stringValidator.directive.ts create mode 100644 src/app/app-modules/data-sync/dashboard/dashboard.component.css create mode 100644 src/app/app-modules/data-sync/dashboard/dashboard.component.html create mode 100644 src/app/app-modules/data-sync/dashboard/dashboard.component.spec.ts create mode 100644 src/app/app-modules/data-sync/dashboard/dashboard.component.ts create mode 100644 src/app/app-modules/data-sync/data-sync-login/data-sync-login.component.css create mode 100644 src/app/app-modules/data-sync/data-sync-login/data-sync-login.component.html create mode 100644 src/app/app-modules/data-sync/data-sync-login/data-sync-login.component.spec.ts create mode 100644 src/app/app-modules/data-sync/data-sync-login/data-sync-login.component.ts create mode 100644 src/app/app-modules/data-sync/dataSync-routing.module.ts create mode 100644 src/app/app-modules/data-sync/dataSync.module.ts create mode 100644 src/app/app-modules/data-sync/master-download/master-download.component.css create mode 100644 src/app/app-modules/data-sync/master-download/master-download.component.html create mode 100644 src/app/app-modules/data-sync/master-download/master-download.component.spec.ts create mode 100644 src/app/app-modules/data-sync/master-download/master-download.component.ts create mode 100644 src/app/app-modules/data-sync/shared/service/data-sync.service.spec.ts create mode 100644 src/app/app-modules/data-sync/shared/service/data-sync.service.ts create mode 100644 src/app/app-modules/data-sync/workarea/workarea.component.css create mode 100644 src/app/app-modules/data-sync/workarea/workarea.component.html create mode 100644 src/app/app-modules/data-sync/workarea/workarea.component.spec.ts create mode 100644 src/app/app-modules/data-sync/workarea/workarea.component.ts create mode 100644 src/app/app-modules/lab/dashboard/dashboard.component.css create mode 100644 src/app/app-modules/lab/dashboard/dashboard.component.html create mode 100644 src/app/app-modules/lab/dashboard/dashboard.component.spec.ts create mode 100644 src/app/app-modules/lab/dashboard/dashboard.component.ts create mode 100644 src/app/app-modules/lab/lab-routing.module.ts create mode 100644 src/app/app-modules/lab/lab.module.ts create mode 100644 src/app/app-modules/lab/shared/services/index.ts create mode 100644 src/app/app-modules/lab/shared/services/lab.service.spec.ts create mode 100644 src/app/app-modules/lab/shared/services/lab.service.ts create mode 100644 src/app/app-modules/lab/shared/services/master-data.service.spec.ts create mode 100644 src/app/app-modules/lab/shared/services/master-data.service.ts create mode 100644 src/app/app-modules/lab/shared/utility/lab-utility.ts create mode 100644 src/app/app-modules/lab/view-file/view-file.component.css create mode 100644 src/app/app-modules/lab/view-file/view-file.component.html create mode 100644 src/app/app-modules/lab/view-file/view-file.component.spec.ts create mode 100644 src/app/app-modules/lab/view-file/view-file.component.ts create mode 100644 src/app/app-modules/lab/view-radiology-uploaded-files/view-radiology-uploaded-files.component.css create mode 100644 src/app/app-modules/lab/view-radiology-uploaded-files/view-radiology-uploaded-files.component.html create mode 100644 src/app/app-modules/lab/view-radiology-uploaded-files/view-radiology-uploaded-files.component.spec.ts create mode 100644 src/app/app-modules/lab/view-radiology-uploaded-files/view-radiology-uploaded-files.component.ts create mode 100644 src/app/app-modules/lab/workarea/LabSubmissionDataManipulation.ts create mode 100644 src/app/app-modules/lab/workarea/workarea.canactivate.service.ts create mode 100644 src/app/app-modules/lab/workarea/workarea.component.css create mode 100644 src/app/app-modules/lab/workarea/workarea.component.html create mode 100644 src/app/app-modules/lab/workarea/workarea.component.spec.ts create mode 100644 src/app/app-modules/lab/workarea/workarea.component.ts create mode 100644 src/app/app-modules/lab/worklist/worklist.component.css create mode 100644 src/app/app-modules/lab/worklist/worklist.component.html create mode 100644 src/app/app-modules/lab/worklist/worklist.component.spec.ts create mode 100644 src/app/app-modules/lab/worklist/worklist.component.ts rename src/app/{user-login => app-modules}/login/login.component.css (82%) rename src/app/{user-login => app-modules}/login/login.component.html (74%) create mode 100644 src/app/app-modules/login/login.component.spec.ts create mode 100644 src/app/app-modules/login/login.component.ts create mode 100644 src/app/app-modules/nurse-doctor/dashboard/dashboard.component.css create mode 100644 src/app/app-modules/nurse-doctor/dashboard/dashboard.component.html create mode 100644 src/app/app-modules/nurse-doctor/dashboard/dashboard.component.spec.ts create mode 100644 src/app/app-modules/nurse-doctor/dashboard/dashboard.component.ts create mode 100644 src/app/app-modules/nurse-doctor/doctor-worklist/doctor-worklist.component.css create mode 100644 src/app/app-modules/nurse-doctor/doctor-worklist/doctor-worklist.component.html create mode 100644 src/app/app-modules/nurse-doctor/doctor-worklist/doctor-worklist.component.spec.ts create mode 100644 src/app/app-modules/nurse-doctor/doctor-worklist/doctor-worklist.component.ts create mode 100644 src/app/app-modules/nurse-doctor/nurse-doctor-routing.module.ts create mode 100644 src/app/app-modules/nurse-doctor/nurse-doctor.module.ts create mode 100644 src/app/app-modules/nurse-doctor/nurse-worklist-tabs/nurse-reffered-worklist/nurse-reffered-worklist.component.css create mode 100644 src/app/app-modules/nurse-doctor/nurse-worklist-tabs/nurse-reffered-worklist/nurse-reffered-worklist.component.html create mode 100644 src/app/app-modules/nurse-doctor/nurse-worklist-tabs/nurse-reffered-worklist/nurse-reffered-worklist.component.spec.ts create mode 100644 src/app/app-modules/nurse-doctor/nurse-worklist-tabs/nurse-reffered-worklist/nurse-reffered-worklist.component.ts create mode 100644 src/app/app-modules/nurse-doctor/nurse-worklist-tabs/nurse-worklist-tabs.component.css create mode 100644 src/app/app-modules/nurse-doctor/nurse-worklist-tabs/nurse-worklist-tabs.component.html create mode 100644 src/app/app-modules/nurse-doctor/nurse-worklist-tabs/nurse-worklist-tabs.component.spec.ts create mode 100644 src/app/app-modules/nurse-doctor/nurse-worklist-tabs/nurse-worklist-tabs.component.ts create mode 100644 src/app/app-modules/nurse-doctor/nurse-worklist/nurse-worklist.component.css create mode 100644 src/app/app-modules/nurse-doctor/nurse-worklist/nurse-worklist.component.html create mode 100644 src/app/app-modules/nurse-doctor/nurse-worklist/nurse-worklist.component.spec.ts create mode 100644 src/app/app-modules/nurse-doctor/nurse-worklist/nurse-worklist.component.ts create mode 100644 src/app/app-modules/nurse-doctor/oncologist-worklist/oncologist-worklist.component.css create mode 100644 src/app/app-modules/nurse-doctor/oncologist-worklist/oncologist-worklist.component.html create mode 100644 src/app/app-modules/nurse-doctor/oncologist-worklist/oncologist-worklist.component.spec.ts create mode 100644 src/app/app-modules/nurse-doctor/oncologist-worklist/oncologist-worklist.component.ts create mode 100644 src/app/app-modules/nurse-doctor/radiologist-worklist/radiologist-worklist.component.css create mode 100644 src/app/app-modules/nurse-doctor/radiologist-worklist/radiologist-worklist.component.html create mode 100644 src/app/app-modules/nurse-doctor/radiologist-worklist/radiologist-worklist.component.spec.ts create mode 100644 src/app/app-modules/nurse-doctor/radiologist-worklist/radiologist-worklist.component.ts create mode 100644 src/app/app-modules/nurse-doctor/shared/services/audio-recording.service.ts create mode 100644 src/app/app-modules/nurse-doctor/shared/services/doctor.service.ts create mode 100644 src/app/app-modules/nurse-doctor/shared/services/idrsscore.service.spec.ts create mode 100644 src/app/app-modules/nurse-doctor/shared/services/idrsscore.service.ts create mode 100644 src/app/app-modules/nurse-doctor/shared/services/index.ts create mode 100644 src/app/app-modules/nurse-doctor/shared/services/masterdata.service.ts create mode 100644 src/app/app-modules/nurse-doctor/shared/services/nurse.service.ts create mode 100644 src/app/app-modules/nurse-doctor/shared/services/test-in-vitals.service.spec.ts create mode 100644 src/app/app-modules/nurse-doctor/shared/services/test-in-vitals.service.ts create mode 100644 src/app/app-modules/nurse-doctor/shared/utility/cancer-utility.ts create mode 100644 src/app/app-modules/nurse-doctor/shared/utility/general-utility.ts create mode 100644 src/app/app-modules/nurse-doctor/shared/utility/index.ts create mode 100644 src/app/app-modules/nurse-doctor/shared/utility/ncd-screening-utility.ts create mode 100644 src/app/app-modules/nurse-doctor/shared/utility/quick-consult-utility.ts create mode 100644 src/app/app-modules/nurse-doctor/shared/utility/validation-utility.ts create mode 100644 src/app/app-modules/nurse-doctor/shared/utility/visit-detail-utility.ts create mode 100644 src/app/app-modules/nurse-doctor/workarea/workarea-can-activate.service.ts create mode 100644 src/app/app-modules/nurse-doctor/workarea/workarea.component.css create mode 100644 src/app/app-modules/nurse-doctor/workarea/workarea.component.html create mode 100644 src/app/app-modules/nurse-doctor/workarea/workarea.component.ts create mode 100644 src/app/app-modules/pharmacist/dashboard/dashboard.component.css create mode 100644 src/app/app-modules/pharmacist/dashboard/dashboard.component.html create mode 100644 src/app/app-modules/pharmacist/dashboard/dashboard.component.spec.ts create mode 100644 src/app/app-modules/pharmacist/dashboard/dashboard.component.ts create mode 100644 src/app/app-modules/pharmacist/pharmacist-routing.module.ts create mode 100644 src/app/app-modules/pharmacist/pharmacist.module.ts create mode 100644 src/app/app-modules/pharmacist/redir-fallback/redir-fallback.component.css create mode 100644 src/app/app-modules/pharmacist/redir-fallback/redir-fallback.component.html create mode 100644 src/app/app-modules/pharmacist/redir-fallback/redir-fallback.component.spec.ts create mode 100644 src/app/app-modules/pharmacist/redir-fallback/redir-fallback.component.ts create mode 100644 src/app/app-modules/pharmacist/redir-in/redir-in.component.css create mode 100644 src/app/app-modules/pharmacist/redir-in/redir-in.component.html create mode 100644 src/app/app-modules/pharmacist/redir-in/redir-in.component.spec.ts create mode 100644 src/app/app-modules/pharmacist/redir-in/redir-in.component.ts create mode 100644 src/app/app-modules/pharmacist/shared/services/pharmacist.service.spec.ts create mode 100644 src/app/app-modules/pharmacist/shared/services/pharmacist.service.ts create mode 100644 src/app/app-modules/pharmacist/worklist/worklist.component.css create mode 100644 src/app/app-modules/pharmacist/worklist/worklist.component.html create mode 100644 src/app/app-modules/pharmacist/worklist/worklist.component.spec.ts create mode 100644 src/app/app-modules/pharmacist/worklist/worklist.component.ts create mode 100644 src/app/app-modules/registrar/dashboard/dashboard.component.css create mode 100644 src/app/app-modules/registrar/dashboard/dashboard.component.html create mode 100644 src/app/app-modules/registrar/dashboard/dashboard.component.spec.ts create mode 100644 src/app/app-modules/registrar/dashboard/dashboard.component.ts create mode 100644 src/app/app-modules/registrar/quick-search/quick-search.component.css create mode 100644 src/app/app-modules/registrar/quick-search/quick-search.component.html create mode 100644 src/app/app-modules/registrar/quick-search/quick-search.component.spec.ts create mode 100644 src/app/app-modules/registrar/quick-search/quick-search.component.ts create mode 100644 src/app/app-modules/registrar/registrar-routing.module.ts create mode 100644 src/app/app-modules/registrar/registrar.module.ts create mode 100644 src/app/app-modules/registrar/registration/editRegistration.component.spec.ts create mode 100644 src/app/app-modules/registrar/registration/editWrongRegistration.component.spec.ts create mode 100644 src/app/app-modules/registrar/registration/register-demographic-details/register-demographic-details.component.css create mode 100644 src/app/app-modules/registrar/registration/register-demographic-details/register-demographic-details.component.html create mode 100644 src/app/app-modules/registrar/registration/register-demographic-details/register-demographic-details.component.spec.ts create mode 100644 src/app/app-modules/registrar/registration/register-demographic-details/register-demographic-details.component.ts create mode 100644 src/app/app-modules/registrar/registration/register-other-details/health-id-validatepopup.html create mode 100644 src/app/app-modules/registrar/registration/register-other-details/register-other-details.component.css create mode 100644 src/app/app-modules/registrar/registration/register-other-details/register-other-details.component.html create mode 100644 src/app/app-modules/registrar/registration/register-other-details/register-other-details.component.spec.ts create mode 100644 src/app/app-modules/registrar/registration/register-other-details/register-other-details.component.ts create mode 100644 src/app/app-modules/registrar/registration/register-other-details/view-health-id-card/view-health-id-card.component.css create mode 100644 src/app/app-modules/registrar/registration/register-other-details/view-health-id-card/view-health-id-card.component.html create mode 100644 src/app/app-modules/registrar/registration/register-other-details/view-health-id-card/view-health-id-card.component.spec.ts create mode 100644 src/app/app-modules/registrar/registration/register-other-details/view-health-id-card/view-health-id-card.component.ts create mode 100644 src/app/app-modules/registrar/registration/register-personal-details/register-personal-details.component.css create mode 100644 src/app/app-modules/registrar/registration/register-personal-details/register-personal-details.component.html create mode 100644 src/app/app-modules/registrar/registration/register-personal-details/register-personal-details.component.spec.ts create mode 100644 src/app/app-modules/registrar/registration/register-personal-details/register-personal-details.component.ts create mode 100644 src/app/app-modules/registrar/registration/registration.component.css create mode 100644 src/app/app-modules/registrar/registration/registration.component.html create mode 100644 src/app/app-modules/registrar/registration/registration.component.spec.ts create mode 100644 src/app/app-modules/registrar/registration/registration.component.ts create mode 100644 src/app/app-modules/registrar/search-dialog/search-dialog.component.css create mode 100644 src/app/app-modules/registrar/search-dialog/search-dialog.component.html create mode 100644 src/app/app-modules/registrar/search-dialog/search-dialog.component.spec.ts create mode 100644 src/app/app-modules/registrar/search-dialog/search-dialog.component.ts create mode 100644 src/app/app-modules/registrar/search/search.component.css create mode 100644 src/app/app-modules/registrar/search/search.component.html create mode 100644 src/app/app-modules/registrar/search/search.component.spec.ts create mode 100644 src/app/app-modules/registrar/search/search.component.ts create mode 100644 src/app/app-modules/registrar/shared/services/rddevice.service.ts create mode 100644 src/app/app-modules/registrar/shared/services/registrar.service.ts create mode 100644 src/app/app-modules/registrar/shared/utility/registration-utility.ts create mode 100644 src/app/app-modules/reset-password/reset-password.component.css create mode 100644 src/app/app-modules/reset-password/reset-password.component.html create mode 100644 src/app/app-modules/reset-password/reset-password.component.spec.ts create mode 100644 src/app/app-modules/reset-password/reset-password.component.ts create mode 100644 src/app/app-modules/service-point/service-point-resolve.service.ts create mode 100644 src/app/app-modules/service-point/service-point.component.css create mode 100644 src/app/app-modules/service-point/service-point.component.html create mode 100644 src/app/app-modules/service-point/service-point.component.ts create mode 100644 src/app/app-modules/service-point/service-point.service.ts rename src/app/{user-login => app-modules}/service/service.component.css (51%) create mode 100644 src/app/app-modules/service/service.component.html create mode 100644 src/app/app-modules/service/service.component.spec.ts rename src/app/{user-login => app-modules}/service/service.component.ts (57%) create mode 100644 src/app/app-modules/set-password/set-password.component.css create mode 100644 src/app/app-modules/set-password/set-password.component.html create mode 100644 src/app/app-modules/set-password/set-password.component.spec.ts create mode 100644 src/app/app-modules/set-password/set-password.component.ts create mode 100644 src/app/app-modules/set-security-questions/set-security-questions.component.css create mode 100644 src/app/app-modules/set-security-questions/set-security-questions.component.html create mode 100644 src/app/app-modules/set-security-questions/set-security-questions.component.spec.ts create mode 100644 src/app/app-modules/set-security-questions/set-security-questions.component.ts create mode 100644 src/app/app-modules/tm-logout/tm-logout.component.css create mode 100644 src/app/app-modules/tm-logout/tm-logout.component.html create mode 100644 src/app/app-modules/tm-logout/tm-logout.component.spec.ts create mode 100644 src/app/app-modules/tm-logout/tm-logout.component.ts delete mode 100644 src/app/user-login/login/login.component.spec.ts delete mode 100644 src/app/user-login/login/login.component.ts delete mode 100644 src/app/user-login/service/service.component.html delete mode 100644 src/app/user-login/service/service.component.spec.ts delete mode 100644 src/app/user-login/user-login.module.ts create mode 100644 src/environments/environment.ci.ts create mode 100644 src/environments/environment.dev.ts rename src/environments/{environment.ci.ts.template => environment.test.ts} (76%) diff --git a/angular.json b/angular.json index 40ad707..cc32892 100644 --- a/angular.json +++ b/angular.json @@ -35,13 +35,13 @@ "budgets": [ { "type": "initial", - "maximumWarning": "500kb", - "maximumError": "1mb" + "maximumWarning": "5mb", + "maximumError": "6mb" }, { "type": "anyComponentStyle", - "maximumWarning": "2kb", - "maximumError": "4kb" + "maximumWarning": "1mb", + "maximumError": "2mb" } ], "outputHashing": "all" diff --git a/package-lock.json b/package-lock.json index 0a4c310..9adaca7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,9 +18,21 @@ "@angular/platform-browser": "^16.2.12", "@angular/platform-browser-dynamic": "^16.2.0", "@angular/router": "^16.2.0", - "@types/crypto-js": "^4.2.1", + "@types/crypto-js": "^4.2.2", + "@types/file-saver": "^2.0.7", + "@types/recordrtc": "^5.6.14", + "ack-angular-webcam": "^1.10.0", + "bootstrap": "^5.3.3", + "chart.js": "^4.4.2", "crypto-js": "^4.2.0", + "file-saver": "^2.0.5", "html2canvas": "^1.4.1", + "moment": "^2.30.1", + "ng2-charts": "^6.0.0", + "ngx-bootstrap": "^12.0.0", + "ngx-pagination": "^6.0.3", + "ngx-webcam": "^0.4.1", + "recordrtc": "^5.6.2", "rxjs": "~7.8.0", "tslib": "^2.3.0", "zone.js": "~0.13.0" @@ -3331,6 +3343,11 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@kurkle/color": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@kurkle/color/-/color-0.3.2.tgz", + "integrity": "sha512-fuscdXJ9G1qb7W8VdHi+IwRqij3lBkosAm4ydQtEmbY58OzHXqQhvlxqEkoz0yssNVn38bcpRWgA9PP+OGoisw==" + }, "node_modules/@leichtgewicht/ip-codec": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz", @@ -4856,9 +4873,9 @@ } }, "node_modules/@types/crypto-js": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@types/crypto-js/-/crypto-js-4.2.1.tgz", - "integrity": "sha512-FSPGd9+OcSok3RsM0UZ/9fcvMOXJ1ENE/ZbLfOPlBWj7BgXtEAM8VYfTtT760GiLbQIMoVozwVuisjvsVwqYWw==" + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@types/crypto-js/-/crypto-js-4.2.2.tgz", + "integrity": "sha512-sDOLlVbHhXpAUAL0YHDUUwDZf3iN4Bwi4W6a0W0b+QcAezUbRtH4FVb+9J4h+XFPW7l/gQ9F8qC7P+Ec4k8QVQ==" }, "node_modules/@types/eslint": { "version": "8.56.0", @@ -4910,6 +4927,11 @@ "@types/send": "*" } }, + "node_modules/@types/file-saver": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/file-saver/-/file-saver-2.0.7.tgz", + "integrity": "sha512-dNKVfHd/jk0SkR/exKGj2ggkB45MAkzvWCaqLUUgkyjITkGNzH8H+yUwr+BLJUBjZOe9w8X3wgmXhZDRg1ED6A==" + }, "node_modules/@types/http-errors": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", @@ -4973,6 +4995,11 @@ "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", "dev": true }, + "node_modules/@types/recordrtc": { + "version": "5.6.14", + "resolved": "https://registry.npmjs.org/@types/recordrtc/-/recordrtc-5.6.14.tgz", + "integrity": "sha512-Reiy1sl11xP0r6w8DW3iQjc1BgXFyNC7aDuutysIjpFoqyftbQps9xPA2FoBkfVXpJM61betgYPNt+v65zvMhA==" + }, "node_modules/@types/retry": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz", @@ -5582,6 +5609,11 @@ "node": ">= 0.6" } }, + "node_modules/ack-angular-webcam": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/ack-angular-webcam/-/ack-angular-webcam-1.10.0.tgz", + "integrity": "sha512-YXtcN1U+l3hIQPuaGtq8+Ua/SLFi5QFNUH5LyAXo8QHW+KWdxhzUMU8fGESfdEOIiw/80BBAz40Z6pQ97i3xyg==" + }, "node_modules/acorn": { "version": "8.11.2", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", @@ -6169,6 +6201,24 @@ "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", "dev": true }, + "node_modules/bootstrap": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.3.3.tgz", + "integrity": "sha512-8HLCdWgyoMguSO9o+aH+iuZ+aht+mzW0u3HIMzVu7Srrpv7EBBxTnrFlSCskwdY1+EOFQSm7uMJhNQHkdPcmjg==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/twbs" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/bootstrap" + } + ], + "peerDependencies": { + "@popperjs/core": "^2.11.8" + } + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -6436,6 +6486,17 @@ "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", "dev": true }, + "node_modules/chart.js": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.2.tgz", + "integrity": "sha512-6GD7iKwFpP5kbSD4MeRRRlTnQvxfQREy36uEtm1hzHzcOqwWx0YEHuspuoNlslu+nciLIB7fjjsHkUv/FzFcOg==", + "dependencies": { + "@kurkle/color": "^0.3.0" + }, + "engines": { + "pnpm": ">=8" + } + }, "node_modules/chokidar": { "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", @@ -8583,6 +8644,11 @@ "node": "^10.12.0 || >=12.0.0" } }, + "node_modules/file-saver": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/file-saver/-/file-saver-2.0.5.tgz", + "integrity": "sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA==" + }, "node_modules/filelist": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", @@ -11020,6 +11086,11 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, + "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==" + }, "node_modules/lodash.debounce": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", @@ -12041,6 +12112,14 @@ "mkdirp": "bin/cmd.js" } }, + "node_modules/moment": { + "version": "2.30.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", + "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==", + "engines": { + "node": "*" + } + }, "node_modules/mrmime": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-1.0.1.tgz", @@ -12150,6 +12229,58 @@ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", "dev": true }, + "node_modules/ng2-charts": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/ng2-charts/-/ng2-charts-6.0.0.tgz", + "integrity": "sha512-Hg45RDOoFoXSDya4U8t2IW2teKnXjy10zJVij65G/62Si+A5+uu8hKQKkBahxg67iTdpOwtyPGnQJ/chHVfFVA==", + "dependencies": { + "lodash-es": "^4.17.15", + "tslib": "^2.3.0" + }, + "peerDependencies": { + "@angular/cdk": ">=17.0.0", + "@angular/common": ">=17.0.0", + "@angular/core": ">=17.0.0", + "@angular/platform-browser": ">=17.0.0", + "chart.js": "^3.4.0 || ^4.0.0", + "rxjs": "^6.5.3 || ^7.4.0" + } + }, + "node_modules/ngx-bootstrap": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/ngx-bootstrap/-/ngx-bootstrap-12.0.0.tgz", + "integrity": "sha512-6/Hs+FT6peMc+Y2uiOm3IawG06Jh3gLQwwKRBF0U1OMlRbpx4KIyHS9GpZtMevtZaBsCRNfHKiSxwsnvn9wx0Q==", + "dependencies": { + "tslib": "^2.3.0" + }, + "peerDependencies": { + "@angular/animations": "^17.0.0", + "@angular/common": "^17.0.0", + "@angular/core": "^17.0.0", + "@angular/forms": "^17.0.0", + "rxjs": "^6.5.3 || ^7.4.0" + } + }, + "node_modules/ngx-pagination": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/ngx-pagination/-/ngx-pagination-6.0.3.tgz", + "integrity": "sha512-lONjTQ7hFPh1SyhwDrRd5ZwM4NMGQ7bNR6vLrs6mrU0Z8Q1zCcWbf/pvyp4DOlGyd9uyZxRy2wUsSZLeIPjbAw==", + "dependencies": { + "tslib": "^2.3.0" + }, + "peerDependencies": { + "@angular/common": ">=13.0.0", + "@angular/core": ">=13.0.0" + } + }, + "node_modules/ngx-webcam": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/ngx-webcam/-/ngx-webcam-0.4.1.tgz", + "integrity": "sha512-8WoC8GWHaN5tH+4zO0/gfUigVKg/jX7JShAewpumJIgJXFmlKhSPnPjewNNxv7OTQiOOb+5Mh6lhTo52VLlY9A==", + "dependencies": { + "tslib": "^2.3.0" + } + }, "node_modules/nice-napi": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/nice-napi/-/nice-napi-1.0.2.tgz", @@ -14148,6 +14279,11 @@ "node": ">=8.10.0" } }, + "node_modules/recordrtc": { + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/recordrtc/-/recordrtc-5.6.2.tgz", + "integrity": "sha512-1QNKKNtl7+KcwD1lyOgP3ZlbiJ1d0HtXnypUy7yq49xEERxk31PHvE9RCciDrulPCY7WJ+oz0R9hpNxgsIurGQ==" + }, "node_modules/reflect-metadata": { "version": "0.1.14", "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.14.tgz", @@ -17858,8 +17994,7 @@ "version": "7.21.0-placeholder-for-preset-env.2", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz", "integrity": "sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==", - "dev": true, - "requires": {} + "dev": true }, "@babel/plugin-proposal-unicode-property-regex": { "version": "7.18.6", @@ -19157,6 +19292,11 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "@kurkle/color": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@kurkle/color/-/color-0.3.2.tgz", + "integrity": "sha512-fuscdXJ9G1qb7W8VdHi+IwRqij3lBkosAm4ydQtEmbY58OzHXqQhvlxqEkoz0yssNVn38bcpRWgA9PP+OGoisw==" + }, "@leichtgewicht/ip-codec": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz", @@ -19919,8 +20059,7 @@ "version": "16.2.11", "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-16.2.11.tgz", "integrity": "sha512-4ndXJ4s94ZsryVGSDk/waIDrUqXqdGWftoOEn81Zu+nkL9ncI/G1fNUlSJ5OqeKmMLxMFouoy+BuJfvT+gEgnQ==", - "dev": true, - "requires": {} + "dev": true }, "@nodelib/fs.scandir": { "version": "2.1.5", @@ -20451,9 +20590,9 @@ } }, "@types/crypto-js": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@types/crypto-js/-/crypto-js-4.2.1.tgz", - "integrity": "sha512-FSPGd9+OcSok3RsM0UZ/9fcvMOXJ1ENE/ZbLfOPlBWj7BgXtEAM8VYfTtT760GiLbQIMoVozwVuisjvsVwqYWw==" + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@types/crypto-js/-/crypto-js-4.2.2.tgz", + "integrity": "sha512-sDOLlVbHhXpAUAL0YHDUUwDZf3iN4Bwi4W6a0W0b+QcAezUbRtH4FVb+9J4h+XFPW7l/gQ9F8qC7P+Ec4k8QVQ==" }, "@types/eslint": { "version": "8.56.0", @@ -20505,6 +20644,11 @@ "@types/send": "*" } }, + "@types/file-saver": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/file-saver/-/file-saver-2.0.7.tgz", + "integrity": "sha512-dNKVfHd/jk0SkR/exKGj2ggkB45MAkzvWCaqLUUgkyjITkGNzH8H+yUwr+BLJUBjZOe9w8X3wgmXhZDRg1ED6A==" + }, "@types/http-errors": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", @@ -20568,6 +20712,11 @@ "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", "dev": true }, + "@types/recordrtc": { + "version": "5.6.14", + "resolved": "https://registry.npmjs.org/@types/recordrtc/-/recordrtc-5.6.14.tgz", + "integrity": "sha512-Reiy1sl11xP0r6w8DW3iQjc1BgXFyNC7aDuutysIjpFoqyftbQps9xPA2FoBkfVXpJM61betgYPNt+v65zvMhA==" + }, "@types/retry": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz", @@ -20759,8 +20908,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/@vitejs/plugin-basic-ssl/-/plugin-basic-ssl-1.0.1.tgz", "integrity": "sha512-pcub+YbFtFhaGRTo1832FQHQSHvMrlb43974e2eS8EKleR3p1cDdkJFPci1UhwkEf1J9Bz+wKBSzqpKp7nNj2A==", - "dev": true, - "requires": {} + "dev": true }, "@webassemblyjs/ast": { "version": "1.11.6", @@ -21038,6 +21186,11 @@ "negotiator": "0.6.3" } }, + "ack-angular-webcam": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/ack-angular-webcam/-/ack-angular-webcam-1.10.0.tgz", + "integrity": "sha512-YXtcN1U+l3hIQPuaGtq8+Ua/SLFi5QFNUH5LyAXo8QHW+KWdxhzUMU8fGESfdEOIiw/80BBAz40Z6pQ97i3xyg==" + }, "acorn": { "version": "8.11.2", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", @@ -21066,15 +21219,13 @@ "version": "1.9.0", "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", - "dev": true, - "requires": {} + "dev": true }, "acorn-jsx": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "requires": {} + "dev": true }, "acorn-walk": { "version": "7.2.0", @@ -21482,6 +21633,11 @@ "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", "dev": true }, + "bootstrap": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.3.3.tgz", + "integrity": "sha512-8HLCdWgyoMguSO9o+aH+iuZ+aht+mzW0u3HIMzVu7Srrpv7EBBxTnrFlSCskwdY1+EOFQSm7uMJhNQHkdPcmjg==" + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -21661,6 +21817,14 @@ "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", "dev": true }, + "chart.js": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.2.tgz", + "integrity": "sha512-6GD7iKwFpP5kbSD4MeRRRlTnQvxfQREy36uEtm1hzHzcOqwWx0YEHuspuoNlslu+nciLIB7fjjsHkUv/FzFcOg==", + "requires": { + "@kurkle/color": "^0.3.0" + } + }, "chokidar": { "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", @@ -22564,8 +22728,7 @@ "version": "8.11.0", "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", - "dev": true, - "requires": {} + "dev": true } } }, @@ -22935,8 +23098,7 @@ "version": "9.1.0", "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", - "dev": true, - "requires": {} + "dev": true }, "eslint-plugin-prettier": { "version": "5.1.3", @@ -23277,6 +23439,11 @@ "flat-cache": "^3.0.4" } }, + "file-saver": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/file-saver/-/file-saver-2.0.5.tgz", + "integrity": "sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA==" + }, "filelist": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", @@ -23950,8 +24117,7 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", - "dev": true, - "requires": {} + "dev": true }, "ieee754": { "version": "1.2.1", @@ -24720,8 +24886,7 @@ "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==", - "dev": true, - "requires": {} + "dev": true }, "karma-source-map-support": { "version": "1.4.0", @@ -25062,6 +25227,11 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, + "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==" + }, "lodash.debounce": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", @@ -25831,6 +26001,11 @@ "minimist": "^1.2.6" } }, + "moment": { + "version": "2.30.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", + "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==" + }, "mrmime": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-1.0.1.tgz", @@ -25912,6 +26087,39 @@ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", "dev": true }, + "ng2-charts": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/ng2-charts/-/ng2-charts-6.0.0.tgz", + "integrity": "sha512-Hg45RDOoFoXSDya4U8t2IW2teKnXjy10zJVij65G/62Si+A5+uu8hKQKkBahxg67iTdpOwtyPGnQJ/chHVfFVA==", + "requires": { + "lodash-es": "^4.17.15", + "tslib": "^2.3.0" + } + }, + "ngx-bootstrap": { + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/ngx-bootstrap/-/ngx-bootstrap-12.0.0.tgz", + "integrity": "sha512-6/Hs+FT6peMc+Y2uiOm3IawG06Jh3gLQwwKRBF0U1OMlRbpx4KIyHS9GpZtMevtZaBsCRNfHKiSxwsnvn9wx0Q==", + "requires": { + "tslib": "^2.3.0" + } + }, + "ngx-pagination": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/ngx-pagination/-/ngx-pagination-6.0.3.tgz", + "integrity": "sha512-lONjTQ7hFPh1SyhwDrRd5ZwM4NMGQ7bNR6vLrs6mrU0Z8Q1zCcWbf/pvyp4DOlGyd9uyZxRy2wUsSZLeIPjbAw==", + "requires": { + "tslib": "^2.3.0" + } + }, + "ngx-webcam": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/ngx-webcam/-/ngx-webcam-0.4.1.tgz", + "integrity": "sha512-8WoC8GWHaN5tH+4zO0/gfUigVKg/jX7JShAewpumJIgJXFmlKhSPnPjewNNxv7OTQiOOb+5Mh6lhTo52VLlY9A==", + "requires": { + "tslib": "^2.3.0" + } + }, "nice-napi": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/nice-napi/-/nice-napi-1.0.2.tgz", @@ -26914,8 +27122,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz", "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==", - "dev": true, - "requires": {} + "dev": true }, "postcss-modules-local-by-default": { "version": "4.0.3", @@ -27349,6 +27556,11 @@ "picomatch": "^2.2.1" } }, + "recordrtc": { + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/recordrtc/-/recordrtc-5.6.2.tgz", + "integrity": "sha512-1QNKKNtl7+KcwD1lyOgP3ZlbiJ1d0HtXnypUy7yq49xEERxk31PHvE9RCciDrulPCY7WJ+oz0R9hpNxgsIurGQ==" + }, "reflect-metadata": { "version": "0.1.14", "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.14.tgz", @@ -28028,8 +28240,7 @@ "version": "8.11.0", "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", - "dev": true, - "requires": {} + "dev": true } } }, @@ -28455,8 +28666,7 @@ "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "requires": {} + "dev": true }, "json-schema-traverse": { "version": "0.4.1", @@ -28583,8 +28793,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz", "integrity": "sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==", - "dev": true, - "requires": {} + "dev": true }, "tsconfig-paths": { "version": "4.2.0", @@ -29036,8 +29245,7 @@ "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "requires": {} + "dev": true }, "json-schema-traverse": { "version": "0.4.1", @@ -29126,8 +29334,7 @@ "version": "8.16.0", "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", - "dev": true, - "requires": {} + "dev": true } } }, @@ -29307,8 +29514,7 @@ "version": "7.5.9", "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", - "dev": true, - "requires": {} + "dev": true }, "xml-name-validator": { "version": "3.0.0", diff --git a/package.json b/package.json index b01d1b7..06ea06b 100644 --- a/package.json +++ b/package.json @@ -28,9 +28,21 @@ "@angular/platform-browser": "^16.2.12", "@angular/platform-browser-dynamic": "^16.2.0", "@angular/router": "^16.2.0", - "@types/crypto-js": "^4.2.1", + "@types/crypto-js": "^4.2.2", + "@types/file-saver": "^2.0.7", + "@types/recordrtc": "^5.6.14", + "ack-angular-webcam": "^1.10.0", + "bootstrap": "^5.3.3", + "chart.js": "^4.4.2", "crypto-js": "^4.2.0", + "file-saver": "^2.0.5", "html2canvas": "^1.4.1", + "moment": "^2.30.1", + "ng2-charts": "^6.0.0", + "ngx-bootstrap": "^12.0.0", + "ngx-pagination": "^6.0.3", + "ngx-webcam": "^0.4.1", + "recordrtc": "^5.6.2", "rxjs": "~7.8.0", "tslib": "^2.3.0", "zone.js": "~0.13.0" diff --git a/src/app/app-modules/core/components/allergen-search/allergen-search.component.css b/src/app/app-modules/core/components/allergen-search/allergen-search.component.css new file mode 100644 index 0000000..47d985e --- /dev/null +++ b/src/app/app-modules/core/components/allergen-search/allergen-search.component.css @@ -0,0 +1,82 @@ +.input-full-width { + width: 100%; + } + + .m-t-30 { + margin-top: 30px; + } + + .container-fluid { + padding: 24px !important; + } + + .title { + margin: 0px 0px 10px; + padding: 15px 24px 15px; + color: white; + font-size: 18px; + line-height: 32px; + font-weight: 400; + background: #0277bd; + } + + .title h4 { + display: inline-block; + } + + .title .exit { + cursor: pointer; + } + + .progress { + width: 100%; + } + + .example-sidenav-content { + display: flex; + padding: 20px; + align-items: center; + justify-content: center; + } + + @media screen and (max-width: 768px) { + .search-btn { + width: 100%; + } + } + + .overlay { + height: 100%; + width: 100%; + display: flex; + align-items: center; + justify-content: center; + position: fixed; + z-index: 1001; + /* Sit on top */ + left: 0; + top: 0; + background-color: rgb(0, 0, 0); + /* Black fallback color */ + background-color: rgba(0, 0, 0, 0.3); + /* Black w/opacity */ + } + + + /* Position the content inside the overlay */ + + + /*.overlay-content { + position: relative; + top: 42%; 25% from the top + left: 46%; + width: 100%; 100% width + }*/ + + .overlay:root { + padding: 0px; + } + + .loader-hidden { + display: none; + } \ No newline at end of file diff --git a/src/app/app-modules/core/components/allergen-search/allergen-search.component.html b/src/app/app-modules/core/components/allergen-search/allergen-search.component.html new file mode 100644 index 0000000..dec049a --- /dev/null +++ b/src/app/app-modules/core/components/allergen-search/allergen-search.component.html @@ -0,0 +1,109 @@ +
+

{{ current_language_set?.allergenSearch?.allergenName }}

+ +
+
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + +
+ {{ current_language_set?.common?.ConceptID }} + + {{ element?.conceptID }} + + {{ current_language_set?.common?.term }} + + {{ element?.term }} + + + + + +
+
+
+ {{ current_language_set?.noRecordsFound }} +
+ + +
+
+
+ +
+
+
+
diff --git a/src/app/app-modules/core/components/allergen-search/allergen-search.component.spec.ts b/src/app/app-modules/core/components/allergen-search/allergen-search.component.spec.ts new file mode 100644 index 0000000..e9a9b0f --- /dev/null +++ b/src/app/app-modules/core/components/allergen-search/allergen-search.component.spec.ts @@ -0,0 +1,21 @@ +/* + * 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/. + */ 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 new file mode 100644 index 0000000..b415219 --- /dev/null +++ b/src/app/app-modules/core/components/allergen-search/allergen-search.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, Inject, OnInit, DoCheck, ViewChild } from '@angular/core'; +import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; +import { HttpServiceService } from '../../services/http-service.service'; +import { SetLanguageComponent } from '../set-language.component'; +import { MatPaginator } from '@angular/material/paginator'; +import { MatTableDataSource } from '@angular/material/table'; + +@Component({ + selector: 'app-allergen-search', + templateUrl: './allergen-search.component.html', + styleUrls: ['./allergen-search.component.css'], +}) +export class AllergenSearchComponent implements OnInit, DoCheck { + searchTerm!: string; + pageCount: any; + selectedComponentsList = []; + placeHolderSearch: any; + current_language_set: any; + + selectedComponent: any = null; + selectedComponentNo: any; + message = ''; + selectedItem: any; + displayedColumns: any = ['ConceptID', 'term', 'empty']; + + @ViewChild(MatPaginator) paginator: MatPaginator | null = null; + components = new MatTableDataSource(); + + constructor( + @Inject(MAT_DIALOG_DATA) public input: any, + // private masterdataService: MasterdataService, + public httpServiceService: HttpServiceService, + public dialogRef: MatDialogRef, + ) {} + + ngOnInit() { + this.assignSelectedLanguage(); + // this.search(this.input.searchTerm, 0); + } + + ngDoCheck() { + this.assignSelectedLanguage(); + } + assignSelectedLanguage() { + const getLanguageJson = new SetLanguageComponent(this.httpServiceService); + getLanguageJson.setLanguage(); + this.current_language_set = getLanguageJson.currentLanguageObject; + } + + selectComponentName(item: any, component: any) { + this.selectedComponent = null; + this.selectedComponentNo = item; + this.selectedComponent = component; + console.log('selectedComponent', this.selectedComponent); + this.selectedItem = component; + } + submitComponentList() { + const reqObj = { + componentNo: this.selectedComponentNo, + component: this.selectedComponent, + }; + this.dialogRef.close(reqObj); + } + showProgressBar = false; + // search(term: string, pageNo: any): void { + // if (term.length > 2) { + // this.showProgressBar = true; + // this.masterdataService + // .searchDiagnosisBasedOnPageNo1(term, pageNo) + // .subscribe( + // (res: any) => { + // if (res.statusCode === 200) { + // this.showProgressBar = false; + // if (res.data && res.data.sctMaster.length > 0) { + // this.components.data = res.data.sctMaster; + // this.components.paginator = this.paginator; + // } else { + // this.message = this.current_language_set.common.noRecordFound; + // } + // } else { + // this.resetData(); + // this.showProgressBar = false; + // } + // }, + // err => { + // this.resetData(); + // this.showProgressBar = false; + // } + // ); + // } + // } + + resetData() { + this.components.data = []; + this.components.paginator = this.paginator; + } +} diff --git a/src/app/app-modules/core/components/app-footer/app-footer.component.css b/src/app/app-modules/core/components/app-footer/app-footer.component.css new file mode 100644 index 0000000..51efeeb --- /dev/null +++ b/src/app/app-modules/core/components/app-footer/app-footer.component.css @@ -0,0 +1,38 @@ +footer { + background: rgb(37, 55, 70); + height: 30px; + padding: 6px; + color: white; +} + +.footer-text { + margin: 0px; +} + +.online { + background: green; + display: inline-block; + height: 10px; + width: 10px; + border-radius: 50%; +} + +.offline { + background: red; + display: inline-block; + height: 10px; + width: 10px; + border-radius: 50%; +} + +.spec { + margin-top: -6px; +} + +.netstate { + margin-top: 8px; +} + +.swymed-btn { + background: #354f64 +} \ No newline at end of file diff --git a/src/app/app-modules/core/components/app-footer/app-footer.component.html b/src/app/app-modules/core/components/app-footer/app-footer.component.html new file mode 100644 index 0000000..b84f229 --- /dev/null +++ b/src/app/app-modules/core/components/app-footer/app-footer.component.html @@ -0,0 +1,58 @@ +
+
+
+ Powered by: WIPRO + {{ currentLanguageSet?.coreComponents?.poweredByWipro }} +
+
+ + +
+
+ +
+
+
diff --git a/src/app/app-modules/core/components/app-footer/app-footer.component.spec.ts b/src/app/app-modules/core/components/app-footer/app-footer.component.spec.ts new file mode 100644 index 0000000..2df2a83 --- /dev/null +++ b/src/app/app-modules/core/components/app-footer/app-footer.component.spec.ts @@ -0,0 +1,46 @@ +/* + * 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 { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { AppFooterComponent } from './app-footer.component'; + +describe('AppFooterComponent', () => { + let component: AppFooterComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [AppFooterComponent], + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(AppFooterComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); 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 new file mode 100644 index 0000000..be9a103 --- /dev/null +++ b/src/app/app-modules/core/components/app-footer/app-footer.component.ts @@ -0,0 +1,73 @@ +/* + * 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, DoCheck } from '@angular/core'; +import { HttpServiceService } from '../../services/http-service.service'; +import { SetLanguageComponent } from '../set-language.component'; +import { MatSnackBarRef } from '@angular/material/snack-bar'; + +@Component({ + selector: 'app-footer', + templateUrl: './app-footer.component.html', + styleUrls: ['./app-footer.component.css'], +}) +export class AppFooterComponent implements OnInit, DoCheck { + currentLanguageSet: any; + status = false; + isSpecialist = false; + + constructor(public httpServiceService: HttpServiceService) {} + year: any; + today!: Date; + + ngOnInit() { + this.assignSelectedLanguage(); + this.today = new Date(); + this.year = this.today.getFullYear(); + console.log('inside footer', this.year); + setInterval(() => { + this.status = navigator.onLine; + }, 1000); + } + + ngDoCheck() { + this.assignSelectedLanguage(); + } + assignSelectedLanguage() { + const getLanguageJson = new SetLanguageComponent(this.httpServiceService); + getLanguageJson.setLanguage(); + this.currentLanguageSet = getLanguageJson.currentLanguageObject; + } + + openSnackBar() { + // let snackBarRef: MatSnackBarRef = this.snackBar.openFromComponent(SpecialistLoginComponent, { + // horizontalPosition: 'right', + // data : { + // message: 'string',action: 'Save' + // } + // } + // ); + // snackBarRef.afterDismissed().subscribe(() => { + // console.log('locsl', JSON.parse(localStorage.getItem('swymedLogin'))); + // }) + } +} diff --git a/src/app/app-modules/core/components/app-header/app-header.component.css b/src/app/app-modules/core/components/app-header/app-header.component.css new file mode 100644 index 0000000..49190c9 --- /dev/null +++ b/src/app/app-modules/core/components/app-header/app-header.component.css @@ -0,0 +1,131 @@ +.helpAlign { + font-size: 24px; + vertical-align: middle; + text-align: center; + padding: 0px; + margin-top:5px !important; + color: white +} +.white-icon { + color: white; /* Set the color to white */ + } +.w85 { + width : 85%; +} +.nav-btn{ + background-color: #c9cdce; + box-sizing: border-box; + position: relative; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; + outline: 0; + border: none; + -webkit-tap-highlight-color: transparent; + display: inline-block; + white-space: nowrap; + text-decoration: none; + vertical-align: baseline; + text-align: center; + margin: 0; + min-width: 88px; + line-height: 36px; + padding: 0 16px; + border-radius: 2px; + +} +.menu-font{ + font-size: 14px !important; +} +.navbar-iemr { + background-color: #253746; + color: white; + border-radius: 0px; + margin-bottom: 5px; + min-height: unset; + padding: 3px 0px; +} + +.icon-bar { + background-color: white; +} + +.navbar-brand { + padding: 0px 15px; + height: unset; +} + +li a { + outline: none; +} + +.navbar-iemr li { + float: right !important; +} + +.navbar-iemr li a:hover { + background: unset; +} + +.navbar-iemr .nav li a { + padding: 6px 8px; +} + +li.telemed a img { + height: 24px; + width: 24px; +} + +li.logout a span.logoutIcon:hover { + background-position-y: -21px; +} + +#main-navbar { + padding: 5px 15px; + font-weight: bold; + background-color: rgba(37, 55, 70, 0.2); + box-shadow: inset 0px 0px 5px 2px rgba(0, 0, 0, 0.1); +} + +.active { + background: rgba(37, 55, 70, 0.1); +} + +button.mat-button { + font-weight: bold; + width: 100%; +} + +mat-menu { + width: 100%; +} + +@media (max-width: 760px) { + .navbar-brand { + padding: 5px 15px; + } +} + + +.iot { + font-size: 26px; + vertical-align: middle; + text-align: center; + padding: 0px; + color: rgba(245, 245, 245, 0.877); + margin-top: 4px; +} + +.connected{ + color:green; + } + +.alignDropDown { + margin-top: 3px; +} +.alignWord { + margin: 8px 10px; + +} \ No newline at end of file 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 new file mode 100644 index 0000000..f29f8d0 --- /dev/null +++ b/src/app/app-modules/core/components/app-header/app-header.component.html @@ -0,0 +1,188 @@ + + +
+ +
diff --git a/src/app/app-modules/core/components/app-header/app-header.component.spec.ts b/src/app/app-modules/core/components/app-header/app-header.component.spec.ts new file mode 100644 index 0000000..9a253c4 --- /dev/null +++ b/src/app/app-modules/core/components/app-header/app-header.component.spec.ts @@ -0,0 +1,213 @@ +/* + * 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 { + async, + ComponentFixture, + tick, + fakeAsync, + TestBed, +} from '@angular/core/testing'; +import { AuthService } from '../../app-modules/services/auth.service'; +import { AppHeaderComponent } from './app-header.component'; +import { CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA } from '@angular/core'; +import { Observable } from 'rxjs/Observable'; +import 'rxjs/add/observable/from'; +import 'rxjs/add/observable/empty'; +import 'rxjs/add/observable/throw'; +import { By } from '@angular/platform-browser'; +import { NoopAnimationsModule } from '@angular/platform-browser/animations'; +import { Router, ActivatedRoute } from '@angular/router'; +import { MaterialModule } from '../../../core/material.module'; + +class MockActivatedRoute { + snapshot = { + params: [null], + }; +} + +describe('AppHeaderComponent', () => { + let component: AppHeaderComponent; + let fixture: ComponentFixture; + let authService: AuthService; + let router: Router; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + schemas: [CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA], + imports: [MaterialModule, NoopAnimationsModule], + declarations: [AppHeaderComponent], + providers: [ + { provide: Router, useClass: RouterStub }, + { provide: ActivatedRoute, useClass: MockActivatedRoute }, + { provide: AuthService, useClass: authServiceMock }, + ], + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(AppHeaderComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + component.showRoles = false; + authService = TestBed.get(AuthService); + router = TestBed.get(Router); + window.localStorage.setItem('servicePointName', 'Barpeta SP'); + window.localStorage.setItem('userName', 'Prabhsimran Singh'); + window.sessionStorage.setItem('isAuthenticated', 'true'); + }); + + it('should create app header component', () => { + expect(component).toBeTruthy(); + }); + + it('should get servicePointName from localstorage when init', () => { + fixture.autoDetectChanges(); + expect(component.servicePoint).toEqual( + window.localStorage.getItem('servicePointName'), + ); + }); + + it('should get userName from localstorage when init', () => { + fixture.autoDetectChanges(); + expect(component.userName).toEqual(window.localStorage.getItem('userName')); + }); + + it('should get isAuthenticated from localstorage when init', () => { + fixture.autoDetectChanges(); + expect(component.isAuthenticated.toString()).toBe( + window.sessionStorage.getItem('isAuthenticated'), + ); + }); + + it("should keep roles as undefined as we've kept showroles as no", () => { + fixture.autoDetectChanges(); + expect(component.roles).toBe(undefined); + }); + + it("should keep filteredNavigation as undefined as we've kept showroles as no", () => { + fixture.autoDetectChanges(); + expect(component.filteredNavigation).toBe(undefined); + }); + + it('should set roles as per save in localstorage when we have showRoles set to true', () => { + component.showRoles = true; + const role = + '["Registrar","Nurse","Doctor","TC Specialist","Oncologist","Lab Technician","Pharmacist"]'; + window.localStorage.setItem('role', role); + component.ngOnInit(); + fixture.detectChanges(); + expect(component.roles).toBeTruthy(); + }); + + it("should not set roles as per save in localstorage when we don't have showRoles set to true", () => { + const role = + '["Registrar","Nurse","Doctor","TC Specialist","Oncologist","Lab Technician","Pharmacist"]'; + window.localStorage.setItem('role', role); + component.ngOnInit(); + fixture.detectChanges(); + expect(component.roles).not.toBeTruthy(); + }); + + it('should filteredNavigation as per save in localstorage when we have showRoles set to true', () => { + component.showRoles = true; + const role = + '["Registrar","Nurse","Doctor","TC Specialist","Oncologist","Lab Technician","Pharmacist"]'; + window.localStorage.setItem('role', role); + component.ngOnInit(); + fixture.detectChanges(); + expect(component.filteredNavigation).toBeTruthy(); + }); + + it('should call logout method on click of logout tag', fakeAsync(() => { + const spy = spyOn(authService, 'logoutUser').and.returnValue( + Observable.of(1), + ); + component.ngOnInit(); + fixture.detectChanges(); + const el = fixture.debugElement.query(By.css('#logoutButton')); + el.triggerEventHandler('click', null); + tick(); + fixture.detectChanges(); + expect(spy).toHaveBeenCalled(); + })); + + it('should not clear local storage asresponse is not correct', () => { + spyOn(authService, 'logoutUser').and.returnValue( + Observable.of({ statusCode: 401 }), + ); + component.ngOnInit(); + component.logout(); + + expect(localStorage.length).not.toEqual(0); + }); + + it('should not clear session storage asresponse is not correct', () => { + spyOn(authService, 'logoutUser').and.returnValue( + Observable.of({ statusCode: 401 }), + ); + component.ngOnInit(); + component.logout(); + + expect(sessionStorage.length).not.toEqual(0); + }); + + it('should clear local storage as response is correct', () => { + spyOn(authService, 'logoutUser').and.returnValue( + Observable.of({ statusCode: 200 }), + ); + component.ngOnInit(); + component.logout(); + + expect(localStorage.length).toEqual(0); + }); + + it('should clear local storage as response is correct', () => { + spyOn(authService, 'logoutUser').and.returnValue( + Observable.of({ statusCode: 200 }), + ); + component.ngOnInit(); + component.logout(); + + expect(sessionStorage.length).toEqual(0); + }); + + it('should call to navigate to other component', () => { + spyOn(authService, 'logoutUser').and.returnValue( + Observable.of({ statusCode: 200 }), + ); + const spier = spyOn(router, 'navigate'); + component.ngOnInit(); + component.logout(); + expect(spier).toHaveBeenCalled(); + }); + + it('should call to navigate to login component', () => { + spyOn(authService, 'logoutUser').and.returnValue( + Observable.of({ statusCode: 200 }), + ); + const spier = spyOn(router, 'navigate'); + component.ngOnInit(); + component.logout(); + expect(spier).toHaveBeenCalledWith(['/login']); + }); +}); 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 new file mode 100644 index 0000000..5e7f6cc --- /dev/null +++ b/src/app/app-modules/core/components/app-header/app-header.component.ts @@ -0,0 +1,310 @@ +/* + * 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, Input } from '@angular/core'; +import { Router } from '@angular/router'; +import { environment } from 'src/environments/environment'; +import { MatDialog } from '@angular/material/dialog'; +import { AuthService, ConfirmationService } from '../../services'; +import { HttpServiceService } from '../../services/http-service.service'; +import { IotService } from '../../services/iot.service'; +import { IotBluetoothComponent } from '../iot-bluetooth/iot-bluetooth.component'; +import { ShowCommitAndVersionDetailsComponent } from '../show-commit-and-version-details/show-commit-and-version-details.component'; +import { TelemedicineService } from '../../services/telemedicine.service'; + +@Component({ + selector: 'app-header', + templateUrl: './app-header.component.html', + styleUrls: ['./app-header.component.css'], +}) +export class AppHeaderComponent implements OnInit { + language_file_path: any = './assets/'; + app_language: any = 'English'; + currentLanguageSet: any; + languageArray: any; + navigation: any; + @Input() + showRoles = false; + + servicePoint!: any; + userName!: any; + isAuthenticated!: boolean; + roles: any; + filteredNavigation: any; + isConnected = true; + status!: any; + license: any; + + constructor( + private dialog: MatDialog, + private router: Router, + private auth: AuthService, + private telemedicineService: TelemedicineService, + public service: IotService, + private http_service: HttpServiceService, + ) {} + + ngOnInit() { + this.service.disconnectValue$.subscribe((response) => { + if (response === undefined) this.isConnected = false; + else this.isConnected = response; + }); + this.http_service.currentLangugae$.subscribe((response) => { + this.currentLanguageSet = response; + }); + + this.getUIVersionAndCommitDetails(); + this.servicePoint = localStorage.getItem('servicePointName'); + this.userName = localStorage.getItem('userName'); + this.isAuthenticated = sessionStorage.getItem('isAuthenticated') === 'true'; + this.license = environment.licenseUrl; + if (this.isAuthenticated) { + this.fetchLanguageSet(); + } + this.status = localStorage.getItem('providerServiceID'); + } + + DataSync() { + this.router.navigate(['/datasync']); + } + fetchLanguageSet() { + this.http_service.fetchLanguageSet().subscribe((languageRes: any) => { + if ( + languageRes && + languageRes.data !== undefined && + languageRes !== null + ) { + this.languageArray = languageRes.data; + this.getLanguage(); + } + }); + console.log('language array' + this.languageArray); + } + changeLanguage(language: any) { + this.http_service + .getLanguage(this.language_file_path + language + '.json') + .subscribe( + (response) => { + if (response !== undefined && response !== null) { + this.languageSuccessHandler(response, language); + } else { + alert(this.currentLanguageSet.alerts.info.langNotDefinesd); + } + }, + (error) => { + alert( + this.currentLanguageSet.alerts.info.comingUpWithThisLang + + ' ' + + language, + ); + }, + ); + } + getLanguage() { + if (sessionStorage.getItem('setLanguage') != null) { + this.changeLanguage(sessionStorage.getItem('setLanguage')); + } else { + this.changeLanguage(this.app_language); + } + } + + languageSuccessHandler(response: any, language: any) { + console.log('language is ', response); + if (response == undefined) { + alert(this.currentLanguageSet.alerts.info.langNotDefinesd); + } + + if (response[language] != undefined) { + this.currentLanguageSet = response[language]; + sessionStorage.setItem('setLanguage', language); + if (this.currentLanguageSet) { + this.languageArray.forEach((item: any) => { + if (item.languageName == language) { + this.app_language = language; + } + }); + } else { + this.app_language = language; + } + + this.http_service.getCurrentLanguage(response[language]); + this.rolenavigation(); + } else { + alert( + this.currentLanguageSet.alerts.info.comingUpWithThisLang + + ' ' + + language, + ); + } + } + + logout() { + this.auth.logout().subscribe((res) => { + this.router.navigate(['/login']).then((result) => { + if (result) { + this.changeLanguage('English'); + localStorage.clear(); + sessionStorage.clear(); + } + }); + }); + } + rolenavigation() { + this.navigation = [ + { + role: 'Registrar', + label: this.currentLanguageSet.role_selection.Registrar, + + work: [ + { + link: '/registrar/registration', + label: this.currentLanguageSet.ro.registration, + }, + { + link: '/registrar/search', + label: this.currentLanguageSet.common.search, + }, + ], + }, + { + role: 'Nurse', + link: '/nurse-doctor/nurse-worklist', + label: this.currentLanguageSet.role_selection.Nurse, + }, + { + role: 'Doctor', + link: '/nurse-doctor/doctor-worklist', + label: this.currentLanguageSet.role_selection.Doctor, + }, + { + role: 'Lab Technician', + link: '/lab/worklist', + label: this.currentLanguageSet.role_selection.LabTechnician, + }, + { + role: 'Pharmacist', + link: '/pharmacist/pharmacist-worklist', + label: this.currentLanguageSet.role_selection.Pharmacist, + }, + { + role: 'Radiologist', + link: '/nurse-doctor/radiologist-worklist', + label: this.currentLanguageSet.role_selection.Radiologist, + }, + { + role: 'Oncologist', + link: '/nurse-doctor/oncologist-worklist', + label: this.currentLanguageSet.role_selection.Oncologist, + }, + { + role: 'TC Specialist', + label: this.currentLanguageSet.common.TCSpecialist, + work: [ + { + link: '/nurse-doctor/tcspecialist-worklist', + label: 'Worklist', + labelName: this.currentLanguageSet.common.Worklist, + }, + { + label: 'Timesheet', + labelName: this.currentLanguageSet.common.timeSheet, + }, + ], + }, + { + role: 'DataSync', + link: '/datasync', + label: this.currentLanguageSet.common.dataSync, + }, + ]; + if (this.showRoles) { + const role: any = localStorage.getItem('role'); + this.roles = JSON.parse(role); + if (this.roles !== undefined && this.roles !== null) { + this.filteredNavigation = this.navigation.filter((item: any) => { + return this.roles.includes(item.role); + }); + } + } + } + commitDetailsUI: any; + versionUI: any; + getUIVersionAndCommitDetails() { + 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); + }, + ); + } + showVersionAndCommitDetails() { + this.auth.getAPIVersionAndCommitDetails().subscribe( + (res: any) => { + if (res.statusCode == 200) { + this.constructAPIAndUIDetails(res.data); + } + }, + (err) => {}, + ); + } + constructAPIAndUIDetails(apiVersionAndCommitDetails: any) { + const data = { + commitDetailsUI: { + version: this.commitDetailsUI['version'], + commit: this.commitDetailsUI['commit'], + }, + commitDetailsAPI: { + version: apiVersionAndCommitDetails['git.build.version'] || 'NA', + commit: apiVersionAndCommitDetails['git.commit.id'] || 'NA', + }, + }; + if (data) { + this.showData(data); + } + } + showData(versionData: any) { + this.dialog.open(ShowCommitAndVersionDetailsComponent, { + data: versionData, + }); + } + + openIOT() { + this.dialog.open(IotBluetoothComponent, { + width: '600px', + }); + } + + getSwymedLogout() { + this.auth.getSwymedLogout().subscribe((res: any) => { + window.location.href = res.data.response; + this.logout(); + }); + } + navigateToTeleMedicine() { + this.telemedicineService.routeToTeleMedecine(); + } +} diff --git a/src/app/app-modules/core/components/beneficiary-details/beneficiary-details.component.css b/src/app/app-modules/core/components/beneficiary-details/beneficiary-details.component.css new file mode 100644 index 0000000..a9f0e63 --- /dev/null +++ b/src/app/app-modules/core/components/beneficiary-details/beneficiary-details.component.css @@ -0,0 +1,15 @@ +.profileData tr td span { + font-weight: bold; +} + +img { + border-radius: 50%; + width: 100px; + height: 100px; +} + +.table>tbody>tr>td, .table>tbody>tr>th { + padding: 4px; + border-top: none; + vertical-align: middle; +} \ No newline at end of file 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 new file mode 100644 index 0000000..9d09575 --- /dev/null +++ b/src/app/app-modules/core/components/beneficiary-details/beneficiary-details.component.html @@ -0,0 +1,94 @@ +
+
+ DefaultPatient + Patient + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ {{ current_language_set?.bendetails?.beneficiaryName }}: +
{{ beneficiary?.beneficiaryName }}
+ {{ current_language_set?.bendetails?.gender }} / + {{ current_language_set?.bendetails?.age }}: +
+ {{ beneficiary?.genderName }} / {{ beneficiary?.age }}  {{ + beneficiary?.ageUnit + }} +
+ {{ current_language_set?.bendetails?.beneficiaryID }}: +
{{ beneficiary?.beneficiaryID }}
{{ current_language_set?.aBHA }}:
{{ healthIDValue }}
+ {{ current_language_set?.bendetails?.registrationDate }}: +
{{ beneficiary?.createdDate | date: "dd/MM/yyyy, h:mm a" }}
+ {{ current_language_set?.bendetails?.visitDate }}: +
{{ today | date: "dd/MM/yyyy, h:mm a" }}
{{ current_language_set?.bendetails?.district }}:
+ {{ beneficiary?.districtName }} / {{ beneficiary?.villageName }} +
+
+
diff --git a/src/app/app-modules/core/components/beneficiary-details/beneficiary-details.component.spec.ts b/src/app/app-modules/core/components/beneficiary-details/beneficiary-details.component.spec.ts new file mode 100644 index 0000000..4e418c0 --- /dev/null +++ b/src/app/app-modules/core/components/beneficiary-details/beneficiary-details.component.spec.ts @@ -0,0 +1,46 @@ +/* + * 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 { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { BeneficiaryDetailsComponent } from './beneficiary-details.component'; + +describe('BeneficiaryDetailsComponent', () => { + let component: BeneficiaryDetailsComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [BeneficiaryDetailsComponent], + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(BeneficiaryDetailsComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/app-modules/core/components/beneficiary-details/beneficiary-details.component.ts b/src/app/app-modules/core/components/beneficiary-details/beneficiary-details.component.ts new file mode 100644 index 0000000..84ffa02 --- /dev/null +++ b/src/app/app-modules/core/components/beneficiary-details/beneficiary-details.component.ts @@ -0,0 +1,160 @@ +/* + * 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, DoCheck, OnDestroy } from '@angular/core'; +import { ActivatedRoute } from '@angular/router'; +import { BeneficiaryDetailsService } from '../../services/beneficiary-details.service'; +import { HttpServiceService } from '../../services/http-service.service'; +import { SetLanguageComponent } from '../set-language.component'; +import { ConfirmationService } from '../../services'; + +@Component({ + selector: 'app-beneficiary-details', + templateUrl: './beneficiary-details.component.html', + styleUrls: ['./beneficiary-details.component.css'], +}) +export class BeneficiaryDetailsComponent implements OnInit, DoCheck, OnDestroy { + beneficiary: any; + today: any; + beneficiaryDetailsSubscription: any; + current_language_set: any; + benDetails: any; + healthIDArray: any = []; + healthIDValue = ''; + + constructor( + private route: ActivatedRoute, + public httpServiceService: HttpServiceService, + private beneficiaryDetailsService: BeneficiaryDetailsService, + // private registrarService: RegistrarService, + private confirmationService: ConfirmationService, + ) {} + + ngOnInit() { + const benFlowID: any = localStorage.getItem('benFlowID'); + this.assignSelectedLanguage(); + this.today = new Date(); + this.route.params.subscribe((param) => { + this.beneficiaryDetailsService.getBeneficiaryDetails( + param['beneficiaryRegID'], + benFlowID, + ); + this.beneficiaryDetailsSubscription = + this.beneficiaryDetailsService.beneficiaryDetails$.subscribe((res) => { + if (res != null) { + this.beneficiary = res; + if (res.serviceDate) { + this.today = res.serviceDate; + } + } + }); + + this.beneficiaryDetailsService + .getBeneficiaryImage(param['beneficiaryRegID']) + .subscribe((data: any) => { + if (data?.benImage) { + this.beneficiary.benImage = data.benImage; + } + }); + }); + } + + ngDoCheck() { + this.assignSelectedLanguage(); + } + assignSelectedLanguage() { + const getLanguageJson = new SetLanguageComponent(this.httpServiceService); + getLanguageJson.setLanguage(); + this.current_language_set = getLanguageJson.currentLanguageObject; + } + + ngOnDestroy() { + if (this.beneficiaryDetailsSubscription) + this.beneficiaryDetailsSubscription.unsubscribe(); + } + + getHealthIDDetails() { + this.route.params.subscribe((param) => { + console.log('benID', param); + const data = { + beneficiaryRegID: param['beneficiaryRegID'], + beneficiaryID: null, + }; + // this.registrarService.getHealthIdDetails(data).subscribe( + // (healthIDDetails: any) => { + // if (healthIDDetails.statusCode == 200) { + // console.log('healthID', healthIDDetails); + // if ( + // healthIDDetails.data.BenHealthDetails != undefined && + // healthIDDetails.data.BenHealthDetails != null + // ) { + // this.benDetails = healthIDDetails.data.BenHealthDetails; + // if (this.benDetails.length > 0) { + // this.benDetails.forEach((healthID: any, index: any) => { + // if ( + // healthID.healthId != undefined && + // healthID.healthId != null && + // index != this.benDetails.length - 1 + // ) + // this.healthIDArray.push(healthID.healthId + ','); + // else if ( + // healthID.healthId != undefined && + // healthID.healthId != null + // ) + // this.healthIDArray.push(healthID.healthId); + // if ( + // healthID.healthId != undefined && + // healthID.healthId != null + // ) + // this.healthIDValue = + // this.healthIDValue + healthID.healthId + ','; + // }); + // } + // if ( + // this.healthIDValue != undefined && + // this.healthIDValue != null && + // this.healthIDValue.length > 1 + // ) { + // this.healthIDValue = this.healthIDValue.substring( + // 0, + // this.healthIDValue.length - 1, + // ); + // //this.beneficiaryDetailsService.healthID= this.healthIDValue; + // } + // } + // } else { + // this.confirmationService.alert( + // this.current_language_set.issueInGettingBeneficiaryABHADetails, + // 'error', + // ); + // } + // }, + // (err: any) => { + // this.confirmationService.alert( + // this.current_language_set.issueInGettingBeneficiaryABHADetails, + // 'error', + // ); + // }, + // ); + }); + } +} diff --git a/src/app/app-modules/core/components/calibration/calibration.component.css b/src/app/app-modules/core/components/calibration/calibration.component.css new file mode 100644 index 0000000..88983ab --- /dev/null +++ b/src/app/app-modules/core/components/calibration/calibration.component.css @@ -0,0 +1,104 @@ +.input-full-width { + width: 100%; + } + + .m-t-30 { + margin-top: 30px; + } + + .container-fluid { + padding: 24px !important; + } + + .title { + margin: 0px 0px 10px; + padding: 15px 24px 15px; + color: white; + font-size: 18px; + line-height: 32px; + font-weight: 400; + background: #0277bd; + } + + .title h4 { + display: inline-block; + } + + .title .exit { + cursor: pointer; + } + + .progress { + width: 100%; + } + + .example-sidenav-content { + display: flex; + padding: 20px; + align-items: center; + justify-content: center; + } + + @media screen and (max-width: 768px) { + .search-btn { + width: 100%; + } + } + + .overlay { + height: 100%; + width: 100%; + display: flex; + align-items: center; + justify-content: center; + position: fixed; + z-index: 1001; + /* Sit on top */ + left: 0; + top: 0; + background-color: rgb(0, 0, 0); + /* Black fallback color */ + background-color: rgba(0, 0, 0, 0.3); + /* Black w/opacity */ + } + + + /* Position the content inside the overlay */ + + + /*.overlay-content { + position: relative; + top: 42%; 25% from the top + left: 46%; + width: 100%; 100% width + }*/ + + .overlay:root { + padding: 0px; + } + + .loader-hidden { + display: none; + } + + +table { + overflow: auto; + max-height: 500px; +} + +.element-row { + position: relative; +} + +.element-row:not(.expanded) { + cursor: pointer; +} + +.element-row:not(.expanded):hover { + background: grey; +} + +.element-row.expanded { + border-bottom-color: transparent; +} \ No newline at end of file diff --git a/src/app/app-modules/core/components/calibration/calibration.component.html b/src/app/app-modules/core/components/calibration/calibration.component.html new file mode 100644 index 0000000..c9c5176 --- /dev/null +++ b/src/app/app-modules/core/components/calibration/calibration.component.html @@ -0,0 +1,95 @@ +
+

{{ current_language_set?.coreComponents?.selectCallibrationStrip }}

+ +
+
+ + + {{ + current_language_set?.coreComponents?.inTableSearchStripCode + }} + + search + +
+ + + + + + + + + + + + + + + +
+ {{ current_language_set?.coreComponents?.sno }} + + {{ element.sno }} + + {{ current_language_set?.coreComponents?.stripCode }} + + {{ element?.stripCode }} + + {{ current_language_set?.coreComponents?.expiryDate }} + + {{ + element.expiryDate !== undefined && element.expiryDate !== null + ? (element.expiryDate | date: "dd-MM-yyyy") + : "NA" + }} +
+
+
+ {{ current_language_set?.noRecordsFound }} +
+ + +
+
diff --git a/src/app/app-modules/core/components/calibration/calibration.component.spec.ts b/src/app/app-modules/core/components/calibration/calibration.component.spec.ts new file mode 100644 index 0000000..4c88079 --- /dev/null +++ b/src/app/app-modules/core/components/calibration/calibration.component.spec.ts @@ -0,0 +1,46 @@ +/* + * 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 { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { CalibrationComponent } from './calibration.component'; + +describe('CalibrationComponent', () => { + let component: CalibrationComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [CalibrationComponent], + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(CalibrationComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/app-modules/core/components/calibration/calibration.component.ts b/src/app/app-modules/core/components/calibration/calibration.component.ts new file mode 100644 index 0000000..a8adc75 --- /dev/null +++ b/src/app/app-modules/core/components/calibration/calibration.component.ts @@ -0,0 +1,156 @@ +/* + * 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/. + */ + +//SH20094090,calibration integration,09-06-2021 + +import { Component, Inject, OnInit, DoCheck, ViewChild } from '@angular/core'; +import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; +import { ConfirmationService } from '../../services'; +import { HttpServiceService } from '../../services/http-service.service'; +import { SetLanguageComponent } from '../set-language.component'; +import { MatPaginator } from '@angular/material/paginator'; +import { MatTableDataSource } from '@angular/material/table'; + +@Component({ + selector: 'app-calibration', + templateUrl: './calibration.component.html', + styleUrls: ['./calibration.component.css'], +}) +export class CalibrationComponent implements OnInit, DoCheck { + searchTerm: any; + message = ''; + dataList = []; + current_language_set: any; + + @ViewChild(MatPaginator) paginator: MatPaginator | null = null; + components = new MatTableDataSource(); + displayedColumns: any = ['sno', 'SCode', 'ExpiryDate']; + + constructor( + @Inject(MAT_DIALOG_DATA) public input: any, + // private masterdataService: MasterdataService, + private confirmationService: ConfirmationService, + public httpServiceService: HttpServiceService, + public dialogRef: MatDialogRef, + ) {} + + ngOnInit() { + this.assignSelectedLanguage(); + // this.masterData(this.input.providerServiceMapID, 0); + } + + ngDoCheck() { + this.assignSelectedLanguage(); + } + assignSelectedLanguage() { + const getLanguageJson = new SetLanguageComponent(this.httpServiceService); + getLanguageJson.setLanguage(); + this.current_language_set = getLanguageJson.currentLanguageObject; + } + + // masterData(providerServiceMapID: any, pageNo: any) { + // this.masterdataService + // .fetchCalibrationStrips(providerServiceMapID, pageNo) + // .subscribe( + // (res: any) => { + // if (res.statusCode == 200) { + // if ( + // res.data && + // res.data.calibrationData !== undefined && + // res.data.calibrationData.length > 0 + // ) { + // 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 = []; + // this.components.paginator = this.paginator; + // } + // } else { + // this.resetData(); + // } + // }, + // (err: any) => { + // this.resetData(); + // } + // ); + // } + + goToLink(item: any) { + const today = new Date(); + if (item.expiryDate !== undefined && new Date(item.expiryDate) < today) { + this.confirmationService + .confirmCalibration( + 'info', + this.current_language_set.coreComponents.selectedCalibrationStripIs, + ) + .subscribe((res) => { + if (res === true) { + this.dialogRef.close(item.stripCode); + } + }); + } else { + this.confirmationService + .confirmCalibration( + 'info', + this.current_language_set.coreComponents + .doYouWantToProceedWithSelectedCalibrationStrip, + ) + .subscribe((res) => { + if (res === true) { + this.dialogRef.close(item.stripCode); + } + }); + } + } + close() { + this.dialogRef.close(null); + } + + resetData() { + this.components.data = []; + this.components.paginator = this.paginator; + } + + filterPreviousData(searchTerm: any) { + console.log('searchTerm', searchTerm); + if (!searchTerm) { + this.components.data = this.dataList; + this.components.paginator = this.paginator; + } else { + this.components.data = []; + this.components.paginator = this.paginator; + this.dataList.forEach((item) => { + for (const key in item) { + const value: string = '' + item[key]; + if (value.toLowerCase().indexOf(searchTerm.toLowerCase()) >= 0) { + this.components.data.push(item); + this.components.paginator = this.paginator; + break; + } + } + }); + } + } +} diff --git a/src/app/app-modules/core/components/camera-dialog/camera-dialog.component.css b/src/app/app-modules/core/components/camera-dialog/camera-dialog.component.css new file mode 100644 index 0000000..777a3af --- /dev/null +++ b/src/app/app-modules/core/components/camera-dialog/camera-dialog.component.css @@ -0,0 +1,38 @@ +.center-btn { + justify-content: center !important; + display: flex !important; +} + +#workarea { + width: 650px; + height: 650px; + text-align: center; +} + +#photo { + overflow: hidden; + width: 600px; + height: 400px; + background-position: center; + background-size: contain; + background-repeat: no-repeat; +} + +#camPic { + overflow: hidden; + width: 550px; + height: 400px; + text-align: center; + background-position: center; + background-size: contain; + background-repeat: no-repeat; +} + +.overflown { + max-height: 250px; + overflow-y: auto; +} + +.dialog { + padding: 24px; +} \ No newline at end of file diff --git a/src/app/app-modules/core/components/camera-dialog/camera-dialog.component.html b/src/app/app-modules/core/components/camera-dialog/camera-dialog.component.html new file mode 100644 index 0000000..d538827 --- /dev/null +++ b/src/app/app-modules/core/components/camera-dialog/camera-dialog.component.html @@ -0,0 +1,217 @@ +
+ +
+ + + sys +
+
+ +

+
+ + + +
+

+
+
+ +
+ +
+ sys +
+
+ +
+ +
+
+
+ +
+ +
+

+ {{ + current_language_set?.coreComponents + ?.noDataAvailableForThisBeneficiary + }} +

+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ annotate +
+ +
+ +
+

{{ current_language_set?.coreComponents?.markDescriptions }}

+
+ + + +
+
+
+
+ + +
+ + + +
+
+
+ +
+ +

+ {{ current_language_set?.previousvisit?.bodyweighttrends }} +

+

+ {{ current_language_set?.previousvisit?.bloodGlucoseTrends }} +

+

+ {{ current_language_set?.previousvisit?.bloodPressureTrends }} +

+ +
+ + +
+ + +
+
+
diff --git a/src/app/app-modules/core/components/camera-dialog/camera-dialog.component.spec.ts b/src/app/app-modules/core/components/camera-dialog/camera-dialog.component.spec.ts new file mode 100644 index 0000000..d5f95b8 --- /dev/null +++ b/src/app/app-modules/core/components/camera-dialog/camera-dialog.component.spec.ts @@ -0,0 +1,46 @@ +/* + * 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 { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { CameraDialogComponent } from './camera-dialog.component'; + +describe('CameraDialogComponent', () => { + let component: CameraDialogComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [CameraDialogComponent], + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(CameraDialogComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should be created', () => { + expect(component).toBeTruthy(); + }); +}); 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 new file mode 100644 index 0000000..213e269 --- /dev/null +++ b/src/app/app-modules/core/components/camera-dialog/camera-dialog.component.ts @@ -0,0 +1,310 @@ +/* + * 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, + Output, + EventEmitter, + ElementRef, + ViewChild, + DoCheck, + AfterViewInit, +} from '@angular/core'; +import { MatDialogRef } from '@angular/material/dialog'; +import { HttpServiceService } from '../../services/http-service.service'; +import { ConfirmationService } from '../../services'; +import { SetLanguageComponent } from '../set-language.component'; +import { saveAs } from 'file-saver'; +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'; + +interface Mark { + xCord: any; + yCord: any; + description: any; + point: any; +} + +@Component({ + selector: 'app-camera-dialog', + templateUrl: './camera-dialog.component.html', + styleUrls: ['./camera-dialog.component.css'], +}) +export class CameraDialogComponent implements OnInit, DoCheck, AfterViewInit { + @Output() cancelEvent = new EventEmitter(); + + @ViewChild('myCanvas') + myCanvas!: ElementRef; + @ViewChild('myImg') + myImg!: ElementRef; + + status: any; + public imageCode: any; + public availablePoints: any; + public annotate: any; + public title!: string; + public capture = false; + public captured: any = false; + public webcam: any; + public graph: any; + base64: any; + error: any; + options: any; + canvas: any; + pointsToWrite: Array = []; + markers: Mark[] = []; + ctx!: CanvasRenderingContext2D; + loaded = false; + public current_language_set: any; + private trigger: Subject = new Subject(); + public webcamImage!: WebcamImage; + private nextWebcam: Subject = new Subject(); + public barChartType: ChartType = 'bar'; + sysImage = ''; + public barChartData: ChartData = { + datasets: [ + { + backgroundColor: ['red', 'green', 'blue'], + }, + ], + }; + + constructor( + public dialogRef: MatDialogRef, + public httpServiceService: HttpServiceService, + private confirmationService: ConfirmationService, + ) { + this.options = { + audio: false, + video: true, + width: 500, + height: 390, + fallbackMode: 'callback', + fallbackSrc: 'jscam_canvas_only.swf', + fallbackQuality: 50, + cameraType: 'back', + }; + } + + onSuccess(stream: any) { + console.log('capturing video stream'); + } + + onError(err: any) { + console.log(err); + } + + ngOnInit() { + this.assignSelectedLanguage(); + this.loaded = false; + this.status = this.current_language_set.capture; + if (this.availablePoints?.markers) + this.pointsToWrite = this.availablePoints.markers; + } + + public captureImg(webcamImage: WebcamImage): void { + if (webcamImage) { + this.webcamImage = webcamImage; + 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; + } + } + public get nextWebcamObservable(): Observable { + return this.nextWebcam.asObservable(); + } + + ngDoCheck() { + this.assignSelectedLanguage(); + } + assignSelectedLanguage() { + const getLanguageJson = new SetLanguageComponent(this.httpServiceService); + getLanguageJson.setLanguage(); + this.current_language_set = getLanguageJson.currentLanguageObject; + } + + Confirm() { + this.cancelEvent.emit(null); + } + + ngAfterViewInit() { + if (this.annotate) this.loadingCanvas(); + + if (!this.loaded) { + if (this.annotate) this.loadingCanvas(); + this.loaded = true; + } + if (this.pointsToWrite) this.loadMarks(); + } + + loadMarks() { + this.pointsToWrite.forEach((num) => { + this.pointMark(num); + }); + } + + public getSnapshot(): void { + this.trigger.next(); + console.info('image type with base64 ', this.webcamImage); + } + + public get triggerObservable(): Observable { + return this.trigger.asObservable(); + } + + loadingCanvas() { + this.canvas = this.myCanvas.nativeElement; + this.ctx = this.canvas.getContext('2d'); + const img = this.myImg.nativeElement; + this.ctx.drawImage( + img, + 0, + 0, + img.width, + img.height, + 0, + 0, + this.canvas.width, + this.canvas.height, + ); + this.ctx.font = 'bold 20px serif'; + this.score = 1; + } + + handleKeyDownRecaptureImg(event: KeyboardEvent): void { + if (event.key == 'Enter' || event.key == 'Spacebar' || event.key == ' ') { + this.recaptureImage(); + } + } + + recaptureImage(): void { + // Trigger new image capture + this.captured = false; + this.trigger.next(); + } + + handleInitError(error: WebcamInitError): void { + // Handle webcam initialization error + // this.webcamInitError = error; + } + + score: any; + pointMark(event: any) { + if (event.xCord) event.offsetX = event.xCord; + if (event.yCord) event.offsetY = event.yCord; + if (this.score <= 6) { + this.ctx.strokeRect(event.offsetX - 10, event.offsetY - 10, 20, 20); + this.ctx.fillText(this.score, event.offsetX - 3, event.offsetY + 6); + this.saveDescription(event); + } else { + setTimeout(() => { + this.confirmationService.alert( + this.current_language_set.alerts.info.sixMakers, + ); + }, 0); + } + } + + clearPointers() { + this.markers.splice(0); + this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height); + this.loadingCanvas(); + } + + saveDescription(event: any) { + if (event.description) { + this.markers.push({ + xCord: event.offsetX, + yCord: event.offsetY, + description: event.description, + point: event.point, + }); + } else { + this.markers.push({ + xCord: event.offsetX, + yCord: event.offsetY, + description: '', + point: this.score, + }); + } + this.score++; + } + + getMarkers() { + return { + beneficiaryRegID: localStorage.getItem('beneficiaryRegID'), + visitID: localStorage.getItem('visitID'), + createdBy: localStorage.getItem('userName'), + imageID: '', + providerServiceMapID: localStorage.getItem('providerServiceID'), + markers: this.markers, + }; + } + + downloadGraph() { + const container = document.getElementById('container-dialog'); + + if (container) { + html2canvas(container) + .then((canvas) => { + canvas.toBlob((blob) => { + if (blob) { + try { + const graphName = + `${this.graph.type}_${localStorage.getItem( + 'beneficiaryRegID', + )}_${localStorage.getItem('visitID')}` || 'graphTrends'; + saveAs(blob, graphName); + } catch (e) { + console.error('Error saving image:', e); + + // Perform a null check before calling window.open + const newWindow = window.open(); + if (newWindow) { + newWindow.document.write( + '', + ); + } else { + console.error('Error opening a new window.'); + } + } + } else { + console.error('Blob is null.'); + } + }); + }) + .catch((error) => { + console.error('Error capturing HTML element:', error); + }); + } else { + console.error('Element with ID "container-dialog" not found.'); + } + } +} diff --git a/src/app/app-modules/core/components/common-dialog/common-dialog.component.css b/src/app/app-modules/core/components/common-dialog/common-dialog.component.css index 77368eb..1d51b60 100644 --- a/src/app/app-modules/core/components/common-dialog/common-dialog.component.css +++ b/src/app/app-modules/core/components/common-dialog/common-dialog.component.css @@ -29,6 +29,9 @@ .action button { border: 1px solid lightgray; + margin-left: 5px; + width: 60px; + } .success { diff --git a/src/app/app-modules/core/components/common-dialog/common-dialog.component.html b/src/app/app-modules/core/components/common-dialog/common-dialog.component.html index dcf9f7e..67c0335 100644 --- a/src/app/app-modules/core/components/common-dialog/common-dialog.component.html +++ b/src/app/app-modules/core/components/common-dialog/common-dialog.component.html @@ -57,7 +57,7 @@

{{ message | titlecase }}

- + {{ message | titlecase }}