Overview

Namespaces

  • Azalea
    • Selenium
      • App
        • Charts
        • Components
        • Encounters
        • Home
        • Login
        • Main
        • Messages
        • Patients
        • Scheduler
      • Core
      • EHR
        • UI
          • Charts
          • Documents
          • Encounters
          • Home
          • Messaging
            • Folders
          • Patients
          • Payments
          • Precerts
          • Reports
          • Scheduler
          • Settings
            • General
              • Locations
              • Roles
              • Users
        • User
      • Login
        • UI
      • PHR
        • UI
        • User
      • Toolkit
        • Exception
        • Validation
    • Util
  • None
  • tests
    • integration
      • barebones
        • controllers
          • charts
          • patients
          • system
        • models
          • billing
          • encounters
          • examples
          • messaging
          • rcm
          • system
    • unit
      • barebones
        • lib
        • utilities
          • calculations

Classes

  • AddPatientTest
  • Azalea\Selenium\App\ApplicationTestCase
  • Azalea\Selenium\App\Charts\Chart
  • Azalea\Selenium\App\Charts\ChartAssessment
  • Azalea\Selenium\App\Charts\ChartDiagnosisCodes
  • Azalea\Selenium\App\Charts\ChartListControls
  • Azalea\Selenium\App\Charts\ChartObjective
  • Azalea\Selenium\App\Charts\ChartProcedureCodes
  • Azalea\Selenium\App\Charts\Charts
  • Azalea\Selenium\App\Charts\ChartSubjective
  • Azalea\Selenium\App\Components\CodeLookup
  • Azalea\Selenium\App\Components\CollectionGrid
  • Azalea\Selenium\App\Components\Popup
  • Azalea\Selenium\App\Customers
  • Azalea\Selenium\App\Encounters\Encounter
  • Azalea\Selenium\App\Encounters\EncounterDiagnosisCodes
  • Azalea\Selenium\App\Encounters\EncounterLedger
  • Azalea\Selenium\App\Encounters\EncounterProcedureCodes
  • Azalea\Selenium\App\Encounters\Encounters
  • Azalea\Selenium\App\Home\Home
  • Azalea\Selenium\App\Login\LoginPage
  • Azalea\Selenium\App\Main\MainSearch
  • Azalea\Selenium\App\Messages\Messages
  • Azalea\Selenium\App\Patients
  • Azalea\Selenium\App\Patients\Patient
  • Azalea\Selenium\App\Patients\PatientCharts
  • Azalea\Selenium\App\Patients\PatientEditDemographicsForm
  • Azalea\Selenium\App\Patients\PatientEncounters
  • Azalea\Selenium\App\Patients\PatientFaker
  • Azalea\Selenium\App\Patients\PatientList
  • Azalea\Selenium\App\Patients\PatientListFilters
  • Azalea\Selenium\App\Patients\Patients
  • Azalea\Selenium\App\Providers
  • Azalea\Selenium\App\Scheduler\AppointmentPopup
  • Azalea\Selenium\App\Scheduler\Scheduler
  • Azalea\Selenium\App\Users
  • Azalea\Selenium\Core\BaseTestCase
  • Azalea\Selenium\Core\Browser
  • Azalea\Selenium\Core\Page
  • Azalea\Selenium\Core\User
  • Azalea\Selenium\Core\View
  • Azalea\Selenium\Core\WebDriver
  • Azalea\Selenium\EHR\Application
  • Azalea\Selenium\EHR\EHR
  • Azalea\Selenium\EHR\EHRTestCase
  • Azalea\Selenium\EHR\EMR
  • Azalea\Selenium\EHR\PM
  • Azalea\Selenium\EHR\UI\Charts\ChartsList
  • Azalea\Selenium\EHR\UI\Charts\ChartsListRow
  • Azalea\Selenium\EHR\UI\Charts\ChartsListTab
  • Azalea\Selenium\EHR\UI\CheckboxGrid
  • Azalea\Selenium\EHR\UI\Documents\Documents
  • Azalea\Selenium\EHR\UI\Documents\DocumentsTab
  • Azalea\Selenium\EHR\UI\Encounters\Encounters
  • Azalea\Selenium\EHR\UI\Encounters\EncountersTab
  • Azalea\Selenium\EHR\UI\Grid
  • Azalea\Selenium\EHR\UI\GridRow
  • Azalea\Selenium\EHR\UI\Heading
  • Azalea\Selenium\EHR\UI\Home\Home
  • Azalea\Selenium\EHR\UI\Home\OfficeOverview
  • Azalea\Selenium\EHR\UI\LockScreen
  • Azalea\Selenium\EHR\UI\MainMenu
  • Azalea\Selenium\EHR\UI\MainSearch
  • Azalea\Selenium\EHR\UI\Messaging\Folders\MessagingAllMail
  • Azalea\Selenium\EHR\UI\Messaging\Folders\MessagingInbox
  • Azalea\Selenium\EHR\UI\Messaging\Folders\MessagingSentMail
  • Azalea\Selenium\EHR\UI\Messaging\Folders\MessagingStarred
  • Azalea\Selenium\EHR\UI\Messaging\Folders\MessagingTrashed
  • Azalea\Selenium\EHR\UI\Messaging\Messaging
  • Azalea\Selenium\EHR\UI\Messaging\MessagingCompose
  • Azalea\Selenium\EHR\UI\Messaging\MessagingFolder
  • Azalea\Selenium\EHR\UI\Messaging\MessagingMenu
  • Azalea\Selenium\EHR\UI\Messaging\MessagingReply
  • Azalea\Selenium\EHR\UI\Messaging\MessagingTab
  • Azalea\Selenium\EHR\UI\Messaging\MessagingViewMessage
  • Azalea\Selenium\EHR\UI\Module
  • Azalea\Selenium\EHR\UI\Notifications
  • Azalea\Selenium\EHR\UI\Patients\ChartsListRow
  • Azalea\Selenium\EHR\UI\Patients\ChartsTab
  • Azalea\Selenium\EHR\UI\Patients\PatientAllergies
  • Azalea\Selenium\EHR\UI\Patients\PatientAllergyEditPopup
  • Azalea\Selenium\EHR\UI\Patients\PatientAllergySearchPopup
  • Azalea\Selenium\EHR\UI\Patients\PatientAppointments
  • Azalea\Selenium\EHR\UI\Patients\PatientAssembly
  • Azalea\Selenium\EHR\UI\Patients\PatientCharts
  • Azalea\Selenium\EHR\UI\Patients\PatientChartsList
  • Azalea\Selenium\EHR\UI\Patients\PatientComments
  • Azalea\Selenium\EHR\UI\Patients\PatientDashboard
  • Azalea\Selenium\EHR\UI\Patients\PatientDemographics
  • Azalea\Selenium\EHR\UI\Patients\PatientDemographicsPopup
  • Azalea\Selenium\EHR\UI\Patients\PatientDocuments
  • Azalea\Selenium\EHR\UI\Patients\PatientDocumentsList
  • Azalea\Selenium\EHR\UI\Patients\PatientEncounters
  • Azalea\Selenium\EHR\UI\Patients\PatientEncountersAddPopup
  • Azalea\Selenium\EHR\UI\Patients\PatientHandouts
  • Azalea\Selenium\EHR\UI\Patients\PatientInsurance
  • Azalea\Selenium\EHR\UI\Patients\PatientLabOrders
  • Azalea\Selenium\EHR\UI\Patients\PatientLabOrdersAddView
  • Azalea\Selenium\EHR\UI\Patients\PatientMedications
  • Azalea\Selenium\EHR\UI\Patients\PatientPortal
  • Azalea\Selenium\EHR\UI\Patients\PatientRecalls
  • Azalea\Selenium\EHR\UI\Patients\Patients
  • Azalea\Selenium\EHR\UI\Patients\PatientSearchPopup
  • Azalea\Selenium\EHR\UI\Patients\PatientSection
  • Azalea\Selenium\EHR\UI\Patients\PatientSidebar
  • Azalea\Selenium\EHR\UI\Patients\PatientsList
  • Azalea\Selenium\EHR\UI\Patients\PatientsListRow
  • Azalea\Selenium\EHR\UI\Patients\PatientsListTab
  • Azalea\Selenium\EHR\UI\Patients\PatientsTab
  • Azalea\Selenium\EHR\UI\Patients\PatientTab
  • Azalea\Selenium\EHR\UI\Patients\PatientTasks
  • Azalea\Selenium\EHR\UI\Patients\PatientVitals
  • Azalea\Selenium\EHR\UI\Patients\PatientVitalsAddPopup
  • Azalea\Selenium\EHR\UI\Payments\EDIRemitsTab
  • Azalea\Selenium\EHR\UI\Payments\Payments
  • Azalea\Selenium\EHR\UI\Payments\PaymentsTab
  • Azalea\Selenium\EHR\UI\Payments\UnappliedPaymentsTab
  • Azalea\Selenium\EHR\UI\Popup
  • Azalea\Selenium\EHR\UI\PopupConfirm
  • Azalea\Selenium\EHR\UI\PopupError
  • Azalea\Selenium\EHR\UI\Precerts\Precerts
  • Azalea\Selenium\EHR\UI\Precerts\PrecertsTab
  • Azalea\Selenium\EHR\UI\Reports\AuditLogTab
  • Azalea\Selenium\EHR\UI\Reports\ClinicalQualityMeasuresTab
  • Azalea\Selenium\EHR\UI\Reports\ClinicalQualityMeasuresValueSetsTab
  • Azalea\Selenium\EHR\UI\Reports\MeaningfulUseTab
  • Azalea\Selenium\EHR\UI\Reports\PatientStatementsTab
  • Azalea\Selenium\EHR\UI\Reports\RecordsTab
  • Azalea\Selenium\EHR\UI\Reports\Reports
  • Azalea\Selenium\EHR\UI\Reports\ReportsQueueTab
  • Azalea\Selenium\EHR\UI\Reports\ReportsTab
  • Azalea\Selenium\EHR\UI\Reports\SystemStatisticsTab
  • Azalea\Selenium\EHR\UI\Scheduler\AppointmentsRequestsTab
  • Azalea\Selenium\EHR\UI\Scheduler\AppointmentsTab
  • Azalea\Selenium\EHR\UI\Scheduler\RecallsTab
  • Azalea\Selenium\EHR\UI\Scheduler\Scheduler
  • Azalea\Selenium\EHR\UI\Scheduler\SchedulerTab
  • Azalea\Selenium\EHR\UI\SelectDropdown
  • Azalea\Selenium\EHR\UI\Settings\BillingTab
  • Azalea\Selenium\EHR\UI\Settings\General\GroupsSection
  • Azalea\Selenium\EHR\UI\Settings\General\HandoutsSection
  • Azalea\Selenium\EHR\UI\Settings\General\InsurancesSection
  • Azalea\Selenium\EHR\UI\Settings\General\Locations\LocationRow
  • Azalea\Selenium\EHR\UI\Settings\General\Locations\LocationsList
  • Azalea\Selenium\EHR\UI\Settings\General\LocationsSection
  • Azalea\Selenium\EHR\UI\Settings\General\ProvidersSection
  • Azalea\Selenium\EHR\UI\Settings\General\Roles\RoleCreatePopup
  • Azalea\Selenium\EHR\UI\Settings\General\Roles\RoleRow
  • Azalea\Selenium\EHR\UI\Settings\General\Roles\RolesList
  • Azalea\Selenium\EHR\UI\Settings\General\RolesSection
  • Azalea\Selenium\EHR\UI\Settings\General\Users\UserDetails
  • Azalea\Selenium\EHR\UI\Settings\General\Users\UserRow
  • Azalea\Selenium\EHR\UI\Settings\General\Users\UsersList
  • Azalea\Selenium\EHR\UI\Settings\General\UsersSection
  • Azalea\Selenium\EHR\UI\Settings\GeneralTab
  • Azalea\Selenium\EHR\UI\Settings\InventoryTab
  • Azalea\Selenium\EHR\UI\Settings\MedicalTab
  • Azalea\Selenium\EHR\UI\Settings\PatientTab
  • Azalea\Selenium\EHR\UI\Settings\SchedulerTab
  • Azalea\Selenium\EHR\UI\Settings\Settings
  • Azalea\Selenium\EHR\UI\TabContainer
  • Azalea\Selenium\EHR\UI\TabPanel
  • Azalea\Selenium\EHR\UI\UserAccountMenu
  • Azalea\Selenium\EHR\User\EHRAdminTestingUser
  • Azalea\Selenium\EHR\User\EMRAdminTestingUser
  • Azalea\Selenium\EHR\User\PMAdminTestingUser
  • Azalea\Selenium\Login\LoginPage
  • Azalea\Selenium\Login\LoginTestCase
  • Azalea\Selenium\Login\ResetPasswordPage
  • Azalea\Selenium\Login\UI\LoginForm
  • Azalea\Selenium\Login\UI\ResetPasswordForm
  • Azalea\Selenium\PHR\Application
  • Azalea\Selenium\PHR\PHR
  • Azalea\Selenium\PHR\PHRTestCase
  • Azalea\Selenium\PHR\UI\PopupError
  • Azalea\Selenium\PHR\User\PHRTestingUser
  • Azalea\Selenium\Toolkit\Dom
  • Azalea\Selenium\Toolkit\NestedHashMap
  • Azalea\Selenium\Toolkit\ResourceLoader
  • Azalea\Selenium\Toolkit\SauceLabsTestCase
  • Azalea\Selenium\Toolkit\SeleniumTestCase
  • Azalea\Selenium\Toolkit\TestCase
  • Azalea\Selenium\Toolkit\Validation\ElementExists
  • Azalea\Selenium\Toolkit\Validation\ElementHasText
  • Azalea\Selenium\Toolkit\Validation\ElementVisible
  • Azalea\Selenium\Toolkit\Validation\PageTitle
  • Azalea\Selenium\Toolkit\Validation\ValidationRule
  • Azalea\Selenium\Toolkit\Validation\ViewExists
  • Azalea\Selenium\Toolkit\Validation\WebDriverValidator
  • Azalea\Selenium\Toolkit\View
  • Azalea\Util\Config
  • Azalea\Util\Debug
  • Azalea_Sniffs_WhiteSpace_ScopeClosingBraceSniff
  • BaseModelTestCase
  • ChartAssessmentTest
  • ChartCustomFieldBehaviorsTest
  • ChartDiagnosisTest
  • ChartEncounterDiagnosisTest
  • ChartEncounterProceduresTest
  • ChartInventoryTest
  • ChartObjectiveTest
  • ChartProblemHistoryTest
  • ChartProceduresTest
  • ChartProviderAccessTest
  • ChartSigningTest
  • ChartsListProviderAccessTest
  • ChartSmokingStatusTest
  • ChartSubjectiveTest
  • ConfigTest
  • EncounterClaimsTest
  • EncounterDemographicsTest
  • EncounterDiagnosisTest
  • EncounterGuarantorTest
  • EncounterLedgerTest
  • EncounterProceduresTest
  • ExampleTestCase
  • MessagesLabelsTest
  • PageTest
  • PatentsListTest
  • PathManagerTest
  • PatientAccountSummaryTest
  • PatientBillingActionsTest
  • PatientCommentsTest
  • PatientDashboardAlertsTest
  • PatientDashboardLinkedPatientsTest
  • PatientDemographicsEditTest
  • PatientDocumentsTest
  • PatientPopupCommentsTest
  • PatientProviderAccessTest
  • PatientsListProviderAccessTest
  • PermissionsTest
  • PopupTest
  • SchedulerBlocksTest
  • SchedulerInsuranceBlocksTest
  • SimpePage
  • SimpleView
  • SimpleViewWithArgs
  • SimpleViewWithNoHash
  • TestCase
  • tests\integration\barebones\BarebonesConstants
  • tests\integration\barebones\BarebonesTestCase
  • tests\integration\barebones\controllers\charts\ChartsControllerTest
  • tests\integration\barebones\controllers\patients\PatientsPopupAlertsControllerTest
  • tests\integration\barebones\controllers\system\ClientsControllerTest
  • tests\integration\barebones\models\billing\ClientsFeeSchedulesMapModelTest
  • tests\integration\barebones\models\encounters\AppointmentModelTest
  • tests\integration\barebones\models\encounters\CollectionTest
  • tests\integration\barebones\models\encounters\ConcurrentCollectionTest
  • tests\integration\barebones\models\encounters\EncounterModelTest
  • tests\integration\barebones\models\encounters\EncountersIncompleteReasonModelTest
  • tests\integration\barebones\models\encounters\ModelQueryBuilderTest
  • tests\integration\barebones\models\examples\ExampleModelBasicsTest
  • tests\integration\barebones\models\examples\ExamplesGenericControllerTest
  • tests\integration\barebones\models\messaging\MessageModelTest
  • tests\integration\barebones\models\rcm\RCMStatsGeneralControllerTests
  • tests\integration\barebones\models\system\ClientModelTest
  • tests\unit\barebones\lib\BarebonesTestCase
  • tests\unit\barebones\utilities\ArraysTest
  • tests\unit\barebones\utilities\calculations\PovertyLineTest
  • tests\unit\barebones\utilities\MathTest
  • UrlManagerTest
  • VariantRulesTest
  • VariantsManagerTest
  • ViewTest
  • WebDriverMock

