package com.openhis.administration.service;

import java.util.Date;

import com.baomidou.mybatisplus.extension.service.IService;
import com.openhis.administration.domain.EncounterParticipant;
import com.openhis.common.enums.ParticipantType;

import java.util.List;

/**
 * 就诊参与者管理Service接口
 *
 * @author system
 * @date 2025-02-20
 */
public interface IEncounterParticipantService extends IService<EncounterParticipant> {

    /**
     * 保存就诊参与者
     * 
     * @param encounterParticipant 就诊参与者信息
     */
    void saveEncounterParticipant(EncounterParticipant encounterParticipant);

    /**
     * 创建住院参与者
     *
     * @param encounterId 住院id
     * @param startTime 入科时间
     * @param practitionerId 参与者id
     * @param typeCode 参与者类型
     */
    void creatEncounterParticipants(Long encounterId, Date startTime, Long practitionerId, String typeCode);

    /**
     * 更新医疗参与者状态
     *
     * @param encounterId 住院id
     * @return 更新结果
     */
    Integer updateEncounterParticipantsStatus(Long encounterId);

    /**
     * 根据就诊id查询本次就诊的参与者
     * @param encounterId 就诊id
     * @return 就诊参与者集合
     */
    List<EncounterParticipant> getEncounterParticipantList(Long encounterId);

    /**
     *
     * @param encounterId
     * @return
     */
    List<EncounterParticipant> getEncounterParticipantListByTypeCode(Long encounterId, ParticipantType participantType);

}