query:
query AccessToken_AuthSelf {
  authResponse: authSelf {
    ...MappedAuthResponse
    __typename
  }
}

fragment MappedAuthResponse on AuthResponse {
  accessToken
  expiresAt
  overrides {
    path: selector
    props
    __typename
  }
  user {
    accountFlags
    clinic {
      ...MappedClinic
      __typename
    }
    email
    id
    name
    locale
    surname
    phone
    userClinics {
      id
      clinic {
        ...MappedClinic
        __typename
      }
      __typename
    }
    __typename
  }
  roles
  __typename
}

fragment MappedClinic on Clinic {
  city
  currentThumbnail {
    id
    fullUrl
    __typename
  }
  description
  features
  name
  id
  slug
  __typename
}


clinicSlug: mudr-buzalkova

query:
query ClinicNavigation_GetClinic($clinicSlug: String!, $locale: Locale!) {
  clinic: getClinic(clinicSlug: $clinicSlug) {
    ...ClinicNavigation_Clinic
    __typename
  }
  userECRFs: listUserECRFsByClinic(clinicSlug: $clinicSlug, locale: $locale) {
    id
    __typename
  }
}

fragment ClinicNavigation_Clinic on Clinic {
  features
  type
  ...ClinicDropdown_Clinic
  __typename
}

fragment ClinicDropdown_Clinic on Clinic {
  currentThumbnail {
    id
    fullUrl
    __typename
  }
  id
  name
  slug
  searchableSince
  type
  __typename
}


query:
query ClinicDocumentTitlePrefix_GetClinic($clinicSlug: String!) {
  clinic: getClinic(clinicSlug: $clinicSlug) {
    id
    internalId
    __typename
  }
}


query:
query ClinicAgenda_GetCalendarsForClinic($clinicSlug: String!) {
  clinic: getClinic(clinicSlug: $clinicSlug) {
    ...ClinicAgenda_Clinic
    __typename
  }
  calendarGroups: listCalendarGroups(clinicSlug: $clinicSlug) {
    ...ClinicAgenda_CalendarGroup
    __typename
  }
  calendars: getCalendarsForClinic(clinicSlug: $clinicSlug) {
    ...ClinicAgenda_Calendar
    __typename
  }
  defaultCalendar: getDefaultCalendarForClinic2(clinicSlug: $clinicSlug) {
    id
    __typename
  }
}

fragment ClinicAgenda_Clinic on Clinic {
  id
  features
  type
  country
  __typename
}

fragment ClinicAgenda_Calendar on Calendar {
  ...CalendarTabs_Calendar
  ...GroupsControl_Calendar_Calendar
  calendarSettings {
    ignoreHolidays
    __typename
  }
  name
  userId
  __typename
}

fragment ClinicAgenda_CalendarGroup on CalendarGroup {
  ...GroupsControl_Calendar_CalendarGroup
  __typename
}

fragment CalendarTabs_Calendar on Calendar {
  id
  name
  internalName
  __typename
}

fragment GroupsControl_Calendar_Calendar on Calendar {
  id
  internalName
  name
  __typename
}

fragment GroupsControl_Calendar_CalendarGroup on CalendarGroup {
  calendars {
    ...GroupsControl_Calendar_Calendar
    __typename
  }
  id
  name
  __typename
}


clinicCountry: CZ

query:
query ClinicAgenda_ListClinicReservations($calendarIds: [UUID!], $clinicSlug: String!, $locale: Locale!, $since: DateTime!, $until: DateTime!, $emptyCalendarIds: Boolean!, $skipCalendarWindows: Boolean!, $clinicCountry: Country = CZ) {
  calendarWindows: getCalendarWindows(
    clinicSlug: $clinicSlug
    calendarIds: $calendarIds
    pageInfo: {first: 10000, offset: 0}
  ) @skip(if: $skipCalendarWindows) {
    ...ClinicAgenda_CalendarSlotWindow
    __typename
  }
  holidays: getHolidays(since: $since, until: $until, countries: [$clinicCountry]) {
    ...AgendaGrid_Holiday
    __typename
  }
  recurringReservations: listClinicRecurringReservations(
    clinicSlug: $clinicSlug
    calendarIds: $calendarIds
    since: $since
    until: $until
  ) @skip(if: $emptyCalendarIds) {
    ...AgendaGrid_RecurringReservationResponse
    __typename
  }
  reservations: listClinicReservations(
    clinicSlug: $clinicSlug
    calendarIds: $calendarIds
    since: $since
    until: $until
  ) @skip(if: $emptyCalendarIds) {
    ...AgendaGrid_Reservation
    __typename
  }
  vacations: findVacations(
    clinicSlug: $clinicSlug
    calendarIds: $calendarIds
    since: $since
    until: $until
  ) @skip(if: $emptyCalendarIds) {
    ...AgendaGrid_Vacation
    __typename
  }
}

fragment ClinicAgenda_CalendarSlotWindow on CalendarSlotWindow {
  ...AgendaGrid_CalendarSlotWindow
  ...CalendarSlotWindowToResolveReservationLength
  __typename
}

fragment CalendarSlotWindowToResolveReservationLength on CalendarSlotWindow {
  supportedUserEcrfs(locale: $locale) {
    id
    reservationLength
    __typename
  }
  windowUserECRFs {
    id
    clinicPatientRequestSettingsId
    reservationLength
    __typename
  }
  __typename
}

fragment AgendaGrid_CalendarSlotWindow on CalendarSlotWindow {
  id
  start
  end
  validFrom
  validTill
  dayOfWeek
  weekParity
  calendar {
    ...AgendaGrid_Calendar
    __typename
  }
  __typename
}

fragment AgendaGrid_Holiday on Holiday {
  endAt
  name
  startAt
  __typename
}

fragment AgendaGrid_RecurringReservationResponse on RecurringReservationResponse {
  instances {
    ...AgendaGrid_RecurringReservationInstance
    __typename
  }
  recurringReservation {
    ...AgendaGrid_RecurringReservation
    __typename
  }
  __typename
}

