-
Notifications
You must be signed in to change notification settings - Fork 486
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into sainak/feat/use-managed-media-source
- Loading branch information
Showing
76 changed files
with
1,287 additions
and
928 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
# Whitelabelling envs | ||
|
||
REACT_APP_TITLE=CARE | ||
REACT_APP_META_DESCRIPTION=Revolutionizing EMR with AI: Open Healthcare Network develops free, open-source tools to enhance efficiency in global healthcare delivery. Our EMR system is recognized as a Digital Public Good by the United Nations. | ||
REACT_APP_META_DESCRIPTION="Revolutionizing EMR with AI: Open Healthcare Network develops free, open-source tools to enhance efficiency in global healthcare delivery. Our EMR system is recognized as a Digital Public Good by the United Nations." | ||
REACT_APP_COVER_IMAGE=https://cdn.ohc.network/care_logo.svg | ||
REACT_APP_COVER_IMAGE_ALT=https://cdn.ohc.network/care_logo.svg | ||
REACT_PUBLIC_URL=https://care.ohc.network | ||
|
||
# Care API URL without the /api prefix | ||
REACT_CARE_API_URL=https://careapi.ohc.network | ||
|
||
# Dev envs | ||
ESLINT_NO_DEV_ERRORS=true | ||
|
||
CARE_CDN_URL="https://egov-s3-facility-10bedicu.s3.amazonaws.com https://egov-s3-patient-data-10bedicu.s3.amazonaws.com http://localhost:4566" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
dotenv | ||
test -f .env.local && dotenv .env.local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# Backend URL | ||
REACT_CARE_API_URL=https://careapi.ohc.network | ||
|
||
# Dashboard URL | ||
REACT_DASHBOARD_URL= | ||
|
||
# GitHub URL (default: https://github.com/ohcnetwork) | ||
REACT_GITHUB_URL= | ||
|
||
# OHCN URL (default: https://ohc.network?ref=care) | ||
REACT_OHCN_URL= | ||
|
||
# Plausible site domain (default: care.ohc.network) | ||
REACT_PLAUSIBLE_SITE_DOMAIN= | ||
|
||
# Plausible server URL (default: https://plausible.10bedicu.in) | ||
REACT_PLAUSIBLE_SERVER_URL= | ||
|
||
|
||
# Main logo (JSON string with light and dark properties) | ||
REACT_HEADER_LOGO= | ||
|
||
# Main logo (JSON string with light and dark properties) | ||
# Example: REACT_MAIN_LOGO="{\"light\": \"https://cdn.ohc.network/light-logo.svg\", \"dark\": \"https://cdn.ohc.network/dark-logo.svg\"}" | ||
REACT_MAIN_LOGO= | ||
|
||
# State logo (JSON string with light and dark properties) | ||
REACT_STATE_LOGO= | ||
|
||
# Custom logo (JSON string with light and dark properties) | ||
REACT_CUSTOM_LOGO= | ||
|
||
# Custom alternative logo (JSON string with light and dark properties) | ||
REACT_CUSTOM_LOGO_ALT= | ||
|
||
# Custom description | ||
REACT_CUSTOM_DESCRIPTION= | ||
|
||
# Google Maps API key | ||
REACT_GMAPS_API_KEY= | ||
|
||
# Government data API key | ||
REACT_GOV_DATA_API_KEY= | ||
|
||
# reCAPTCHA site key | ||
REACT_RECAPTCHA_SITE_KEY= | ||
|
||
# Sentry DSN | ||
REACT_SENTRY_DSN= | ||
|
||
# Sentry environment (default: staging) | ||
REACT_SENTRY_ENVIRONMENT= | ||
|
||
# KASP settings | ||
REACT_KASP_ENABLED=true | ||
REACT_KASP_STRING=KASP | ||
REACT_KASP_FULL_STRING=Karunya Arogya Suraksha Padhathi | ||
|
||
# Sample format file paths | ||
REACT_SAMPLE_FORMAT_ASSET_IMPORT=/asset-import-template.xlsx | ||
REACT_SAMPLE_FORMAT_EXTERNAL_RESULT_IMPORT=/External-Results-Template.csv | ||
|
||
# Camera feed, still watching idle timeout (in seconds; default: 180) | ||
REACT_STILL_WATCHING_IDLE_TIMEOUT= | ||
|
||
# Camera feed, still watching prompt duration (in seconds; default: 30) | ||
REACT_STILL_WATCHING_PROMPT_DURATION= | ||
|
||
# Feature flags | ||
REACT_ENABLE_HCX=true | ||
REACT_ENABLE_ABDM=true | ||
REACT_ENABLE_SCRIBE=true | ||
REACT_WARTIME_SHIFTING=true | ||
|
||
# JWT token refresh interval (in milliseconds) (default: 5 minutes) | ||
REACT_JWT_TOKEN_REFRESH_INTERVAL= | ||
|
||
# Minimum encounter date (default: 2020-01-01) | ||
REACT_MIN_ENCOUNTER_DATE= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
const env = import.meta.env; | ||
|
||
interface ILogo { | ||
light: string; | ||
dark: string; | ||
} | ||
|
||
const logo = (value?: string, fallback?: ILogo) => { | ||
if (!value) { | ||
return fallback; | ||
} | ||
|
||
try { | ||
return JSON.parse(value) as ILogo; | ||
} catch { | ||
// TODO: define vite plugin to validate care.config.ts during build step | ||
return fallback; | ||
} | ||
}; | ||
const careConfig = { | ||
apiUrl: env.REACT_CARE_API_URL, | ||
|
||
urls: { | ||
dashboard: env.REACT_DASHBOARD_URL, | ||
github: env.REACT_GITHUB_URL || "https://github.com/ohcnetwork", | ||
ohcn: env.REACT_OHCN_URL || "https://ohc.network?ref=care", | ||
}, | ||
|
||
headerLogo: logo(env.REACT_HEADER_LOGO, { | ||
light: "https://cdn.ohc.network/header_logo.png", | ||
dark: "https://cdn.ohc.network/header_logo.png", | ||
}), | ||
mainLogo: logo(env.REACT_MAIN_LOGO, { | ||
light: "https://cdn.ohc.network/light-logo.svg", | ||
dark: "https://cdn.ohc.network/black-logo.svg", | ||
}), | ||
stateLogo: logo(env.REACT_STATE_LOGO), | ||
customLogo: logo(env.REACT_CUSTOM_LOGO), | ||
customLogoAlt: logo(env.REACT_CUSTOM_LOGO_ALT), | ||
customDescription: env.REACT_CUSTOM_DESCRIPTION, | ||
|
||
gmapsApiKey: | ||
env.REACT_GMAPS_API_KEY || "AIzaSyDsBAc3y7deI5ZO3NtK5GuzKwtUzQNJNUk", | ||
|
||
govDataApiKey: | ||
env.REACT_GOV_DATA_API_KEY || | ||
"579b464db66ec23bdd000001cdd3946e44ce4aad7209ff7b23ac571b", | ||
reCaptchaSiteKey: | ||
env.REACT_RECAPTCHA_SITE_KEY || "6LdvxuQUAAAAADDWVflgBqyHGfq-xmvNJaToM0pN", | ||
|
||
kasp: { | ||
enabled: env.REACT_KASP_ENABLED === "true", | ||
string: env.REACT_KASP_STRING || "KASP", | ||
fullString: | ||
env.REACT_KASP_FULL_STRING || "Karunya Arogya Suraksha Padhathi", | ||
}, | ||
|
||
sampleFormats: { | ||
assetImport: | ||
env.REACT_SAMPLE_FORMAT_ASSET_IMPORT || "/asset-import-template.xlsx", | ||
externalResultImport: | ||
env.REACT_SAMPLE_FORMAT_EXTERNAL_RESULT_IMPORT || | ||
"/External-Results-Template.csv", | ||
}, | ||
|
||
wartimeShifting: env.REACT_WARTIME_SHIFTING === "true", | ||
|
||
stillWatching: { | ||
idleTimeout: env.REACT_STILL_WATCHING_IDLE_TIMEOUT | ||
? parseInt(env.REACT_STILL_WATCHING_IDLE_TIMEOUT) | ||
: 3 * 60, | ||
promptDuration: env.REACT_STILL_WATCHING_PROMPT_DURATION | ||
? parseInt(env.REACT_STILL_WATCHING_PROMPT_DURATION) | ||
: 30, | ||
}, | ||
|
||
auth: { | ||
tokenRefreshInterval: env.REACT_JWT_TOKEN_REFRESH_INTERVAL | ||
? parseInt(env.REACT_JWT_TOKEN_REFRESH_INTERVAL) | ||
: 5 * 60e3, | ||
}, | ||
|
||
minEncounterDate: new Date(env.REACT_MIN_ENCOUNTER_DATE || "2020-01-01"), | ||
|
||
// Plugins related configs... | ||
|
||
plausible: { | ||
server: env.REACT_PLAUSIBLE_SERVER_URL || "https://plausible.10bedicu.in", | ||
domain: env.REACT_PLAUSIBLE_SITE_DOMAIN || "care.ohc.network", | ||
}, | ||
|
||
sentry: { | ||
dsn: | ||
env.REACT_SENTRY_DSN || | ||
"https://[email protected]/5183632", | ||
environment: env.REACT_SENTRY_ENVIRONMENT || "staging", | ||
}, | ||
|
||
hcx: { | ||
enabled: env.REACT_ENABLE_HCX === "true", | ||
}, | ||
|
||
abdm: { | ||
enabled: (env.REACT_ENABLE_ABDM ?? "true") === "true", | ||
}, | ||
|
||
scribe: { | ||
enabled: env.REACT_ENABLE_SCRIBE === "true", | ||
}, | ||
} as const; | ||
|
||
export default careConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.