$query="select a.item_id, b.stock_qty,b.expiry_date, a.unit_id from tbl_items a left join item_stock b on a.item_id = b.item_id where a.item_id = '".$value."' and a.is_group_item = 'N' and b.ohc_type_id = '".$_SESSION['current_ohcttype']."' and stock_qty > 0 and item_batch_no!='' ";
error_log("query for available medicine : ".$query);
$sql_treatment_qty="select * from treatment where appointment_id='".$appointment_id."' and is_display!='N' and item_id='".$item_id."' and item_batch_no='".$item_batch."' ";