1: <?php
2: namespace Azalea\Selenium\App\Patients;
3:
4: use Azalea\Selenium\Toolkit\View;
5:
6: class PatientCharts extends View
7: {
8: 9: 10: 11: 12: 13:
14: public function addChart()
15: {
16:
17: $this->driver->waitFor("#btn_new_encounter")->click();
18: try {
19: $this->driver->spinWait(function ($driver) {
20: $driver->querySelector("#existing_soap_popup #btn_new_encounter")
21: ->click();
22: return true;
23: }, 10);
24: } catch (\Exception $e) {
25:
26:
27: }
28:
29: $chartView = $this->driver->assertView("charts/chart.json", $this->getArgs());
30:
31: $this->driver->waitFor(".chart-controls-edit #btn_jump_cc")->click();
32: return $chartView;
33: }
34:
35: 36: 37: 38: 39:
40: public function edit($enc_id)
41: {
42: $this->updateHash("/charts/c/".$enc_id."/edit");
43: $chartView = $this->driver->assertView("charts/chart.json", $this->getArgs());
44:
45: $this->driver->waitFor(".chart-controls-edit #btn_jump_cc")->click();
46: return $chartView;
47: }
48: }
49:
50: ?>
51: