Skip to content

Commit

Permalink
Eausadha API logic modified
Browse files Browse the repository at this point in the history
  • Loading branch information
IN40068837 authored and IN40068837 committed Dec 12, 2023
1 parent bb29c62 commit 656ee2d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.iemr.common.repository.eausadha;

import java.util.List;

import org.springframework.data.repository.CrudRepository;
import org.springframework.data.rest.core.annotation.RestResource;
import org.springframework.stereotype.Repository;
Expand All @@ -10,6 +12,6 @@
@RestResource(exported = false)
public interface ItemMasterRepo extends CrudRepository<ItemMaster, Integer> {

ItemMaster findByItemCode(String drugId);
List<ItemMaster> findByItemCode(String drugId);

}
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ public String createEAusadha(EAusadhaDTO eAusadhaDTO, String Authorization) thro
batchNumber = obj.getString("Batch_number");
drugName = obj.getString("Drug_name");

ItemMaster itemCode = itemMasterRepo.findByItemCode(drugId);
List<ItemMaster> itemCodeList = itemMasterRepo.findByItemCode(drugId);
ItemMaster itemCode = itemCodeList.get(0);
Integer facilityId = eAusadhaDTO.getFacilityId();
if (itemCode != null && null != itemCode.getItemID()) {
Integer itemId = itemCode.getItemID();
Expand Down

0 comments on commit 656ee2d

Please sign in to comment.