package com.ruoyi.web.work.hl7.service;

import ca.uhn.hl7v2.HL7Exception;
import ca.uhn.hl7v2.model.v24.segment.DG1;
import ca.uhn.hl7v2.model.v24.segment.PV1;
import ca.uhn.hl7v2.model.v24.segment.PV2;
import com.ruoyi.web.work.domain.Visit;

import java.text.ParseException;
import java.util.List;

public interface HL7VisitService {

    //根据患者id修改当前患者的就诊记录信息
    void updateVisitInfoByPatId(List<DG1> dg1All,Long patId,PV1 pv1,PV2 pv2) throws ParseException, HL7Exception;

    //保存患者多次就诊信息tb_visit
    void saveVisitInfo(List<DG1> dg1All,PV1 pv1,PV2 pv2,Long patId) throws ParseException, HL7Exception, Exception;

    //更新患者就诊记录的在院状态、出院时间、出院方式
    Long updateVisitHospitalStatus(Long dbPid, PV1 pv1) throws HL7Exception;

    //根据患者id和送检科室查询是否本次就诊的报告
    Visit findVisitByPatIdAndDeptName(Long patId, String inspectionDeptName);
}
