def policy_details
policy_details = Policy.where("policy_number LIKE ? or assured_name LIKE ? or application_number LIKE ? or proposer_name LIKE ?","%#{params[:policy_number].present?}%","%#{params[:assured_name]}%","%#{params[:application_number]}%",
"%#{params[:proposer_name]}%")
if policy_details.present?
policy_details = policy_details.select(:assured_name, :policy_number, :application_number, :id, :issuance_date, :proposer_name, :policy_name, :base_premium)
end
output = {status: '10', data: policy_details}.to_json
render json: output, status: :ok
end