fragment AgendaGrid_RecurringReservationInstance on RecurringReservationInstance {
  start
  end
  color
  note
  __typename
}

fragment AgendaGrid_RecurringReservation on RecurringReservation {
  id
  note
  calendar {
    ...AgendaGrid_Calendar
    __typename
  }
  color
  __typename
}

fragment AgendaGrid_Calendar on Calendar {
  id
  name
  internalName
  __typename
}

fragment AgendaGrid_Reservation on Reservation {
  id
  start
  end
  color
  done
  note
  canceledAt
  request {
    ...AgendaGrid_PatientRequest
    __typename
  }
  remindDaysBefore
  calendar {
    ...AgendaGrid_Calendar
    __typename
  }
  additionalCalendars {
    ...AgendaGrid_Calendar
    __typename
  }
  videoCallDoctorUrl
  done
  __typename
}

fragment AgendaGrid_PatientRequest on PatientRequest {
  id
  displayTitle(locale: $locale)
  tags(onlyImportant: true) {
    ...Tag
    __typename
  }
  ecrf: userECRF(locale: $locale) {
    id
    icon {
      id
      color
      urlSvg
      __typename
    }
    name
    __typename
  }
  extendedPatient {
    ...AgendaGrid_Patient
    __typename
  }
  eventType
  flags
  clinicNotes {
    ...AgendaGrid_ClinicNote
    __typename
  }
  invoice {
    id
    amount
    currency
    status
    __typename
  }
  clinicMedicalRecord
  __typename
}

fragment AgendaGrid_ClinicNote on ClinicPatientRequestNote {
  id
  content
  __typename
}

fragment Tag on Tag {
  id
  name
  color
  icon
  __typename
}

fragment AgendaGrid_Patient on ExtendedPatient {
  id
  kind
  name
  surname
  owner {
    name
    surname
    __typename
  }
  key
  tags(onlyImportant: true) {
    ...Tag
    __typename
  }
  type
  isUnknownPatient
  user {
    id
    name
    surname
    __typename
  }
  identificationNumber
  insuranceCompanyObject {
    id
    shortName
    __typename
  }
  dob
  __typename
}

fragment AgendaGrid_Vacation on ClinicVacation {
  id
  since
  until
  calendarId
  calendars {
    ...AgendaGrid_Calendar
    __typename
  }
  __typename
}


query:
query ClinicAgenda_ListClinicReservations($calendarIds: [UUID!], $clinicSlug: String!, $locale: Locale!, $since: DateTime!, $until: DateTime!, $emptyCalendarIds: Boolean!, $skipCalendarWindows: Boolean!, $clinicCountry: Country = CZ) {
  calendarWindows: getCalendarWindows(
    clinicSlug: $clinicSlug
    calendarIds: $calendarIds
    pageInfo: {first: 10000, offset: 0}
  ) @skip(if: $skipCalendarWindows) {
    ...ClinicAgenda_CalendarSlotWindow
    __typename
  }
  holidays: getHolidays(since: $since, until: $until, countries: [$clinicCountry]) {
    ...AgendaGrid_Holiday
    __typename
  }
  recurringReservations: listClinicRecurringReservations(
    clinicSlug: $clinicSlug
    calendarIds: $calendarIds
    since: $since
    until: $until
  ) @skip(if: $emptyCalendarIds) {
    ...AgendaGrid_RecurringReservationResponse
    __typename
  }
  reservations: listClinicReservations(
    clinicSlug: $clinicSlug
    calendarIds: $calendarIds
    since: $since
    until: $until
  ) @skip(if: $emptyCalendarIds) {
    ...AgendaGrid_Reservation
    __typename
  }
  vacations: findVacations(
    clinicSlug: $clinicSlug
    calendarIds: $calendarIds
    since: $since
    until: $until
  ) @skip(if: $emptyCalendarIds) {
    ...AgendaGrid_Vacation
    __typename
  }
}

fragment ClinicAgenda_CalendarSlotWindow on CalendarSlotWindow {
  ...AgendaGrid_CalendarSlotWindow
  ...CalendarSlotWindowToResolveReservationLength
  __typename
}

fragment CalendarSlotWindowToResolveReservationLength on CalendarSlotWindow {
  supportedUserEcrfs(locale: $locale) {
    id
    reservationLength
    __typename
  }
  windowUserECRFs {
    id
    clinicPatientRequestSettingsId
    reservationLength
    __typename
  }
  __typename
}

fragment AgendaGrid_CalendarSlotWindow on CalendarSlotWindow {
  id
  start
  end
  validFrom
  validTill
  dayOfWeek
  weekParity
  calendar {
    ...AgendaGrid_Calendar
    __typename
  }
  __typename
}

fragment AgendaGrid_Holiday on Holiday {
  endAt
  name
  startAt
  __typename
}

fragment AgendaGrid_RecurringReservationResponse on RecurringReservationResponse {
  instances {
    ...AgendaGrid_RecurringReservationInstance
    __typename
  }
  recurringReservation {
    ...AgendaGrid_RecurringReservation
    __typename
  }
  __typename
}

fragment AgendaGrid_RecurringReservationInstance on RecurringReservationInstance {
  start
  end
  color
  note
  __typename
}

fragment AgendaGrid_RecurringReservation on RecurringReservation {
  id
  note
  calendar {
    ...AgendaGrid_Calendar
    __typename
  }
  color
  __typename
}

fragment AgendaGrid_Calendar on Calendar {
  id
  name
  internalName
  __typename
}

fragment AgendaGrid_Reservation on Reservation {
  id
  start
  end
  color
  done
  note
  canceledAt
  request {
    ...AgendaGrid_PatientRequest
    __typename
  }
  remindDaysBefore
  calendar {
    ...AgendaGrid_Calendar
    __typename
  }
  additionalCalendars {
    ...AgendaGrid_Calendar
    __typename
  }
  videoCallDoctorUrl
  done
  __typename
}

