1: <?php
2: namespace Azalea\Selenium\App\Encounters;
3:
4: use Azalea\Selenium\Toolkit\View;
5:
6: class Encounter extends View
7: {
8: 9: 10:
11: public function goToChart()
12: {
13: $this->driver->waitFor("#encounter_context_controls #btn_chart")->click();
14:
15: $this->driver->waitForElementVisible(".chart-controls-details #btn_jump_cc")->click();
16: return $this;
17: }
18:
19: 20: 21:
22: public function getStatus()
23: {
24: return trim($this->driver->waitFor("#encounter_status")->text());
25: }
26:
27: public function save($confirm = true)
28: {
29: $this->driver->waitFor("#encounter_controls #btn_encounter_save")->click();
30: $this->driver->waitForAjax();
31: if ($this->driver->getApp()->popup->confirmIsVisible()) {
32: if ($confirm) {
33: $this->driver->getApp()->popup->confirmYes();
34: } else {
35: return false;
36: }
37: }
38: $this->waitFor("#enc_pat_details");
39: return $this;
40: }
41:
42: public function edit()
43: {
44: $this->driver->waitFor("#encounter_controls #btn_edit_encounter")->click();
45: $this->driver->wait(1);
46: $this->waitFor("#encounter_edit_form");
47: return $this;
48: }
49:
50: 51: 52:
53: public function cancel()
54: {
55: $this->driver->waitFor("#encounter_controls #enc_more_actions")->click();
56:
57: $this->driver->getFirstVisible(".encounter-action-cancel > a")->click();
58: $this->driver->getApp()->popup->confirmYes();
59: $this->driver->waitForAjax();
60: return $this;
61: }
62:
63: 64: 65:
66: public function doPrimary_1500_837_File()
67: {
68: $this->driver->waitFor("#encounter_controls #enc_more_actions")->click();
69:
70: $this->driver->getFirstVisible('[item="claim_statement_action.make_837_primary"]')->click();
71: $this->driver->getApp()->popup->confirmYes();
72: $this->driver->waitForAjax();
73: return $this;
74: }
75:
76: 77: 78:
79: public function setDateOfService($value)
80: {
81: $this->setInput("enc_date_of_service", $value);
82: $this->tab();
83: return $this;
84: }
85: }
86:
87: ?>