package com.fs.lotus.mapper;

import com.fs.his.domain.FsInquiryOrder;
import com.fs.his.domain.FsPatient;
import com.fs.his.domain.FsStoreOrder;
import com.fs.his.domain.FsUser;
import com.fs.lotus.domain.LotusClaimRecord;
import com.fs.lotus.domain.LotusEntinementActivation;
import com.fs.lotus.domain.LotusPaymentConfig;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface LotusHealthMapper {
    /**
     * 根据诊断名称查询icd (精准)
     * @param diagnosisName
     * @return
     */
    String selectIcdBydiagnosisName(String diagnosisName);

    /**
     * 根据诊断名称查询icd (模糊)
     * @param diagnosisName
     * @return
     */
    String searchByDiagnosisName(String diagnosisName);

    FsPatient selectUserByIdCard(@Param("idCard") String idCard, @Param("activateBizCode") String activateBizCode);

    int updatePatient(FsPatient fsPatient);

    int updateFsUser(FsUser fsUser);

    List<FsPatient> getPatientList(long userId);

    List<FsInquiryOrder> getInquiryOrder(long userId);

    LotusPaymentConfig selectPayConfig();

    LotusPaymentConfig selectPayConfigByMchId(@Param("mchId") String mchId);

    int insertClaimRecord(LotusClaimRecord record);

    String selectOpenid(Long userId);

    Map<String, Object> selectInfo(Long orderId);

    Map<String, Object> selectReport(String orderId);

    Map<String, Object> selectInquiry(String orderId);

    Map<String, Object> selectPrescribe(String prescribeId);

    Map<String, Object> selectIcd(String inquiryResult);

    List<Map<String, Object>> selectBillLog(Long orderId);

    String selectIcdByName(String diagnose);

    /**
     * 查询lotus聊天记录
     */
    List<Map<String, Object>> selectLotusMsgList(@Param("orderId") Long orderId);

    /**
     * 查询医生姓名
     */
    String selectDoctorNameById(@Param("doctorId") String doctorId);

    /**
     * 查询用户昵称
     */
    String selectUserNickNameById(@Param("userId") String userId);

    LotusEntinementActivation selectByUserId(String userId);

    List<FsInquiryOrder> selectInquiryList();

    List<FsStoreOrder> selectStoreOrderList(List<FsInquiryOrder> inquiryOrders);

    String getPrescribe(Long prescribeId);

    String getBill(Long orderId);
}
