# Interfaces

## AccountType

```ts
type AccountType =
  | 'patient'
  | 'provider'
  | 'company'
  | 'marketer'
  | 'staffing_company'
  | 'guest'
```

## Appointment

```ts
interface Appointment {
  id: string
  patient: {
    user_id: string
    tv_uid: string
    tv_group_id: string
    languages: {
      'en-US': boolean
    }
    inviter_code: string
    document_symptoms_and_conditions: string
    document_family_symptoms_and_conditions: string
    document_procedures_and_treatments: string
    document_immunization_history: string
    document_social_history: string
    document_allergies: string
    document_medications: string
    document_sexual_history: string
    document_obstetrical_history: string
    document_health_kit: string
    document_samsung_health: string
    attributes: {
      first_name: string
      last_name: string
      address: string
      primary_phone_number: string
      birthday: string
      email: string
    }
    tv_blobs: Array<{
      tv_blob_id: string
      patient: string
      filename: string
      created: string
    }>
  }
  provider: {
    user_id: string
    email: string
    cell_phone_number: string
    primary_phone_number: string
    first_name: string
    middle_name: string
    last_name: string
    gender: string
    profile_photo: string
    education_school: string
    education_degree: string
    NPI: string
    DEA: string
    brief_introduction: string
    languages: {
      'en-US': boolean
    }
    specialties: string[]
    rating: integer
  }
  status: AppointmentStatus
  is_walk_in: boolean
  purpose: string
  start_time: string
  end_time: string
  document_present_history_illness: string
  document_provider_note: string
  document_prescription: string
  document_absence: string
  document_legal_absence: string
  created_at: string
  updated_at: string
  specialty: string
  creator: string
  customer: string
  time_slot: string
  video_session: integer
}
```

## AppointmentReview

```ts
interface AppointmentReview {
  appointment: string
  review: string
  comment: string
}
```

## AppointmentsFilterFunc

```ts
type AppointmentsFilterFunc = (
  appointment: Appointment,
  id: string,
  allAppointments: { [id: string]: Appointment },
) => boolean
```

## AppointmentStatus

```ts
type AppointmentStatus = 0 | 1 | 2 | 3
```

## AuthOfflineProvider

```ts
interface AuthOfflineProviderResult {
  user_id: string
  user_type: 'Patient' | 'Provider'
  jwt_token: string
}
```

## CategoryObject

```ts
interface CategoryObject {
  code: string
  translations: Translation
  sub_categories: Array<{}>
  specialties: Specialty[]
}
```

## CategoryObjects

```ts
type CategoryObjects = CategoryObject[]
```

## ChasePaymentProfileParams

```ts
interface ChasePaymentProfileParams {
  card_number: string
  expiration_date: string
  cvv_code: string | number
  billing_first_name: string
  billing_last_name: string
  billing_address: string
  billing_city: string
  billing_state: string
  billing_zip_code: string | number
}
```

## ConstructQueryAppointmentsUrlArgs

```ts
interface ConstructQueryAppointmentsUrlArgs {
  patients?: string[]
  providers?: string[]
  status?: number[]
  start_time?: string
  end_time?: string
  filter?: AppointmentsFilterFunc
}
```

## Coupon

```ts
interface Coupon {
  code: string
  amount: number
  expired_at: string
}
```

## CreateAppointmentParams

```ts
interface CreateAppointmentParams {
  patient: string
  provider: string
  specialty: string
  charge_method: string
  time_slot: number | string
  purpose?: string
  payment_profile_id?: string
  coupons?: string[]
  card_number?: string | number
  expiration_date?: string
  cvv_code?: string | number
  billing_first_name?: string
  billing_last_name?: string
  billing_address?: string
  billing_city?: string
  billing_state?: string
  billing_zip_code?: string | number
}
```

## CreateAppointmentReturnValue

```ts
interface CreateAppointmentReturnValue {
  pagination: Pagination
  appointments: Appointment[]
  ids: string[]
}
```

## CreateAppointmentReviewParams

```ts
interface CreateAppointmentReviewParams {
  appointment: string
  rating: string
  comment: string
}
```

## CreatePatientOtherDataArgs