fragment AgendaGrid_PatientRequest on PatientRequest {
  id
  displayTitle(locale: $locale)
  tags(onlyImportant: true) {
    ...Tag
    __typename
  }
  ecrf: userECRF(locale: $locale) {
    id
    icon {
      id
      color
      urlSvg
      __typename
    }
    name
    __typename
  }
  extendedPatient {
    ...AgendaGrid_Patient
    __typename
  }
  eventType
  flags
  clinicNotes {
    ...AgendaGrid_ClinicNote
    __typename
  }
  invoice {
    id
    amount
    currency
    status
    __typename
  }
  clinicMedicalRecord
  __typename
}

fragment AgendaGrid_ClinicNote on ClinicPatientRequestNote {
  id
  content
  __typename
}

fragment Tag on Tag {
  id
  name
  color
  icon
  __typename
}

fragment AgendaGrid_Patient on ExtendedPatient {
  id
  kind
  name
  surname
  owner {
    name
    surname
    __typename
  }
  key
  tags(onlyImportant: true) {
    ...Tag
    __typename
  }
  type
  isUnknownPatient
  user {
    id
    name
    surname
    __typename
  }
  identificationNumber
  insuranceCompanyObject {
    id
    shortName
    __typename
  }
  dob
  __typename
}

fragment AgendaGrid_Vacation on ClinicVacation {
  id
  since
  until
  calendarId
  calendars {
    ...AgendaGrid_Calendar
    __typename
  }
  __typename
}


query:
query UpdateReservation_GetReservation($clinicSlug: String!, $includeReservation: Boolean!, $recurringReservationId: UUID!, $reservationId: UUID!, $since: DateTime!) {
  recurringReservation: getRecurringReservationResponse(
    clinicSlug: $clinicSlug
    id: $recurringReservationId
    since: $since
    until: $since
  ) @skip(if: $includeReservation) {
    ...UpdateReservationForm_RecurringReservation
    __typename
  }
  reservation: getReservation(
    clinicSlug: $clinicSlug
    reservationId: $reservationId
  ) @include(if: $includeReservation) {
    ...UpdateReservationForm_Reservation
    __typename
  }
  calendars: getCalendarsForClinic(clinicSlug: $clinicSlug) {
    ...CalendarSelect_Calendar
    __typename
  }
}

fragment UpdateReservationForm_RecurringReservation on RecurringReservationResponse {
  recurringReservation {
    calendarId
    duration
    id
    rrule {
      ...UpdateReservationForm_RecurringReservationSettings
      __typename
    }
    note
    color
    __typename
  }
  instances {
    start
    end
    note
    color
    __typename
  }
  __typename
}

fragment UpdateReservationForm_RecurringReservationSettings on RecurringReservationSettings {
  byhour
  byminute
  bymonth
  bymonthday
  bynmonthday
  bynweekday
  bysetpos
  byweekday
  byweekno
  byyearday
  count
  dtstart
  frequency
  interval
  tzid
  until
  wkst
  __typename
}

fragment UpdateReservationForm_Reservation on Reservation {
  calendarId
  color
  id
  note
  end
  start
  __typename
}

fragment CalendarSelect_Calendar on Calendar {
  id
  name
  __typename
}


query:
query ClinicRequestDetail_GetPatientRequest2($requestId: UUID!, $clinicSlug: String!, $isDoctor: Boolean!, $locale: Locale!) {
  patientRequestMedicalRecords: listMedicalRecordsForPatientRequest(
    attachmentTypes: [ECRF_FILL_ATTACHMENT, MESSAGE_ATTACHMENT, PATIENT_REQUEST_ATTACHMENT]
    patientRequestId: $requestId
    pageInfo: {first: 100, offset: 0}
  ) {
    ...ClinicRequestDetail_PatientRequestMedicalRecord
    __typename
  }
  request: getPatientRequest2(
    patientRequestId: $requestId
    clinicSlug: $clinicSlug
  ) {
    id
    ...ClinicRequestDetail_Request
    createdBy {
      id
      __typename
    }
    ecrf: userECRF(locale: $locale) {
      id
      sid
      __typename
    }
    eventType
    hasMobileApp
    extendedPatient(clinicSlug: $clinicSlug) {
      ...ClinicRequestDetail_Patient
      ...ClinicPatientInfo_Patient
      __typename
    }
    __typename
  }
}

fragment ClinicRequestDetail_Patient on ExtendedPatient {
  id
  user {
    id
    phone
    __typename
  }
  phone
  editableByDoctor
  name
  surname
  type
  isUnknownPatient
  __typename
}

fragment ClinicRequestDetail_Request on PatientRequest {
  id
  doneAt
  doneBy {
    id
    name
    surname
    __typename
  }
  removedAt
  queue {
    id
    __typename
  }
  isInClinic
  clinic {
    id
    paymentEnabled
    hasInvoicingEnabled
    slug
    features
    __typename
  }
  clinicMedicalRecord
  clinicMedicalRecordVisibleToPatient
  extendedPatient(clinicSlug: $clinicSlug) {
    id
    kind
    identificationNumber
    name
    key
    type
    user {
      id
      name
      surname
      __typename
    }
    surname
    __typename
  }
  ecrf: userECRF(locale: $locale) {
    id
    sid
    name
    flags {
      isReference
      __typename
    }
    __typename
  }
  ecrfFilledData(locale: $locale) {
    ...EcrfFilledSteps_EcrfFilledStep
    __typename
  }
  eventType
  flags
  invoice {
    ...InvoiceStatusBar_Invoice
    __typename
  }
  userNote
  paymentData {
    ...InvoicePaymentStatusBar_PaymentSummaryData
    __typename
  }
  recording {
    ...ClinicRequestContent_Recording
    __typename
  }
  reservations {
    ...Reservations_Reservation
    ...VideoCall_Reservation
    __typename
  }
  evaluationResult(locale: $locale) {
    ...ClinicRequest_ECRFEvaluationResult
    __typename
  }
  tags(onlyImportant: false) {
    id
    ...Tag
    __typename
  }
  ...ClinicRequestHeading_Request
  ...ClinicRequestControls_Request
  ...InvoiceStatusBar_PatientRequest
  ...InvoicePriceBar_Request
  __typename
}

fragment ClinicRequestContent_Recording on Recording {
  fileUrl
  type
  __typename
}

fragment ClinicRequestControls_Request on PatientRequest {
  ...ClinicRequestControlsBar_Request
  isInClinic
  extendedPatient(clinicSlug: $clinicSlug) {
    id
    identificationNumber
    kind
    name
    owner {
      name
      surname
      __typename
    }
    key
    type
    user {
      id
      name
      surname
      __typename
    }
    status
    surname
    isUnknownPatient
    __typename
  }
  __typename
}

fragment ClinicRequestControlsBar_Request on PatientRequest {
  id
  dueDate
  doneAt
  doneBy {
    name
    surname
    __typename
  }
  queue {
    id
    __typename
  }
  __typename
}

fragment EcrfFilledSteps_EcrfFilledStep on ECRFFilledStep {
  name
  groups {
    ...EcrfFilledSteps_EcrfFilledGroup
    __typename
  }
  __typename
}

fragment EcrfFilledSteps_EcrfFilledGroup on ECRFFilledGroup {
  label
  name
  fields {
    ...EcrfFilledSteps_EcrfFilledField
    __typename
  }
  __typename
}

fragment EcrfFilledSteps_EcrfFilledField on ECRFFilledField {
  ...EcrfFilledSteps_ShallowECRFFilledField
  enumerations {
    ...EcrfFilledSteps_EcrfFilledEnumeration
    __typename
  }
  __typename
}

fragment EcrfFilledSteps_EcrfFilledEnumeration on ECRFFilledEnumeration {
  ...EcrfFilledSteps_ShallowEcrfFilledEnumeration
  children {
    ...EcrfFilledSteps_ShallowECRFFilledField
    enumerations {
      ...EcrfFilledSteps_ShallowEcrfFilledEnumeration
      children {
        ...EcrfFilledSteps_ShallowECRFFilledField
        enumerations {
          ...EcrfFilledSteps_ShallowEcrfFilledEnumeration
          children {
            ...EcrfFilledSteps_ShallowECRFFilledField
            enumerations {
              ...EcrfFilledSteps_ShallowEcrfFilledEnumeration
              children {
                ...EcrfFilledSteps_ShallowECRFFilledField
                enumerations {
                  ...EcrfFilledSteps_ShallowEcrfFilledEnumeration
                  children {
                    ...EcrfFilledSteps_ShallowECRFFilledField
                    __typename
                  }
                  __typename
                }
                __typename
              }
              __typename
            }
            __typename
          }
          __typename
        }
        __typename
      }
      __typename
    }
    __typename
  }
  __typename
}

fragment EcrfFilledSteps_ShallowECRFFilledField on ECRFFilledField {
  name
  label
  type
  value
  __typename
}

fragment EcrfFilledSteps_ShallowEcrfFilledEnumeration on ECRFFilledEnumeration {
  name
  label
  checked
  __typename
}

fragment ClinicRequest_ECRFEvaluationResult on ECRFEvaluationResult {
  contentForDoctor
  fields {
    name
    label
    type
    value
    min
    max
    __typename
  }
  __typename
}

fragment ClinicRequestHeading_Request on PatientRequest {
  clinic {
    id
    name
    slug
    currentThumbnail {
      id
      fullUrl
      __typename
    }
    __typename
  }
  isInClinic
  createdAt
  createdBy {
    id
    name
    surname
    __typename
  }
  customTitle
  createdByDoctor
  displayTitle(locale: $locale)
  ecrf: userECRF(locale: $locale) {
    id
    name
    ecrfSet {
      id
      name
      __typename
    }
    __typename
  }
  eventType
  flags
  id
  extendedPatient(clinicSlug: $clinicSlug) {
    id
    name
    key
    surname
    __typename
  }
  referringClinic {
    id
    name
    __typename
  }
  __typename
}

fragment Reservations_Reservation on Reservation {
  calendar {
    ...Reservations_Calendar
    __typename
  }
  additionalCalendars {
    ...Reservations_Calendar
    __typename
  }
  calendarId
  canceledAt
  canceledBy {
    id
    clinicId
    name
    surname
    __typename
  }
  createdAt
  createdBy {
    id
    clinicId
    name
    surname
    __typename
  }
  clinic {
    id
    slug
    __typename
  }
  done
  end
  id
  note
  start
  videoCallDoctorUrl
  additionalCalendars {
    id
    __typename
  }
  __typename
}

fragment Reservations_Calendar on Calendar {
  id
  internalName
  name
  __typename
}

fragment InvoiceStatusBar_Invoice on Invoice {
  amount
  currency
  dueAmount
  id
  isOverdue
  link
  payments {
    ...InvoiceStatusBar_Payment
    __typename
  }
  refundedAmount
  status
  settledAmount
  isOnlinePayable
  __typename
}

fragment InvoiceStatusBar_Payment on Payment {
  id
  status
  __typename
}

fragment InvoiceStatusBar_PatientRequest on PatientRequest {
  extendedPatient(clinicSlug: $clinicSlug) {
    id
    user {
      id
      phone
      __typename
    }
    key
    phone
    __typename
  }
  hasMobileApp
  paymentData {
    status
    __typename
  }
  id
  priceWhenCreated
  currencyWhenCreated
  __typename
}

fragment VideoCall_Reservation on Reservation {
  canceledAt
  end
  id
  showVideoCall
  start
  videoCallDoctorUrl
  __typename
}

fragment Tag on Tag {
  id
  name
  color
  icon
  __typename
}

fragment InvoicePaymentStatusBar_PaymentSummaryData on PaymentSummaryData {
  status
  amount
  currency
  __typename
}

