Skip to content

Commit

Permalink
Fix dcm4che#1921 : IOCM-RS Update Patient Service : Incorrect RSOpera…
Browse files Browse the repository at this point in the history
…tion being sent to RSForward Service
  • Loading branch information
vrindanayak committed Apr 11, 2019
1 parent 59c1533 commit dc2d979
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -300,13 +300,19 @@ public void updatePatient(@PathParam("PatientID") IDWithIssuer patientID, InputS
errResponse("missing Patient ID in message body", Response.Status.BAD_REQUEST));
try {
boolean newPatient = patientID.equals(bodyPatientID);
if (newPatient)
RSOperation rsOp;
if (newPatient) {
patientService.updatePatient(ctx);
rsOp = ctx.getEventActionCode().equals(AuditMessages.EventActionCode.Create)
? RSOperation.CreatePatient
: RSOperation.UpdatePatient;
}
else {
rsOp = RSOperation.ChangePatientID;
ctx.setPreviousAttributes(patientID.exportPatientIDWithIssuer(null));
patientService.changePatientID(ctx);
}
rsForward.forward(RSOperation.UpdatePatient, arcAE, attrs, request);
rsForward.forward(rsOp, arcAE, attrs, request);
String msgType = ctx.getEventActionCode().equals(AuditMessages.EventActionCode.Create)
? newPatient
? "ADT^A28^ADT_A05" : "ADT^A47^ADT_A30"
Expand Down

0 comments on commit dc2d979

Please sign in to comment.