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=1740580001377#/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_invoice&method=post
 *医疗发票识别
 *
 */
@NoArgsConstructor
@Data
public class BMedicalInvoiceResp  extends BBaseResp {

    @JsonProperty("log_id")
    private Long logId;
    @JsonProperty("words_result_num")
    private Integer wordsResultNum;
    @JsonProperty("Province")
    private String province;
    @JsonProperty("InvoiceType")
    private String invoiceType;
    @JsonProperty("words_result")
    private WordsResultDTO wordsResult;

    @NoArgsConstructor
    @Data
    public static class WordsResultDTO {
        @JsonProperty("AmountInWords")
        private AmountInWordsDTO amountInWords;
        @JsonProperty("Sex")
        private SexDTO sex;
        @JsonProperty("InsuranceType")
        private InsuranceTypeDTO insuranceType;
        @JsonProperty("Name")
        private NameDTO name;
        @JsonProperty("SocialSecurityNum")
        private SocialSecurityNumDTO socialSecurityNum;
        @JsonProperty("DischargeDate")
        private DischargeDateDTO dischargeDate;
        @JsonProperty("HospitalNum")
        private HospitalNumDTO hospitalNum;
        @JsonProperty("HospitalName")
        private HospitalNameDTO hospitalName;
        @JsonProperty("CostCategories")
        private List<List<CostCategoriesDTO>> costCategories;
        @JsonProperty("RegionSupplement")
        private List<RegionSupplementDTO> regionSupplement;
        @JsonProperty("ClinicNum")
        private ClinicNumDTO clinicNum;
        @JsonProperty("AmountInFiguers")
        private AmountInFiguersDTO amountInFiguers;
        @JsonProperty("AdmissionDate")
        private AdmissionDateDTO admissionDate;
        @JsonProperty("HospitalType")
        private HospitalTypeDTO hospitalType;
        @JsonProperty("RefundAmount")
        private RefundAmountDTO refundAmount;
        @JsonProperty("Date")
        private DateDTO date;
        @JsonProperty("ChargingUnit")
        private ChargingUnitDTO chargingUnit;
        @JsonProperty("CostDetail")
        private List<List<CostDetailDTO>> costDetail;
        @JsonProperty("PaymentAmount")
        private PaymentAmountDTO paymentAmount;
        @JsonProperty("PrepayAmount")
        private PrepayAmountDTO prepayAmount;
        @JsonProperty("PersonalPayment")
        private PersonalPaymentDTO personalPayment;
        @JsonProperty("HospitalDay")
        private HospitalDayDTO hospitalDay;
        @JsonProperty("BusinessNum")
        private BusinessNumDTO businessNum;
        @JsonProperty("InsurancePayment")
        private InsurancePaymentDTO insurancePayment;
        @JsonProperty("Payee")
        private PayeeDTO payee;
        @JsonProperty("RecordNum")
        private RecordNumDTO recordNum;
        @JsonProperty("InvoiceNum")
        private InvoiceNumDTO invoiceNum;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        @NoArgsConstructor
        @Data
        public static class CostCategoriesDTO {
            @JsonProperty("name")
            private String name;
            @JsonProperty("word")
            private String word;
            @JsonProperty("medi_info")
            private String mediInfo;            //医保目录查询结果，**当 medi_query 参数存在时，仅在「收费项目」的数组里返回，**以下参数同此说明
            @JsonProperty("medi_check")
            private String mediCheck;           //查询是否成功，“1”表示成功，“0”表示不成功
            @JsonProperty("medi_name")
            private String mediName;                //药品名
            @JsonProperty("medi_type")
            private String mediType;                //医保类别
            @JsonProperty("medi_region")
            private String mediRegion;                  //医保目录的城市
            @JsonProperty("medi_code")
            private String mediCode;                    //	药品编码
            @JsonProperty("medi_register")
            private String mediRegister;            //	药品注册号





        }

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

        @NoArgsConstructor
        @Data
        public static class CostDetailDTO {
            @JsonProperty("name")
            private String name;
            @JsonProperty("word")
            private String word;
            @JsonProperty("medi_info")
            private String mediInfo;            //医保目录查询结果，**当 medi_query 参数存在时，仅在「收费项目」的数组里返回，**以下参数同此说明
            @JsonProperty("medi_check")
            private String mediCheck;           //查询是否成功，“1”表示成功，“0”表示不成功
            @JsonProperty("medi_name")
            private String mediName;                //药品名
            @JsonProperty("medi_type")
            private String mediType;                //医保类别
            @JsonProperty("medi_region")
            private String mediRegion;                  //医保目录的城市
            @JsonProperty("medi_code")
            private String mediCode;                    //	药品编码
            @JsonProperty("medi_register")
            private String mediRegister;            //	药品注册号

        }
    }
}