fragment InvoicePriceBar_Request on PatientRequest {
  priceWhenCreated
  currencyWhenCreated
  __typename
}

fragment ClinicPatientInfo_Patient on ExtendedPatient {
  anamnesisShared
  anamnesisStatusForClinic {
    updatedAt
    __typename
  }
  clinics {
    ...ClinicsTinyList_Clinic
    __typename
  }
  id
  isInClinic
  dob
  city
  familyMembers: family {
    ...FamilyMemberList_FamilyMember
    __typename
  }
  houseNumber
  identificationNumber
  insuranceCompanyObject {
    id
    code
    name
    shortName
    __typename
  }
  kind
  name
  note
  owner {
    ...PatientInfo_ContactPatientOwner
    __typename
  }
  key
  status
  street
  surname
  user {
    ...PatientInfo_ContactPatientUser
    __typename
  }
  userRelationship
  premiumPlanPatient {
    id
    ...PremiumPlanTag_PremiumPlanPatient
    __typename
  }
  sex
  tags(onlyImportant: false) {
    ...Tag
    __typename
  }
  type
  isUnknownPatient
  hasMobileApp
  ...MergeSuggestionAlert_ExtendedPatient
  ...PatientInfo_ContactPatient
  __typename
}

fragment ClinicsTinyList_Clinic on Clinic {
  currentThumbnail {
    id
    fullUrl
    __typename
  }
  id
  name
  slug
  __typename
}

fragment PatientInfo_ContactPatient on ExtendedPatient {
  id
  city
  email
  houseNumber
  key
  phone
  street
  __typename
}

fragment PatientInfo_ContactPatientOwner on PatientOwner {
  name
  surname
  __typename
}

fragment PatientInfo_ContactPatientUser on PatientUser {
  id
  email
  name
  phone
  surname
  __typename
}

fragment FamilyMemberList_FamilyMember on FamilyPatientUserUnion {
  ...FamilyMemberList_Patient
  ...FamilyMemberList_PatientUser
  __typename
}

fragment FamilyMemberList_Patient on ExtendedPatient {
  dob
  id
  identificationNumber
  isInClinic
  kind
  name
  key
  surname
  sex
  type
  isUnknownPatient
  __typename
}

fragment FamilyMemberList_PatientUser on PatientUser {
  name
  surname
  __typename
}

fragment MergeSuggestionAlert_ExtendedPatient on ExtendedPatient {
  id
  key
  isInClinic
  __typename
}

fragment PremiumPlanTag_PremiumPlanPatient on PremiumPlanPatient {
  id
  autorenew
  validTo
  premiumPlan {
    ...PremiumPlanTag_PremiumPlan
    __typename
  }
  __typename
}

fragment PremiumPlanTag_PremiumPlan on PremiumPlan {
  id
  name
  color
  __typename
}

fragment ClinicRequestDetail_PatientRequestMedicalRecord on PatientRequestMedicalRecord {
  attachmentType
  id
  medicalRecord {
    ...FileItem_MedicalRecord
    __typename
  }
  __typename
}

fragment FileItem_MedicalRecord on MedicalRecord {
  contentType
  description
  downloadUrl
  id
  url
  visibleToPatient @include(if: $isDoctor)
  __typename
}


operationName: ClinicRequestDetailModalContent

query:
query ClinicRequestDetailModalContent($clinicSlug: String!, $patientUuid: UUID!, $locale: Locale!) {
  clinic: getClinic(clinicSlug: $clinicSlug) {
    features
    id
    type
    ais
    ...ClinicRequestControls_Clinic
    ...PatientInfo_Clinic
    __typename
  }
  calendars: getCalendarsForClinic(clinicSlug: $clinicSlug) {
    ...ClinicRequestDetailModalContent_Calendar
    __typename
  }
  mergeSuggestions: findMergeSuggestions(
    clinicSlug: $clinicSlug
    input: {existingPatientId: $patientUuid}
  ) {
    ...MergeSuggestionAlert_MergeSuggestionResult
    __typename
  }
  queues: listQueues(clinicSlug: $clinicSlug) {
    ...ClinicRequestControlsBar_Queue
    __typename
  }
  patientRequestsResponse: filterPatientRequestsForClinic(
    clinicSlug: $clinicSlug
    filter: {patientId: $patientUuid}
    pageInfo: {first: 4, offset: 0}
  ) {
    count
    items {
      ...ClinicRequestDetail_RequestList_PatientRequest
      __typename
    }
    __typename
  }
  premiumPlans: listClinicPremiumPlans(clinicSlug: $clinicSlug) {
    id
    __typename
  }
  insuranceCards: getPatientDocuments(
    patientId: $patientUuid
    type: InsuranceCard
  ) {
    ...PatientInfo_InsuranceCard
    __typename
  }
}

fragment ClinicRequestDetailModalContent_Calendar on Calendar {
  id
  __typename
}

fragment ClinicRequestControlsBar_Queue on ClinicPatientRequestQueue {
  id
  name
  mine
  clinicPatientRequestQueueUsers {
    accountable {
      id
      name
      surname
      __typename
    }
    id
    __typename
  }
  __typename
}

fragment ClinicRequestControls_Clinic on Clinic {
  id
  slug
  canSendToEzprava
  __typename
}

fragment MergeSuggestionAlert_MergeSuggestionResult on MergeSuggestionResult {
  extendedPatient {
    ...MergeSuggestionAlert_ExtendedPatient
    __typename
  }
  matchResult
  __typename
}

fragment MergeSuggestionAlert_ExtendedPatient on ExtendedPatient {
  id
  key
  isInClinic
  __typename
}

fragment ClinicRequestDetail_RequestList_PatientRequest on PatientRequest {
  id
  createdAt
  displayTitle(locale: $locale)
  doneAt
  reservations {
    id
    canceledAt
    calendar {
      id
      name
      internalName
      __typename
    }
    __typename
  }
  __typename
}

fragment PatientInfo_Clinic on Clinic {
  id
  slug
  ais
  ...ClinicWithTypeAndFeatures_Clinic
  __typename
}

