From 05d7f8f304477608f90b00fc7a766c879ec7b373 Mon Sep 17 00:00:00 2001 From: jainvedant392 Date: Sun, 3 Mar 2024 19:02:18 +0530 Subject: [PATCH 1/3] Add Patient Filter for Review Missed --- package-lock.json | 9 +++++---- package.json | 1 + src/Components/Patient/ManagePatients.tsx | 2 ++ src/Components/Patient/PatientFilter.tsx | 15 +++++++++++++++ vite.config.mts | 1 + 5 files changed, 24 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index cb293da599d..a73bcca4fa9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -88,6 +88,7 @@ "autoprefixer": "^10.4.14", "cypress": "^13.5.0", "cypress-localstorage-commands": "^2.2.3", + "dotenv": "^16.4.5", "eslint": "^8.44.0", "eslint-config-prettier": "^8.8.0", "eslint-config-standard": "^17.1.0", @@ -9182,15 +9183,15 @@ } }, "node_modules/dotenv": { - "version": "16.3.1", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", - "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", "dev": true, "engines": { "node": ">=12" }, "funding": { - "url": "https://github.com/motdotla/dotenv?sponsor=1" + "url": "https://dotenvx.com" } }, "node_modules/dotenv-expand": { diff --git a/package.json b/package.json index 4dac2273e0b..6577f0c670d 100644 --- a/package.json +++ b/package.json @@ -128,6 +128,7 @@ "autoprefixer": "^10.4.14", "cypress": "^13.5.0", "cypress-localstorage-commands": "^2.2.3", + "dotenv": "^16.4.5", "eslint": "^8.44.0", "eslint-config-prettier": "^8.8.0", "eslint-config-standard": "^17.1.0", diff --git a/src/Components/Patient/ManagePatients.tsx b/src/Components/Patient/ManagePatients.tsx index d853a5cf71a..c412253a501 100644 --- a/src/Components/Patient/ManagePatients.tsx +++ b/src/Components/Patient/ManagePatients.tsx @@ -225,6 +225,7 @@ export const PatientManager = () => { diagnoses_provisional: qParams.diagnoses_provisional || undefined, diagnoses_unconfirmed: qParams.diagnoses_unconfirmed || undefined, diagnoses_differential: qParams.diagnoses_differential || undefined, + review_missed: qParams.review_missed || undefined, }; useEffect(() => { @@ -917,6 +918,7 @@ export const PatientManager = () => { kasp(), badge("COWIN ID", "covin_id"), badge("Is Antenatal", "is_antenatal"), + badge("Review Missed", "review_missed"), badge( "Is Medico-Legal Case", "last_consultation_medico_legal_case" diff --git a/src/Components/Patient/PatientFilter.tsx b/src/Components/Patient/PatientFilter.tsx index 6392c5c4d45..2c235162ca2 100644 --- a/src/Components/Patient/PatientFilter.tsx +++ b/src/Components/Patient/PatientFilter.tsx @@ -100,6 +100,7 @@ export default function PatientFilter(props: any) { diagnoses_provisional: filter.diagnoses_provisional || null, diagnoses_unconfirmed: filter.diagnoses_unconfirmed || null, diagnoses_differential: filter.diagnoses_differential || null, + review_missed: filter.review_missed || null, }); useQuery(routes.getAnyFacility, { @@ -203,6 +204,7 @@ export default function PatientFilter(props: any) { diagnoses_provisional, diagnoses_unconfirmed, diagnoses_differential, + review_missed, } = filterState; const data = { district: district || "", @@ -270,6 +272,7 @@ export default function PatientFilter(props: any) { diagnoses_provisional: diagnoses_provisional || "", diagnoses_unconfirmed: diagnoses_unconfirmed || "", diagnoses_differential: diagnoses_differential || "", + review_missed: review_missed || "", }; onChange(data); }; @@ -437,6 +440,18 @@ export default function PatientFilter(props: any) { } /> +
+ Review Missed + (o === "true" ? "Yes" : "No")} + value={filterState.review_missed} + onChange={(v) => + setFilterState({ ...filterState, review_missed: v }) + } + /> +
Is Medico-Legal Case Date: Fri, 8 Mar 2024 13:35:24 +0530 Subject: [PATCH 2/3] removed dotenv --- package-lock.json | 1 - package.json | 1 - vite.config.mts | 7 ++++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5c3246fa5ba..497be83b96f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -89,7 +89,6 @@ "autoprefixer": "^10.4.14", "cypress": "^13.5.0", "cypress-localstorage-commands": "^2.2.3", - "dotenv": "^16.4.5", "cypress-split": "^1.20.1", "eslint": "^8.44.0", "eslint-config-prettier": "^8.8.0", diff --git a/package.json b/package.json index 9df2357d347..7c5ab561332 100644 --- a/package.json +++ b/package.json @@ -129,7 +129,6 @@ "autoprefixer": "^10.4.14", "cypress": "^13.5.0", "cypress-localstorage-commands": "^2.2.3", - "dotenv": "^16.4.5", "cypress-split": "^1.20.1", "eslint": "^8.44.0", "eslint-config-prettier": "^8.8.0", diff --git a/vite.config.mts b/vite.config.mts index 28b38c919dc..3c2d90c3fa0 100644 --- a/vite.config.mts +++ b/vite.config.mts @@ -1,7 +1,6 @@ import { VitePWA } from "vite-plugin-pwa"; import { defineConfig } from "vite"; import react from "@vitejs/plugin-react-swc"; -import 'dotenv/config'; const cdnUrls = process.env.CARE_CDN_URL ?? @@ -11,6 +10,8 @@ const cdnUrls = "http://localhost:4566", ].join(" "); + const local_care_api = process.env.CARE_API ?? "http://localhost:9000"; + export default defineConfig({ envPrefix: "REACT_", plugins: [ @@ -78,7 +79,7 @@ export default defineConfig({ port: 4000, proxy: { "/api": { - target: process.env.CARE_API ?? "https://careapi.ohc.network", + target: local_care_api ?? "https://careapi.ohc.network", changeOrigin: true, }, }, @@ -95,7 +96,7 @@ export default defineConfig({ port: 4000, proxy: { "/api": { - target: process.env.CARE_API ?? "https://careapi.ohc.network", + target: local_care_api ?? "https://careapi.ohc.network", changeOrigin: true, }, }, From 01237df98ed35ca40bb75ccbd784523e9fe8ce40 Mon Sep 17 00:00:00 2001 From: jainvedant392 Date: Mon, 18 Mar 2024 19:05:40 +0530 Subject: [PATCH 3/3] modified vite.config.mts --- vite.config.mts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/vite.config.mts b/vite.config.mts index 3c2d90c3fa0..c8eb11c53cf 100644 --- a/vite.config.mts +++ b/vite.config.mts @@ -10,8 +10,6 @@ const cdnUrls = "http://localhost:4566", ].join(" "); - const local_care_api = process.env.CARE_API ?? "http://localhost:9000"; - export default defineConfig({ envPrefix: "REACT_", plugins: [ @@ -79,7 +77,7 @@ export default defineConfig({ port: 4000, proxy: { "/api": { - target: local_care_api ?? "https://careapi.ohc.network", + target: process.env.CARE_API ?? "https://careapi.ohc.network", changeOrigin: true, }, }, @@ -96,7 +94,7 @@ export default defineConfig({ port: 4000, proxy: { "/api": { - target: local_care_api ?? "https://careapi.ohc.network", + target: process.env.CARE_API ?? "https://careapi.ohc.network", changeOrigin: true, }, },