1: <?php
2: namespace Azalea\Selenium\App\Patients;
3:
4: use Azalea\Selenium\Toolkit\View;
5:
6: class PatientListFilters extends View
7: {
8: public function byGender($gender)
9: {
10: $this->select("gender", $gender);
11: return $this;
12: }
13:
14: public function olderThan($age, $unit = "y")
15: {
16: $this->select("age", "OLDER");
17: $this->type("age_lower", $age);
18: $this->select("age_lower_unit", $unit);
19: return $this;
20: }
21:
22: public function byStatus($status)
23: {
24: $this->select("status", $status);
25: return $this;
26: }
27:
28: public function byPrimaryInsurance($ins_id)
29: {
30: $this->select("primary_ins", $ins_id);
31: return $this;
32: }
33:
34: public function byRenderingProvider($phy_id)
35: {
36: $self = $this;
37:
38: $this->querySelector('[name="provider"] + .awa-ui-searchable-select-overlay')->click();
39: $this->driver->spinWait(function () use ($self) {
40: return (count($self->querySelectorAll('[name="provider"] > option')) > 1);
41: });
42: $this->select("provider", $phy_id);
43: return $this;
44: }
45:
46: public function byMaritalStatus($status)
47: {
48: $this->select("maritial_status", $status);
49: return $this;
50: }
51:
52: public function byLanguage($lang_id)
53: {
54: $this->select("language", $lang_id);
55: return $this;
56: }
57:
58: public function byEthnicity($ethnicity)
59: {
60: $this->select("ethnicity", $ethnicity);
61: return $this;
62: }
63:
64: public function go()
65: {
66: $this->driver->waitForAjax();
67: $this->press("Go");
68: return $this;
69: }
70:
71: public function reset()
72: {
73: $this->press("Reset Filters");
74: return $this;
75: }
76: }
77:
78: ?>
79: