package com.heyu.api.baidu.response.medical;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.heyu.api.baidu.response.BBaseResp;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * https://console.bce.baidu.com/support/?_=1740575657628&timestamp=1740580669633#/api?product=AI&project=%E6%96%87%E5%AD%97%E8%AF%86%E5%88%AB&parent=%E5%8C%BB%E7%96%97%E7%A5%A8%E6%8D%AEOCR&api=rest%2F2.0%2Focr%2Fv1%2Fmedical_detail&method=post
 *医疗费用明细识别
 *
 */
@NoArgsConstructor
@Data
public class BMedicalDetailResp  extends BBaseResp {


    @JsonProperty("log_id")
    private Long logId;
    @JsonProperty("words_result_num")
    private Integer wordsResultNum;
    @JsonProperty("words_result")
    private WordsResultDTO wordsResult;

    @NoArgsConstructor
    @Data
    public static class WordsResultDTO {
        @JsonProperty("PatientID")
        private PatientIDDTO patientID;
        @JsonProperty("TotalAmount")
        private TotalAmountDTO totalAmount;
        @JsonProperty("Date")
        private DateDTO date;
        @JsonProperty("Name")
        private NameDTO name;
        @JsonProperty("CostDetail")
        private List<List<CostDetailDTO>> costDetail;

        @NoArgsConstructor
        @Data
        public static class PatientIDDTO {
            @JsonProperty("word")
            private String word;
        }

        @NoArgsConstructor
        @Data
        public static class TotalAmountDTO {
            @JsonProperty("word")
            private String word;
        }

        @NoArgsConstructor
        @Data
        public static class DateDTO {
            @JsonProperty("word")
            private String word;
        }

        @NoArgsConstructor
        @Data
        public static class NameDTO {
            @JsonProperty("word")
            private String word;
        }

        @NoArgsConstructor
        @Data
        public static class CostDetailDTO {
            @JsonProperty("word_name")
            private String wordName;
            @JsonProperty("word")
            private String word;
        }
    }
}
