1: <?php
2: namespace Azalea\Selenium\EHR\UI\Patients;
3:
4: class PatientSection extends \Azalea\Selenium\Core\View
5: {
6: protected static $selector = "#patient{pat_id}";
7: protected static $selectorControls = ".awa-mvc-StructuredView-controls";
8: protected static $selectorSection = "";
9: private $pat_id = "";
10: 11: 12:
13: public function __construct($driver, $args)
14: {
15: if (!isset($args['pat_id'])) {
16: throw new \InvalidArgumentException("Required View Arg: pat_id");
17: }
18: $this->pat_id = $args['pat_id'];
19: return parent::__construct($driver, $args);
20: }
21:
22: 23: 24: 25: 26:
27: public function getSelector($args = array())
28: {
29: return parent::getSelector(array(
30: "pat_id" => $this->id
31: ));
32: }
33:
34: public function getPatientId()
35: {
36: return $this->pat_id;
37: }
38:
39: 40: 41: 42: 43:
44: public function getSelectorControls()
45: {
46: return $this->getSelector()." ".static::$selectorControls;
47: }
48:
49: 50: 51: 52:
53: public function getSelectorSection()
54: {
55: return $this->getSelector()." ".static::$selectorSection;
56: }
57:
58: 59: 60: 61:
62: public function verify($args = array())
63: {
64: $this->id = $args['pat_id'];
65:
66: $selector = $this->getSelector();
67: $this->byCss($selector." ".static::$selectorControls);
68: $this->byCss($selector." ".static::$selectorSection);
69:
70: return true;
71: }
72: }