Skip to content

Commit

Permalink
Merge pull request #11 from IsantePlus/ITOS-9
Browse files Browse the repository at this point in the history
ITOS-9: added CCD importing during searching
  • Loading branch information
pgesek authored May 22, 2018
2 parents 5391ecd + f928534 commit ed07d8c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public List<SimpleObject> getPatients(@SpringBean("registrationCoreService") Reg
return simplify(ui, patients);
}

public FragmentActionResult importMpiPatient(@RequestParam("nationalFingerprintId") String nationalId,
public FragmentActionResult importMpiPatientWithCcd(@RequestParam("nationalFingerprintId") String nationalId,
@SpringBean("registrationCoreService") RegistrationCoreService registrationService,
@SpringBean("tempFingerprintService") TempFingerprintService tempFingerprintService,
HttpSession session) {
Expand All @@ -62,9 +62,13 @@ public FragmentActionResult importMpiPatient(@RequestParam("nationalFingerprintI
Patient registeredPatient = registrationService.findByPatientIdentifier(
enrollmentResult.getLocalBiometricSubject().getSubjectId(),
PropertiesUtil.getLocalFpType().getUuid());
if (registrationService.importCcd(registeredPatient) == null) {
LOGGER.error("Ccd import failure");
}
result = new SuccessResult(registeredPatient.getUuid());
} catch (Exception ex) {
String message = "Error during importing patient by national fingerprint id. Details: " + ex.getMessage();
String message = "Error during importing patient with ccd by national fingerprint id. Details: " + ex
.getMessage();
LOGGER.error(message, ex);
result = new FailureResult(message);
}
Expand Down
6 changes: 3 additions & 3 deletions omod/src/main/webapp/fragments/search/m2SysSearch.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@
});
});
function importMpiPatient(patient) {
function importMpiPatientWithCcd(patient) {
emr.getFragmentActionWithCallback(
"registrationapp", "search/m2SysSearch", "importMpiPatient",
"registrationapp", "search/m2SysSearch", "importMpiPatientWithCcd",
{ nationalFingerprintId: patient.nationalFingerprintPatientIdentifier.identifier },
function (successResponse) {
redirectToPatient(successResponse.message);
Expand All @@ -65,7 +65,7 @@
actions: {
confirm: function () {
emrDialog.close();
importMpiPatient(patient);
importMpiPatientWithCcd(patient);
},
cancel: function () {
}
Expand Down

0 comments on commit ed07d8c

Please sign in to comment.