Skip to content

Commit

Permalink
fixed merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
shivankacker committed Jul 24, 2024
2 parents c7e5583 + c3e1b1a commit 38ebade
Show file tree
Hide file tree
Showing 261 changed files with 2,909 additions and 2,396 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Whitelabelling envs

REACT_APP_TITLE=CARE
REACT_APP_META_DESCRIPTION=CoronaSafe Network is an open-source public utility designed by a multi-disciplinary team of innovators and volunteers. CoronaSafe Care is a Digital Public Good recognised by 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.coronasafe.network/care_logo.svg
REACT_APP_COVER_IMAGE_ALT=https://cdn.coronasafe.network/care_logo.svg
REACT_PUBLIC_URL=https://care.coronasafe.in
Expand Down
1 change: 0 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"extends": [
"eslint:recommended",
"plugin:react-hooks/recommended",
"plugin:prettier/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:i18next/recommended",
Expand Down
4 changes: 4 additions & 0 deletions cypress/e2e/patient_spec/patient_discharge.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ describe("Patient Discharge based on multiple reason", () => {
patientDischarge.clickDischarge();
patientDischarge.selectDischargeReason(patientDischargeReason4);
cy.submitButton("Confirm Discharge");
cy.submitButton("Acknowledge & Submit");
cy.verifyNotification("Patient Discharged Successfully");
cy.closeNotification();
// Verify the consultation dashboard reflection
Expand All @@ -53,6 +54,7 @@ describe("Patient Discharge based on multiple reason", () => {
patientDischarge.typeDischargeNote(patientDeathCause);
patientDischarge.typeDoctorName(doctorName);
cy.submitButton("Confirm Discharge");
cy.submitButton("Acknowledge & Submit");
cy.verifyNotification("Patient Discharged Successfully");
cy.closeNotification();
// Verify the consultation dashboard reflection
Expand All @@ -77,6 +79,7 @@ describe("Patient Discharge based on multiple reason", () => {
patientDischarge.typeReferringFacility(referringFreetextFacility);
cy.wait(2000);
cy.submitButton("Confirm Discharge");
cy.submitButton("Acknowledge & Submit");
cy.wait(2000);
cy.verifyNotification("Patient Discharged Successfully");
cy.closeNotification();
Expand Down Expand Up @@ -108,6 +111,7 @@ describe("Patient Discharge based on multiple reason", () => {
cy.closeNotification();
// submit the discharge pop-up
cy.submitButton("Confirm Discharge");
cy.submitButton("Acknowledge & Submit");
cy.wait(2000);
cy.verifyNotification("Patient Discharged Successfully");
cy.closeNotification();
Expand Down
11 changes: 7 additions & 4 deletions cypress/e2e/patient_spec/patient_registration.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ describe("Patient Creation with consultation", () => {
});

it("Patient Registration using the transfer with no consultation", () => {
// transfer the patient and no consulation
// transfer the patient with no consulation and verify the transfer to a new facility
patientPage.createPatient();
patientPage.selectFacility(patientTransferFacility);
patientPage.patientformvisibility();
Expand All @@ -264,9 +264,10 @@ describe("Patient Creation with consultation", () => {
patientTransfer.clickTransferPatientNameList(patientTransferName);
patientTransfer.clickTransferPatientYOB(yearOfBirth);
patientTransfer.clickTransferSubmitButton();
patientTransfer.verifyFacilitySuccessfullMessage();
cy.verifyNotification(
"Patient Dummy Patient 10 (Male) transferred successfully",
);
patientTransfer.clickConsultationCancelButton();
cy.wait(3000);
// allow the transfer button of a patient
patientTransfer.clickAllowPatientTransferButton();
// Verify the patient error message for the same facility
Expand All @@ -280,7 +281,9 @@ describe("Patient Creation with consultation", () => {
patientTransfer.clickTransferPatientNameList(patientTransferName);
patientTransfer.clickTransferPatientYOB(yearOfBirth);
patientTransfer.clickTransferSubmitButton();
patientTransfer.verifyFacilityErrorMessage();
cy.verifyNotification(
"Patient - Patient transfer cannot be completed because the patient has an active consultation in the same facility",
);
});

it("Patient Registration using External Result Import", () => {
Expand Down
2 changes: 1 addition & 1 deletion cypress/pageobject/Patient/PatientPrescription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class PatientPrescription {
}

clickAdministerButton() {
cy.get("#administer-medicine").should("be.visible");
cy.get("#administer-medicine").scrollIntoView().should("be.visible");
cy.verifyAndClickElement("#administer-medicine", "Administer");
}

Expand Down
30 changes: 2 additions & 28 deletions cypress/pageobject/Patient/PatientTransfer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,44 +19,18 @@ class PatientTransfer {

clickTransferSubmitButton() {
cy.get("#submit-transferpatient").click();
cy.wait(2000);
}

clickConsultationCancelButton() {
cy.get("#cancel").scrollIntoView();
cy.get("#cancel").click();
cy.wait(2000);
}

clickAllowPatientTransferButton() {
cy.get("#patient-allow-transfer").click();
}

verifyFacilitySuccessfullMessage() {
cy.get(".pnotify")
.should("exist")
.within(() => {
cy.get(".pnotify-text")
.invoke("text")
.then((text) => {
expect(text.trim()).to.match(
/^Patient Dummy Patient 10 \(Male\) transferred successfully$/i,
);
});
});
}

verifyFacilityErrorMessage() {
cy.get(".pnotify")
.should("exist")
.within(() => {
cy.get(".pnotify-text")
.invoke("text")
.then((text) => {
expect(text).to.match(
/Patient - Patient transfer cannot be completed because the patient has an active consultation in the same facility/,
);
});
});
}
}

export default PatientTransfer;
1 change: 1 addition & 0 deletions cypress/support/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/// <reference types="cypress" />
import "./commands";

declare global {
Expand Down
71 changes: 44 additions & 27 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"echarts-for-react": "^3.0.2",
"eslint-mdx": "^3.1.5",
"events": "^3.3.0",
"glob": "^10.3.15",
"glob": "^10.4.2",
"hi-profiles": "^1.0.6",
"i18next": "^23.11.4",
"i18next-browser-languagedetector": "^7.2.1",
Expand All @@ -83,7 +83,7 @@
"react-copy-to-clipboard": "^5.1.0",
"react-dnd": "^16.0.1",
"react-dnd-html5-backend": "^16.0.1",
"react-dnd-scrolling": "^1.3.7",
"react-dnd-scrolling": "^1.3.8",
"react-dom": "18.3.1",
"react-google-recaptcha": "^3.1.0",
"react-i18next": "^13.0.1",
Expand Down Expand Up @@ -112,6 +112,7 @@
"@tailwindcss/container-queries": "^0.1.1",
"@tailwindcss/forms": "^0.5.7",
"@tailwindcss/typography": "^0.5.13",
"@types/cypress": "^1.1.3",
"@types/echarts": "^4.9.22",
"@types/google.maps": "^3.55.8",
"@types/lodash-es": "^4.17.12",
Expand All @@ -127,7 +128,7 @@
"@typescript-eslint/parser": "^5.61.0",
"@vitejs/plugin-react-swc": "^3.6.0",
"autoprefixer": "^10.4.19",
"cypress": "^13.9.0",
"cypress": "^13.13.1",
"cypress-localstorage-commands": "^2.2.5",
"cypress-split": "^1.23.2",
"eslint": "^8.44.0",
Expand Down
4 changes: 2 additions & 2 deletions src/CAREUI/display/Count.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ export default function CountBlock(props: Props) {
<CareIcon icon={props.icon} className="text-primary-600" />
</div>
<div>
<dt className="my-2 truncate text-sm font-semibold text-gray-700">
<dt className="my-2 truncate text-sm font-semibold text-secondary-700">
{props.text}
</dt>
{props.loading ? (
<dd className="h-10 w-full max-w-[100px] animate-pulse rounded-lg bg-gray-300" />
<dd className="h-10 w-full max-w-[100px] animate-pulse rounded-lg bg-secondary-300" />
) : (
<dd id="count" className="text-5xl font-black leading-9">
{props.count}
Expand Down
4 changes: 2 additions & 2 deletions src/CAREUI/display/FilterBadge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ const FilterBadge = ({ name, value, onRemove }: FilterBadgeProps) => {
data-testid={name}
className={`${
!value && "hidden"
} flex flex-row items-center rounded-full border border-gray-300 bg-white px-3 py-1 text-xs font-medium leading-4 text-gray-600`}
} flex flex-row items-center rounded-full border border-secondary-300 bg-white px-3 py-1 text-xs font-medium leading-4 text-secondary-600`}
>
{`${name}: ${value}`}
<CareIcon
id="removeicon"
icon="l-times"
className="ml-2 box-content cursor-pointer rounded-full text-base hover:bg-gray-500"
className="ml-2 box-content cursor-pointer rounded-full text-base hover:bg-secondary-500"
onClick={onRemove}
/>
</span>
Expand Down
Loading

0 comments on commit 38ebade

Please sign in to comment.