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 EncounterProceduresTest extends ApplicationTestCase
  8: {
  9:     public function supportsCustomer($cus_id)
 10:     {
 11:         // Azalea EHR, Azalea PM customers only
 12:         return (Customers::isEhrCustomer($cus_id) || Customers::isPmCustomer($cus_id));
 13:     }
 14: 
 15:     /**
 16:      * Summary:
 17:      * Add and remove Procedure Codes in an Encounter using Quick Submit
 18:      * and Search functions.
 19:      */
 20:     public function testAddAndRemove()
 21:     {
 22:         $app = $this->login(Users::FELIX_MILLER, Users::PASSWORD);
 23: 
 24:         // Open Patient Record for Camila C. Fisher (QAA74) > Encounters section.
 25:         $encounterView = $app->patients->get(Patients::CAMILA_FISHER_ID)
 26:             ->encounters
 27:             ->navigate()
 28:             ->addEncounter();
 29: 
 30:         // Make sure that the Date of Service, Place of Service, and Location
 31:         // fields are not empty.
 32:         $encounterView->setDateOfService(date("m/d/Y", time()))
 33:             ->select("enc_spl_id", "9") // OFFICE (11)
 34:             ->select("enc_loc_id", "401") // Gerhard Hospital
 35:             ->tab();
 36: 
 37:         // In the procedures Quick Submit boxes enter 99214, 81003, 83036, 10060
 38:         // Click Submit.
 39:         $encounterView->procedures->fillQuickSubmit("99214", 1)
 40:             ->fillQuickSubmit("81003", 2)
 41:             ->fillQuickSubmit("83036", 3)
 42:             ->fillQuickSubmit("10060", 4)
 43:             ->tab();
 44:         $encounterView->procedures->submitQuickSubmit();
 45:         $encounterView->procedures->grid->waitForRowCount(4);
 46: 
 47:         /*
 48:          * Expected Outcome:
 49:          * a. The Procedure Codes grid is populated with four rows, one for each of the above CPTs.
 50:          */
 51:         $encounterView->procedures->grid->assertCanSee("99214");
 52:         $encounterView->procedures->grid->assertCanSee("81003");
 53:         $encounterView->procedures->grid->assertCanSee("83036");
 54:         $encounterView->procedures->grid->assertCanSee("10060");
 55: 
 56:         // Click the "X" button in the row corresponding to 99214.
 57:         $encounterView->procedures->grid->first()->querySelector('.delete')->click();
 58: 
 59:         //  Click Yes to confirm.
 60:         $app->popup->confirmYes();
 61: 
 62:         /*
 63:          * Expected Outcome:
 64:          * a. The 99214 row is removed.
 65:          */
 66:         $this->spinWait(function () use ($encounterView) {
 67:             $encounterView->procedures->grid->assertCanNotSee("99214");
 68:             return true;
 69:         });
 70: 
 71:         // Click the Search button in the procedures section
 72:         $encounterView->procedures->waitFor(
 73:             $encounterView->procedures->selectors->addProcedureButton
 74:         )->click();
 75: 
 76:         $encounterView->popups->procedureSearch->verifyAndWait();
 77:         $encounterView->popups->procedureSearch->grid->waitForRowAt(0);
 78: 
 79:         // Search for "99214"
 80:         $encounterView->popups->procedureSearch->type("autoselect_search", "99214");
 81:         $encounterView->popups->procedureSearch->grid->waitForRowTextAt(0, "99214");
 82: 
 83:         // Click on the "99214" row
 84:         $encounterView->popups->procedureSearch->grid->waitForRowAt(0)->click();
 85: 
 86:         // Press the Select button
 87:         $app->popup->first()->press("Select");
 88: 
 89:         /*
 90:          * Expected Outcome:
 91:          * a. The 99214 row is added.
 92:          */
 93:         $this->spinWait(function () use ($encounterView) {
 94:             $encounterView->procedures->grid->assertCanSee("99214");
 95:             return true;
 96:         });
 97: 
 98:         // remove all cpts to clean up
 99:         $encounterView->procedures->removeAll();
100: 
101:         // cancel the encounter to clean up
102:         $encounterView->cancel();
103: 
104:         $this->assertNoErrorPopups();
105:     }
106: 
107:     /**
108:      * Summary:
109:      * When adding a procedure code in an Encounter with an existing diagnosis code
110:      * the procedure points to the diagnosis code. Removing the diagnosis code
111:      * removes the dx pointer from the procedure code.
112:      */
113:     public function testAddAndRemoveDxPointers()
114:     {
115:         $app = $this->login(Users::FELIX_MILLER, Users::PASSWORD);
116: 
117:         // Open Patient Record for Camila C. Fisher (QAA74) > Encounters section.
118:         $encounterView = $app->patients->get(Patients::CAMILA_FISHER_ID)
119:             ->encounters
120:             ->navigate()
121:             ->addEncounter();
122: 
123:         // Make sure that the Date of Service, Place of Service, and Location
124:         // fields are not empty.
125:         $encounterView->setDateOfService(date("m/d/Y", time()))
126:             ->select("enc_spl_id", "9") // OFFICE (11)
127:             ->select("enc_loc_id", "401") // Gerhard Hospital
128:             ->tab();
129: 
130:         // In the diagnosis Quick Submit boxes enter I10
131:         // and click Submit.
132:         $encounterView->icds->fillQuickSubmit("I10", 1)->tab();
133:         $encounterView->icds->submitQuickSubmit();
134:         $encounterView->icds->grid->waitForRowCount(1);
135: 
136:         // In the procedures Quick Submit boxes enter 99214
137:         // Click Submit.
138:         $encounterView->procedures->fillQuickSubmit("99214", 1)
139:             ->submitQuickSubmit();
140:         $encounterView->procedures->grid->waitForRowCount(1);
141: 
142:         /*
143:          * Expected Outcome:
144:          * a. The Procedure Codes grid is populated with one row for 99214
145:          *    and the Dx Pointers column indicates I10.
146:          */
147:         $encounterView->procedures->grid->assertCanSee("99214");
148:         $encounterView->procedures->grid->assertCanSee("I10");
149: 
150:         // Click the "X" button in the row corresponding to diagnosis I10.
151:         $encounterView->icds->grid->first()->querySelector('[data-button-class="delete"]')->click();
152: 
153:         //  Click Yes to confirm.
154:         $app->popup->confirmYes();
155: 
156:         /*
157:          * Expected Outcome:
158:          * a. The Dx Pointer I10 is removed from the 99214 procedure row.
159:          */
160:         $this->spinWait(function () use ($encounterView) {
161:             $encounterView->procedures->grid->assertCanNotSee("I10");
162:             return true;
163:         });
164: 
165:         // remove all cpts to clean up
166:         $encounterView->procedures->removeAll();
167: 
168:         // cancel the encounter to clean up
169:         $encounterView->cancel();
170: 
171:         $this->assertNoErrorPopups();
172:     }
173: 
174:     /**
175:      * Summary:
176:      * When adding a dx pointer to an Encounter with at least one procedure code
177:      * and "Apply new diagnoses to all CPT Codes Below" checked, the procedure
178:      * codes receive the Dx pointer and do not when the option is not checked.
179:      */
180:     public function testApplyNewDxToAllProcedureCodes()
181:     {
182:         $app = $this->login(Users::FELIX_MILLER, Users::PASSWORD);
183: 
184:         // Open Patient Record for Camila C. Fisher (QAA74) > Encounters section.
185:         $encounterView = $app->patients->get(Patients::CAMILA_FISHER_ID)
186:             ->encounters
187:             ->navigate()
188:             ->addEncounter();
189: 
190:         // Make sure that the Date of Service, Place of Service, and Location
191:         // fields are not empty.
192:         $encounterView->setDateOfService(date("m/d/Y", time()))
193:             ->select("enc_spl_id", "9") // OFFICE (11)
194:             ->select("enc_loc_id", "401") // Gerhard Hospital
195:             ->tab();
196: 
197:         // In the procedures Quick Submit boxes enter 99214
198:         // Click Submit.
199:         $encounterView->procedures->fillQuickSubmit("99214", 1)
200:             ->submitQuickSubmit();
201:         $encounterView->procedures->grid->waitForRowCount(1);
202: 
203:         // Check the "Apply new diagnoses to all CPT Codes Below" option
204:         $encounterView->icds->check(
205:             $encounterView->icds->selectors->applyDxToAll
206:         );
207: 
208:         // In the diagnosis Quick Submit boxes enter I10
209:         // and click Submit.
210:         $encounterView->icds->fillQuickSubmit("I10", 1)->tab();
211:         $encounterView->icds->submitQuickSubmit();
212:         $encounterView->icds->grid->waitForRowCount(1);
213: 
214:         /*
215:          * Expected Outcome:
216:          * a. The Procedure Codes grid is populated with one row for 99214
217:          *    and the Dx Pointers column indicates I10.
218:          */
219:         $this->waitForAjax();
220:         $encounterView->procedures->grid->assertCanSee("99214");
221:         $encounterView->procedures->grid->assertCanSee("I10");
222: 
223:         // Uncheck the "Apply new diagnoses to all CPT Codes Below" option
224:         $encounterView->icds->uncheck(
225:             $encounterView->icds->selectors->applyDxToAll
226:         );
227: 
228:         // In the diagnosis Quick Submit boxes enter F32.9
229:         // and click Submit.
230:         $encounterView->icds->fillQuickSubmit("F32.9", 1)
231:             ->submitQuickSubmit();
232:         $encounterView->icds->grid->waitForRowCount(2);
233: 
234:         /*
235:          * Expected Outcome:
236:          * a. The Procedure Codes grid is populated with one row for 99214
237:          *    and the Dx Pointers column indicates I10 but not F32.9
238:          */
239:         $this->waitForAjax();
240:         $this->wait(1); // wait an additional second to be sure it doesn't appear
241:         $this->spinWait(function () use ($encounterView) {
242:             $encounterView->procedures->grid->assertCanNotSee("F32.9");
243:             return true;
244:         });
245: 
246:         // remove all cpts to clean up
247:         $encounterView->procedures->removeAll();
248: 
249:         // cancel the encounter to clean up
250:         $encounterView->cancel();
251: 
252:         $this->assertNoErrorPopups();
253:     }
254: 
255:     /**
256:      * Summary:
257:      * The "Clear All DX Pointers" button removes all Dx pointers from
258:      * existing procedure codes.
259:      */
260:     public function testClearAllDxPointers()
261:     {
262:         $app = $this->login(Users::FELIX_MILLER, Users::PASSWORD);
263: 
264:         // Open Patient Record for Camila C. Fisher (QAA74) > Encounters section.
265:         $encounterView = $app->patients->get(Patients::CAMILA_FISHER_ID)
266:             ->encounters
267:             ->navigate()
268:             ->addEncounter();
269: 
270:         // Make sure that the Date of Service, Place of Service, and Location
271:         // fields are not empty.
272:         $encounterView->setDateOfService(date("m/d/Y", time()))
273:             ->select("enc_spl_id", "9") // OFFICE (11)
274:             ->select("enc_loc_id", "401") // Gerhard Hospital
275:             ->tab();
276: 
277:         // In the diagnosis Quick Submit boxes, enter:
278:         // H35.029, S72.123F, T23.011S, Y37.110S
279:         // and click Submit.
280:         $encounterView->icds->fillQuickSubmit("H35.029", 1)
281:             ->fillQuickSubmit("S72.123F", 2)
282:             ->fillQuickSubmit("T23.011S", 3)
283:             ->fillQuickSubmit("Y37.110S", 4)
284:             ->tab();
285:         $encounterView->icds->submitQuickSubmit();
286:         $encounterView->icds->grid->waitForRowCount(4);
287: 
288:         // In the procedures Quick Submit boxes enter 99214, 81003, 83036, 10060
289:         // Click Submit.
290:         $encounterView->procedures->fillQuickSubmit("99214", 1)
291:             ->fillQuickSubmit("81003", 2)
292:             ->fillQuickSubmit("83036", 3)
293:             ->fillQuickSubmit("10060", 4)
294:             ->submitQuickSubmit();
295:         $encounterView->procedures->grid->waitForRowCount(4);
296: 
297:         /*
298:          * Expected Outcome:
299:          * a. The Procedure Codes grid is populated with four procedure codes
300:          *    each with four Dx pointers.
301:          */
302:         $encounterView->procedures->grid->assertCanSee("H35.029");
303:         $encounterView->procedures->grid->assertCanSee("S72.123F");
304:         $encounterView->procedures->grid->assertCanSee("T23.011S");
305:         $encounterView->procedures->grid->assertCanSee("Y37.110S");
306: 
307:         // Click the "Clear All DX Pointers" button
308:         $encounterView->procedures->querySelector(
309:             $encounterView->procedures->selectors->clearAllDxPointersButton
310:         )->click();
311: 
312:         //  Click Yes to confirm.
313:         $app->popup->confirmYes();
314: 
315:         /*
316:          * Expected Outcome:
317:          * a. The Procedure Codes grid is populated with four procedure codes
318:          *    each with no Dx pointers.
319:          */
320:         $this->spinWait(function () use ($encounterView) {
321:             $encounterView->procedures->grid->assertCanNotSee("H35.029");
322:             $encounterView->procedures->grid->assertCanNotSee("S72.123F");
323:             $encounterView->procedures->grid->assertCanNotSee("T23.011S");
324:             $encounterView->procedures->grid->assertCanNotSee("Y37.110S");
325:             return true;
326:         });
327: 
328:         // remove all procedures to clean up
329:         $encounterView->procedures->removeAll();
330: 
331:         // cancel the encounter to clean up
332:         $encounterView->cancel();
333: 
334:         $this->assertNoErrorPopups();
335:     }
336: 
337:     /**
338:      * Summary:
339:      * The "Apply to CPTs" button applies the Dx code to all existing
340:      * procedure codes in the Encounter.
341:      */
342:     public function testApplyDxPointerToProcedures()
343:     {
344:         $app = $this->login(Users::FELIX_MILLER, Users::PASSWORD);
345: 
346:         // Open Patient Record for Camila C. Fisher (QAA74) > Encounters section.
347:         $encounterView = $app->patients->get(Patients::CAMILA_FISHER_ID)
348:             ->encounters
349:             ->navigate()
350:             ->addEncounter();
351: 
352:         // Make sure that the Date of Service, Place of Service, and Location
353:         // fields are not empty.
354:         $encounterView->setDateOfService(date("m/d/Y", time()))
355:             ->select("enc_spl_id", "9") // OFFICE (11)
356:             ->select("enc_loc_id", "401") // Gerhard Hospital
357:             ->tab();
358: 
359:         // In the diagnosis Quick Submit boxes, enter I10
360:         // H35.029, S72.123F, T23.011S, Y37.110S
361:         // and click Submit.
362:         $encounterView->icds->fillQuickSubmit("I10", 1)->tab();
363:         $encounterView->icds->submitQuickSubmit();
364:         $encounterView->icds->grid->waitForRowCount(1);
365: 
366:         // In the procedures Quick Submit boxes enter 99214, 81003, 83036, 10060
367:         // Click Submit.
368:         $encounterView->procedures->fillQuickSubmit("99214", 1)
369:             ->fillQuickSubmit("81003", 2)
370:             ->fillQuickSubmit("83036", 3)
371:             ->fillQuickSubmit("10060", 4)
372:             ->submitQuickSubmit();
373:         $encounterView->procedures->grid->waitForRowCount(4);
374: 
375:         // Click the "Clear All DX Pointers" button
376:         $encounterView->procedures->querySelector(
377:             $encounterView->procedures->selectors->clearAllDxPointersButton
378:         )->click();
379: 
380:         //  Click Yes to confirm.
381:         $app->popup->confirmYes();
382: 
383:         $this->waitForAjax();
384:         $this->spinWait(function () use ($encounterView) {
385:             $encounterView->procedures->grid->assertCanNotSee("I10");
386:             return true;
387:         });
388: 
389:         // Click the "Apply to CPTs" button in the row corresponding to diagnosis I10.
390:         $encounterView->icds->grid->first()->querySelector('[data-button-class="apply"]')->click();
391: 
392:         /*
393:          * Expected Outcome:
394:          * a. The Procedure Codes grid is populated with four procedure codes
395:          *    each with the I10 Dx pointer.
396:          */
397:         $this->spinWait(function () use ($encounterView) {
398:             $encounterView->procedures->grid->assertCanSee("I10");
399:             return true;
400:         });
401: 
402:         // remove all procedures to clean up
403:         $encounterView->procedures->removeAll();
404: 
405:         // cancel the encounter to clean up
406:         $encounterView->cancel();
407: 
408:         $this->assertNoErrorPopups();
409:     }
410: }
411: 
412: ?>
API documentation generated by ApiGen