From cff31ac67140188758b51884e90953e339aa3d6b Mon Sep 17 00:00:00 2001 From: Soorya Kumaran C <90232857+SooryaKumaranC-tw@users.noreply.github.com> Date: Mon, 15 Apr 2024 12:47:12 +0530 Subject: [PATCH] Refactor the method names --- .../ipd/api/events/handler/impl/RolloverTaskEventHandler.java | 4 ++-- .../api/events/handler/impl/ShiftStartTaskEventHandler.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/src/main/java/org/openmrs/module/ipd/api/events/handler/impl/RolloverTaskEventHandler.java b/api/src/main/java/org/openmrs/module/ipd/api/events/handler/impl/RolloverTaskEventHandler.java index 59e59e3..9dc34a3 100644 --- a/api/src/main/java/org/openmrs/module/ipd/api/events/handler/impl/RolloverTaskEventHandler.java +++ b/api/src/main/java/org/openmrs/module/ipd/api/events/handler/impl/RolloverTaskEventHandler.java @@ -40,7 +40,7 @@ public void handleEvent(IPDEvent event) { List taskNames = eventConfig.getTasks().stream() .map(TaskDetail::getName) .collect(Collectors.toList()); - List rolloverTasks = taskService.getTasksByNameAndStatus(taskNames, FhirTask.TaskStatus.REQUESTED); + List rolloverTasks = taskService.searchTasks(taskNames, FhirTask.TaskStatus.REQUESTED); List fhirTaskRequestedPeriods = new ArrayList(); for (Task task : rolloverTasks) { if (task.getFhirTaskRequestedPeriod() != null) { @@ -49,6 +49,6 @@ public void handleEvent(IPDEvent event) { fhirTaskRequestedPeriods.add(fhirTaskRequestedPeriod); } } - taskRequestedPeriodDao.bulkUpdate(fhirTaskRequestedPeriods); + taskRequestedPeriodDao.update(fhirTaskRequestedPeriods); } } \ No newline at end of file diff --git a/api/src/main/java/org/openmrs/module/ipd/api/events/handler/impl/ShiftStartTaskEventHandler.java b/api/src/main/java/org/openmrs/module/ipd/api/events/handler/impl/ShiftStartTaskEventHandler.java index 12d1960..e97d620 100644 --- a/api/src/main/java/org/openmrs/module/ipd/api/events/handler/impl/ShiftStartTaskEventHandler.java +++ b/api/src/main/java/org/openmrs/module/ipd/api/events/handler/impl/ShiftStartTaskEventHandler.java @@ -45,7 +45,7 @@ public void handleEvent(IPDEvent event) { } } if(tasks.size() > 0){ - taskService.bulkSaveTasks(tasks); + taskService.saveTask(tasks); } }