1: <?php
2: namespace Azalea\Selenium\App\Charts;
3:
4: use Azalea\Selenium\Toolkit\View;
5:
6: class Charts extends View
7: {
8: 9: 10: 11: 12: 13: 14:
15: public function getEncounterIdFromHash($timeout = 30)
16: {
17:
18: $matches = null;
19: $regex = "/#\/charts\/c\/(\d+)[\/\w+]*/";
20: $this->waitForHash($regex);
21: preg_match($regex, $this->getCurrentHash(), $matches);
22: $enc_id = $matches[1];
23: return $enc_id;
24: }
25:
26: 27: 28: 29: 30: 31: 32: 33: 34:
35: public function open($pat_id, $enc_id, $edit = false)
36: {
37: if ($edit === true) {
38: $this->updateHash("/charts/c/$enc_id/edit");
39: return $this->driver->assertView("charts/chart.json", array("pat_id" => $pat_id));
40: }
41:
42: $this->updateHash("/charts/c/$enc_id/detail");
43: return $this->driver->assertView("charts/chart.json", array("pat_id" => $pat_id));
44: }
45: }
46:
47: ?>
48: