Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor Improvements to PatientRegistration; Drop External Results #8463

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions cypress/e2e/patient_spec/patient_registration.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { PatientPage } from "../../pageobject/Patient/PatientCreation";
import FacilityPage from "../../pageobject/Facility/FacilityCreation";
import { generatePhoneNumber } from "../../pageobject/utils/constants";
import PatientTransfer from "../../pageobject/Patient/PatientTransfer";
import PatientExternal from "../../pageobject/Patient/PatientExternal";
import PatientInsurance from "../../pageobject/Patient/PatientInsurance";
import PatientMedicalHistory from "../../pageobject/Patient/PatientMedicalHistory";

Expand Down Expand Up @@ -34,7 +33,6 @@ describe("Patient Creation with consultation", () => {
const patientPage = new PatientPage();
const facilityPage = new FacilityPage();
const patientTransfer = new PatientTransfer();
const patientExternal = new PatientExternal();
const patientInsurance = new PatientInsurance();
const patientMedicalHistory = new PatientMedicalHistory();
const phone_number = generatePhoneNumber();
Expand Down Expand Up @@ -70,7 +68,6 @@ describe("Patient Creation with consultation", () => {
const patientTransferPhoneNumber = "9849511866";
const patientTransferFacility = "Dummy Shifting Center";
const patientTransferName = "Dummy Patient 10";
const patientExternalName = "Patient 20";
const patientOccupation = "Student";

before(() => {
Expand Down Expand Up @@ -286,31 +283,6 @@ describe("Patient Creation with consultation", () => {
);
});

it("Patient Registration using External Result Import", () => {
// copy the patient external ID from external results
cy.awaitUrl("/external_results");
patientExternal.verifyExternalListPatientName(patientExternalName);
patientExternal.verifyExternalIdVisible();
// cypress have a limitation to work only asynchronously
// import the result and create a new patient
let extractedId = "";
cy.get("#patient-external-id")
.invoke("text")
.then((text) => {
extractedId = text.split("Care external results ID: ")[1];
cy.log(`Extracted Care external results ID: ${extractedId}`);
cy.awaitUrl("/patients");
patientPage.createPatient();
patientPage.selectFacility(patientFacility);
patientPage.patientformvisibility();
patientExternal.clickImportFromExternalResultsButton();
patientExternal.typeCareExternalResultId(extractedId);
patientExternal.clickImportPatientData();
});
// verify the patient is successfully created
patientExternal.verifyExternalPatientName(patientExternalName);
});

afterEach(() => {
cy.saveLocalStorage();
});
Expand Down
28 changes: 0 additions & 28 deletions cypress/pageobject/Patient/PatientExternal.ts

This file was deleted.

Loading
Loading