/*
 * Copyright ©2023 CJB-CNIT Team. All rights reserved
 */
package com.openhis.web.reportmanage.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.openhis.web.reportmanage.appservice.InpatientMedicalRecordHomePageCollectionAppService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import com.core.common.core.domain.R;
import com.openhis.web.reportmanage.appservice.ITransferReportAppService;
import com.openhis.web.reportmanage.dto.TransferReportSearchParam;

import lombok.extern.slf4j.Slf4j;

import java.util.List;

/**
 * 住院病案首页采集 controller
 *
 * @author yuxj
 * @date 2025-08-25
 */
@RestController
@RequestMapping("/medicalRecordHomePage-manage/collection")
@Slf4j
public class InpatientMedicalRecordHomePageCollectionController {

    @Autowired
    private InpatientMedicalRecordHomePageCollectionAppService inpatientMedicalRecordHomePageCollectionAppService;

    /**
     * 住院病案csv做成
     *
     * @param encounterIdList 就诊idList
     * @return 执行结果
     */
    @GetMapping(value = "/make-csvFile")
    public R<?> makeCsvFile(@RequestParam List<Long> encounterIdList, HttpServletResponse response) {
        return inpatientMedicalRecordHomePageCollectionAppService.makeCsvFile(encounterIdList, response);
    }
}
