import request from "@/utils/request";

class PatientAPI {
  /**
   * 获取患者信息
   *
   * @return 患者基本信息
   */
  static getInfo() {
    return request<any, PatientBasicInfo>({
      url: "/api/v1/patients/basic",
      method: "get",
    });
  }
  static getInfoById(id: number) {
    return request<any, PatientBasicInfoVO>({
      url: `/api/v1/patients/basic/${id}`,
      method: "get",
    });
  }
}
export default PatientAPI;

/** 患者基本信息 */
export interface PatientBasicInfo {
  patients: Array<PatientBasicInfoVO>;
}

export interface PatientBasicInfoVO {
  /** 患者ID */
  patientId: number;

  /** 患者姓名 */
  patientName: string;

  /** 患者性别 */
  patientSex: string;

  /** 患者年龄 */
  patientAge: number;

  /** 患者身份证号 */
  patientIdCard: string;

  /** 患者手机号 */
  patientPhone: string;

  /** 患者地址 */
  patientAddress: string;
}
