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 PatientDashboardAlertsTest extends ApplicationTestCase
  8: {
  9:     /**
 10:      * Summary:
 11:      * A patient's insurance co-pay can be entered as either a dollar
 12:      * or a percentage amount and displays as such on the dashboard.
 13:      *
 14:      * @author jtracy
 15:      */
 16:     public function testDisplaysCoPayAsDollarOrPercent()
 17:     {
 18:         $app = $this->login(Users::FELIX_MILLER, Users::PASSWORD);
 19: 
 20:         // open the patient record for Insurance Copay Test (QA150)
 21:         $patientView = $app->patients->open(Patients::INSURANCE_COPAY_TEST);
 22: 
 23:         // navigate to patient insurance view
 24:         $patientInsurance = $patientView->insurance->navigate()->verifyAndWait();
 25: 
 26:         // close any patient popups
 27:         $this->waitForAjax();
 28:         $app->popup->closeAll();
 29: 
 30:         $patientInsurance->grid->waitForRowAt(0);
 31: 
 32:         // Edit the insurance 1ST MEDICAL NETWORK
 33:         $patientInsurance->grid->at(0)->querySelector('[data-button-class="edit"]')->click();
 34: 
 35:         // Fill in a Copay of $25.00
 36:         $form = $this->getView("patients/add-insurance-popup-form.json")->verifyAndWait();
 37:         $form->setInput(array(
 38:             "pat_ins_copay" => "$25.00"
 39:         ))->tab();
 40: 
 41:         // Save the insurance
 42:         $app->popup->last()->press("Save");
 43: 
 44:         $this->waitForAjax();
 45: 
 46:         // Go to the patient's dashboard
 47:         $patientDash = $patientView->dashboard->navigate()->verifyAndWait();
 48: 
 49:         /**
 50:          * Expected outcome:
 51:          * a. Dashboard contains alert:
 52:          *      Patient has a copay of $25.00
 53:          */
 54:         $this->spinWait(function () use ($patientDash) {
 55:             $patientDash->balanceAlerts->assertCanSee("Patient has a copay of $25.00");
 56:             return true;
 57:         });
 58: 
 59:         // Go back to the patinet's insurance list
 60:         $patientInsurance = $patientView->insurance->navigate()->verifyAndWait();
 61: 
 62:         $patientInsurance->grid->waitForRowAt(0);
 63: 
 64:         // Edit the insurance 1ST MEDICAL NETWORK
 65:         $patientInsurance->grid->at(0)->querySelector('[data-button-class="edit"]')->click();
 66: 
 67:         // Fill in a Copay of 25%
 68:         $form = $this->getView("patients/add-insurance-popup-form.json")->verifyAndWait();
 69:         $form->setInput(array(
 70:             "pat_ins_copay" => "25%"
 71:         ))->tab();
 72: 
 73:         // Save the insurance
 74:         $app->popup->last()->press("Save");
 75: 
 76:         $this->waitForAjax();
 77: 
 78:         // Go to the patient's dashboard
 79:         $patientDash = $patientView->dashboard->navigate()->verifyAndWait();
 80: 
 81:         /**
 82:          * Expected outcome:
 83:          * a. Dashboard contains alert:
 84:          *      Patient has a copay of 25%
 85:          */
 86:         $this->spinWait(function () use ($patientDash) {
 87:             $patientDash->balanceAlerts->assertCanSee("Patient has a copay of 25%");
 88:             return true;
 89:         });
 90:     }
 91: 
 92:     /**
 93:      * Summary:
 94:      * A self pay patient with one Encounter with a balance in NEW status.
 95:      * Balance should not appear in Dashboard screen.
 96:      *
 97:      * @author jtracy
 98:      */
 99:     public function testPatientBalanceAlertTest1()
100:     {
101:         if (!Customers::isEhrCustomer($this->getCustomerId()) && !Customers::isPmCustomer($this->getCustomerId())) {
102:             return $this->skip();
103:         }
104: 
105:         $app = $this->login(Users::FELIX_MILLER, Users::PASSWORD);
106: 
107:         // open the patient record for Patient Balance Test 1
108:         $patientView = $app->patients->open(Patients::PATIENT_BALANCE_TEST1);
109: 
110:         // navigate to the patient's dashboard
111:         $patientDash = $patientView->dashboard->navigate()->verifyAndWait();
112: 
113:         /**
114:          * Expected outcome:
115:          * a. Dashboard does NOT contain the alert:
116:          *      Patient has a patient balance of $151.83
117:          */
118:         $this->waitForAjax();
119:         $this->spinWait(function () use ($patientDash) {
120:             $patientDash->balanceAlerts->assertCanNotSee("Calculating account balances for this patient...");
121:             $patientDash->balanceAlerts->assertCanNotSee("Patient has a patient balance");
122:             return true;
123:         });
124:     }
125: 
126:     /**
127:      * Summary:
128:      * A self pay patient with one Encounter with a balance in READY status.
129:      * Balance should appear in Dashboard screen.
130:      *
131:      * @author jtracy
132:      */
133:     public function testPatientBalanceAlertTest2()
134:     {
135:         if (!Customers::isEhrCustomer($this->getCustomerId()) && !Customers::isPmCustomer($this->getCustomerId())) {
136:             return $this->skip();
137:         }
138: 
139:         $app = $this->login(Users::FELIX_MILLER, Users::PASSWORD);
140: 
141:         // open the patient record for Patient Balance Test 2
142:         $patientView = $app->patients->open(Patients::PATIENT_BALANCE_TEST2);
143: 
144:         // navigate to the patient's dashboard
145:         $patientDash = $patientView->dashboard->navigate()->verifyAndWait();
146: 
147:         /**
148:          * Expected outcome:
149:          * a. Dashboard contains the alert:
150:          *      Patient has a patient balance of $151.83
151:          */
152:         $this->waitForAjax();
153:         $this->spinWait(function () use ($patientDash) {
154:             $patientDash->balanceAlerts->assertCanNotSee("Calculating account balances for this patient...");
155:             $patientDash->balanceAlerts->assertCanSee("Patient has a patient balance of $151.83");
156:             return true;
157:         });
158:     }
159: 
160:     /**
161:      * Summary:
162:      * A self pay patient with one Encounter with a balance from multiple
163:      * procedure codes in READY status. Correct balance should appear in
164:      * Dashboard screen.
165:      *
166:      * @author jtracy
167:      */
168:     public function testPatientBalanceAlertTest3()
169:     {
170:         if (!Customers::isEhrCustomer($this->getCustomerId()) && !Customers::isPmCustomer($this->getCustomerId())) {
171:             return $this->skip();
172:         }
173: 
174:         $app = $this->login(Users::FELIX_MILLER, Users::PASSWORD);
175: 
176:         // open the patient record for Patient Balance Test 3
177:         $patientView = $app->patients->open(Patients::PATIENT_BALANCE_TEST3);
178: 
179:         // navigate to the patient's dashboard
180:         $patientDash = $patientView->dashboard->navigate()->verifyAndWait();
181: 
182:         /**
183:          * Expected outcome:
184:          * a. Dashboard contains the alert:
185:          *      Patient has a patient balance of $1,277.89
186:          */
187:         $this->waitForAjax();
188:         $this->spinWait(function () use ($patientDash) {
189:             $patientDash->balanceAlerts->assertCanNotSee("Calculating account balances for this patient...");
190:             $patientDash->balanceAlerts->assertCanSee("Patient has a patient balance of $1,277.89");
191:             return true;
192:         });
193:     }
194: 
195:     /**
196:      * Summary:
197:      * A self pay patient with multiple Encounters with a balance and in READY status.
198:      * Correct balance should appear in Dashboard screen.
199:      *
200:      * @author jtracy
201:      */
202:     public function testPatientBalanceAlertTest4()
203:     {
204:         if (!Customers::isEhrCustomer($this->getCustomerId()) && !Customers::isPmCustomer($this->getCustomerId())) {
205:             return $this->skip();
206:         }
207: 
208:         $app = $this->login(Users::FELIX_MILLER, Users::PASSWORD);
209: 
210:         // open the patient record for Patient Balance Test 4
211:         $patientView = $app->patients->open(Patients::PATIENT_BALANCE_TEST4);
212: 
213:         // navigate to the patient's dashboard
214:         $patientDash = $patientView->dashboard->navigate()->verifyAndWait();
215: 
216:         /**
217:          * Expected outcome:
218:          * a. Dashboard contains the alert:
219:          *      Patient has a patient balance of $1,398.28
220:          */
221:         $this->waitForAjax();
222:         $this->spinWait(function () use ($patientDash) {
223:             $patientDash->balanceAlerts->assertCanNotSee("Calculating account balances for this patient...");
224:             $patientDash->balanceAlerts->assertCanSee("Patient has a patient balance of $1,398.28");
225:             return true;
226:         });
227:     }
228: 
229:     /**
230:      * Summary:
231:      * A self pay patient with an Encounter with both charges and payments in
232:      * READY status. Correct balance should appear in Dashboard screen.
233:      *
234:      * @author jtracy
235:      */
236:     public function testPatientBalanceAlertTest5()
237:     {
238:         if (!Customers::isEhrCustomer($this->getCustomerId()) && !Customers::isPmCustomer($this->getCustomerId())) {
239:             return $this->skip();
240:         }
241: 
242:         $app = $this->login(Users::FELIX_MILLER, Users::PASSWORD);
243: 
244:         // open the patient record for Patient Balance Test 5
245:         $patientView = $app->patients->open(Patients::PATIENT_BALANCE_TEST5);
246: 
247:         // navigate to the patient's dashboard
248:         $patientDash = $patientView->dashboard->navigate()->verifyAndWait();
249: 
250:         /**
251:          * Expected outcome:
252:          * a. Dashboard contains the alert:
253:          *      Patient has a patient balance of $977.39
254:          */
255:         $this->waitForAjax();
256:         $this->spinWait(function () use ($patientDash) {
257:             $patientDash->balanceAlerts->assertCanNotSee("Calculating account balances for this patient...");
258:             $patientDash->balanceAlerts->assertCanSee("Patient has a patient balance of $977.39");
259:             return true;
260:         });
261:     }
262: 
263:     /**
264:      * Summary:
265:      * An insurance pay patient with Encounters in READY status with charges
266:      * and primary insurance payments + patient balance. Correct balance
267:      * should appear in Dashboard screen.
268:      *
269:      * @author jtracy
270:      */
271:     public function testPatientBalanceAlertTest6()
272:     {
273:         if (!Customers::isEhrCustomer($this->getCustomerId()) && !Customers::isPmCustomer($this->getCustomerId())) {
274:             return $this->skip();
275:         }
276: 
277:         $app = $this->login(Users::FELIX_MILLER, Users::PASSWORD);
278: 
279:         // open the patient record for Patient Balance Test 6
280:         $patientView = $app->patients->open(Patients::PATIENT_BALANCE_TEST6);
281: 
282:         // navigate to the patient's dashboard
283:         $patientDash = $patientView->dashboard->navigate()->verifyAndWait();
284: 
285:         /**
286:          * Expected outcome:
287:          * a. Dashboard contains the alert:
288:          *      Patient has a patient balance of $586.99
289:          */
290:         $this->waitForAjax();
291:         $this->spinWait(function () use ($patientDash) {
292:             $patientDash->balanceAlerts->assertCanNotSee("Calculating account balances for this patient...");
293:             $patientDash->balanceAlerts->assertCanSee("Patient has a patient balance of $586.99");
294:             return true;
295:         });
296:     }
297: 
298:     /**
299:      * Summary:
300:      * Patient Multiple Balance Test 1:
301:      * 1. Encounter with a Charge, Primary Insurance Payment, Insurance Adjustment, Zero Balance.
302:      * 2. Encounter with a Charge, Primary Insurance Payment, Balance, Next Payer Secondary Insurance.
303:      * 3. Encounter with a Charge, Primary Insurance Payment, Secondary Insurance Payment, Zero Balance.
304:      * 4. Encounter with a Charge, Primary Insurance Payment, Secondary Insurance Payment, Patient Balance.
305:      *
306:      * @author jtracy
307:      */
308:     public function testPatientMultipleBalanceTest1()
309:     {
310:         if (!Customers::isEhrCustomer($this->getCustomerId()) && !Customers::isPmCustomer($this->getCustomerId())) {
311:             return $this->skip();
312:         }
313: 
314:         $app = $this->login(Users::FELIX_MILLER, Users::PASSWORD);
315: 
316:         // open the patient record for Patient Multiple Balance Test 1
317:         $patientView = $app->patients->open(Patients::PATIENT_MULTI_BALANCE_TEST1);
318: 
319:         // navigate to the patient's dashboard
320:         $patientDash = $patientView->dashboard->navigate()->verifyAndWait();
321: 
322:         /**
323:          * Expected outcome:
324:          * a. Dashboard contains the alerts:
325:          *      Patient has a patient balance of $120.72
326:          *      Patient has an insurance balance of $48.56
327:          */
328:         $this->waitForAjax();
329:         $this->spinWait(function () use ($patientDash) {
330:             $patientDash->balanceAlerts->assertCanNotSee("Calculating account balances for this patient...");
331:             $patientDash->balanceAlerts->assertCanSee("Patient has a patient balance of $120.72");
332:             $patientDash->balanceAlerts->assertCanSee("Patient has an insurance balance of $48.56");
333:             return true;
334:         });
335:     }
336: 
337:     /**
338:      * Summary:
339:      * An insurance pay patient with an Encounter with a primary insurance
340:      * balance in NEW status. No insurance balance should appear in the
341:      * Dashboard screen.
342:      *
343:      * @author jtracy
344:      */
345:     public function testPrimaryInsuranceBalanceAlertTest1()
346:     {
347:         if (!Customers::isEhrCustomer($this->getCustomerId()) && !Customers::isPmCustomer($this->getCustomerId())) {
348:             return $this->skip();
349:         }
350: 
351:         $app = $this->login(Users::FELIX_MILLER, Users::PASSWORD);
352: 
353:         // open the patient record for Primary Insurance Balance Test 1
354:         $patientView = $app->patients->open(Patients::PRI_INS_BALANCE_TEST1);
355: 
356:         // navigate to the patient's dashboard
357:         $patientDash = $patientView->dashboard->navigate()->verifyAndWait();
358: 
359:         /**
360:          * Expected outcome:
361:          * a. Dashboard does NOT contain the alert:
362:          *      Patient has an insurance balance of $148.56
363:          */
364:         $this->waitForAjax();
365:         $this->spinWait(function () use ($patientDash) {
366:             $patientDash->balanceAlerts->assertCanNotSee("Calculating account balances for this patient...");
367:             $patientDash->balanceAlerts->assertCanNotSee("Patient has an insurance balance");
368:             return true;
369:         });
370:     }
371: 
372:     /**
373:      * Summary:
374:      * An insurance pay patient with an Encounter with a primary insurance
375:      * balance in READY status. Correct insurance balance should appear in the
376:      * Dashboard screen.
377:      *
378:      * @author jtracy
379:      */
380:     public function testPrimaryInsuranceBalanceAlertTest2()
381:     {
382:         if (!Customers::isEhrCustomer($this->getCustomerId()) && !Customers::isPmCustomer($this->getCustomerId())) {
383:             return $this->skip();
384:         }
385: 
386:         $app = $this->login(Users::FELIX_MILLER, Users::PASSWORD);
387: 
388:         // open the patient record for Primary Insurance Balance Test 2
389:         $patientView = $app->patients->open(Patients::PRI_INS_BALANCE_TEST2);
390: 
391:         // navigate to the patient's dashboard
392:         $patientDash = $patientView->dashboard->navigate()->verifyAndWait();
393: 
394:         /**
395:          * Expected outcome:
396:          * a. Dashboard contains the alert:
397:          *      Patient has an insurance balance of $148.56
398:          */
399:         $this->waitForAjax();
400:         $this->spinWait(function () use ($patientDash) {
401:             $patientDash->balanceAlerts->assertCanNotSee("Calculating account balances for this patient...");
402:             $patientDash->balanceAlerts->assertCanSee("Patient has an insurance balance of $148.56");
403:             return true;
404:         });
405:     }
406: 
407:     /**
408:      * Summary:
409:      * An insurance pay patient with multiple Encounters with a primary
410:      * insurance balance in READY status. Correct insurance balance should
411:      * appear in the Dashboard screen.
412:      *
413:      * @author jtracy
414:      */
415:     public function testPrimaryInsuranceBalanceAlertTest3()
416:     {
417:         if (!Customers::isEhrCustomer($this->getCustomerId()) && !Customers::isPmCustomer($this->getCustomerId())) {
418:             return $this->skip();
419:         }
420: 
421:         $app = $this->login(Users::FELIX_MILLER, Users::PASSWORD);
422: 
423:         // open the patient record for Primary Insurance Balance Test 3
424:         $patientView = $app->patients->open(Patients::PRI_INS_BALANCE_TEST3);
425: 
426:         // navigate to the patient's dashboard
427:         $patientDash = $patientView->dashboard->navigate()->verifyAndWait();
428: 
429:         /**
430:          * Expected outcome:
431:          * a. Dashboard contains the alert:
432:          *      Patient has an insurance balance of $1,367.64
433:          */
434:         $this->waitForAjax();
435:         $this->spinWait(function () use ($patientDash) {
436:             $patientDash->balanceAlerts->assertCanNotSee("Calculating account balances for this patient...");
437:             $patientDash->balanceAlerts->assertCanSee("Patient has an insurance balance of $1,367.64");
438:             return true;
439:         });
440:     }
441: 
442:     /**
443:      * Summary:
444:      * A guarantor patient has a linked dependent patient with an insurance
445:      * and a patient balance. The patient balance shows on the guarantor's
446:      * dashboard and as a guarantor balance on the dependent's dashboard.
447:      * The insurance balance shows only on the dependent's dashboard.
448:      *
449:      * @author jtracy
450:      */
451:     public function testPatientGuarantorBalanceAlertTest1()
452:     {
453:         if (!Customers::isEhrCustomer($this->getCustomerId()) && !Customers::isPmCustomer($this->getCustomerId())) {
454:             return $this->skip();
455:         }
456: 
457:         $app = $this->login(Users::FELIX_MILLER, Users::PASSWORD);
458: 
459:         // open the patient record for Phyllis Armstrong
460:         $patientView = $app->patients->open(Patients::PHYLLIS_ARMSTRONG);
461: 
462:         // navigate to the patient's dashboard
463:         $patientDash = $patientView->dashboard->navigate()->verifyAndWait();
464: 
465:         /**
466:          * Expected outcome:
467:          * a. Dashboard does contains the alert:
468:          *      Patient has a patient balance of $70.72
469:          */
470:         $this->waitForAjax();
471:         $this->spinWait(function () use ($patientDash) {
472:             $patientDash->balanceAlerts->assertCanNotSee("Calculating account balances for this patient...");
473:             $patientDash->balanceAlerts->assertCanSee("Patient has a patient balance of $70.72");
474:             return true;
475:         });
476: 
477:         // open the patient record for April Armstrong
478:         $patientView = $app->patients->open(Patients::APRIL_ARMSTRONG);
479: 
480:         // navigate to the patient's dashboard
481:         $patientDash = $patientView->dashboard->navigate()->verifyAndWait();
482: 
483:         /**
484:          * Expected outcome:
485:          * a. Dashboard does contains the alert:
486:          *      Patient has an insurance balance of $798.36
487:          *      Patient's guarantor ( Armstrong, Phyllis ) has a balance of $70.72
488:          */
489:         $this->waitForAjax();
490:         $this->spinWait(function () use ($patientDash) {
491:             $patientDash->balanceAlerts->assertCanNotSee("Calculating account balances for this patient...");
492:             $patientDash->balanceAlerts->assertCanSee("Patient has an insurance balance of $798.36");
493:             $patientDash->balanceAlerts->assertCanSee("Patient's guarantor");
494:             $patientDash->balanceAlerts->assertCanSee("Armstrong, Phyllis");
495:             $patientDash->balanceAlerts->assertCanSee("has a balance of $70.72");
496:             return true;
497:         });
498:     }
499: }
500: 
501: ?>
API documentation generated by ApiGen