예제 #1
0
 public void AddNonExistingPatient(int patientid)
 {
     flag = false;
     Console.WriteLine("------------Searching for the patient  " + patientid + " ------------");
     search.SearchPatient("duplicatepatients.csv", patientid);
     Thread.Sleep(5000);
     if (!search.IsSearchEmpty())
     {
         Console.WriteLine("Patient Found in PSC!!");
         tabs.Dashboard();
         flag = true;
         Console.WriteLine("---------------------------------------------------------------------------\n");
         Assert.Ignore("Result:  Ignoring this patient as this already exist in PSC");
     }
     if (flag == false)
     {
         Console.WriteLine("Patient doesn't exist on PSC, So adding the patient");
         flag = bip.AddPatient(filename, patientid);
         Thread.Sleep(2000);
         if (!standard.Save())
         {
             Console.WriteLine("Result:  Not able to add new patient as patient information is not correct in one or more basic info fields");
             Console.WriteLine(" INFO:  Please check the screenshot for more information");
             bip.GoToDashBoard();
             Console.WriteLine("---------------------------------------------------------------------------\n");
             Assert.Ignore();
         }
         Thread.Sleep(4000);
         flag = bip.VerifyPatientAdded();
         Thread.Sleep(2000);
         bip.GoToDashBoard();
         Assert.Pass();
     }
 }
예제 #2
0
 //Provide information of Insurance
 public bool AddInsurance(int key)
 {
     try
     {
         SelectInsurance();
         GetInsuranceInformation(key);
         Thread.Sleep(1000);
         Input.ClickOnSpecificItemByName(additionalinfowindow, rj.GetElementValue("ScanInsuranceBack"));
         Thread.Sleep(1000);
         for (int i = 0; i < 3; i++)
         {
             Input.SwitchTextBox();
         }
         Input.ClearAll();
         Input.TypeKeyword(additionalinfo["FirstName"]);
         Input.TabAndInputText(additionalinfo["LastName"]);
         GetPlanType();
         Input.ReverseTabAndInputText(additionalinfo["GroupNumber"]);
         Thread.Sleep(1000);
         Input.ReverseTabAndInputText(additionalinfo["PolicyNumber"]);
         Thread.Sleep(1000);
         Input.ReverseTabAndInputText(additionalinfo["InsuranceProvider"]);
         Thread.Sleep(2000);
         standard.Save();
         Thread.Sleep(2000);
         return(true);
     }
     catch (Exception)
     {
         Console.WriteLine("Not able to add the guardian");
         return(false);
     }
 }
예제 #3
0
 public void AddNonExistingPatient()
 {
     if (search.IsSearchEmpty() && patientid < 3)
     {
         Console.WriteLine("Not able to search the patient, So adding the patient");
         search.AddNewPatient();
         Thread.Sleep(5000);
         BasicInfoPage bip = new BasicInfoPage(currentWindow);
         bip.ProvideBasicInformation("patientadditionalinfo.csv", patientid);
         Thread.Sleep(2000);
         standard.Save();
         Thread.Sleep(3000);
         tabs.Dashboard();
         Thread.Sleep(2000);
         standard.Ok();
     }
 }
예제 #4
0
        //Verify if save is enable or not
        public bool VerifyBasicInfoField()
        {
            bool result = standard.Save();

            return(result);
        }