27
27
import static org .openmrs .performance .Constants .WEIGHT_KG ;
28
28
import static org .openmrs .performance .utils .CommonUtils .extractConceptIds ;
29
29
30
-
31
-
32
- public class DoctorRegistry extends Registry <DoctorHttpService >{
30
+ public class DoctorRegistry extends Registry <DoctorHttpService > {
33
31
34
32
public DoctorRegistry () {
35
33
super (new DoctorHttpService ());
@@ -106,19 +104,19 @@ public ChainBuilder openLabResultsTab(String patientUuid) {
106
104
public ChainBuilder openAllergiesTab (String patientUuid ) {
107
105
return exec (httpService .getAllergies (patientUuid ));
108
106
}
109
-
110
- public ChainBuilder openAllergiesForm (){
107
+
108
+ public ChainBuilder openAllergiesForm () {
111
109
return exec (
112
- httpService .getAllergens ("Drug" ,DRUG_ALLERGEN_UUID ),
113
- httpService .getAllergens ("Environment" ,ENVIRONMENTAL_ALLERGEN_UUID ),
114
- httpService .getAllergens ("Food" ,FOOD_ALLERGEN_UUID ),
115
- httpService .getAllergens ("Allergic Reactions" ,ALLERGY_REACTION_UUID )
110
+ httpService .getAllergens ("Drug" , DRUG_ALLERGEN_UUID ),
111
+ httpService .getAllergens ("Environment" , ENVIRONMENTAL_ALLERGEN_UUID ),
112
+ httpService .getAllergens ("Food" , FOOD_ALLERGEN_UUID ),
113
+ httpService .getAllergens ("Allergic Reactions" , ALLERGY_REACTION_UUID )
116
114
);
117
115
}
118
-
119
- public ChainBuilder recordAllergy (String patientUuid ) {
116
+
117
+ public ChainBuilder recordAllergy (String patientUuid ) {
120
118
return exec (
121
- httpService .saveAllergy (patientUuid )
119
+ httpService .saveAllergy (patientUuid )
122
120
);
123
121
}
124
122
@@ -135,6 +133,12 @@ public ChainBuilder openAttachmentsTab(String patientUuid) {
135
133
.exec (httpService .getAllowedFileExtensions ());
136
134
}
137
135
136
+
137
+ public ChainBuilder openProgramsTab (String patientUuid ) {
138
+ return exec (httpService .getPrograms ())
139
+ .exec (httpService .getProgramEnrollments (patientUuid ));
140
+ }
141
+
138
142
public ChainBuilder addAttachment (String patientUuid ){
139
143
return exec (httpService .uploadAttachment (patientUuid ))
140
144
.exec (httpService .getAttachments (patientUuid ));
@@ -155,19 +159,19 @@ public ChainBuilder addDrugOrder(String patientUuid, String visitUuid, String cu
155
159
httpService .getActiveVisitOfPatient (patientUuid ),
156
160
httpService .searchForDrug ("asprin" ),
157
161
httpService .searchForDrug ("Tylenol" ),
158
- httpService .saveOrder (patientUuid , visitUuid , currentUserUuid , asprin_162_5mg , asprinConcept )
162
+ httpService .saveOrder (patientUuid , visitUuid , currentUserUuid , asprin_162_5mg , asprinConcept )
159
163
);
160
-
164
+
161
165
}
162
-
166
+
163
167
public ChainBuilder addVisitNote (String patientUuid , String currentUserUuid ) {
164
168
String visitNoteText = "Patient visit note" ;
165
169
String certainty = "PROVISIONAL" ;
166
170
String encounterUuid = "#{encounterUuid}" ;
167
171
168
172
return exec (
169
- httpService .saveVisitNote (patientUuid , currentUserUuid , visitNoteText ),
170
- httpService .saveDiagnosis (patientUuid , encounterUuid , DIABETIC_KETOSIS_CONCEPT , certainty , 1 ),
171
- httpService .saveDiagnosis (patientUuid , encounterUuid , DIABETIC_FOOT_ULCER_CONCEPT , certainty , 2 ));
173
+ httpService .saveVisitNote (patientUuid , currentUserUuid , visitNoteText ),
174
+ httpService .saveDiagnosis (patientUuid , encounterUuid , DIABETIC_KETOSIS_CONCEPT , certainty , 1 ),
175
+ httpService .saveDiagnosis (patientUuid , encounterUuid , DIABETIC_FOOT_ULCER_CONCEPT , certainty , 2 ));
172
176
}
173
177
}
0 commit comments