fragment ClinicWithTypeAndFeatures_Clinic on Clinic {
  id
  type
  features
  __typename
}

fragment PatientInfo_InsuranceCard on PatientDocument {
  id
  contentType
  url
  downloadUrl
  __typename
}


query:
query ClinicRequestNotes_Get($patientRequestId: String!) {
  notes: getClinicPatientRequestNotes(requestId: $patientRequestId) {
    ...NotesList_ClinicPatientRequestNote
    __typename
  }
}

fragment NotesList_ClinicPatientRequestNote on ClinicPatientRequestNote {
  id
  content
  createdAt
  updatedAt
  createdBy {
    id
    name
    surname
    __typename
  }
  __typename
}


query:
query UseMessages_ListMessages($requestId: String!, $updatedSince: DateTime) {
  messages: listMessages(
    patientRequestId: $requestId
    updatedSince: $updatedSince
  ) {
    ...UseMessages_Message
    __typename
  }
}

fragment UseMessages_Message on Message {
  createdAt
  id
  medicalRecord {
    ...UseMessages_MedicalRecord
    __typename
  }
  readAt
  sender {
    clinicId
    id
    name
    surname
    __typename
  }
  text
  type
  updatedAt
  __typename
}

fragment UseMessages_MedicalRecord on MedicalRecord {
  contentType
  createdAt
  description
  downloadUrl
  id
  token
  updatedAt
  url
  __typename
}


query:
query Communication_GetClinicFooter($clinicSlug: String!) {
  footer: getClinicFooter(clinicSlug: $clinicSlug)
}


query:
query ClinicRequestDetail_GetPatientRequest2($requestId: UUID!, $clinicSlug: String!, $isDoctor: Boolean!, $locale: Locale!) {
  patientRequestMedicalRecords: listMedicalRecordsForPatientRequest(
    attachmentTypes: [ECRF_FILL_ATTACHMENT, MESSAGE_ATTACHMENT, PATIENT_REQUEST_ATTACHMENT]
    patientRequestId: $requestId
    pageInfo: {first: 100, offset: 0}
  ) {
    ...ClinicRequestDetail_PatientRequestMedicalRecord
    __typename
  }
  request: getPatientRequest2(
    patientRequestId: $requestId
    clinicSlug: $clinicSlug
  ) {
    id
    ...ClinicRequestDetail_Request
    createdBy {
      id
      __typename
    }
    ecrf: userECRF(locale: $locale) {
      id
      sid
      __typename
    }
    eventType
    hasMobileApp
    extendedPatient(clinicSlug: $clinicSlug) {
      ...ClinicRequestDetail_Patient
      ...ClinicPatientInfo_Patient
      __typename
    }
    __typename
  }
}

fragment ClinicRequestDetail_Patient on ExtendedPatient {
  id
  user {
    id
    phone
    __typename
  }
  phone
  editableByDoctor
  name
  surname
  type
  isUnknownPatient
  __typename
}

fragment ClinicRequestDetail_Request on PatientRequest {
  id
  doneAt
  doneBy {
    id
    name
    surname
    __typename
  }
  removedAt
  queue {
    id
    __typename
  }
  isInClinic
  clinic {
    id
    paymentEnabled
    hasInvoicingEnabled
    slug
    features
    __typename
  }
  clinicMedicalRecord
  clinicMedicalRecordVisibleToPatient
  extendedPatient(clinicSlug: $clinicSlug) {
    id
    kind
    identificationNumber
    name
    key
    type
    user {
      id
      name
      surname
      __typename
    }
    surname
    __typename
  }
  ecrf: userECRF(locale: $locale) {
    id
    sid
    name
    flags {
      isReference
      __typename
    }
    __typename
  }
  ecrfFilledData(locale: $locale) {
    ...EcrfFilledSteps_EcrfFilledStep
    __typename
  }
  eventType
  flags
  invoice {
    ...InvoiceStatusBar_Invoice
    __typename
  }
  userNote
  paymentData {
    ...InvoicePaymentStatusBar_PaymentSummaryData
    __typename
  }
  recording {
    ...ClinicRequestContent_Recording
    __typename
  }
  reservations {
    ...Reservations_Reservation
    ...VideoCall_Reservation
    __typename
  }
  evaluationResult(locale: $locale) {
    ...ClinicRequest_ECRFEvaluationResult
    __typename
  }
  tags(onlyImportant: false) {
    id
    ...Tag
    __typename
  }
  ...ClinicRequestHeading_Request
  ...ClinicRequestControls_Request
  ...InvoiceStatusBar_PatientRequest
  ...InvoicePriceBar_Request
  __typename
}

fragment ClinicRequestContent_Recording on Recording {
  fileUrl
  type
  __typename
}

fragment ClinicRequestControls_Request on PatientRequest {
  ...ClinicRequestControlsBar_Request
  isInClinic
  extendedPatient(clinicSlug: $clinicSlug) {
    id
    identificationNumber
    kind
    name
    owner {
      name
      surname
      __typename
    }
    key
    type
    user {
      id
      name
      surname
      __typename
    }
    status
    surname
    isUnknownPatient
    __typename
  }
  __typename
}

fragment ClinicRequestControlsBar_Request on PatientRequest {
  id
  dueDate
  doneAt
  doneBy {
    name
    surname
    __typename
  }
  queue {
    id
    __typename
  }
  __typename
}

fragment EcrfFilledSteps_EcrfFilledStep on ECRFFilledStep {
  name
  groups {
    ...EcrfFilledSteps_EcrfFilledGroup
    __typename
  }
  __typename
}

fragment EcrfFilledSteps_EcrfFilledGroup on ECRFFilledGroup {
  label
  name
  fields {
    ...EcrfFilledSteps_EcrfFilledField
    __typename
  }
  __typename
}

fragment EcrfFilledSteps_EcrfFilledField on ECRFFilledField {
  ...EcrfFilledSteps_ShallowECRFFilledField
  enumerations {
    ...EcrfFilledSteps_EcrfFilledEnumeration
    __typename
  }
  __typename
}

