Skip to content

Commit

Permalink
Merge branch 'develop' into issues/8131/show-bed-number-on-location
Browse files Browse the repository at this point in the history
  • Loading branch information
Shelly011s authored Sep 30, 2024
2 parents f695dff + d76d6d8 commit 537f986
Show file tree
Hide file tree
Showing 584 changed files with 21,381 additions and 30,530 deletions.
12 changes: 7 additions & 5 deletions .env
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_COVER_IMAGE=https://cdn.coronasafe.network/care_logo.svg
REACT_APP_COVER_IMAGE_ALT=https://cdn.coronasafe.network/care_logo.svg
REACT_PUBLIC_URL=https://care.coronasafe.in
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"
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
dotenv
test -f .env.local && dotenv .env.local
15 changes: 3 additions & 12 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:i18next/recommended",
"plugin:tailwindcss/recommended",
"plugin:storybook/recommended"
"plugin:prettier/recommended"
],
"overrides": [
{
Expand Down Expand Up @@ -46,10 +45,6 @@
"i18next"
],
"rules": {
"quotes": [
"error",
"double"
],
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"error",
Expand All @@ -59,6 +54,7 @@
"caughtErrorsIgnorePattern": "^_"
}
],
"@typescript-eslint/no-explicit-any": "warn",
"react/react-in-jsx-scope": "off",
"i18next/no-literal-string": [
"warn",
Expand All @@ -81,12 +77,7 @@
]
}
}
],
"tailwindcss/no-custom-classname": "off",
"tailwindcss/migration-from-tailwind-2": "error",
"tailwindcss/classnames-order": "off",
"tailwindcss/enforces-shorthand": "off",
"tailwindcss/no-contradicting-classname": "error"
]
},
"ignorePatterns": [
"dist",
Expand Down
79 changes: 79 additions & 0 deletions .example.env
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=
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @coronasafe/code-reviewers @coronasafe/care-fe-code-reviewers
* @ohcnetwork/care-fe-code-reviewers
4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
- Change 2
- More?

@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers
@ohcnetwork/care-fe-code-reviewers

## Merge Checklist

- [ ] Add specs that demonstrate bug / test a new feature.
- [ ] Update [product documentation](https://docs.coronasafe.network/coronasafe-care-documentation/architecture/architecture-and-layering-of-care).
- [ ] Update [product documentation](https://docs.ohc.network).
- [ ] Ensure that UI text is kept in I18n files.
- [ ] Prep screenshot or demo video for changelog entry, and attach it to issue.
- [ ] Request for Peer Reviews
Expand Down
1 change: 1 addition & 0 deletions .github/runner-files/jwks.b64.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
eyJrZXl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wTWk1TnUzbS02SkhGSFF5RDU2ZTFsQUlwUS1lakpuTWR6MXQ0aUplbEFzIiwgImt0eSI6ICJSU0EiLCAia2lkIjogIlhjckcyVS0tR3B4SVhORXpKOWNWREdRaEUzeXlIamREMDN1aDZmYXpRX2siLCAiYWxnIjogIlJTMjU2In1dfQ==
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
CodeQL-Build:
runs-on: ubuntu-latest
if: github.repository == 'coronasafe/care_fe'
if: github.repository == 'ohcnetwork/care_fe'
permissions:
security-events: write
actions: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/comment-p1-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
add-comment:
if: github.event.label.name == 'P1' && github.repository == 'coronasafe/care_fe'
if: github.event.label.name == 'P1' && github.repository == 'ohcnetwork/care_fe'
runs-on: ubuntu-latest
permissions:
issues: write
Expand Down
24 changes: 19 additions & 5 deletions .github/workflows/cypress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,45 @@ on:
jobs:
cypress-run:
permissions: write-all
if: github.repository == 'coronasafe/care_fe'
if: github.repository == 'ohcnetwork/care_fe'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
containers: [1, 2, 3, 4, 5, 6, 7, 8]
env:
REACT_CARE_API_URL: http://localhost:9000
steps:
- name: Checkout 📥
uses: actions/checkout@v3

- name: Set backend branch
id: backend-branch
run: |
if [[ '${{ github.event.pull_request.base.ref }}' == 'staging' ]]; then
echo "branch=staging" >> $GITHUB_OUTPUT
else
echo "branch=develop" >> $GITHUB_OUTPUT
fi
- name: Checkout care 📥
uses: actions/checkout@v3
with:
repository: coronasafe/care
repository: ohcnetwork/care
path: care
ref: ${{ steps.backend-branch.outputs.branch }}

- name: Start care docker containers 🐳
run: |
cd care
echo DISABLE_RATELIMIT=True >> docker/.prebuilt.env
echo "CORS_ALLOWED_ORIGINS=\"[\\\"http://localhost:4000\\\"]\"" >> docker/.prebuilt.env
echo JWKS_BASE64=\"$(cat ../.github/runner-files/jwks.b64.txt)\" >> docker/.prebuilt.env
make docker_config_file=docker-compose.pre-built.yaml up
make docker_config_file=docker-compose.pre-built.yaml load-dummy-data
cd ..
env:
JWKS_BASE64: ${{ secrets.JWKS_BASE64 }}

- name: Wait for care to be up ♻
uses: nick-fields/retry@v2
Expand All @@ -56,7 +72,7 @@ jobs:
- name: Install dependencies 📦
run: npm install

- name: Build & Compile rescript files ⚙️
- name: Build ⚙️
run: npm run build

- name: Install Specific Chrome Version
Expand All @@ -79,7 +95,6 @@ jobs:
parallel: true
group: "UI-Chrome"
env:
CARE_API: http://localhost:9000
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_OPTIONS: --max_old_space_size=4096
Expand All @@ -101,7 +116,6 @@ jobs:
group: "UI-Chrome"
env:
CYPRESS_SPLIT_TESTS: "true"
CARE_API: http://localhost:9000
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_OPTIONS: --max_old_space_size=4096
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ env:

jobs:
test:
if: github.repository == 'coronasafe/care_fe'
if: github.repository == 'ohcnetwork/care_fe'
runs-on: ubuntu-latest
name: Test
steps:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/issue-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,39 @@ jobs:
issue_opened_and_reopened:
name: issue_opened_and_reopened
runs-on: ubuntu-latest
if: github.repository == 'coronasafe/care_fe' && github.event_name == 'issues' && github.event.action == 'opened' || github.event.action == 'reopened'
if: github.repository == 'ohcnetwork/care_fe' && github.event_name == 'issues' && github.event.action == 'opened' || github.event.action == 'reopened'
steps:
- name: 'Move issue to "Triage"'
uses: leonsteinhaeuser/[email protected]
with:
gh_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
organization: coronasafe
organization: ohcnetwork
project_id: 4
resource_node_id: ${{ github.event.issue.node_id }}
status_value: "Triage"
issue_closed:
name: issue_closed
runs-on: ubuntu-latest
if: github.repository == 'coronasafe/care_fe' && github.event_name == 'issues' && github.event.action == 'closed'
if: github.repository == 'ohcnetwork/care_fe' && github.event_name == 'issues' && github.event.action == 'closed'
steps:
- name: 'Moved issue to "Done"'
uses: leonsteinhaeuser/[email protected]
with:
gh_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
organization: coronasafe
organization: ohcnetwork
project_id: 4
resource_node_id: ${{ github.event.issue.node_id }}
status_value: "Done"
issue_assigned:
name: issue_assigned
runs-on: ubuntu-latest
if: github.repository == 'coronasafe/care_fe' && github.event_name == 'issues' && github.event.action == 'assigned'
if: github.repository == 'ohcnetwork/care_fe' && github.event_name == 'issues' && github.event.action == 'assigned'
steps:
- name: 'Move issue to "In Progress"'
uses: leonsteinhaeuser/[email protected]
with:
gh_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
organization: coronasafe
organization: ohcnetwork
project_id: 4
resource_node_id: ${{ github.event.issue.node_id }}
status_value: "In Progress"
2 changes: 1 addition & 1 deletion .github/workflows/label-deploy-failed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
auto-label-deploy-failed:
runs-on: ubuntu-latest
if: |
github.repository == 'coronasafe/care_fe' && github.event.issue.pull_request &&
github.repository == 'ohcnetwork/care_fe' && github.event.issue.pull_request &&
contains(github.event.comment.body, 'Deploy Preview')
steps:
- name: Add 'Deploy-Failed'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/label-merge-conflict.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:

jobs:
auto-label:
if: github.repository == 'coronasafe/care_fe'
if: github.repository == 'ohcnetwork/care_fe'
runs-on: ubuntu-latest
steps:
- uses: prince-chrismc/label-merge-conflicts-action@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/label-wip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
check-linked-issues:
if: github.repository == 'coronasafe/care_fe'
if: github.repository == 'ohcnetwork/care_fe'
name: Check linked issues
runs-on: ubuntu-latest
outputs:
Expand All @@ -29,7 +29,7 @@ jobs:
runs-on: ubuntu-latest
needs: check-linked-issues
permissions: write-all
if: github.repository == 'coronasafe/care_fe' && join(needs.check-linked-issues.outputs.linked_issues) != ''
if: github.repository == 'ohcnetwork/care_fe' && join(needs.check-linked-issues.outputs.linked_issues) != ''
steps:
- name: Label
uses: actions/github-script@v6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ossar-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
OSSAR-Scan:
if: github.repository == 'coronasafe/care_fe'
if: github.repository == 'ohcnetwork/care_fe'
# OSSAR runs on windows-latest.
# ubuntu-latest and macos-latest support coming soon
runs-on: windows-latest
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,16 @@ on:
jobs:
stale:
runs-on: ubuntu-latest
if: github.repository == 'coronasafe/care_fe'
if: github.repository == 'ohcnetwork/care_fe'
steps:
- uses: actions/stale@v6
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-label: "stale"
stale-pr-label: "stale"
stale-issue-message: "Hi, @coronasafe/care-frontend-maintainers, This issue has been automatically marked as stale because it has not had any recent activity."
stale-pr-message: "Hi, This pr has been automatically marked as stale because it has not had any recent activity. It will be automatically closed if no further activity occurs for 7 more days. Thank you for your contributions."
close-pr-message: "Hi, @coronasafe/care-frontend-maintainers, This PR has been automatically closed due to inactivity. Thank you for your contributions. Feel free to re-open the PR."
exempt-issue-labels: "blocked,waiting for related PR,waiting for back end,help wanted,work-in-progress,In Progress,wishlist,EPIC,backlog"
exempt-pr-labels: "tested,needs testing,need Review,waiting for related PR,waiting for back end,help wanted,blocked,work-in-progress,In Progress,backlog"
days-before-issue-stale: 14
days-before-pr-stale: 7
days-before-issue-close: -1
days-before-pr-close: 7
days-before-pr-close: -1
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,14 @@ yarn-error.log*
dist
dev-dist
build
storybook-static
.swp
stats.json
public/build-meta.json
.vscode/*
!.vscode/launch.json
src/supportedBrowsers.ts


# Reason React
# Reason React
/lib/bs/**
.merlin
*.bs.js
Expand Down
Loading

0 comments on commit 537f986

Please sign in to comment.