1: <?php
2: namespace Azalea\Selenium\EHR\UI\Patients;
3:
4: class PatientVitalsAddPopup extends \Azalea\Selenium\EHR\UI\Popup
5: {
6: protected static $selector = "#pat_vit_form";
7:
8: 9: 10: 11: 12:
13: protected static $BMI_TEXT_BOX = '#espv_bmi';
14: protected static $NOTES_TEXT_BOX = '#espv_notes';
15: protected static $PULSE_TEXT_BOX = '#espv_pulse';
16: protected static $PULSE_OX_TEXT_BOX = '#espv_pulse_oximetry';
17: protected static $RESP_RATE_TEXT_BOX = '#espv_resp_rate';
18: protected static $TEMPERATURE_TEXT_BOX = '#espv_temp';
19: protected static $HEIGHT_FEET_TEXT_BOX = '#espv_height_ft';
20: protected static $HEIGHT_INCHES_TEXT_BOX = '#espv_height_in';
21: protected static $WEIGHT_POUNDS_TEXT_BOX = '#espv_weight_lbs';
22: protected static $WEIGHT_OUNCES_TEXT_BOX = '#espv_weight_ozs';
23: protected static $BLOOD_PRESSURE_NOMINATOR_TEXT_BOX = '#espv_blood_pressure_mm';
24: protected static $BLOOD_PRESSURE_DENOMINATOR_TEXT_BOX = '#espv_blood_pressure_hg';
25:
26: protected static $HEIGHT_SELECT = '#espv_height_ft_in';
27: protected static $WEIGHT_SELECT = '#espv_weight_lbs_ozs';
28: protected static $TEMPERATURE_SELECT = '#espv_location';
29: protected static $BLOOD_PRESSURE_SELECT = '#espv_position';
30:
31: protected static $BUTTON_SAVE = 'button[data-events="click:save"]';
32: protected static $BUTTON_CANCEL = 'button[data-events="click:onCancel"]';
33:
34: 35: 36: 37: 38:
39: public function clickSaveButton()
40: {
41: $this->byCss(self::$BUTTON_SAVE)->click();
42: }
43:
44: public function clickCancelButton()
45: {
46: $this->byCss(self::$BUTTON_CANCEL)->click();
47: }
48:
49: public function setTextHeightFeet($text='')
50: {
51: $selector = self::$HEIGHT_FEET_TEXT_BOX;
52: if($this->displayed($selector))
53: {
54: $this->_setText($selector, $text);
55: }
56: }
57:
58: public function setTextHeightInches($text='')
59: {
60: $this->_setText(self::$HEIGHT_INCHES_TEXT_BOX, $text);
61: }
62:
63: public function setTextWeightPounds($text='')
64: {
65: $this->_setText(self::$WEIGHT_POUNDS_TEXT_BOX, $text);
66: }
67:
68: public function setTextWeightOunces($text='')
69: {
70: $selector = self::$WEIGHT_OUNCES_TEXT_BOX;
71: if($this->displayed($selector))
72: {
73: $this->_setText($selector, $text);
74: }
75: }
76:
77: public function setTextBloodPressureMM($text='')
78: {
79: $this->_setText(self::$BLOOD_PRESSURE_NOMINATOR_TEXT_BOX, $text);
80: }
81:
82: public function setTextBloodPressureHG($text='')
83: {
84: $this->_setText(self::$BLOOD_PRESSURE_DENOMINATOR_TEXT_BOX, $text);
85: }
86:
87: public function setTextTemperature($text='')
88: {
89: $this->_setText(self::$TEMPERATURE_TEXT_BOX, $text);
90: }
91:
92: public function setTextPulse($text='')
93: {
94: $this->_setText(self::$PULSE_TEXT_BOX, $text);
95: }
96:
97: public function setTextRespRate($text='')
98: {
99: $this->_setText(self::$RESP_RATE_TEXT_BOX, $text);
100: }
101:
102: public function setTextPulseOX($text='')
103: {
104: $this->_setText(self::$PULSE_OX_TEXT_BOX, $text);
105: }
106:
107: public function setTextNotes($text='')
108: {
109: $this->_setText(self::$NOTES_TEXT_BOX, $text);
110: }
111:
112: 113: 114: 115: 116:
117: private function _setText($selector,$text='')
118: {
119: $this->byCss($selector)->value($text);
120: }
121:
122: 123: 124: 125:
126: public function verify($args = array())
127: {
128: return parent::verify($args);
129: }
130: }
131: ?>