1: <?php
2: namespace Azalea\Selenium\App\Encounters;
3:
4: use Azalea\Selenium\Toolkit\View;
5:
6: class EncounterDiagnosisCodes extends View
7: {
8:
9: 10: 11:
12:
13: public function fillQuickSubmit($code, $box = 1)
14: {
15: $this->querySelector('[name="icd9_'.$box.'"]')->value($code);
16: return $this;
17: }
18:
19: public function submitQuickSubmit()
20: {
21:
22: $this->clickElement(".icd9_submit");
23: $this->driver->waitForAjax();
24: }
25:
26: public function search()
27: {
28:
29: $this->clickElement(".add_icd9");
30: $this->driver->wait(1);
31: return $this;
32: }
33:
34: public function removeAll()
35: {
36: $total = count($this->querySelectorAll('[data-grid-row] .eic_code'));
37: for ($i = $total; $i > 0; $i--) {
38: $this->querySelector('[data-grid-row="0"] [data-button-class="delete"]')->click();
39: $this->spinWait(function ($driver) use ($i) {
40: return (count($driver->querySelectorAll('[data-grid-row] .eic_code')) < $i);
41: });
42: }
43: return $this;
44: }
45: }
46:
47: ?>