1: <?php
2: namespace Azalea\Selenium\EHR\UI\Patients;
3:
4: class PatientsListRow extends \Azalea\Selenium\Core\View
5: {
6: protected static $gridSelector = "#patient-list-tab .awa-ui-grid";
7:
8: 9: 10:
11: public function __construct($driver, $element)
12: {
13: parent::__construct($driver);
14: $this->row = $element;
15: }
16:
17: 18: 19: 20:
21: public function click()
22: {
23: $this->row->click();
24: $this->driver->wait(4);
25: return new PatientTab($this->driver, array(
26: "pat_id" => $this->getPatientId()
27: ));
28: }
29:
30: 31: 32: 33:
34: public function getIndex()
35: {
36: return $this->row->attribute("data-grid-row");
37: }
38:
39: 40: 41: 42:
43: public function getPatientId()
44: {
45: return $this->row->attribute("data-model-id");
46: }
47:
48: 49: 50: 51:
52: public function isIncomplete()
53: {
54: return (strpos($this->row->attribute("class"), "incomplete") !== false);
55: }
56:
57: 58: 59: 60:
61: public function isInactive()
62: {
63: return (strpos($this->row->attribute("class"), "inactive") !== false);
64: }
65:
66: 67: 68:
69: public function clickInsuranceLink()
70: {
71: $this->clickAndWait($this->byCss(
72: static::$gridSelector.' [data-grid-row="'.$this->getIndex().'"] .ins_name > a'
73: ));
74: }
75: }