Skip to content

Commit

Permalink
BAH-3331 | Remove. Unused Controller, Bed Management And OpenERPClien…
Browse files Browse the repository at this point in the history
…t Methods

* [Parvathy, Rahul] | Refactor. Remove Unused Controller And Bed Management

Co-authored-by: Parvathy Babu <[email protected]>

* [Parvathy, Rahul] | Refactor. Remove Unused OpenERPClient Methods

Co-authored-by: Parvathy Babu <[email protected]>

---------

Co-authored-by: Parvathy Babu <[email protected]>
  • Loading branch information
rahu1ramesh and parvathy00 authored Nov 30, 2023
1 parent b6bb47d commit 20014d5
Show file tree
Hide file tree
Showing 20 changed files with 8 additions and 812 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import org.bahmni.feed.openerp.domain.encounter.OpenERPOrder;
import org.bahmni.feed.openerp.domain.encounter.OpenERPOrders;
import org.bahmni.openerp.web.request.builder.Parameter;
import org.bahmni.openerp.web.service.ProductService;

import java.io.IOException;
import java.util.ArrayList;
Expand All @@ -23,7 +22,7 @@ public class OpenElisLabOrder {
private String patientIdentifier;
private Set<OpenElisTestDetail> testDetails = new HashSet<>();

public List<Parameter> getParameters(String eventId, ProductService productService, String feedURIForLastReadEntry, String feedURI) throws IOException {
public List<Parameter> getParameters(String eventId, String feedURIForLastReadEntry, String feedURI) throws IOException {
List<Parameter> parameters = new ArrayList<>();
String patientId = getPatientIdentifier();

Expand All @@ -34,11 +33,11 @@ public List<Parameter> getParameters(String eventId, ProductService productServi
parameters.add(createParameter("feed_uri_for_last_read_entry", feedURIForLastReadEntry, "string"));

OpenERPOrders orders = new OpenERPOrders(getAccessionUuid());
mapOrders(parameters, orders, productService);
mapOrders(parameters, orders);
return parameters;
}

private void mapOrders(List<Parameter> parameters, OpenERPOrders orders, ProductService productService) throws IOException {
private void mapOrders(List<Parameter> parameters, OpenERPOrders orders) throws IOException {
if (hasOrders()) {
for (OpenElisTestDetail testDetail : testDetails) {
if(testDetail.getPanelUuid() == null || !orderAlreadyPresent(orders, testDetail)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import org.bahmni.openerp.web.client.strategy.OpenERPContext;
import org.bahmni.openerp.web.request.OpenERPRequest;
import org.bahmni.openerp.web.request.builder.Parameter;
import org.bahmni.openerp.web.service.ProductService;
import org.ict4h.atomfeed.client.domain.Event;
import org.ict4h.atomfeed.client.service.EventWorker;

Expand All @@ -20,7 +19,6 @@ public class OpenElisSaleOrderEventWorker implements EventWorker {
private final OpenERPContext openERPContext;
private final OpenElisWebClient webClient;
private final String urlPrefix;
private ProductService productService;

private static final Logger logger = LogManager.getLogger(OpenElisSaleOrderEventWorker.class);

Expand Down Expand Up @@ -53,7 +51,7 @@ private OpenERPRequest mapRequest(Event event) throws IOException {
String labOrders = webClient.get(URI.create(urlPrefix + event.getContent()));
OpenElisLabOrder openElisLabOrder = ObjectMapperRepository.objectMapper.readValue(labOrders, OpenElisLabOrder.class);

OpenERPRequest openERPRequest = new OpenERPRequest("atom.event.worker", "process_event", openElisLabOrder.getParameters(event.getId(),productService, event.getFeedUri(), feedUrl));
OpenERPRequest openERPRequest = new OpenERPRequest("atom.event.worker", "process_event", openElisLabOrder.getParameters(event.getId(), event.getFeedUri(), feedUrl));

if (event.getFeedUri() == null)
openERPRequest.addParameter(createParameter("is_failed_event", "1", "boolean"));
Expand Down
Loading

0 comments on commit 20014d5

Please sign in to comment.