Exceptions

  • Azalea\Selenium\Toolkit\Exception\ElementNotFoundException
  • Azalea\Selenium\Toolkit\Exception\InvalidPageException
  • Azalea\Selenium\Toolkit\Exception\TimeoutException
  • Overview
  • Namespace
  • Class
  1: <?php
  2: use Azalea\Selenium\App\ApplicationTestCase;
  3: use Azalea\Selenium\App\Customers;
  4: use Azalea\Selenium\App\Patients;
  5: use Azalea\Selenium\App\Users;
  6: 
  7: class PatientDemographicsEditTest extends ApplicationTestCase
  8: {
  9:     /**
 10:      * Summary:
 11:      * Basic edit patient workflow. Checks that most of the entered fields
 12:      * are present in the edited patient's demographics.
 13:      *
 14:      * @author jtracy
 15:      */
 16:     public function testEditPatientSimple()
 17:     {
 18:         $app = $this->login(Users::FELIX_MILLER, Users::PASSWORD);
 19: 
 20:         // open the patient record for Devan T. Zulauf (QAA283)
 21:         $patientView = $app->patients->open(Patients::DEVAN_ZULAUF);
 22: 
 23:         // navigate to patient demographic edit view
 24:         $patientEditDemog = $patientView->demographicsEdit->navigate()->verifyAndWait();
 25: 
 26:         // close any patient popups
 27:         $this->waitForAjax();
 28:         $app->popup->closeAll();
 29: 
 30:         $patientForm = $patientEditDemog->form;
 31: 
 32:         // save the patient name, we won't change this
 33:         $fname = $patientForm->getInput("pat_fname");
 34:         $mname = $patientForm->getInput("pat_mname");
 35:         $lname = $patientForm->getInput("pat_lname");
 36: 
 37:         $patient = $patientForm->fillRandom();
 38: 
 39:         $patientForm->setInput(array(
 40:             "pat_fname" => $fname,
 41:             "pat_mname" => $mname,
 42:             "pat_lname" => $lname
 43:         ));
 44: 
 45:         $patientView->press("Save Changes");
 46: 
 47:         // Check for required fields warning confirmation popup
 48:         $this->waitForAjax();
 49:         if ($app->popup->confirmIsVisible()) {
 50:             $app->popup->confirmYes();
 51:         }
 52: 
 53:         $patientDemog = $patientView->demographics->verifyAndWait();
 54: 
 55:         $this->assertElementHasText("#pat_mrn + td", $patient->pat_mrn);
 56:         $this->assertElementHasText("#pat_xray_num + td", $patient->pat_xray_num);
 57:         $this->assertElementHasText("#pat_bill_type + td", "SELF PAY (PATIENT)");
 58:         $this->assertElementHasTextNoCase("#pat_phy_id_rendering + td > a", $patient->pat_phy_name);
 59:         $this->assertElementHasTextNoCase("#pat_phy_id_requested + td > a", $patient->pat_phy_requested_name);
 60:         $this->assertElementHasTextNoCase("#pat_phy_id_referring + td > a", $patient->pat_phy_referring_name);
 61:         $this->assertElementHasTextNoCase("#par_fname + td", $fname);
 62:         $this->assertElementHasTextNoCase("#pat_mname + td", $mname);
 63:         $this->assertElementHasTextNoCase("#pat_lname + td", $lname);
 64:         $patientDemog->assertCanSee(substr($patient->pat_dob, 4, 2)."/".substr($patient->pat_dob, 6, 2)."/".substr($patient->pat_dob, 0, 4));
 65:         $patientDemog->assertCanSee(strtoupper($patient->pat_sex));
 66:         $this->assertElementHasTextNoCase("#pat_martial_status + td", $patient->pat_maritial_status);
 67:         $this->assertElementHasTextNoCase("#pat_ethnicity + td", $patient->pat_ethnicity);
 68:         $this->assertElementHasTextNoCase("#pat_email + td", $patient->pat_email);
 69:         $this->assertElementHasTextNoCase("#pat_address1 + td", $patient->pat_address1);
 70:         $this->assertElementHasTextNoCase("#pat_address1 + td", $patient->pat_city);
 71:         $this->assertElementHasTextNoCase("#pat_address1 + td", $patient->pat_state);
 72:         $this->assertElementHasText("#pat_address1 + td", $patient->pat_zip);
 73: 
 74:         $this->assertNoErrorPopups();
 75:     }
 76: 
 77:     /**
 78:      * Summary:
 79:      * Test add and remove of Patient Guarantor from the
 80:      * add patient edit screen.
 81:      */
 82:     public function testAddGuarantorInfo()
 83:     {
 84:         $app = $this->login(Users::FELIX_MILLER, Users::PASSWORD);
 85: 
 86:         // open the patient record for Dayton P. Bartoletti (QAA71)
 87:         $patientView = $app->patients->open(Patients::DAYTON_BARTOLETTI);
 88: 
 89:         // navigate to patient demographic edit view
 90:         $patientEditDemog = $patientView->demographicsEdit->navigate()->verifyAndWait();
 91: 
 92:         // close any patient popups
 93:         $this->waitForAjax();
 94:         $app->popup->closeAll();
 95: 
 96:         $patientForm = $patientEditDemog->form;
 97: 
 98:         // clear the guarantor pid field
 99:         $patientForm->clearInput("pat_guarantor_pid")->tab();
100:         $patientForm->select("pat_guarantor_relation", "");
101: 
102:         $patientForm->assertNotInputHasValue("pat_guarantor_pid");
103:         $patientForm->assertNotInputHasValue("pat_guarantor_relation");
104:         $patientForm->assertNotInputHasValue("pat_guarantor");
105:         $patientForm->assertNotInputHasValue("pat_guarantor_dob");
106:         $patientForm->assertNotInputHasValue("pat_guarantor_address1");
107:         $patientForm->assertNotInputHasValue("pat_guarantor_address2");
108:         $patientForm->assertNotInputHasValue("pat_guarantor_city");
109:         $patientForm->assertInputDisabled("pat_guarantor_city");
110:         $patientForm->assertNotInputHasValue("pat_guarantor_state");
111:         $patientForm->assertInputDisabled("pat_guarantor_state");
112:         $patientForm->assertNotInputHasValue("pat_guarantor_zip");
113:         $patientForm->assertNotInputHasValue("pat_guarantor_zip_plus4");
114:         $patientForm->assertNotInputHasValue("pat_guarantor_employer");
115: 
116:         // now add a gaurantor
117:         $patientForm->setInput("pat_guarantor_pid", "QA17")->tab();
118:         $patientForm->focusInput("pat_guarantor_relation");
119: 
120:         // allow it to auto-populate the fields
121:         $this->wait(2);
122: 
123:         $patientForm->assertInputHasValue("pat_guarantor_pid");
124:         $patientForm->assertInputHasValue("pat_guarantor_relation");
125:         $patientForm->assertInputHasValue("pat_guarantor");
126:         $patientForm->assertInputDisabled("pat_guarantor");
127:         $patientForm->assertInputHasValue("pat_guarantor_dob");
128:         $patientForm->assertInputDisabled("pat_guarantor_dob");
129:         $patientForm->assertInputHasValue("pat_guarantor_address1");
130:         $patientForm->assertInputDisabled("pat_guarantor_address1");
131:         $patientForm->assertInputDisabled("pat_guarantor_address2");
132:         $patientForm->assertInputHasValue("pat_guarantor_city");
133:         $patientForm->assertInputDisabled("pat_guarantor_city");
134:         $patientForm->assertInputHasValue("pat_guarantor_state");
135:         $patientForm->assertInputDisabled("pat_guarantor_state");
136:         $patientForm->assertInputHasValue("pat_guarantor_zip");
137:         $patientForm->assertInputDisabled("pat_guarantor_zip");
138:         $patientForm->assertInputDisabled("pat_guarantor_zip_plus4");
139:         $patientForm->assertInputDisabled("pat_guarantor_employer");
140: 
141:         // now clear the guarantor pid field
142:         $patientForm->clearInput("pat_guarantor_pid")->tab();
143: 
144:         $patientForm->assertNotInputHasValue("pat_guarantor_pid");
145:         $patientForm->assertNotInputHasValue("pat_guarantor_relation");
146:         $patientForm->assertNotInputHasValue("pat_guarantor");
147:         $patientForm->assertNotInputHasValue("pat_guarantor_dob");
148:         $patientForm->assertNotInputHasValue("pat_guarantor_address1");
149:         $patientForm->assertNotInputHasValue("pat_guarantor_address2");
150:         $patientForm->assertNotInputHasValue("pat_guarantor_city");
151:         $patientForm->assertInputDisabled("pat_guarantor_city");
152:         $patientForm->assertNotInputHasValue("pat_guarantor_state");
153:         $patientForm->assertInputDisabled("pat_guarantor_state");
154:         $patientForm->assertNotInputHasValue("pat_guarantor_zip");
155:         $patientForm->assertNotInputHasValue("pat_guarantor_zip_plus4");
156:         $patientForm->assertNotInputHasValue("pat_guarantor_employer");
157: 
158:         $this->assertNoErrorPopups();
159:     }
160: 
161:     /**
162:      * Summary:
163:      * Test the add, edit, and removal of a patient power of attorney from the
164:      * patient demographics edit screen.
165:      */
166:     public function testAddPatientPowerAttorney()
167:     {
168:         $app = $this->login(Users::FELIX_MILLER, Users::PASSWORD);
169: 
170:         // open the patient record for Dayton P. Bartoletti (QAA71)
171:         $patientView = $app->patients->open(Patients::DAYTON_BARTOLETTI);
172: 
173:         // navigate to patient demographic edit view
174:         $patientEditDemog = $patientView->demographicsEdit->navigate()->verifyAndWait();
175: 
176:         // close any patient popups
177:         $this->waitForAjax();
178:         $app->popup->closeAll();
179: 
180:         $patientForm = $patientEditDemog->form;
181: 
182:         // click the + Power of Attorney button
183:         $this->waitFor("#btn_add_pat_poa")->click();
184: 
185:         // fill out the add power of attorney popup
186:         $poaForm = $this->getView("patients/add-power-of-attorney-popup-form.json")->verifyAndWait();
187: 
188:         $gender = (rand(1, 2) == 1 ? 'male' : 'female');
189:         $poaForm->setInput(array(
190:             "npat_fname" => $this->faker->firstName($gender),
191:             "npat_lname" => $this->faker->lastName($gender),
192:             "poa_relation" => "SPOUSE"
193:         ))->tab();
194: 
195:         // save the add power of attorney information
196:         $app->popup->last()->press("Submit");
197: 
198:         $this->waitForElementText('#poa_relation', "SPOUSE", 10);
199:         $patientForm->assertTrue($patientForm->querySelector("#pat_poa_select")->value() > 0);
200:         $patientForm->assertInputHasValue("npat_fname")
201:             ->assertInputHasValue("npat_lname");
202:         $patientForm->assertNotElementEmpty("#poa_relation");
203: 
204: 
205:         // edit the power of attorney
206:         $this->waitFor("#btn_edit_pat_poa")->click();
207: 
208:         $poaForm = $this->getView("patients/add-power-of-attorney-popup-form.json")->verifyAndWait();
209:         $poaForm->assertInputHasValue("npat_fname")
210:             ->assertInputHasValue("npat_lname")
211:             ->assertInputHasValue("poa_relation");
212: 
213:         $app->popup->last()->press("Cancel");
214:         $this->wait(1);
215: 
216:         // remove the power of attorney
217:         $this->waitFor("#btn_remove_pat_poa")->click();
218:         $app->popup->confirmYes();
219: 
220:         $this->waitForElementText('#poa_relation', "", 10);
221:         $patientForm->assertFalse($patientForm->querySelector("#pat_poa_select")->value() > 0);
222:         $patientForm->assertNotInputHasValue("npat_fname")
223:             ->assertNotInputHasValue("npat_lname");
224:         $patientForm->assertElementEmpty("#poa_relation");
225:     }
226: 
227:     /**
228:      * Summary:
229:      * Test the addition of primary, secondary, and tertiary insurances from the
230:      * patient edit demographics screen.
231:      */
232:     public function testAddInsurance()
233:     {
234:         $app = $this->login(Users::FELIX_MILLER, Users::PASSWORD);
235: 
236:         // open the patient record for Devan T. Zulauf (QAA283)
237:         $patientView = $app->patients->open(Patients::DEVAN_ZULAUF);
238: 
239:         // navigate to patient demographic edit view
240:         $patientEditDemog = $patientView->demographicsEdit->navigate()->verifyAndWait();
241: 
242:         // close any patient popups
243:         $this->waitForAjax();
244:         $app->popup->closeAll();
245: 
246:         $patientForm = $patientEditDemog->form;
247: 
248:         // set the bill type to Insurance
249:         $patientForm->setAsInsurancePay();
250: 
251:         // clear insurances
252:         $patientForm->select("pat_ins1_irep_id", "");
253:         $patientForm->select("pat_ins2_irep_id", "");
254:         $patientForm->select("pat_ins3_irep_id", "");
255: 
256:         $patientForm->assertNotInputHasValue("pat_linked_ins1_pid")
257:             ->assertNotInputHasValue("pat_ins1_irep_id")
258:             ->assertCanSee("Primary Ins.");
259:         $patientForm->assertNotInputHasValue("pat_linked_ins2_pid")
260:             ->assertNotInputHasValue("pat_ins2_irep_id")
261:             ->assertCanSee("Secondary Ins.");
262:         $patientForm->assertNotInputHasValue("pat_linked_ins3_pid")
263:             ->assertNotInputHasValue("pat_ins3_irep_id")
264:             ->assertCanSee("Tertiary Ins.");
265: 
266:         // ***** Primary Insurance
267:         $patientForm->addPrimaryInsurance();
268: 
269:         $this->within("#pat_ins_search_popup", function ($driver) {
270:             $driver->waitFor('[data-grid-row="0"]')->click();
271:             $driver->wait(1);
272:         });
273:         $app->popup->last()->press("Add");
274: 
275:         // fill out the add insurance popup
276:         $form = $this->getView("patients/add-insurance-popup-form.json")->verifyAndWait();
277:         $form->setInput(array(
278:             "pat_ins_policy_num" => $this->faker->numerify("##########"),
279:             "pat_ins_group_num" => $this->faker->numerify("##########"),
280:             "dd_pat_ins_insured_relation" => "SELF"
281:         ))->tab();
282: 
283:         $form->assertInputValueEquals("dd_insurance_type", "1");
284: 
285:         // save the add insurance information
286:         $app->popup->last()->press("Save");
287: 
288:         $this->waitForAjax();
289:         $this->waitForElementText('[data-model-attribute-display="pat_ins1_insured_relation"]', "SELF", 10);
290:         $this->wait(1);
291:         $patientForm->assertInputHasValue("pat_ins1_irep_id");
292:         $patientForm->assertNotElementEmpty('[data-model-attribute-display="pat_ins1_policy_num"]')
293:             ->assertNotElementEmpty('[data-model-attribute-display="pat_ins1_group_num"]')
294:             ->assertNotElementEmpty('[data-model-attribute-display="pat_ins1_insured"]')
295:             ->assertNotElementEmpty('[data-model-attribute-display="pat_ins1_insured_dob"]')
296:             ->assertNotElementEmpty('[data-model-attribute-display="pat_ins1_insured_sex"]');
297: 
298:         // ***** Secondary Insurance
299:         // clear the secondary insurance
300:         $patientForm->select("pat_ins2_irep_id", "");
301: 
302:         $patientForm->addSecondaryInsurance();
303: 
304:         $this->within("#pat_ins_search_popup", function ($driver) {
305:             // for some reason, the extra 1 second delay is needed here
306:             $driver->wait(1)->waitFor('[data-grid-row="0"]')->click();
307:             $driver->wait(1);
308:         });
309:         $app->popup->last()->press("Add");
310: 
311:         // fill out the add insurance popup
312:         $form = $this->getView("patients/add-insurance-popup-form.json")->verifyAndWait();
313:         $form->setInput(array(
314:             "pat_ins_policy_num" => $this->faker->numerify("##########"),
315:             "pat_ins_group_num" => $this->faker->numerify("##########"),
316:             "dd_pat_ins_insured_relation" => "SELF"
317:         ))->tab();
318: 
319:         $form->assertInputValueEquals("dd_insurance_type", "2");
320: 
321:         // save the add insurance information
322:         $app->popup->last()->press("Save");
323: 
324:         $this->waitForAjax();
325:         $this->waitForElementText('[data-model-attribute-display="pat_ins2_insured_relation"]', "SELF", 10);
326:         $this->wait(1);
327:         $patientForm->assertInputHasValue("pat_ins2_irep_id");
328:         $patientForm->assertNotElementEmpty('[data-model-attribute-display="pat_ins2_policy_num"]')
329:             ->assertNotElementEmpty('[data-model-attribute-display="pat_ins2_group_num"]')
330:             ->assertNotElementEmpty('[data-model-attribute-display="pat_ins2_insured"]')
331:             ->assertNotElementEmpty('[data-model-attribute-display="pat_ins2_insured_dob"]')
332:             ->assertNotElementEmpty('[data-model-attribute-display="pat_ins2_insured_sex"]');
333: 
334:         // ***** Tertiary Insurance
335:         // clear the tertiary insurance
336:         $patientForm->select("pat_ins3_irep_id", "");
337: 
338:         $patientForm->addTertiaryInsurance();
339: 
340:         $this->within("#pat_ins_search_popup", function ($driver) {
341:             // for some reason, the extra 1 second delay is needed here
342:             $driver->wait(1)->waitFor('[data-grid-row="0"]')->click();
343:             $driver->wait(1);
344:         });
345:         $app->popup->last()->press("Add");
346: 
347:         // fill out the add insurance popup
348:         $form = $this->getView("patients/add-insurance-popup-form.json")->verifyAndWait();
349:         $form->setInput(array(
350:             "pat_ins_policy_num" => $this->faker->numerify("##########"),
351:             "pat_ins_group_num" => $this->faker->numerify("##########"),
352:             "dd_pat_ins_insured_relation" => "SELF"
353:         ))->tab();
354: 
355:         $form->assertInputValueEquals("dd_insurance_type", "4");
356: 
357:         // save the add insurance information
358:         $app->popup->last()->press("Save");
359: 
360:         $this->waitForAjax();
361:         $this->waitForElementText('[data-model-attribute-display="pat_ins3_insured_relation"]', "SELF", 10);
362:         $this->wait(1);
363:         $patientForm->assertInputHasValue("pat_ins3_irep_id");
364:         $patientForm->assertNotElementEmpty('[data-model-attribute-display="pat_ins3_policy_num"]')
365:             ->assertNotElementEmpty('[data-model-attribute-display="pat_ins3_group_num"]')
366:             ->assertNotElementEmpty('[data-model-attribute-display="pat_ins3_insured"]')
367:             ->assertNotElementEmpty('[data-model-attribute-display="pat_ins3_insured_dob"]')
368:             ->assertNotElementEmpty('[data-model-attribute-display="pat_ins3_insured_sex"]');
369: 
370:         // ***** Clean Up
371:         // clear the insurances
372:         $patientForm->select("pat_ins1_irep_id", "");
373:         $patientForm->select("pat_ins2_irep_id", "");
374:         $patientForm->select("pat_ins3_irep_id", "");
375: 
376:         // set the bill type back to Self Pay
377:         $patientForm->setAsSelfPay();
378: 
379:         $patientView->press("Save Changes");
380:         $this->waitForAjax();
381:         $this->assertNoErrorPopups();
382:     }
383: 
384:     /**
385:      * Summary:
386:      * Edit and save a patient's Annual Income, Income verification date, and # Household
387:      * members.
388:      *
389:      * Azalea EHR, Azalea PM only.
390:      *
391:      * @author jtracy
392:      */
393:     public function testEditPatientHouseholdInfo()
394:     {
395:         if (!Customers::isEhrCustomer($this->getCustomerId()) && !Customers::isPmCustomer($this->getCustomerId())) {
396:             return $this->skip();
397:         }
398: 
399:         $app = $this->login(Users::FELIX_MILLER, Users::PASSWORD);
400: 
401:         // open the patient record for Samir J. Funk (QAA199)
402:         $patientView = $app->patients->open(Patients::SAMIR_FUNK);
403: 
404:         // navigate to patient demographic edit view
405:         $patientEditDemog = $patientView->demographicsEdit->navigate()->verifyAndWait();
406: 
407:         // close any patient popups
408:         $this->waitForAjax();
409:         $app->popup->closeAll();
410: 
411:         $patientForm = $patientEditDemog->form;
412: 
413:         $pfrAnnualIncomeInput = $patientForm->selectors->pfrAnnualIncomeInput;
414:         $pfrAnnualIncomeVerifyDate = $patientForm->selectors->pfrAnnualIncomeVerifyDate;
415:         $pfrHouseholdMembersInput = $patientForm->selectors->pfrHouseholdMembersInput;
416: 
417:         // clear out the Annual Income, Last Verified, and Household Members fields
418:         $patientForm->setInput($pfrAnnualIncomeInput, "");
419:         $patientForm->querySelector($pfrAnnualIncomeVerifyDate)->value("");
420:         $patientForm->setInput($pfrHouseholdMembersInput, "");
421: 
422:         // set Annual Income to 5000.50
423:         $patientForm->setInput($pfrAnnualIncomeInput, "5000.50");
424: 
425:         // attempt to save the patient
426:         $patientView->press("Save Changes");
427: 
428:         // Check for required fields warning confirmation popup
429:         $this->waitForAjax();
430:         if ($app->popup->confirmIsVisible()) {
431:             $app->popup->confirmYes();
432:         }
433: 
434:         /*
435:          * Expected outcome:
436:          * a. Error message is displayed: "Enter a valid integer (whole number)."
437:          * b. Patient is not saved.
438:          */
439:         $this->spinWait(function () use ($patientForm) {
440:             $patientForm->assertCanSee("Enter a valid integer (whole number).");
441:             return true;
442:         });
443: 
444:         // Set Annual Income to 0
445:         $patientForm->setInput($pfrAnnualIncomeInput, "0")->tab();
446: 
447:         // Set Last Verified to today
448:         $patientForm->querySelector($pfrAnnualIncomeVerifyDate)
449:             ->value(date("m/d/Y"));
450: 
451:         // Set Household Members to 3
452:         $patientForm->setInput($pfrHouseholdMembersInput, "3");
453: 
454:         // Save Changes
455:         $patientView->press("Save Changes");
456: 
457:         // Check for required fields warning confirmation popup
458:         $this->waitForAjax();
459:         if ($app->popup->confirmIsVisible()) {
460:             $app->popup->confirmYes();
461:         }
462: 
463:         // wait for patient demographics view to load
464:         $patientDemog = $patientView->demographics->verifyAndWait();
465: 
466:         /*
467:          * Expected outcome:
468:          * a. All entered information is saved and displayed.
469:          */
470:         $this->assertElementHasText("#pat_finance_record-pfr_annual_income + td", "$0");
471:         $this->assertElementHasText("#pat_finance_record-pfr_annual_income + td", "Verified: ".date("m/d/Y"));
472:         $this->assertElementHasText("#pat_finance_record-pfr_household_members + td", "3");
473: 
474:         // Open the patient edit demographics view again
475:         $patientEditDemog = $patientView->demographicsEdit->navigate()->verifyAndWait();
476: 
477:         // Close any patient popups
478:         $this->waitForAjax();
479:         $app->popup->closeAll();
480: 
481:         $patientForm = $patientEditDemog->form;
482: 
483:         // Set Annual Income to 50000
484:         $patientForm->setInput($pfrAnnualIncomeInput, "50000")->tab();
485: 
486:         // Save Changes
487:         $patientView->press("Save Changes");
488: 
489:         // Check for required fields warning confirmation popup
490:         $this->waitForAjax();
491:         if ($app->popup->confirmIsVisible()) {
492:             $app->popup->confirmYes();
493:         }
494: 
495:         // Wait for patient demographics view to load
496:         $patientDemog = $patientView->demographics->verifyAndWait();
497: 
498:         /*
499:          * Expected outcome:
500:          * a. All entered information is saved and displayed.
501:          */
502:         $this->assertElementHasText("#pat_finance_record-pfr_annual_income + td", "$50000");
503:         $this->assertElementHasText("#pat_finance_record-pfr_annual_income + td", "Verified: ".date("m/d/Y"));
504:         $this->assertElementHasText("#pat_finance_record-pfr_household_members + td", "3");
505:     }
506: }
507: 
508: ?>
API documentation generated by ApiGen