import { Benefit } from "./corporates";
import { Member } from "./member";

export type ClaimRequest = {
    id: number;
    code: string;
    name: string;
    submission_date: string;
    payment_type: string;
    service_code: string;
    claim_method: string;
    service_type: string;
    code_provider: string;
    file_condition: Files;
    member: Member;
    claim: {
      organization: Organizations
    }
  };

export type Claims = {
    id: number;
    code: string;
    plan: Plan;
    payor_id: string;
    corporate_id: string;
    policy_number: string;
    benefit_desc: string;
    member: Member;
    benefit: Benefit | boolean;
    status: string;
    claim_request: ClaimRequest;
};

export type ClaimsEdit = {
  id: number;
  plan_id: string;
  payor_id: string;
  corporate_id: string;
  policy_number: string;
  member_id: string;
  benefit_code: string;
  benefit_desc: string;
  amount_incurred: number;
  amount_approved: number;
  amount_not_approved: number;
  excess_paid: number;
}

export type Files = {
    name: string;
    url: string;
    path: string;
}

export type Plan = {
  code: string;
}

export type ClaimHistoryCare = {
  id: number;
  claim_id: number;
  service_code: string;
  admission_date: string;
  discharge_date: string;
  main_diagnosis_id: number;
  main_diagnosis_name: string;
  medical_record_number: string;
  organization_id: number;
  practitioner_id: number;
  organization_name: string;
  practitioner_name: string;
  secondary_diagnosis_id: number[];
  sign: string;
  symptoms: string;
  name: any;
}

export type Organizations = {
  id: number;
  code: string;
  name: string;
  address: string;
  type: string;
  lat: string;
  lng: string;
  phone: string;
  timezone: string;
  active: boolean | number;
  province_id: number;
  city_id: number;
  district_id: number;
  village_id: number;
  postal_code: string;
  description: string;
  technology: string;
  support_services: string;
  merchant_code: string;
  merchant_key: string;
  image_url: string;
  region_groups: string;
};

export type Import = {
  result_file: {
    url: string,
    name: string,
    total_success_row: number,
    total_failed_row: number
  }
}
