-
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 triage-form-fix
- Loading branch information
Showing
87 changed files
with
2,634 additions
and
1,561 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,4 +1,4 @@ | ||
plugins: | ||
eslint: | ||
enabled: true | ||
enabled: false | ||
channel: "eslint-7" |
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,23 @@ | ||
name: Combine Dependencies | ||
|
||
on: workflow_dispatch | ||
|
||
# The minimum permissions required to run this Action | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
checks: read | ||
|
||
jobs: | ||
combine-prs: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Combine dependencies | ||
id: combine-dependencies | ||
uses: github/[email protected] | ||
with: | ||
pr_title: Combined dependencies # The title of the pull request to create | ||
select_label: dependencies # The label which marks PRs that should be combined. | ||
labels: combined-dependencies # Add a label to the combined PR | ||
ci_required: "false" # Whether or not CI should be passing to combine the PR |
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
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,127 @@ | ||
import { afterEach, before, beforeEach, cy, describe, it } from "local-cypress"; | ||
import LoginPage from "../../pageobject/Login/LoginPage"; | ||
import { PatientPage } from "../../pageobject/Patient/PatientCreation"; | ||
import PatientDischarge from "../../pageobject/Patient/PatientDischarge"; | ||
import PatientPrescription from "../../pageobject/Patient/PatientPrescription"; | ||
|
||
describe("Patient Discharge based on multiple reason", () => { | ||
const loginPage = new LoginPage(); | ||
const patientPage = new PatientPage(); | ||
const patientDischarge = new PatientDischarge(); | ||
const patientPrescription = new PatientPrescription(); | ||
const patientDischargeReason1 = "Recovered"; | ||
const patientDischargeReason2 = "Referred"; | ||
const patientDischargeReason3 = "Expired"; | ||
const patientDischargeReason4 = "LAMA"; | ||
const patientDischargeAdvice = "Discharge Advice"; | ||
const patientMedicine = "ZOLE"; | ||
const referringFacility = "Dummy Shifting Center, Ernakulam"; | ||
const referringFreetextFacility = "Aster Mims"; | ||
const patientDeathCause = "Cause Of Death"; | ||
const doctorName = "Custom Doctor"; | ||
|
||
before(() => { | ||
loginPage.loginAsDisctrictAdmin(); | ||
cy.saveLocalStorage(); | ||
}); | ||
|
||
beforeEach(() => { | ||
cy.restoreLocalStorage(); | ||
cy.clearLocalStorage(/filters--.+/); | ||
cy.awaitUrl("/patients"); | ||
}); | ||
|
||
it("Discharge a LAMA patient in the consultation", () => { | ||
patientPage.visitPatient("Dummy Patient 12"); | ||
patientDischarge.clickDischarge(); | ||
patientDischarge.selectDischargeReason(patientDischargeReason4); | ||
cy.submitButton("Confirm Discharge"); | ||
cy.verifyNotification("Patient Discharged Successfully"); | ||
cy.closeNotification(); | ||
// Verify the consultation dashboard reflection | ||
cy.verifyContentPresence("#consultation-buttons", ["LAMA"]); | ||
// verify the discharge information card | ||
cy.verifyContentPresence("#discharge-information", [ | ||
patientDischargeReason4, | ||
]); | ||
}); | ||
|
||
it("Discharge a expired patient in the consultation", () => { | ||
patientPage.visitPatient("Dummy Patient 13"); | ||
patientDischarge.clickDischarge(); | ||
patientDischarge.selectDischargeReason(patientDischargeReason3); | ||
patientDischarge.typeDischargeNote(patientDeathCause); | ||
patientDischarge.typeDoctorName(doctorName); | ||
cy.submitButton("Confirm Discharge"); | ||
cy.verifyNotification("Patient Discharged Successfully"); | ||
cy.closeNotification(); | ||
// Verify the consultation dashboard reflection | ||
cy.verifyContentPresence("#consultation-buttons", ["EXPIRED"]); | ||
// verify the discharge information card | ||
cy.verifyContentPresence("#discharge-information", [ | ||
patientDischargeReason3, | ||
patientDeathCause, | ||
doctorName, | ||
]); | ||
}); | ||
|
||
it("Discharge patient with referred reason to a facility", () => { | ||
patientPage.visitPatient("Dummy Patient 16"); | ||
patientDischarge.clickDischarge(); | ||
patientDischarge.selectDischargeReason(patientDischargeReason2); | ||
patientDischarge.typeDischargeNote(patientDischargeAdvice); | ||
// select a registrated facility from dropdown and clear | ||
patientDischarge.typeReferringFacility(referringFacility); | ||
patientDischarge.clickClearButton(); | ||
// select a non-registered facility and perform the discharge | ||
patientDischarge.typeReferringFacility(referringFreetextFacility); | ||
cy.wait(2000); | ||
cy.submitButton("Confirm Discharge"); | ||
cy.wait(2000); | ||
cy.verifyNotification("Patient Discharged Successfully"); | ||
cy.closeNotification(); | ||
// Verify the consultation dashboard reflection | ||
cy.verifyContentPresence("#consultation-buttons", ["Referred"]); | ||
// Verify the dashboard and discharge information | ||
cy.verifyContentPresence("#discharge-information", [ | ||
patientDischargeReason2, | ||
patientDischargeAdvice, | ||
referringFreetextFacility, | ||
]); | ||
}); | ||
|
||
it("Discharge a recovered patient with all relevant fields", () => { | ||
patientPage.visitPatient("Dummy Patient 15"); | ||
patientDischarge.clickDischarge(); | ||
patientDischarge.selectDischargeReason(patientDischargeReason1); | ||
patientDischarge.typeDischargeNote(patientDischargeAdvice); | ||
// Prescribe a medicine for the patient | ||
patientPrescription.clickAddPrescription(); | ||
patientPrescription.interceptMedibase(); | ||
patientPrescription.selectMedicinebox(); | ||
patientPrescription.selectMedicine(patientMedicine); | ||
patientPrescription.enterDosage("4"); | ||
patientPrescription.selectDosageFrequency("Twice daily"); | ||
cy.submitButton("Submit"); | ||
cy.verifyNotification("Medicine prescribed"); | ||
cy.wait(2000); | ||
cy.closeNotification(); | ||
// submit the discharge pop-up | ||
cy.submitButton("Confirm Discharge"); | ||
cy.wait(2000); | ||
cy.verifyNotification("Patient Discharged Successfully"); | ||
cy.closeNotification(); | ||
// Verify the consultation dashboard reflection | ||
cy.verifyContentPresence("#consultation-buttons", ["Recovered"]); | ||
// Verify the dashboard and discharge information | ||
cy.verifyContentPresence("#discharge-information", [ | ||
patientDischargeReason1, | ||
patientDischargeAdvice, | ||
patientMedicine, | ||
]); | ||
}); | ||
|
||
afterEach(() => { | ||
cy.saveLocalStorage(); | ||
}); | ||
}); |
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
District,srf id,name,age,age in,gender,mobile number,address,ward,local body,local body type,source,Sample Collection Date,result date,test type,lab name,sample type,patient status,Is Repeat,patient category,result | ||
District,SRF ID,Name,Age,Age in,Gender,Mobile Number,Address,Ward,Local Body,Local Body Type,Source,Sample Collection Date,Result Date,Test Type,Lab Name,Sample Type,Patient Status,Is Repeat,Patient Category,Result | ||
Ernakulam,00/EKM/0000,Test Upload,24,years,m,8888888888,Upload test address,7,Poothrikka,grama panchayath,Secondary contact aparna,2020-10-14,2020-10-14,Antigen,Karothukuzhi Laboratory,Ag-SD_Biosensor_Standard_Q_COVID-19_Ag_detection_kit,Asymptomatic,NO,Cat 17: All individuals who wish to get themselves tested,Negative |
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.