fragment EcrfFilledSteps_EcrfFilledEnumeration on ECRFFilledEnumeration {
  ...EcrfFilledSteps_ShallowEcrfFilledEnumeration
  children {
    ...EcrfFilledSteps_ShallowECRFFilledField
    enumerations {
      ...EcrfFilledSteps_ShallowEcrfFilledEnumeration
      children {
        ...EcrfFilledSteps_ShallowECRFFilledField
        enumerations {
          ...EcrfFilledSteps_ShallowEcrfFilledEnumeration
          children {
            ...EcrfFilledSteps_ShallowECRFFilledField
            enumerations {
              ...EcrfFilledSteps_ShallowEcrfFilledEnumeration
              children {
                ...EcrfFilledSteps_ShallowECRFFilledField
                enumerations {
                  ...EcrfFilledSteps_ShallowEcrfFilledEnumeration
                  children {
                    ...EcrfFilledSteps_ShallowECRFFilledField
                    __typename
                  }
                  __typename
                }
                __typename
              }
              __typename
            }
            __typename
          }
          __typename
        }
        __typename
      }
      __typename
    }
    __typename
  }
  __typename
}

fragment EcrfFilledSteps_ShallowECRFFilledField on ECRFFilledField {
  name
  label
  type
  value
  __typename
}

fragment EcrfFilledSteps_ShallowEcrfFilledEnumeration on ECRFFilledEnumeration {
  name
  label
  checked
  __typename
}

fragment ClinicRequest_ECRFEvaluationResult on ECRFEvaluationResult {
  contentForDoctor
  fields {
    name
    label
    type
    value
    min
    max
    __typename
  }
  __typename
}

fragment ClinicRequestHeading_Request on PatientRequest {
  clinic {
    id
    name
    slug
    currentThumbnail {
      id
      fullUrl
      __typename
    }
    __typename
  }
  isInClinic
  createdAt
  createdBy {
    id
    name
    surname
    __typename
  }
  customTitle
  createdByDoctor
  displayTitle(locale: $locale)
  ecrf: userECRF(locale: $locale) {
    id
    name
    ecrfSet {
      id
      name
      __typename
    }
    __typename
  }
  eventType
  flags
  id
  extendedPatient(clinicSlug: $clinicSlug) {
    id
    name
    key
    surname
    __typename
  }
  referringClinic {
    id
    name
    __typename
  }
  __typename
}

fragment Reservations_Reservation on Reservation {
  calendar {
    ...Reservations_Calendar
    __typename
  }
  additionalCalendars {
    ...Reservations_Calendar
    __typename
  }
  calendarId
  canceledAt
  canceledBy {
    id
    clinicId
    name
    surname
    __typename
  }
  createdAt
  createdBy {
    id
    clinicId
    name
    surname
    __typename
  }
  clinic {
    id
    slug
    __typename
  }
  done
  end
  id
  note
  start
  videoCallDoctorUrl
  additionalCalendars {
    id
    __typename
  }
  __typename
}

fragment Reservations_Calendar on Calendar {
  id
  internalName
  name
  __typename
}

fragment InvoiceStatusBar_Invoice on Invoice {
  amount
  currency
  dueAmount
  id
  isOverdue
  link
  payments {
    ...InvoiceStatusBar_Payment
    __typename
  }
  refundedAmount
  status
  settledAmount
  isOnlinePayable
  __typename
}

fragment InvoiceStatusBar_Payment on Payment {
  id
  status
  __typename
}

fragment InvoiceStatusBar_PatientRequest on PatientRequest {
  extendedPatient(clinicSlug: $clinicSlug) {
    id
    user {
      id
      phone
      __typename
    }
    key
    phone
    __typename
  }
  hasMobileApp
  paymentData {
    status
    __typename
  }
  id
  priceWhenCreated
  currencyWhenCreated
  __typename
}

fragment VideoCall_Reservation on Reservation {
  canceledAt
  end
  id
  showVideoCall
  start
  videoCallDoctorUrl
  __typename
}

fragment Tag on Tag {
  id
  name
  color
  icon
  __typename
}

fragment InvoicePaymentStatusBar_PaymentSummaryData on PaymentSummaryData {
  status
  amount
  currency
  __typename
}

fragment InvoicePriceBar_Request on PatientRequest {
  priceWhenCreated
  currencyWhenCreated
  __typename
}

fragment ClinicPatientInfo_Patient on ExtendedPatient {
  anamnesisShared
  anamnesisStatusForClinic {
    updatedAt
    __typename
  }
  clinics {
    ...ClinicsTinyList_Clinic
    __typename
  }
  id
  isInClinic
  dob
  city
  familyMembers: family {
    ...FamilyMemberList_FamilyMember
    __typename
  }
  houseNumber
  identificationNumber
  insuranceCompanyObject {
    id
    code
    name
    shortName
    __typename
  }
  kind
  name
  note
  owner {
    ...PatientInfo_ContactPatientOwner
    __typename
  }
  key
  status
  street
  surname
  user {
    ...PatientInfo_ContactPatientUser
    __typename
  }
  userRelationship
  premiumPlanPatient {
    id
    ...PremiumPlanTag_PremiumPlanPatient
    __typename
  }
  sex
  tags(onlyImportant: false) {
    ...Tag
    __typename
  }
  type
  isUnknownPatient
  hasMobileApp
  ...MergeSuggestionAlert_ExtendedPatient
  ...PatientInfo_ContactPatient
  __typename
}

fragment ClinicsTinyList_Clinic on Clinic {
  currentThumbnail {
    id
    fullUrl
    __typename
  }
  id
  name
  slug
  __typename
}

fragment PatientInfo_ContactPatient on ExtendedPatient {
  id
  city
  email
  houseNumber
  key
  phone
  street
  __typename
}

fragment PatientInfo_ContactPatientOwner on PatientOwner {
  name
  surname
  __typename
}

