/
PatientLogupdate.ts
88 lines (70 loc) · 2.2 KB
/
PatientLogupdate.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
class PatientLogupdate {
clickLogupdate() {
cy.get("#log-update").scrollIntoView();
cy.verifyAndClickElement("#log-update", "Log Update");
cy.wait(2000);
}
selectBed(bed: string) {
cy.searchAndSelectOption("input[name='bed']", bed);
cy.submitButton("Move to bed");
cy.wait(2000);
}
selectPatientCategory(category: string) {
cy.clickAndSelectOption("#patient_category", category);
}
typePhysicalExamination(examination: string) {
cy.get("#physical_examination_info").click().type(examination);
cy.get("#physical_examination_info").should("contain", examination);
}
typeOtherDetails(details: string) {
cy.get("#other_details").click().type(details);
}
typeAdditionalSymptoms(symptoms: string) {
cy.clickAndSelectOption("#additional_symptoms", symptoms);
}
typeSystolic(systolic: string) {
cy.searchAndSelectOption("#systolic", systolic);
}
typeDiastolic(diastolic: string) {
cy.searchAndSelectOption("#diastolic", diastolic);
}
typePulse(pulse: string) {
cy.searchAndSelectOption("#pulse", pulse);
}
typeTemperature(temperature: string) {
cy.searchAndSelectOption("#temperature", temperature);
}
typeRespiratory(respiratory: string) {
cy.searchAndSelectOption("#resp", respiratory);
}
typeSpo2(spo: string) {
cy.searchAndSelectOption("#ventilator_spo2", spo);
}
selectRhythm(rhythm: string) {
cy.clickAndSelectOption("#rhythm", rhythm);
}
typeRhythm(rhythm: string) {
cy.get("#rhythm_detail").click().type(rhythm);
}
clickLogupdateCard(element, patientCategory) {
cy.get(element).scrollIntoView();
cy.verifyContentPresence(element, [patientCategory]);
cy.get(element).first().contains("View Details").click();
cy.wait(3000);
}
clickUpdateDetail() {
cy.verifyAndClickElement("#consultation-preview", "Update Details");
cy.wait(3000);
}
clickClearButtonInElement(elementId) {
cy.get(elementId).find("#clear-button").click();
}
clickVitals() {
cy.get("#consultation_tab_nav").scrollIntoView();
cy.verifyAndClickElement("#consultation_tab_nav", "Vitals");
}
clickCopyPreviousValue() {
cy.get("#clone_last").click();
}
}
export default PatientLogupdate;