Skip to content

Commit 6f98645

Browse files
committedJan 21, 2025
O3-4357:fix save allergies endpoint
1 parent ab1172c commit 6f98645

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed
 

‎src/test/java/org/openmrs/performance/http/DoctorHttpService.java

+6-2
Original file line numberDiff line numberDiff line change
@@ -192,10 +192,14 @@ public HttpRequestActionBuilder saveAllergy(String patientUuid) {
192192
payload.put("comment", "test");
193193
payload.put("reactions", reactions);
194194

195-
195+
try{
196196
return http("Save an Allergies")
197197
.post("/openmrs/ws/rest/v1/patient/"+ patientUuid +"/allergy")
198-
.body(StringBody(payload.toString()));
198+
.body(StringBody(new ObjectMapper().writeValueAsString(payload)));
199+
}catch (JsonProcessingException e) {
200+
throw new RuntimeException(e);
201+
}
202+
199203

200204

201205
}

0 commit comments

Comments
 (0)
Failed to load comments.