1: <?php
2: namespace Azalea\Selenium\App\Patients;
3:
4: use Azalea\Selenium\Toolkit\View;
5:
6: class PatientEncounters extends View
7: {
8: 9: 10: 11: 12: 13:
14: public function addEncounter()
15: {
16:
17: $this->driver->waitFor(".btn_new_encounter")->click();
18: $this->waitForAjax();
19: try {
20: $this->driver->spinWait(function ($driver) {
21: $driver->querySelector("#existing_soap_popup #btn_new_encounter")
22: ->click();
23: return true;
24: }, 3);
25: } catch (\Exception $e) {
26:
27:
28: }
29: $this->waitForAjax();
30: return $this->driver->getApp()->encounters->getFromHash();
31: }
32:
33: 34: 35: 36: 37:
38: public function edit($enc_id)
39: {
40: $this->updateHash("/encounters/e/".$enc_id."/billing_edit");
41: return $this->driver->assertView("encounters/encounter.json", array("enc_id" => $enc_id));
42: }
43: }
44:
45: ?>
46: