package com.openhis.web.externalintegration.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.core.common.core.domain.R;
import com.openhis.web.externalintegration.appservice.IFoodborneAcquisitionAppService;

/**
 * 食源性疾病病例数据智能采集Controller
 *
 * @author Thanking
 * @date 2025-10-10
 */
@RestController
@RequestMapping("/external-integration/foodborne-acquisition")
public class FoodborneAcquisitionAppController {

    @Autowired
    private IFoodborneAcquisitionAppService foodborneAcquisitionAppService;

    /**
     * 是否是食源性诊断
     *
     * @param encounterId 就诊ID
     * @return 是否
     */
    @GetMapping("/is-food-diseases-new")
    R<?> isFoodDiseasesNew(@RequestParam("encounterId") Long encounterId) {
        return foodborneAcquisitionAppService.isFoodDiseasesNew(encounterId);
    }
}
