package com.openhis.administration.mapper;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.openhis.administration.domain.EncounterDiagnosis;

/**
 * 就诊诊断管理Mapper接口
 *
 * @author system
 * @date 2025-02-20
 */
@Repository
public interface EncounterDiagnosisMapper extends BaseMapper<EncounterDiagnosis> {

    /**
     * 删除就诊信息
     *
     * @param encounterId 就诊id
     */
    void deleteByEncounterId(@Param("encounterId") Long encounterId);

    /**
     * 删除中医就诊信息
     *
     * @param encounterId 就诊id
     */
    void deleteTcmByEncounterId(@Param("encounterId") Long encounterId);

    /**
     * 根据就诊id定义id等查询就诊诊断
     *
     * @param encounterId 就诊id
     * @param conditionDefId 定义id
     * @param tenantId 租户
     * @return 查询结果
     */
    EncounterDiagnosis getEncounterDiagnosisByEncounterConDefId(@Param("encounterId") Long encounterId,
        @Param("conditionDefId") Long conditionDefId, @Param("tenantId") Integer tenantId);
}