```ts
interface CreatePatientOtherDataArgs {
  inviter_code?: string
  languages?: Array<{
    code: string
    is_primary: boolean
  }>
}
```

## CreateReferringPatient

```ts
interface CreateReferringPatientReturnValue {
  user_exists: boolean
  email_sent: boolean
  referral_id: boolean
}
```

## DocumentFamilySymptomsConditions

```ts
interface DocumentFamilySymptomsConditions {
  STD_bool: boolean
  STD_detail: integer
  abnormal_chest_x_ray_bool: boolean
  abnormal_chest_x_ray_detail: integer
  adopted_bool: boolean
  anesthesia_complications_bool: boolean
  anesthesia_complications_detail: integer
  cancer_bool: boolean
  cancer_detail: integer
  diabetes_bool: boolean
  diabetes_detail: integer
  drugs_bool: boolean
  drugs_detail: integer
  genetic_disorder_bool: boolean
  genetic_disorder_detail: integer
  heart_disease_bool: boolean
  heart_disease_detail: integer
  high_blood_pressure_bool: boolean
  high_blood_pressure_detail: integer
  high_cholesterol_bool: boolean
  high_cholesterol_detail: integer
  liver_disease_bool: boolean
  liver_disease_detail: integer
  mental_illness_bool: boolean
  mental_illness_detail: integer
  other_blood_problem_bool: boolean
  other_blood_problem_detail: integer
  other_bool: boolean
  other_detail: integer
  physically_disabled_bool: boolean
  physically_disabled_detail: integer
  stroke_TIA_bool: boolean
  stroke_TIA_detail: integer
}
```

## DocumentProceduresAndTreatments

```ts
interface DocumentProceduresAndTreatments {
  any_surgery_or_surgeries_in_the_past_bool: boolean
  any_surgery_or_surgeries_in_the_past_detail: string
  blood_transfusion_bool: boolean
  blood_transfusion_detail: string
  cosmetic_plastic_surgery_bool: boolean
  cosmetic_plastic_surgery_detail: string
  hospitalized_bool: boolean
  hospitalized_detail: string
  other_bool: boolean
  other_detail: string
  serious_injuries_bool: boolean
  serious_injuries_detail: string
  tumor_removed_bool: boolean
  tumor_removed_detail: string
}
```

## DocumentHealthKit

```ts
interface DocumentHealthKit {
  Characteristics: {
    bodyFatPercentage: string
    bodyMass: string
    height: string
    leanBodyMass: string
    waistCircumference: string
  }
  Fitness: {
    activeEnergyBurned: string
    basalEnergyBurned: string
    distanceCycling: string
    distanceSwimming: string
    distanceWalkingRunning: string
    distanceWheelchair: string
    flightsClimbed: string
    pushCount: string
    stepCount: string
    swimmingStrokeCount: string
  }
  'Health Categories': {
    cervicalMucusQuality: string
    intermenstrualBleeding: string
    menstrualFlow: string
    ovulationTestResult: string
  }
  'Health Results': {
    bloodAlcoholContent: string
    bloodGlucose: string
    electrodermalActivity: string
    forcedExpiratoryVolume1: string
    forcedVitalCapacity: string
    inhalerUsage: string
    insulinDelivery: string
    numberOfTimesFallen: string
    oxygenSaturation: string
    peakExpiratoryFlowRate: string
    peripheralPerfusionIndex: string
  }
  Nutrition: {
    dietaryBiotin: string
    dietaryCaffeine: string
    dietaryCalcium: string
    dietaryCarbohydrates: string
    dietaryChloride: string
    dietaryCholesterol: string
    dietaryChromium: string
    dietaryCopper: string
    dietaryEnergyConsumed: string
    dietaryFatMonounsaturated: string
    dietaryFatPolyunsaturated: string
    dietaryFatSaturated: string
    dietaryFatTotal: string
    dietaryFiber: string
    dietaryFolate: string
    dietaryIodine: string
    dietaryIron: string
    dietaryMagnesium: string
    dietaryManganese: string
    dietaryMolybdenum: string
    dietaryNiacin: string
    dietaryPantothenicAcid: string
    dietaryPhosphorus: string
    dietaryPotassium: string
    dietaryProtein: string
    dietaryRiboflavin: string
    dietarySelenium: string
    dietarySodium: string
    dietarySugar: string
    dietaryThiamin: string
    dietaryVitaminA: string
    dietaryVitaminB12: string
    dietaryVitaminB6: string
    dietaryVitaminC: string
    dietaryVitaminD: string
    dietaryVitaminE: string
    dietaryVitaminK: string
    dietaryWater: string
    dietaryZinc: string
    uvExposure: string
  }
  Vitals: {
    basalBodyTemperature: string
    bloodPressureDiastolic: string
    bloodPressureSystolic: string
    bodyTemperature: string
    heartRate: string
    heartRateVariabilitySDNN: string
    respiratoryRate: string
    restingHeartRate: string
    walkingHeartRateAverage: string
  }
}
```

