1: <?php
2: namespace Azalea\Selenium\EHR\UI\Patients;
3:
4: class PatientAllergyEditPopup extends \Azalea\Selenium\EHR\UI\Popup
5: {
6: protected static $selector = "#pat_allergy_popup";
7:
8: 9: 10: 11: 12:
13: protected static $ALLERGY_TYPE = '#palg_allergy_type';
14: protected static $REACTION = '#allergy_reaction_picklist';
15: protected static $SEVERITY = '#palg_severity';
16: protected static $REFERRED = '#palg_historical';
17: protected static $ONSET_BUTTON = '.now_ts_btn';
18: protected static $INACTIVE_BUTTON = '#pat_allergy_popup div:nth-child(4) tr + tr + tr .now_ts_btn';
19: protected static $ACTIVE_CHECKBOX = '#palg_active';
20: protected static $COMMENTS = '#palg_comments';
21: protected static $SAVE_BUTTON = '.popup_buttons > button.red';
22: protected static $CANCEL_BUTTON = '.popup_buttons > button.normal';
23:
24: 25: 26: 27: 28:
29: public function clickAllergyTypeSelect()
30: {
31: $this->byCss(self::$ALLERGY_TYPE)->click();
32: }
33:
34: public function selectAllergyType()
35: {
36: $this->byCss(self::$ALLERGY_TYPE.' > option + option')->click();
37: }
38:
39: public function clickReactionSelect()
40: {
41: $this->byCss(self::$REACTION)->click();
42: }
43:
44: public function selectReaction()
45: {
46: $this->byCss(self::$REACTION.' > option + option')->click();
47: }
48:
49: public function clickSeveritySelect()
50: {
51: $this->byCss(self::$SEVERITY)->click();
52: }
53:
54: public function selectSeverity()
55: {
56: $this->byCss(self::$SEVERITY.' > option + option')->click();
57: }
58:
59: public function clickSaveButton()
60: {
61: $this->byCss(self::$SAVE_BUTTON)->click();
62: }
63:
64: public function clickCancelButton()
65: {
66: $this->byCss(self::$CANCEL_BUTTON)->click();
67: }
68:
69: public function clickReferredAllergy()
70: {
71: $this->byCss(self::$REFERRED)->click();
72: }
73:
74: public function clickActiveAllergy()
75: {
76: $this->byCss(self::$ACTIVE_CHECKBOX)->click();
77: }
78:
79: public function setTextComments($text='')
80: {
81: $this->byCss(self::$COMMENTS)->value($text);
82: }
83:
84: public function clickOnsetNowButton()
85: {
86: $this->byCss(self::$ONSET_BUTTON)->click();
87: }
88:
89: public function clickInactiveNowButton()
90: {
91: $this->byCss(self::$INACTIVE_BUTTON)->click();
92: }
93:
94: 95: 96: 97:
98: public function verify($args = array())
99: {
100:
101:
102:
103:
104: return parent::verify($args);
105: }
106: }
107: ?>