Skip to content

Commit

Permalink
Fix #4240 : Rectify success response definition for Create Patient RS…
Browse files Browse the repository at this point in the history
… service in swagger
  • Loading branch information
vrindanayak committed Sep 29, 2023
1 parent 8b07786 commit 7c943e8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,9 @@ public Response createPatient(InputStream in) {
patientService.updatePatient(ctx);
rsForward.forward(RSOperation.CreatePatient, arcAE, ctx.getAttributes(), request);
notifyHL7Receivers("ADT^A28^ADT_A05", ctx);
return Response.ok("{\"Patient record with patient identifiers\": \""
return Response.ok("{\"PatientIdentifiers\": \""
+ IDWithIssuer.pidsOf(ctx.getAttributes())
+ " created successfully.\"}")
+ "\"}")
.build();
} catch (NonUniquePatientException e) {
return errResponse(e.getMessage(), Response.Status.CONFLICT);
Expand Down
9 changes: 6 additions & 3 deletions docs/swagger/responses.json
Original file line number Diff line number Diff line change
Expand Up @@ -1118,11 +1118,14 @@
"schema": {
"type": "object",
"required": [
"PatientID"
"PatientIdentifiers"
],
"properties": {
"PatientID": {
"type": "string"
"PatientIdentifiers": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
Expand Down

0 comments on commit 7c943e8

Please sign in to comment.