## DocumentImmunizationHistory

```ts
interface DocumentImmunizationHistory {
  hepatitis_A_bool: boolean
  hepatitis_A_detail: string
  hepatitis_B_bool: boolean
  hepatitis_B_detail: string
  influenza_bool: boolean
  influenza_detail: string
  measles_bool: boolean
  measles_detail: string
  meningeal_bool: boolean
  meningeal_detail: string
  mumps_bool: boolean
  mumps_detail: string
  pertussis_bool: boolean
  pertussis_detail: string
  pneumococcal_bool: boolean
  pneumococcal_detail: string
  polio_bool: boolean
  polio_detail: string
  rabies_bool: boolean
  rabies_detail: string
  rubella_bool: boolean
  rubella_detail: string
  tetanus_diphtheria_bool: boolean
  tetanus_diphtheria_detail: string
  varicella_bool: boolean
  varicella_detail: string
}
```

## DocumentObstetricalHistory

```ts
interface DocumentObstetricalHistory {
  had_abortion_bool: boolean
  had_abortion_details: string
  had_been_pregnant_bool: boolean
  had_been_pregnant_details: string
  had_stds_in_past_bool: boolean
  had_stds_in_past_detail: string
  has_had_mammogram_bool: boolean
  has_had_mammogram_detail: string
  how_many_days_does_period_last_detail: string
  how_often_get_period_detail: string
  is_currently_pregnant_bool: boolean
  is_currently_pregnant_detail: string
  is_on_birth_control_bool: boolean
  is_on_birth_control_details: string
  is_pap_smear_abnormal_detail: string
  is_seeing_blood_and_clots_bool: boolean
  is_seeing_blood_and_clots_detail: string
  is_your_period_irregular_bool: boolean
  is_your_period_irregular_detail: string
  number_of_living_childrens_bool: boolean
  number_of_living_childrens_details: string
}
```

## DocumentSexualHistory

```ts
interface DocumentSexualHistory {
  has_stds_bool: boolean
  has_stds_details: string
  have_you_been_treated_for_stds_bool: boolean
  have_you_been_treated_for_stds_detail: string
  how_many_sexual_partners: {
    female: integer
    male: integer
  }
  is_sexually_active_bool: boolean
  is_sexually_active_detail: string
}
```

## DocumentSocialHistory

```ts
interface DocumentSocialHistory {
  abused_bool: boolean
  abused_detail: string
  alcohol_bool: boolean
  alcohol_detail: integer
  caffeine_bool: boolean
  caffeine_detail: integer
  drug_bool: boolean
  drug_detail: integer
  marital_status: -integer
  spouse_cause_of_death: string
  spouse_name: string
  tobacco_bool: boolean
  tobacco_detail: integer
}
```

## DocumentAllergies

```ts
type DocumentAllergies = string[]
```

## DocumentMedications

```ts
type DocumentMedications = string[]
```

## FetchAppointmentReviewsReturnValue

`````ts
interface FetchAppointmentReviewsReturnValue {
  pagination: Pagination
  reviews: {
    [appointment: string]: AppointmentReview
  }
  ids: string[]
}
```

## FetchTvBlobReturnValue