fragment PatientInfo_ContactPatientUser on PatientUser {
  id
  email
  name
  phone
  surname
  __typename
}

fragment FamilyMemberList_FamilyMember on FamilyPatientUserUnion {
  ...FamilyMemberList_Patient
  ...FamilyMemberList_PatientUser
  __typename
}

fragment FamilyMemberList_Patient on ExtendedPatient {
  dob
  id
  identificationNumber
  isInClinic
  kind
  name
  key
  surname
  sex
  type
  isUnknownPatient
  __typename
}

fragment FamilyMemberList_PatientUser on PatientUser {
  name
  surname
  __typename
}

fragment MergeSuggestionAlert_ExtendedPatient on ExtendedPatient {
  id
  key
  isInClinic
  __typename
}

fragment PremiumPlanTag_PremiumPlanPatient on PremiumPlanPatient {
  id
  autorenew
  validTo
  premiumPlan {
    ...PremiumPlanTag_PremiumPlan
    __typename
  }
  __typename
}

fragment PremiumPlanTag_PremiumPlan on PremiumPlan {
  id
  name
  color
  __typename
}

fragment ClinicRequestDetail_PatientRequestMedicalRecord on PatientRequestMedicalRecord {
  attachmentType
  id
  medicalRecord {
    ...FileItem_MedicalRecord
    __typename
  }
  __typename
}

fragment FileItem_MedicalRecord on MedicalRecord {
  contentType
  description
  downloadUrl
  id
  url
  visibleToPatient @include(if: $isDoctor)
  __typename
}


operationName: ClinicRequestDetailModalContent

query:
query ClinicRequestDetailModalContent($clinicSlug: String!, $patientUuid: UUID!, $locale: Locale!) {
  clinic: getClinic(clinicSlug: $clinicSlug) {
    features
    id
    type
    ais
    ...ClinicRequestControls_Clinic
    ...PatientInfo_Clinic
    __typename
  }
  calendars: getCalendarsForClinic(clinicSlug: $clinicSlug) {
    ...ClinicRequestDetailModalContent_Calendar
    __typename
  }
  mergeSuggestions: findMergeSuggestions(
    clinicSlug: $clinicSlug
    input: {existingPatientId: $patientUuid}
  ) {
    ...MergeSuggestionAlert_MergeSuggestionResult
    __typename
  }
  queues: listQueues(clinicSlug: $clinicSlug) {
    ...ClinicRequestControlsBar_Queue
    __typename
  }
  patientRequestsResponse: filterPatientRequestsForClinic(
    clinicSlug: $clinicSlug
    filter: {patientId: $patientUuid}
    pageInfo: {first: 4, offset: 0}
  ) {
    count
    items {
      ...ClinicRequestDetail_RequestList_PatientRequest
      __typename
    }
    __typename
  }
  premiumPlans: listClinicPremiumPlans(clinicSlug: $clinicSlug) {
    id
    __typename
  }
  insuranceCards: getPatientDocuments(
    patientId: $patientUuid
    type: InsuranceCard
  ) {
    ...PatientInfo_InsuranceCard
    __typename
  }
}

fragment ClinicRequestDetailModalContent_Calendar on Calendar {
  id
  __typename
}

fragment ClinicRequestControlsBar_Queue on ClinicPatientRequestQueue {
  id
  name
  mine
  clinicPatientRequestQueueUsers {
    accountable {
      id
      name
      surname
      __typename
    }
    id
    __typename
  }
  __typename
}

fragment ClinicRequestControls_Clinic on Clinic {
  id
  slug
  canSendToEzprava
  __typename
}

fragment MergeSuggestionAlert_MergeSuggestionResult on MergeSuggestionResult {
  extendedPatient {
    ...MergeSuggestionAlert_ExtendedPatient
    __typename
  }
  matchResult
  __typename
}

fragment MergeSuggestionAlert_ExtendedPatient on ExtendedPatient {
  id
  key
  isInClinic
  __typename
}

fragment ClinicRequestDetail_RequestList_PatientRequest on PatientRequest {
  id
  createdAt
  displayTitle(locale: $locale)
  doneAt
  reservations {
    id
    canceledAt
    calendar {
      id
      name
      internalName
      __typename
    }
    __typename
  }
  __typename
}

fragment PatientInfo_Clinic on Clinic {
  id
  slug
  ais
  ...ClinicWithTypeAndFeatures_Clinic
  __typename
}

fragment ClinicWithTypeAndFeatures_Clinic on Clinic {
  id
  type
  features
  __typename
}

fragment PatientInfo_InsuranceCard on PatientDocument {
  id
  contentType
  url
  downloadUrl
  __typename
}


query:
query ClinicRequestNotes_Get($patientRequestId: String!) {
  notes: getClinicPatientRequestNotes(requestId: $patientRequestId) {
    ...NotesList_ClinicPatientRequestNote
    __typename
  }
}

fragment NotesList_ClinicPatientRequestNote on ClinicPatientRequestNote {
  id
  content
  createdAt
  updatedAt
  createdBy {
    id
    name
    surname
    __typename
  }
  __typename
}


query:
query UseMessages_ListMessages($requestId: String!, $updatedSince: DateTime) {
  messages: listMessages(
    patientRequestId: $requestId
    updatedSince: $updatedSince
  ) {
    ...UseMessages_Message
    __typename
  }
}

fragment UseMessages_Message on Message {
  createdAt
  id
  medicalRecord {
    ...UseMessages_MedicalRecord
    __typename
  }
  readAt
  sender {
    clinicId
    id
    name
    surname
    __typename
  }
  text
  type
  updatedAt
  __typename
}

fragment UseMessages_MedicalRecord on MedicalRecord {
  contentType
  createdAt
  description
  downloadUrl
  id
  token
  updatedAt
  url
  __typename
}


query:
query Communication_GetClinicFooter($clinicSlug: String!) {
  footer: getClinicFooter(clinicSlug: $clinicSlug)
}