````ts
interface FetchTvBlobReturnValue {
  blob: Blob
  contentType: string
  fileName: string
}
```

## FindProvidersParams

```ts
interface FindProvidersParams {
  specialty: string[]
  language: string[]
  time?: string
  state?: string
}
`````

## FindProviderResult

```ts
interface FindProviderResult {
  time_slot_id?: number
  start?: string
  end?: string
  provider?: {
    user_id?: string
    email?: string
    cell_phone_number?: string
    primary_phone_number?: string
    first_name?: string
    middle_name?: string
    last_name?: string
    gender?: string
    profile_photo?: string
    education_school?: string
    education_degree?: string
    NPI?: string
    DEA?: string
    brief_introduction?: string
    languages?: {
      'en-US'?: boolean
      'zh-CN'?: boolean
      'zh-TW'?: boolean
      'es-ES'?: boolean
    }
    specialties?: string[]
    rating?: string | number
  }
}
```

## FindProviderAvailabilitiesParams

```ts
interface FindProviderAvailabilitiesParams {
  specialty: string[]
  language: string[]
  time?: string
  state?: string
}
```

## FindProviderAvailabilityResult

```ts
interface FindProviderAvailabilityResult {
  user_id?: string
  email?: string
  cell_phone_number?: string
  primary_phone_number?: string
  first_name?: string
  middle_name?: string
  last_name?: string
  gender?: string
  profile_photo
  education_schoo?: string
  education_degree?: string
  NPI?: string
  DEA?: string
  brief_introduction?: string
  languages?: {
    'en-US'?: boolean
    'zh-CN'?: boolean
    'zh-TW'?: boolean
    'es-ES'?: boolean
  }
  specialties: string[]
  rating: string | number | null
  time_slots: Timeslot[]
}
```

## Gender

```ts
type Gender = 'MALE' | 'FEMALE' | 'PNS'
```

## GenderObject

```ts
interface GenderObject {
  code: Gender
  translations: Translation
}
```

## GenderObjects

```ts
type GenderObjects = GenderObject[]
```

## LanguageCode

```ts
type LanguageCode = 'en-US' | 'zh-CN' | 'zh-TW' | 'es-ES'
```

## LanguageObject

```ts
interface LanguageObject {
  code: string
  english: string
  translated: string
}
```

## LanguageObjects

```ts
type LanguageObjects = LanguageObject[]
```

## LanguagePrimaryBoolean

```ts
interface LanguagePrimaryBoolean {
  code: LanguageCode
  is_primary: boolean
}
```

## CreatePatientRequestData

```ts
interface CreatePatientRequestData {
  tv_uid: string
  tv_token: string
  languages?: LanguagePrimaryBoolean[]
  inviter_code?: string
}
```

## Pagination

```ts
interface Pagination {
  object_count: integer
  page_limit: integer
  page_index: integer
  num_pages: integer
}
```

## PatientBlob

```ts
interface PatientBlob {
  tv_blob_id: string
  filename: string
  patient: string
  created?: string
}
```

## PatientBlobs

```ts
type PatientBlobs = PatientBlob[]
```

## PatientDocumentized

```ts
interface PatientDocumentized {
  user_id: string
  tv_uid: string
  tv_group_id: string
  languages: {
    [string]: boolean
  }
  inviter_code: string
  document_symptoms_and_conditions: string
  document_family_symptoms_and_conditions: string
  document_procedures_and_treatments: string
  document_immunization_history: string
  document_social_history: string
  document_allergies: string
  document_medications: string
  document_sexual_history: string
  document_obstetrical_history: string
  document_health_kit: string
  document_samsung_health: string
  tv_blobs: PatientBlob[]
}
```

## PatientFullBackend

```ts
interface PatientFullBackend {
  token: string
  user: PatientDocumentized
  members: {
    [user_id: string]: PatientDocumentized
  }
}
```

## FetchPatientBlobsResult

```ts
interface FetchPatientBlobsResult {
  pagination: Pagination
  blobs: Blob
  ids: string[]
}
```

## FetchProvidersReturnValue

```ts
interface FetchProvidersReturnValue {
  pagination: Pagination
  providers: {
    [user_id: string]: Provider
  }
  ids: string[]
}
```

## LoginWithJwtTokensParams

```ts
export interface LoginWithJwtTokensParams {
  userId: string
  token: string
}
```

## PaymentProfile

```ts
interface PaymentProfile {
  payment_profile_id?: string
  card_last_digits?: string
  card_type?: string
}
```

## Provider

```ts
interface Provider {
  user_id: string
  tv_uid: string
  tv_api_key: string
  is_approved: boolean
  join_date: string
  email: string
  gender: string
  license_state: string
  license_number: string
  license_document: string
  specialties: string[]
  languages: {
    'en-US': boolean
  }
  education_degree: string
  agreed_consent: boolean
  cell_phone_number: string
  primary_phone_number: string
  fax_phone_number: string
  home_phone_number: string
  first_name: string
  middle_name: string
  last_name: string
  street_line_1: string
  street_line_2: string
  city: string
  state: string
  zip_code: string
  referral_code: string
  NPI: string
  DEA: string
  address: string
  tel: string
}
```

## Specialty

```ts
interface Specialty {
  code: string
  category: string
  type: string
  translations: Translation
}
```

## SpecialtyCode

```ts
type SpecialtyCode =
  | 'PLUMONOLOGY'
  | 'CARDIOLOGY'
  | 'PULMONOLOGY'
  | 'EAR_NOSE_THROAT'
  | 'RENAL_NEPHROLOGY'
  | 'UROLOGY'
  | 'PODIATRIST'
  | 'VASCULAR'
  | 'DERMATOLOGY'
  | 'FAMILY_MEDICINE'
  | 'INTERNAL_MEDICINE'
  | 'OBGYN'
  | 'PEDIATRICIAN'
  | 'EMERGENCY_MEDICINE'
  | 'PSYCHOLOGIST'
  | 'NATURAL_HOLISTIC'
  | 'NATURAL_HERBAL'
  | 'HOMEOPATHIC'
  | 'ALLERGY_IMMUNOLOGY'
  | 'CHIROPRACTIC'
  | 'INFECTIOUS_DISEASE'
  | 'ORTHOPEDIC_SPECIALIST'
  | 'PAIN_MANAGEMENT'
  | 'SPORTS_MEDICINE'
  | 'ACUPUNCTURE'
  | 'PSYCHIATRIST'
  | 'ENDOCRINOLOGY'
  | 'GASTROENTEROLOGY'
  | 'NEUROLOGY'
  | 'HAND_SURGERY'
  | 'NURSE'
  | 'PHYSICIAN_ASSISTANT'
```

## SpecialtyObject

```ts
interface SpecialtyObject {
  code: SpecialtyCode
  category: string
  type: string
  translations: {
    [locale: string]: string
  }
}
```

## Timeslot

```ts
interface Timeslot {
  id: number
  start_time: string
  end_time: string
}
```

## Translation

```ts
interface Translation {
  'en-US'?: string
  'zh-CN'?: string
  'zh-TW'?: string
  'es-ES'?: string
}
```

## UpdateAppointmentOptions

```ts
interface UpdateAppointmentOptions {
  purpose?: string
  document_present_history_illness?: string
  document_provider_note?: string
  document_prescription?: string
  document_absence?: string
  document_legal_absence?: string
}
```

## UpdateBackendPatientOptions

```ts
interface UpdatePatientOptions {
  languages?: LanguagePrimaryBoolean[]
  profile?: {
    document_symptoms_and_conditions?: string
    document_family_symptoms_and_conditions?: string
    document_procedures_and_treatments?: string
    document_immunization_history?: string
    document_allergies?: string
    document_medications?: string
    document_sexual_history?: string
    document_obstetrical_history?: string
    document_health_kit?: string
    document_samsung_health?: string
  }
}
```

## UpdateProviderOptions

```ts
interface UpdateProviderOptions {
  NPI?: string
  languages?: {
    [code: string]: boolean
  }
  is_primary?: boolean
  email?: string
  first_name?: string
  middle_name?: string
  last_name?: string
  street_line_1?: string
  street_line_2?: string
  city?: string
  state?: string
  zip_code?: string
  specialties?: string[]
  license_state?: string
  license_number?: string
  education_degree?: string
  education_document?: string
  gender?: string
  code?: string
  primary_phone_number?: string
  cell_phone_number?: string
  referral_code?: string
  fax_phone_number?: string
  npi_document?: string
  DEA?: string
  dea_document?: string
  brief_introduction?: string
}
```
