{"components":{"schemas":{"AdminArchiveUserResponse":{"properties":{"status":{"description":"Account closure status","enum":["closed"],"type":"string"},"user_id":{"description":"Archived user id","type":"integer"}},"required":["user_id","status"]},"AdminSearchBucket":{"properties":{"has_more":{"type":"boolean"},"total":{"type":"integer"}},"required":["total","has_more"],"type":"object"},"AdminSearchClinicBucket":{"allOf":[{"$ref":"#/components/schemas/AdminSearchBucket"},{"properties":{"items":{"items":{"$ref":"#/components/schemas/ClinicSearchHit"},"type":"array"}},"required":["items"],"type":"object"}]},"AdminSearchHospitalBucket":{"allOf":[{"$ref":"#/components/schemas/AdminSearchBucket"},{"properties":{"items":{"items":{"$ref":"#/components/schemas/HospitalSearchHit"},"type":"array"}},"required":["items"],"type":"object"}]},"AdminSearchPeopleBucket":{"allOf":[{"$ref":"#/components/schemas/AdminSearchBucket"},{"properties":{"items":{"items":{"$ref":"#/components/schemas/UserSearchHit"},"type":"array"},"role_totals":{"$ref":"#/components/schemas/AdminSearchRoleTotals"}},"required":["role_totals","items"],"type":"object"}]},"AdminSearchResponse":{"properties":{"clinics":{"$ref":"#/components/schemas/AdminSearchClinicBucket"},"hospitals":{"$ref":"#/components/schemas/AdminSearchHospitalBucket"},"people":{"$ref":"#/components/schemas/AdminSearchPeopleBucket"},"query":{"type":"string"}},"required":["query","people","clinics","hospitals"],"type":"object"},"AdminSearchRoleTotals":{"properties":{"admin":{"type":"integer"},"chef":{"type":"integer"},"clinician":{"type":"integer"},"data_reviewer":{"type":"integer"},"patient":{"type":"integer"}},"required":["clinician","patient","data_reviewer","admin","chef"],"type":"object"},"AdvisorChatMessageRequest":{"properties":{"client_subject_type":{"description":"Internal-only client classification for analytics/debug (not returned).","nullable":true,"type":"string"},"content":{"type":"string"},"context_options":{"additionalProperties":true,"nullable":true,"type":"object"},"meal_id":{"description":"Meal id used when start_mode=assistant_meal_reflection.","nullable":true,"type":"integer"},"opening_question":{"description":"Client-provided opening question used when start_mode=assistant_question.","nullable":true,"type":"string"},"start_mode":{"description":"How this session should start. When set to assistant_question, content is optional and opening_question is required. When set to assistant_meal_reflection, meal_id is required.","enum":["user_message","assistant_question","assistant_meal_reflection"],"nullable":true,"type":"string"},"subject_id":{"nullable":true,"type":"string"},"subject_type":{"$ref":"#/components/schemas/AdvisorChatSubjectTypeEnum"}}},"AdvisorChatMessageResponse":{"properties":{"content":{"type":"string"},"content_type":{"enum":["text/plain","text/markdown"],"type":"string"},"has_follow_up_question":{"nullable":true,"type":"boolean"},"id":{"type":"integer"},"role":{"enum":["user","assistant"],"type":"string"},"session_id":{"type":"integer"},"timestamp":{"format":"date-time","type":"string"},"title":{"nullable":true,"type":"string"}},"required":["id","session_id","role","content_type","content","timestamp"]},"AdvisorChatSessionResponse":{"properties":{"created_time":{"format":"date-time","type":"string"},"id":{"type":"integer"},"messages":{"properties":{"has_more":{"type":"boolean"},"message_next_timestamp":{"format":"date-time","nullable":true,"type":"string"},"rows":{"items":{"$ref":"#/components/schemas/AdvisorChatMessageResponse"},"type":"array"}},"required":["rows","has_more"],"type":"object"},"patient_id":{"type":"integer"},"subject_id":{"type":"string"},"subject_type":{"$ref":"#/components/schemas/AdvisorChatSubjectTypeEnum"},"title":{"nullable":true,"type":"string"},"updated_time":{"format":"date-time","type":"string"},"user_id":{"type":"integer"}},"required":["id","user_id","patient_id","subject_type","messages","created_time","updated_time"]},"AdvisorChatSessionSummaryResponse":{"properties":{"created_time":{"format":"date-time","type":"string"},"id":{"type":"integer"},"latest_message":{"$ref":"#/components/schemas/AdvisorChatMessageResponse","nullable":true,"type":"object"},"oldest_message":{"$ref":"#/components/schemas/AdvisorChatMessageResponse","nullable":true,"type":"object"},"patient_id":{"type":"integer"},"subject_id":{"type":"string"},"subject_type":{"$ref":"#/components/schemas/AdvisorChatSubjectTypeEnum"},"title":{"nullable":true,"type":"string"},"updated_time":{"format":"date-time","type":"string"},"user_id":{"type":"integer"}},"required":["id","user_id","patient_id","subject_type","messages","created_time","updated_time"]},"AdvisorChatSessionsResponse":{"properties":{"has_more":{"type":"boolean"},"next_timestamp":{"format":"date-time","nullable":true,"type":"string"},"rows":{"items":{"$ref":"#/components/schemas/AdvisorChatSessionSummaryResponse"},"type":"array"}},"required":["rows","has_more"]},"AdvisorChatStreamErrorEvent":{"properties":{"errorText":{"type":"string"},"type":{"enum":["error"],"type":"string"}},"required":["type","errorText"],"type":"object"},"AdvisorChatStreamEvent":{"discriminator":{"mapping":{"data-message-metadata":"#/components/schemas/AdvisorChatStreamMetadataEvent","error":"#/components/schemas/AdvisorChatStreamErrorEvent","finish":"#/components/schemas/AdvisorChatStreamFinishEvent","finish-step":"#/components/schemas/AdvisorChatStreamFinishStepEvent","start":"#/components/schemas/AdvisorChatStreamStartEvent","start-step":"#/components/schemas/AdvisorChatStreamStartStepEvent","text-delta":"#/components/schemas/AdvisorChatStreamTextDeltaEvent","text-end":"#/components/schemas/AdvisorChatStreamTextEndEvent","text-start":"#/components/schemas/AdvisorChatStreamTextStartEvent"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/AdvisorChatStreamStartEvent"},{"$ref":"#/components/schemas/AdvisorChatStreamStartStepEvent"},{"$ref":"#/components/schemas/AdvisorChatStreamTextStartEvent"},{"$ref":"#/components/schemas/AdvisorChatStreamTextDeltaEvent"},{"$ref":"#/components/schemas/AdvisorChatStreamTextEndEvent"},{"$ref":"#/components/schemas/AdvisorChatStreamMetadataEvent"},{"$ref":"#/components/schemas/AdvisorChatStreamErrorEvent"},{"$ref":"#/components/schemas/AdvisorChatStreamFinishStepEvent"},{"$ref":"#/components/schemas/AdvisorChatStreamFinishEvent"}]},"AdvisorChatStreamFinishEvent":{"properties":{"messageId":{"type":"string"},"type":{"enum":["finish"],"type":"string"}},"required":["type","messageId"],"type":"object"},"AdvisorChatStreamFinishStepEvent":{"properties":{"type":{"enum":["finish-step"],"type":"string"}},"required":["type"],"type":"object"},"AdvisorChatStreamMetadataEvent":{"properties":{"data":{"$ref":"#/components/schemas/AdvisorChatMessageResponse","description":"Saved advisor message metadata."},"messageId":{"type":"string"},"type":{"enum":["data-message-metadata"],"type":"string"}},"required":["type","messageId","data"],"type":"object"},"AdvisorChatStreamStartEvent":{"properties":{"messageId":{"description":"Unique identifier for the assistant message.","type":"string"},"role":{"enum":["assistant"],"type":"string"},"type":{"enum":["start"],"type":"string"}},"required":["type","messageId","role"],"type":"object"},"AdvisorChatStreamStartStepEvent":{"properties":{"type":{"enum":["start-step"],"type":"string"}},"required":["type"],"type":"object"},"AdvisorChatStreamTextDeltaEvent":{"properties":{"delta":{"description":"Next chunk of assistant text.","type":"string"},"id":{"type":"string"},"type":{"enum":["text-delta"],"type":"string"}},"required":["type","id","delta"],"type":"object"},"AdvisorChatStreamTextEndEvent":{"properties":{"id":{"type":"string"},"type":{"enum":["text-end"],"type":"string"}},"required":["type","id"],"type":"object"},"AdvisorChatStreamTextStartEvent":{"properties":{"id":{"description":"Identifier for the text block being streamed.","type":"string"},"type":{"enum":["text-start"],"type":"string"}},"required":["type","id"],"type":"object"},"AdvisorChatSubjectTypeEnum":{"enum":["general","patient_daily_insight","sms_message","pinned_health_targets","client_prompt","meal_reflection"],"type":"string"},"AdvisorQuestionSuggestionResponse":{"properties":{"id":{"type":"integer"},"patient_id":{"type":"integer"},"question":{"type":"string"},"question_date":{"description":"date of the question","example":"2021-01-01","type":"string"}},"required":["id","patient_id","question_date","question"]},"AveragePlateDataResponse":{"properties":{"breakfast":{"$ref":"#/components/schemas/AveragePlateMealDataResponse","nullable":true,"type":"object"},"calculation_method":{"type":"string"},"date_since":{"type":"string"},"date_until":{"type":"string"},"dinner":{"$ref":"#/components/schemas/AveragePlateMealDataResponse","nullable":true,"type":"object"},"lunch":{"$ref":"#/components/schemas/AveragePlateMealDataResponse","nullable":true,"type":"object"},"n_meals":{"nullable":true,"type":"number"},"overall":{"$ref":"#/components/schemas/AveragePlateMealDataResponse","nullable":true,"type":"object"},"snack":{"$ref":"#/components/schemas/AveragePlateMealDataResponse","nullable":true,"type":"object"},"statements":{"items":{"type":"string"},"nullable":true,"type":"array"}},"required":["calculation_method"]},"AveragePlateMealDataResponse":{"properties":{"fruit":{"nullable":true,"type":"number"},"grains":{"nullable":true,"type":"number"},"protein":{"nullable":true,"type":"number"},"vegetable":{"nullable":true,"type":"number"}},"required":["protein","fruit","grains","vegetable"]},"AzureSearchIndexManagerResponse":{"properties":{"created_time":{"nullable":false,"type":"string"},"document_count":{"nullable":false,"type":"integer"},"id":{"nullable":false,"type":"integer"},"index_name":{"nullable":false,"type":"string"},"is_active":{"nullable":false,"type":"boolean"},"is_deployed":{"nullable":false,"type":"boolean"},"storage_size_mb":{"nullable":false,"type":"integer"},"updated_time":{"nullable":false,"type":"string"}},"required":["index_name"]},"BeverageFrequencyResponse":{"properties":{"alcohol":{"nullable":false,"type":"number"},"artificially_sweetened":{"nullable":false,"type":"number"},"coffee_tea_cocoa":{"nullable":false,"type":"number"},"milk_and_alternatives":{"nullable":false,"type":"number"},"non_alcoholic":{"nullable":true,"type":"number"},"sugary_beverage":{"nullable":false,"type":"number"},"water":{"nullable":false,"type":"number"}},"required":["milk_and_alternatives","sugary_beverage","alcohol","coffee_tea_cocoa","water","artificially_sweetened"]},"BrandAliasResponse":{"properties":{"alias":{"type":"string"},"alias_normalized":{"type":"string"},"brand_id":{"type":"integer"},"confidence":{"nullable":true,"type":"number"},"created_time":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"source":{"nullable":true,"type":"string"}},"type":"object"},"BrandDetailResponse":{"properties":{"aliases":{"items":{"$ref":"#/components/schemas/BrandAliasResponse"},"type":"array"},"brand_type":{"type":"string"},"country":{"nullable":true,"type":"string"},"created_time":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"manufacturer_id":{"nullable":true,"type":"integer"},"name":{"type":"string"},"name_normalized":{"type":"string"},"status":{"type":"string"},"updated_time":{"format":"date-time","nullable":true,"type":"string"}},"type":"object"},"BrandResolveResponse":{"properties":{"brand":{"allOf":[{"$ref":"#/components/schemas/BrandResponse"}],"nullable":true},"match":{"type":"boolean"},"matched_on":{"enum":["name","alias"],"nullable":true,"type":"string"}},"type":"object"},"BrandResponse":{"properties":{"brand_type":{"type":"string"},"country":{"nullable":true,"type":"string"},"created_time":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"manufacturer_id":{"nullable":true,"type":"integer"},"name":{"type":"string"},"name_normalized":{"type":"string"},"status":{"type":"string"},"updated_time":{"format":"date-time","nullable":true,"type":"string"}},"type":"object"},"CalculateCompositeFoodDetailsRequest":{"properties":{"components":{"items":{"$ref":"#/components/schemas/FoodComponentResponse"},"nullable":false,"type":"array"}},"required":["components"]},"CalculateCompositeFoodDetailsResponse":{"properties":{"cc":{"$ref":"#/components/schemas/CcColumnsRequest","nullable":true},"mixed_dish_components":{"$ref":"#/components/schemas/FoodRowMixedDishComponents","nullable":true},"usda_nutrition":{"$ref":"#/components/schemas/UsdaNutritionResponse","nullable":true}}},"CancelClinikoAppointmentRequest":{"properties":{"cancellation_reason_code":{"enum":["user_request","schedule_conflict","provider_cancelled","no_show","other"],"nullable":true,"type":"string"},"cancellation_reason_note":{"nullable":true,"type":"string"}},"type":"object"},"CarbohydrateFrequencyResponse":{"properties":{"beverage":{"nullable":false,"type":"number"},"fruit":{"nullable":false,"type":"number"},"grains":{"nullable":false,"type":"number"},"legume":{"nullable":false,"type":"number"},"other":{"nullable":false,"type":"number"},"statements":{"items":{"properties":{"name":{"example":"source","type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"vegetable":{"nullable":false,"type":"number"}},"required":["fruit","vegetable","legume","grains","other"]},"CarbohydrateReportResponse":{"properties":{"nutrient_label":{"nullable":false,"type":"string"},"nutrient_name":{"nullable":false,"type":"string"},"rows":{"items":{"$ref":"#/components/schemas/CarbohydrateReportRowResponse"},"type":"array"}},"required":["nutrient_name","nutrient_label","rows"]},"CarbohydrateReportRowResponse":{"properties":{"breakfast":{"nullable":false,"type":"number"},"dinner":{"nullable":false,"type":"number"},"lunch":{"nullable":false,"type":"number"},"meal_date":{"nullable":false,"type":"string"},"snack":{"nullable":false,"type":"number"}},"required":["meal_date","breakfast","lunch","dinner","snack"]},"CcColumnsRequest":{"properties":{"cc_added_sugars":{"example":null,"nullable":true,"type":"boolean"},"cc_additives":{"example":null,"nullable":true,"type":"boolean"},"cc_beverage":{"example":null,"nullable":true,"type":"boolean"},"cc_calcium":{"example":null,"nullable":true,"type":"boolean"},"cc_complexcarbs":{"example":null,"nullable":true,"type":"boolean"},"cc_composite_dish":{"example":null,"nullable":true,"type":"boolean"},"cc_cooked":{"example":null,"nullable":true,"type":"boolean"},"cc_fish":{"example":null,"nullable":true,"type":"boolean"},"cc_fried":{"example":null,"nullable":true,"type":"boolean"},"cc_fruit":{"example":null,"nullable":true,"type":"boolean"},"cc_gluten_free":{"example":null,"nullable":true,"type":"boolean"},"cc_grains":{"example":null,"nullable":true,"type":"boolean"},"cc_healthy_fat":{"example":null,"nullable":true,"type":"boolean"},"cc_high_fiber":{"example":null,"nullable":true,"type":"boolean"},"cc_legume":{"example":null,"nullable":true,"type":"boolean"},"cc_meat":{"example":null,"nullable":true,"type":"boolean"},"cc_non_meat_animal_protein":{"example":null,"nullable":true,"type":"boolean"},"cc_nuts_seeds":{"example":null,"nullable":true,"type":"boolean"},"cc_omega_three":{"example":null,"nullable":true,"type":"boolean"},"cc_plant_based":{"example":null,"nullable":true,"type":"boolean"},"cc_plant_based_whole":{"example":null,"nullable":true,"type":"boolean"},"cc_plant_protein":{"example":null,"nullable":true,"type":"boolean"},"cc_pork":{"example":null,"nullable":true,"type":"boolean"},"cc_poultry":{"example":null,"nullable":true,"type":"boolean"},"cc_processed":{"example":null,"nullable":true,"type":"boolean"},"cc_protein":{"example":null,"nullable":true,"type":"boolean"},"cc_raw":{"example":null,"nullable":true,"type":"boolean"},"cc_redmeat":{"example":null,"nullable":true,"type":"boolean"},"cc_shellfish":{"example":null,"nullable":true,"type":"boolean"},"cc_simplecarbs":{"example":null,"nullable":true,"type":"boolean"},"cc_standalone_food":{"example":null,"nullable":true,"type":"boolean"},"cc_sugar_free":{"example":null,"nullable":true,"type":"boolean"},"cc_sugary_beverage":{"example":null,"nullable":true,"type":"boolean"},"cc_supplement":{"example":null,"nullable":true,"type":"boolean"},"cc_ultraprocessed":{"example":null,"nullable":true,"type":"boolean"},"cc_unhealthy_fat":{"example":null,"nullable":true,"type":"boolean"},"cc_vegetable":{"example":null,"nullable":true,"type":"boolean"},"cc_whole":{"example":null,"nullable":true,"type":"boolean"},"cc_whole_foods":{"example":null,"nullable":true,"type":"boolean"}}},"CcServingsResponse":{"additionalProperties":{"type":"number"},"description":"Servings-weighted CC values. Keys match `CcColumnsRequest` fields. Values are derived from calculated servings (clamped to 0-5, rounded to 0.1) and the corresponding boolean CC flag, matching the `health_data_table` nutrients aggregation semantics for `cc_*` fields.\n","nullable":true,"type":"object"},"ChangeLogItem":{"properties":{"change_type":{"enum":["create","update","delete"],"type":"string"},"id":{"type":"integer"},"item_id":{"description":"The id of the changed item.","type":"string"},"item_type":{"description":"The type of item that was changed (ie, the database table name).","type":"string"},"new":{"additionalProperties":true,"description":"new field values (ex, {\"name\": \"new name\"}). Null if change_type is delete.","type":"object"},"old":{"additionalProperties":true,"description":"old field values (ex, {\"name\": \"old name\"}). Null if change_type is create.","type":"object"},"timestamp":{"format":"date-time","type":"string"},"timestamp_wall":{"format":"date-time","type":"string"},"user_email":{"description":"The email of the user who made the change.","type":"string"},"user_id":{"description":"The id of the user who made the change.","type":"integer"},"user_name":{"description":"The name of the user who made the change.","type":"string"}},"required":["id","item_type","item_id","change_type","timestamp"]},"ChefResponse":{"properties":{"bio":{"nullable":true,"type":"string"},"contributor_kind":{"enum":["internal_staff","external_expert","chef","community"],"type":"string"},"created_by_user_id":{"description":"Admin who granted chef status the first time","nullable":true,"type":"integer"},"created_time":{"description":"time in UTC","format":"date-time","type":"string"},"display_name":{"description":"Patient-facing attribution, e.g. 'Created by Doris'","type":"string"},"id":{"description":"Same as the underlying user id","type":"integer"},"image_url":{"nullable":true,"type":"string"},"is_active":{"type":"boolean"},"last_updated_by_user_id":{"description":"Admin who most recently granted, re-granted, or revoked chef status","nullable":true,"type":"integer"},"updated_time":{"description":"time in UTC","format":"date-time","type":"string"}},"required":["id","display_name","contributor_kind","is_active","created_time","updated_time"]},"ClinicAppointmentResponse":{"properties":{"appointment_id":{"type":"integer"},"created_by_user_id":{"type":"integer"},"created_time":{"format":"date-time","type":"string"},"description":{"type":"string"},"end_time":{"description":"calendar date in format YYYY-MM-DD HH:MM:SS","example":"2020-05-10 09:30:00","format":"date-time","type":"string"},"patient_id":{"type":"integer"},"purpose":{"type":"string"},"start_time":{"description":"calendar date in format YYYY-MM-DD HH:MM:SS","example":"2020-05-02 08:30:00","format":"date-time","type":"string"},"title":{"type":"string"},"updated_time":{"format":"date-time","type":"string"}},"required":["appointment_id","patient_id","title","start_time","end_time"]},"ClinicAppointmentsResponse":{"properties":{"clinic_appointments":{"items":{"$ref":"#/components/schemas/ClinicAppointmentResponse"},"type":"array"},"clinic_id":{"type":"integer"}},"required":["clinic_id"]},"ClinicInvitationCodeResponse":{"properties":{"clinic_id":{"type":"integer"},"created_time":{"format":"date-time","type":"string"},"id":{"type":"integer"},"invitation_code":{"type":"string"},"updated_time":{"format":"date-time","type":"string"}},"required":["id","clinic_id","invitation_code","created_time","updated_time"]},"ClinicLinkResponse":{"properties":{"created_by_clinician_id":{"type":"integer"},"created_time":{"format":"date-time","type":"string"},"id":{"type":"integer"},"link":{"type":"string"},"patient_id":{"type":"integer"},"updated_time":{"format":"date-time","type":"string"}},"required":["id","patient_id","created_by_clinician_id","link","created_time","updated_time"]},"ClinicMealPlanSettingsRequest":{"properties":{"brand_color_primary":{"type":"string"},"brand_color_secondary":{"type":"string"},"footer_text":{"nullable":true,"type":"string"},"logo_storage_key":{"nullable":true,"type":"string"}}},"ClinicMealPlanSettingsResponse":{"properties":{"brand_color_primary":{"type":"string"},"brand_color_secondary":{"type":"string"},"clinic_id":{"type":"integer"},"footer_text":{"nullable":true,"type":"string"},"id":{"type":"integer"},"logo_storage_key":{"nullable":true,"type":"string"}},"required":["id","clinic_id","brand_color_primary","brand_color_secondary"]},"ClinicPatientsReportResponse":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/ClinicPatientsReportRowResponse"},"type":"array"}},"required":["rows"]},"ClinicPatientsReportRowGoalResponse":{"properties":{"change":{"example":"increase, decrease","type":"string"},"goal_id":{"type":"integer"},"goal_type":{"example":"frequency, nutrient","type":"string"},"patient_id":{"type":"integer"},"period":{"enum":["day","week","breakfast","lunch","dinner","snack"],"type":"string"},"success":{"type":"boolean"},"target_display_name":{"example":"vitamin c","type":"string"},"target_name":{"example":"vitamin_c_mg","type":"string"},"target_unit":{"example":"mg","nullable":true,"type":"string"},"target_value":{"type":"number"}},"required":["goal_id","patient_id","goal_type","change","target_name","target_display_name","target_value","period","success"]},"ClinicPatientsReportRowResponse":{"properties":{"email":{"type":"string"},"feeling":{"nullable":true,"type":"string"},"first_name":{"type":"string"},"goals":{"items":{"$ref":"#/components/schemas/ClinicPatientsReportRowGoalResponse"},"type":"array"},"is_registered":{"type":"boolean"},"last_meal_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","nullable":true,"type":"string"},"last_name":{"type":"string"},"patient_id":{"type":"integer"},"phone_number":{"nullable":true,"type":"string"},"tracking_start_date":{"nullable":true,"type":"string"}},"required":["patient_id","first_name","last_name","email","is_registered","goals"]},"ClinicResponse":{"properties":{"address":{"description":"Street address where the clinic is located","nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"clinic_address":{"nullable":true,"type":"string"},"clinic_email":{"nullable":true,"type":"string"},"clinic_logo_url":{"nullable":true,"type":"string"},"clinic_phone_number":{"nullable":true,"type":"string"},"clinic_postal_code":{"nullable":true,"type":"string"},"clinic_state_province":{"nullable":true,"type":"string"},"clinic_type":{"enum":["corporate","research","collaboration","wellness","obesity","diabetes","metabolic syndrome","weight loss","migraine","gastroesophageal reflux","gi discomfort","vertigo","sleep apnea","rxlife","dexcom","menopause"],"type":"string"},"clinic_website":{"nullable":true,"type":"string"},"config_add_default_goals_to_new_patients":{"nullable":true,"type":"boolean"},"config_add_default_tips_to_new_patients":{"nullable":true,"type":"boolean"},"country":{"description":"Clinic mailing country when set; otherwise hospital country when available (Canada or USA)","nullable":true,"type":"string"},"created_time":{"format":"date-time","type":"string"},"default_report_template":{"example":["clinical_summary_statement","calories_by_period","carbs_by_period","fasting_windows","average_plate_serv","macronutrient_distribution","micronutrient_summary_table","diet_quality_score","carbohydrate_frequency","GI_food_list","glycemic_index_frequency","average_fats_frequency","average_beverage_frequency","average_grains_frequency","average_proteins_frequency","food_dump","supplements"],"items":{"type":"string"},"type":"array"},"description":{"nullable":true,"type":"string"},"flags":{"$ref":"#/components/schemas/RxFeatureFlagsResponse","type":"object"},"full_name":{"description":"Full/legal clinic name","nullable":true,"type":"string"},"hospital_id":{"type":"integer"},"id":{"type":"integer"},"invited_by":{"description":"The user who invited the patient to THIS clinic (per-clinic membership). Populated only by GET /patients/{id}/clinics; null when the inviter is unknown or on other clinic endpoints.","nullable":true,"properties":{"email":{"nullable":true,"type":"string"},"first_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"last_name":{"nullable":true,"type":"string"}},"type":"object"},"is_disabled":{"type":"boolean"},"name":{"type":"string"},"receive_report_notification":{"nullable":true,"type":"boolean"},"receive_report_pdf_by_email":{"nullable":true,"type":"boolean"},"report_template_sections":{"nullable":true,"type":"object"},"state":{"description":"Region / state / province (structured address)","nullable":true,"type":"string"},"updated_time":{"format":"date-time","type":"string"},"zip_code":{"nullable":true,"type":"string"}},"required":["id","hospital_id","clinic_type","name","created_time","updated_time"]},"ClinicSearchHit":{"properties":{"clinic_type":{"type":"string"},"hospital_id":{"type":"integer"},"id":{"type":"integer"},"name":{"type":"string"},"type":{"enum":["clinic"],"type":"string"}},"required":["type","id","name","clinic_type","hospital_id"],"type":"object"},"ClinicianAppointmentResponse":{"properties":{"appointment_id":{"type":"integer"},"clinic_id":{"type":"integer"},"created_by_user_id":{"type":"integer"},"created_time":{"format":"date-time","type":"string"},"description":{"type":"string"},"end_time":{"description":"calendar date in format YYYY-MM-DD HH:MM:SS","example":"2020-05-10 09:30:00","format":"date-time","type":"string"},"patient_id":{"type":"integer"},"purpose":{"type":"string"},"start_time":{"description":"calendar date in format YYYY-MM-DD HH:MM:SS","example":"2020-05-02 08:30:00","format":"date-time","type":"string"},"title":{"type":"string"},"updated_time":{"format":"date-time","type":"string"}},"required":["appointment_id","patient_id","clinic_id","title","start_time","end_time"]},"ClinicianAppointmentsResponse":{"properties":{"clinician_appointments":{"items":{"$ref":"#/components/schemas/ClinicianAppointmentResponse"},"type":"array"},"clinician_id":{"type":"integer"}},"required":["clinician_id"]},"ClinicianGuidanceContent":{"additionalProperties":false,"properties":{"communication_style":{"type":"string"},"focus_areas":{"items":{"type":"string"},"type":"array"},"foods_to_add":{"items":{"type":"string"},"type":"array"},"foods_to_limit":{"items":{"type":"string"},"type":"array"},"goal":{"type":"string"},"patient_context":{"type":"string"},"recommendations":{"items":{"type":"string"},"type":"array"},"schema_version":{"enum":[1],"type":"integer"}},"required":["schema_version","goal"],"type":"object"},"ClinicianGuidanceFreshnessEnum":{"enum":["current","stale","omitted"],"type":"string"},"ClinicianGuidanceListResponse":{"properties":{"own_clinic":{"items":{"$ref":"#/components/schemas/ClinicianGuidanceOwnClinicResponse"},"type":"array"},"shared":{"items":{"$ref":"#/components/schemas/ClinicianGuidanceSharedClinicResponse"},"type":"array"}},"required":["own_clinic","shared"],"type":"object"},"ClinicianGuidanceOwnClinicResponse":{"properties":{"admin_audit_reason":{"nullable":true,"type":"string"},"clinic_id":{"type":"integer"},"confirmed_at":{"format":"date-time","type":"string"},"content":{"$ref":"#/components/schemas/ClinicianGuidanceContent"},"created_by_user_id":{"nullable":true,"type":"integer"},"created_time":{"format":"date-time","type":"string"},"editable":{"type":"boolean"},"effective_at":{"format":"date-time","type":"string"},"ends_at":{"format":"date-time","nullable":true,"type":"string"},"expires_at":{"format":"date-time","type":"string"},"freshness":{"$ref":"#/components/schemas/ClinicianGuidanceFreshnessEnum"},"hospital_id":{"type":"integer"},"id":{"type":"integer"},"omitted_at":{"format":"date-time","type":"string"},"patient_id":{"type":"integer"},"status":{"$ref":"#/components/schemas/ClinicianGuidanceRevisionStatusEnum"},"superseded_at":{"format":"date-time","nullable":true,"type":"string"},"supersedes_id":{"nullable":true,"type":"integer"},"updated_time":{"format":"date-time","type":"string"},"version":{"type":"integer"}},"required":["id","patient_id","clinic_id","hospital_id","content","status","freshness","effective_at","confirmed_at","expires_at","omitted_at","version","editable"],"type":"object"},"ClinicianGuidanceRenewRequest":{"properties":{"admin_audit_reason":{"nullable":true,"type":"string"},"content":{"allOf":[{"$ref":"#/components/schemas/ClinicianGuidanceContent"}],"nullable":true},"ends_at":{"format":"date-time","nullable":true,"type":"string"},"expected_version":{"nullable":true,"type":"integer"},"revision_id":{"type":"integer"}},"required":["revision_id"],"type":"object"},"ClinicianGuidanceRevisionResponse":{"description":"Own-clinic editable shape, or anonymous shared shape for cross-clinic reads","oneOf":[{"$ref":"#/components/schemas/ClinicianGuidanceOwnClinicResponse"},{"$ref":"#/components/schemas/ClinicianGuidanceSharedClinicResponse"}]},"ClinicianGuidanceRevisionStatusEnum":{"enum":["active","superseded"],"type":"string"},"ClinicianGuidanceSaveRequest":{"properties":{"admin_audit_reason":{"nullable":true,"type":"string"},"clinic_id":{"type":"integer"},"content":{"$ref":"#/components/schemas/ClinicianGuidanceContent"},"ends_at":{"format":"date-time","nullable":true,"type":"string"}},"required":["clinic_id","content"],"type":"object"},"ClinicianGuidanceSharedClinicResponse":{"properties":{"confirmed_at":{"format":"date-time","type":"string"},"content":{"$ref":"#/components/schemas/ClinicianGuidanceContent"},"editable":{"enum":[false],"type":"boolean"},"effective_at":{"format":"date-time","type":"string"},"ends_at":{"format":"date-time","nullable":true,"type":"string"},"expires_at":{"format":"date-time","type":"string"},"freshness":{"$ref":"#/components/schemas/ClinicianGuidanceFreshnessEnum"},"omitted_at":{"format":"date-time","type":"string"},"status":{"$ref":"#/components/schemas/ClinicianGuidanceRevisionStatusEnum"}},"required":["content","status","freshness","effective_at","confirmed_at","expires_at","omitted_at","editable"],"type":"object"},"ClinicianGuidanceUpdateRequest":{"properties":{"admin_audit_reason":{"nullable":true,"type":"string"},"content":{"$ref":"#/components/schemas/ClinicianGuidanceContent"},"ends_at":{"format":"date-time","nullable":true,"type":"string"},"expected_version":{"nullable":true,"type":"integer"}},"required":["content"],"type":"object"},"ClinicianLinkResponse":{"properties":{"created_by_clinician_id":{"type":"integer"},"created_time":{"format":"date-time","type":"string"},"id":{"type":"integer"},"link":{"type":"string"},"patient_id":{"type":"integer"},"updated_time":{"format":"date-time","type":"string"}},"required":["id","patient_id","created_by_clinician_id","link","created_time","updated_time"]},"ClinicianMealLogsTableResponseRow":{"properties":{"day_of_week":{"description":"monday, tuesday, wednesday, thursday, friday, saturday, sunday","type":"string"},"food_image_url":{"nullable":true,"type":"string"},"food_name_with_image":{"nullable":true,"type":"string"},"meal_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","nullable":true,"type":"string"},"meal_id":{"type":"integer"},"meal_items":{"items":{"type":"string"},"nullable":true,"type":"array"},"meal_name":{"description":"breakfast, lunch, dinner, snack, other","type":"string"},"meal_photo_id":{"nullable":true,"type":"string"},"meal_photo_url":{"nullable":true,"type":"string"},"meal_time":{"description":"time in 24h format hh:mm","example":"17:30","type":"string"}},"required":["meal_date","meal_time"]},"ClinicianPatientsTableResponseRow":{"properties":{"clinics":{"items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"type":"array"},"email":{"type":"string"},"first_name":{"type":"string"},"has_active_subscription":{"type":"boolean"},"has_completed_subscription":{"type":"boolean"},"has_draft_report":{"type":"boolean"},"has_expired_subscription":{"type":"boolean"},"has_upcoming_subscription":{"type":"boolean"},"hospital_attributes":{"$ref":"#/components/schemas/PatientHospitalAttributes"},"invitation_id":{"nullable":true,"type":"integer"},"invitation_status":{"enum":["pending","accepted","rejected","revoked","expired"],"nullable":true,"type":"string"},"is_registered":{"type":"boolean"},"last_completed_report_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","nullable":true,"type":"string"},"last_meal_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","nullable":true,"type":"string"},"last_name":{"type":"string"},"most_recent_subscription_start_date":{"nullable":true,"type":"string"},"next_report_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","nullable":true,"type":"string"},"patient_id":{"type":"integer"},"phone_number":{"nullable":true,"type":"string"},"registered_by_user_id":{"type":"integer"},"tracking_start_date":{"nullable":true,"type":"string"}},"required":["patient_id","first_name","last_name","email","is_registered"]},"ClinicianResponse":{"properties":{"bio":{"type":"string"},"created_time":{"format":"date-time","type":"string"},"direct_patient_email_permitted":{"type":"boolean"},"email":{"type":"string"},"email_verified":{"type":"boolean"},"first_name":{"type":"string"},"flags":{"$ref":"#/components/schemas/RxFeatureFlagsResponse","type":"object"},"hospital_id":{"type":"integer"},"id":{"type":"integer"},"is_internal":{"type":"boolean"},"is_meal_admin":{"type":"boolean"},"is_report_admin":{"type":"boolean"},"is_report_previewer":{"type":"boolean"},"last_name":{"type":"string"},"locale":{"type":"string"},"phone_number":{"type":"string"},"updated_time":{"format":"date-time","type":"string"}},"required":["id","hospital_id","first_name","last_name","phone_number","email","email_verified","bio","is_meal_admin","direct_patient_email_permitted","created_time","updated_time"]},"ClinicianTipResponse":{"properties":{"created_by_clinician_id":{"type":"integer"},"created_time":{"format":"date-time","type":"string"},"message":{"type":"string"},"patient_id":{"type":"integer"},"updated_time":{"format":"date-time","type":"string"}},"required":["patient_id","created_by_clinician_id","message","created_time","updated_time"]},"ClinicianTipResponses":{"properties":{"date_since":{"format":"date-time","type":"string"},"date_until":{"format":"date-time","type":"string"},"patient_id":{"type":"integer"},"tips":{"items":{"$ref":"#/components/schemas/ClinicianTipResponse"},"type":"array"}},"required":["patient_id","date_since","date_until"]},"ClinikoAppointmentResponse":{"properties":{"appointment_type_description":{"nullable":true,"type":"string"},"appointment_type_id":{"nullable":true,"type":"integer"},"appointment_type_name":{"type":"string"},"appointment_type_sort_order":{"nullable":true,"type":"integer"},"assigned_practitioner_id":{"nullable":true,"type":"integer"},"business_timezone":{"nullable":true,"type":"string"},"canceled_at":{"format":"date-time","nullable":true,"type":"string"},"cancellation_reason":{"nullable":true,"type":"string"},"cliniko_appointment_id":{"type":"integer"},"created_time":{"format":"date-time","type":"string"},"duration_minutes":{"type":"integer"},"ends_at":{"format":"date-time","type":"string"},"id":{"type":"integer"},"localized_ends_at":{"format":"date-time","nullable":true,"type":"string"},"localized_starts_at":{"format":"date-time","nullable":true,"type":"string"},"practitioner":{"$ref":"#/components/schemas/ClinikoPractitionerResponse"},"province_code":{"type":"string"},"slot_id":{"nullable":true,"type":"string"},"starts_at":{"format":"date-time","type":"string"},"status":{"type":"string"},"telehealth_link_policy":{"$ref":"#/components/schemas/ClinikoTelehealthLinkPolicyResponse"},"telehealth_url":{"nullable":true,"type":"string"}},"required":["id","cliniko_appointment_id","appointment_type_name","duration_minutes","province_code","starts_at","ends_at","status","created_time"],"type":"object"},"ClinikoAppointmentTypeResponse":{"properties":{"cliniko_id":{"type":"integer"},"description":{"nullable":true,"type":"string"},"display_name":{"type":"string"},"duration_minutes":{"type":"integer"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"name":{"type":"string"},"sort_order":{"type":"integer"},"telehealth_enabled":{"type":"boolean"}},"required":["id","cliniko_id","name","display_name","duration_minutes","telehealth_enabled","sort_order","is_active"],"type":"object"},"ClinikoAppointmentTypesResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/ClinikoAppointmentTypeResponse"},"type":"array"}},"required":["results"],"type":"object"},"ClinikoAppointmentsResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/ClinikoAppointmentResponse"},"type":"array"}},"required":["results"],"type":"object"},"ClinikoAvailabilityResponse":{"properties":{"appointment_type_cliniko_id":{"type":"integer"},"available_times":{"items":{"$ref":"#/components/schemas/ClinikoAvailabilitySlotResponse"},"type":"array"},"business_cliniko_id":{"type":"integer"},"business_timezone":{"type":"string"},"operational_business_cliniko_id":{"type":"integer"},"province_code":{"type":"string"}},"required":["business_cliniko_id","operational_business_cliniko_id","province_code","appointment_type_cliniko_id","business_timezone","available_times"],"type":"object"},"ClinikoAvailabilitySlotResponse":{"properties":{"appointment_start":{"format":"date-time","type":"string"},"business_timezone":{"type":"string"},"display_timezone":{"nullable":true,"type":"string"},"display_timezone_abbr":{"nullable":true,"type":"string"},"practitioner":{"$ref":"#/components/schemas/ClinikoPractitionerResponse"},"practitioner_id":{"description":"Practitioner ID from /cliniko/practitioners[].id.","type":"integer"},"slot_id":{"type":"string"},"starts_at_utc":{"format":"date-time","type":"string"}},"required":["slot_id","appointment_start","starts_at_utc","business_timezone","practitioner_id"],"type":"object"},"ClinikoBookingErrorResponse":{"properties":{"code":{"type":"integer"},"detail":{"type":"string"},"error_code":{"nullable":true,"type":"string"},"message":{"type":"string"},"missing_fields":{"items":{"type":"string"},"nullable":true,"type":"array"},"status":{"type":"integer"},"title":{"type":"string"},"type":{"nullable":true,"type":"string"}},"type":"object"},"ClinikoPractitionerResponse":{"properties":{"active":{"type":"boolean"},"avatar_url":{"nullable":true,"type":"string"},"bio":{"nullable":true,"type":"string"},"cliniko_id":{"type":"integer"},"credentials":{"nullable":true,"type":"string"},"id":{"nullable":true,"type":"integer"},"languages":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"},"province_codes":{"items":{"type":"string"},"type":"array"}},"required":["id","cliniko_id","name","languages","province_codes","active"],"type":"object"},"ClinikoPractitionersResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/ClinikoPractitionerResponse"},"type":"array"}},"required":["results"],"type":"object"},"ClinikoProvinceResponse":{"properties":{"active":{"type":"boolean"},"allowed_timezones":{"items":{"type":"string"},"type":"array"},"code":{"type":"string"},"default_timezone":{"type":"string"},"display_name":{"type":"string"},"eligible":{"type":"boolean"},"sort_order":{"type":"integer"}},"required":["code","display_name","default_timezone","allowed_timezones","sort_order","active","eligible"],"type":"object"},"ClinikoProvincesResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/ClinikoProvinceResponse"},"type":"array"}},"required":["results"],"type":"object"},"ClinikoTelehealthLinkPolicyResponse":{"properties":{"has_link":{"type":"boolean"},"visible":{"type":"boolean"}},"type":"object"},"CognitiveSearchAutocompleteResponse":{"properties":{"autocomplete_results":{"items":{"$ref":"#/components/schemas/CognitiveSearchAutocompleteRowResponse"},"nullable":true,"type":"array"},"search_term":{"description":"context","nullable":false,"type":"string"}},"required":["search_term","autocomplete_results"]},"CognitiveSearchAutocompleteRowResponse":{"properties":{"food_name":{"description":"matching food name","nullable":false,"type":"string"},"food_name_plus_text":{"description":"matching food name","nullable":false,"type":"string"},"id":{"description":"order of result","nullable":false,"type":"integer"}},"required":["id","food_name","food_name_plus_text"]},"CognitiveSearchParametersResponse":{"properties":{"search":{"description":"matching food name","nullable":false,"type":"string"},"skip":{"description":"row id in index","nullable":false,"type":"integer"}},"required":["search","skip"]},"CognitiveSearchResponse":{"properties":{"context":{"description":"context","nullable":false,"type":"string"},"parameters":{"$ref":"#/components/schemas/CognitiveSearchParametersResponse","nullable":false,"type":"object"},"search_results":{"items":{"$ref":"#/components/schemas/CognitiveSearchRowResponse"},"nullable":true,"type":"array"}},"required":["context","parameters","search_results"]},"CognitiveSearchRowResponse":{"properties":{"brand_name":{"description":"matching brand name","nullable":true,"type":"string"},"food_name":{"description":"matching food name","nullable":false,"type":"string"},"id":{"description":"row id in index","type":"integer"},"manufacturer":{"description":"matching manufacturer name","nullable":true,"type":"string"},"score":{"description":"context","type":"number"}},"required":["id","score","food_name"]},"CognitiveSearchSuggestResponse":{"properties":{"search_term":{"description":"context","nullable":false,"type":"string"},"suggest_results":{"items":{"$ref":"#/components/schemas/CognitiveSearchSuggestRowResponse"},"nullable":true,"type":"array"}},"required":["search_term","suggest_results"]},"CognitiveSearchSuggestRowResponse":{"properties":{"id":{"description":"order of result","nullable":false,"type":"integer"},"suggest_food_name":{"description":"suggest food name","nullable":false,"type":"string"}},"required":["id","suggest_food_name"]},"CompatibleClientVersions":{"properties":{"android_min_version":{"description":"empty string if not specified","type":"string"},"ios_min_version":{"description":"empty string if not specified","type":"string"}},"required":["ios_min_version","android_min_version"]},"ConfirmIngredientSwapRequest":{"properties":{"ingredient_index":{"type":"integer"},"new_ingredient_line":{"type":"string"},"slot_id":{"type":"integer"}},"required":["slot_id","ingredient_index","new_ingredient_line"]},"CreateBrandAliasRequest":{"properties":{"alias":{"type":"string"},"confidence":{"nullable":true,"type":"number"},"source":{"type":"string"}},"required":["alias"],"type":"object"},"CreateBrandRequest":{"properties":{"brand_type":{"default":"standard","enum":["standard","store_brand","restaurant"],"type":"string"},"country":{"nullable":true,"type":"string"},"manufacturer_id":{"nullable":true,"type":"integer"},"name":{"type":"string"},"status":{"default":"active","enum":["active","pending_review","deprecated"],"type":"string"}},"required":["name"],"type":"object"},"CreateChefRequest":{"properties":{"bio":{"nullable":true,"type":"string"},"contributor_kind":{"description":"chef and community are reserved and not yet grantable","enum":["internal_staff","external_expert"],"type":"string"},"display_name":{"type":"string"},"image_url":{"nullable":true,"type":"string"},"user_id":{"description":"Existing RxFood user to grant chef status to","type":"integer"}},"required":["user_id","display_name","contributor_kind"]},"CreateClinicAndCliniciansRequest":{"description":"The server merges default feature flags into clinic.flags_raw according to\nclinic.clinic_type (e.g. wellness vs diabetes/obesity). Values sent in\nclinic.flags_raw override those defaults. Other clinic types receive no preset\nflags unless provided in the request.\nWhen create_hospital query parameter is true, hospital_id is optional and a new\nhospital will be created using the clinic name. Otherwise, hospital_id is required.\nThe country field is optional and defaults to Canada when creating a hospital.\nValid country values are Canada or USA.\n","properties":{"clinic":{"$ref":"#/components/schemas/CreateClinicRequest"},"clinicians":{"items":{"$ref":"#/components/schemas/CreateClinicianRequest"},"type":"array"},"country":{"description":"Country for the hospital when create_hospital=true. Valid values are 'Canada' or 'USA'. Aliases 'US' and 'United States' are accepted and normalized to 'USA'. Defaults to 'Canada' if not provided.","nullable":true,"type":"string"},"hospital_id":{"nullable":true,"type":"integer"},"signup_metadata_non_sensitive":{"additionalProperties":true,"description":"Additional signup metadata that does not contain sensitive information. Safe to send to, ex, Metabase and product analytics providers. Currently included in a PatientSignupMetadata telemetry_event.","nullable":true,"type":"object"},"signup_metadata_sensitive":{"additionalProperties":true,"description":"Additional signup metadata that contains sensitive information (PII, PHI, etc). Will not be sent to, ex, Metabase and product analytics providers. Currently included in a PatientSignupMetadata telemetry_event.","nullable":true,"type":"object"}},"required":["clinic","clinicians"]},"CreateClinicRequest":{"properties":{"address":{"description":"Street address (line 1) where the clinic is located","nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"clinic_address":{"nullable":true,"type":"string"},"clinic_email":{"nullable":true,"type":"string"},"clinic_invitation_code":{"nullable":true,"type":"string"},"clinic_logo_base64":{"description":"Base64-encoded logo image; optional data: URL prefix. Stored in public bucket when provided.","nullable":true,"type":"string"},"clinic_logo_filename":{"description":"Original filename for extension hint (e.g. logo.png)","nullable":true,"type":"string"},"clinic_logo_url":{"description":"Public HTTPS URL for clinic logo (used as-is when set without clinic_logo_base64)","nullable":true,"type":"string"},"clinic_phone_number":{"nullable":true,"type":"string"},"clinic_postal_code":{"nullable":true,"type":"string"},"clinic_state_province":{"nullable":true,"type":"string"},"clinic_type":{"enum":["corporate","research","collaboration","wellness","obesity","diabetes","metabolic syndrome","weight loss","migraine","gastroesophageal reflux","gi discomfort","vertigo","sleep apnea","rxlife","dexcom","menopause"],"type":"string"},"clinic_website":{"nullable":true,"type":"string"},"config_add_default_goals_to_new_patients":{"nullable":true,"type":"boolean"},"config_add_default_tips_to_new_patients":{"nullable":true,"type":"boolean"},"country":{"description":"Clinic mailing country. Valid values are 'Canada' or 'USA'. Aliases 'US' and 'United States' are accepted and normalized to 'USA'.","nullable":true,"type":"string"},"default_report_template":{"example":["clinical_summary_statement","calories_by_period","carbs_by_period","fasting_windows","average_plate_serv","macronutrient_distribution","micronutrient_summary_table","diet_quality_score","carbohydrate_frequency","GI_food_list","glycemic_index_frequency","average_fats_frequency","average_beverage_frequency","average_grains_frequency","average_proteins_frequency","food_dump","supplements"],"items":{"type":"string"},"nullable":true,"type":"array"},"description":{"nullable":true,"type":"string"},"flags_raw":{"$ref":"#/components/schemas/RxFeatureFlagsResponse","nullable":true},"full_name":{"description":"Full/legal clinic name","nullable":true,"type":"string"},"name":{"type":"string"},"receive_report_notification":{"nullable":true,"type":"boolean"},"receive_report_pdf_by_email":{"nullable":true,"type":"boolean"},"report_template_sections":{"nullable":true,"type":"object"},"state":{"description":"Region / state / province for structured address","nullable":true,"type":"string"},"zip_code":{"nullable":true,"type":"string"}},"required":["name","clinic_type"]},"CreateClinicianAppointmentRequest":{"properties":{"description":{"type":"string"},"end_time":{"description":"calendar date in format YYYY-MM-DD HH:MM:SS","example":"2020-05-10 09:30:00","format":"date-time","type":"string"},"purpose":{"type":"string"},"start_time":{"description":"calendar date in format YYYY-MM-DD HH:MM:SS","example":"2020-05-02 08:30:00","format":"date-time","type":"string"},"title":{"type":"string"}},"required":["start_time","end_time","title","description","purpose"]},"CreateClinicianLinkBatchRequest":{"properties":{"created_by_clinician_id":{"type":"integer"},"link":{"type":"string"},"patient_ids":{"items":{"type":"integer"},"type":"array"}},"required":["created_by_clinician_id","link","patient_ids"]},"CreateClinicianLinkForTestingRequest":{"properties":{"link":{"type":"string"},"patient_id":{"type":"integer"}},"required":["link","patient_id"]},"CreateClinicianRequest":{"properties":{"bio":{"type":"string"},"clinic_ids":{"description":"array of clinic ids to add the clinician to. clinician must be in the hospital of each.","items":{"type":"integer"},"nullable":true,"type":"array"},"email":{"type":"string"},"first_name":{"type":"string"},"is_clinic_admin":{"nullable":true,"type":"boolean"},"is_notified_of_report":{"nullable":true,"type":"boolean"},"last_name":{"type":"string"},"password":{"nullable":true,"type":"string"},"phone_number":{"type":"string"},"preferred_contact":{"nullable":true,"type":"boolean"}},"required":["first_name","last_name","email","bio"]},"CreateClinicianTipBatchRequest":{"properties":{"created_by_clinician_id":{"type":"integer"},"message":{"type":"string"},"patient_ids":{"items":{"type":"integer"},"type":"array"}},"required":["created_by_clinician_id","message","patient_ids"]},"CreateClinicianTipForTestingRequest":{"properties":{"message":{"type":"string"},"patient_id":{"type":"integer"}},"required":["message","patient_id"]},"CreateClinikoAppointmentRequest":{"properties":{"additional_comments":{"nullable":true,"type":"string"},"appointment_type_id":{"type":"integer"},"birthday":{"format":"date","nullable":true,"type":"string"},"idempotency_key":{"nullable":true,"type":"string"},"patient_timezone":{"nullable":true,"type":"string"},"phone_number":{"nullable":true,"type":"string"},"province_code":{"type":"string"},"slot_id":{"type":"string"}},"required":["appointment_type_id","province_code","slot_id"],"type":"object"},"CreateDataReviewerGroupRequest":{"properties":{"group_name":{"type":"integer"},"is_active":{"type":"boolean"}},"required":["group_name","is_active"]},"CreateDataReviewerRequest":{"properties":{"country_of_residence":{"nullable":true,"type":"string"},"email":{"nullable":false,"type":"string"},"first_name":{"nullable":true,"type":"string"},"last_name":{"nullable":true,"type":"string"},"review_level":{"description":"level of access. defaults to reviewer","enum":["analyst","reviewer"],"nullable":true,"type":"string"}},"required":["email"]},"CreateDefaultClinicianLinkRequest":{"properties":{"description":{"type":"string"},"link":{"type":"string"},"title":{"type":"string"}},"required":["link"]},"CreateFavoriteRequest":{"properties":{"addon_names":{"items":{"type":"string"},"nullable":true,"type":"array"},"custom_label":{"description":"user-defined label to be stored with the favorite.","nullable":true,"type":"string"},"food_name":{"description":"food name","example":"pizza","type":"string"},"note":{"description":"note to be stored with the favorite.","nullable":true,"type":"string"},"replacement_food_name":{"description":"replacement food as generated by the system","example":"thin crust pizza","nullable":true,"type":"string"},"serving_type_label":{"description":"special label indicating custom servings, such pizza size","nullable":true,"type":"string"},"serving_type_multiplier":{"description":"multiplier applied to a serving to account for sizing, such as a large pizza when the reference is a small pizza","nullable":true,"type":"number"},"serving_unit_amount":{"description":"unit amount in grams per serving","nullable":true,"type":"number"},"serving_unit_label":{"description":"unit of measure coinciding with the unit amount","nullable":true,"type":"string"},"servings":{"description":"number of servings to be stored","nullable":true,"type":"number"}},"required":["food_name"]},"CreateFoodScrapingRequest":{"properties":{"brand":{"nullable":true,"type":"string"},"food_name":{"type":"string"},"manufacturer":{"nullable":true,"type":"string"},"reference_url":{"nullable":true,"type":"string"}},"required":["food_name"]},"CreateGoalRequest":{"properties":{"change":{"enum":["increase","decrease"],"type":"string"},"goal_type":{"enum":["nutrient","frequency"],"type":"string"},"meal_slots":{"description":"When period is meal, optional subset of meal names; default breakfast/lunch/dinner","items":{"enum":["breakfast","lunch","dinner","snack"],"type":"string"},"nullable":true,"type":"array"},"period":{"enum":["day","week","breakfast","lunch","dinner","snack","meal"],"type":"string"},"target_name":{"example":"vitamin_c_mg","type":"string"},"target_range_high":{"nullable":true,"type":"number"},"target_range_low":{"nullable":true,"type":"number"},"target_range_type":{"enum":["above","below","within"],"nullable":true,"type":"string"},"target_value":{"type":"number"}},"required":["goal_type","change","target_name","target_value","period"]},"CreateGoalsRequest":{"properties":{"goals":{"items":{"$ref":"#/components/schemas/CreateGoalRequest"},"type":"array"}},"required":["goals"]},"CreateHospitalRequest":{"properties":{"address":{"type":"string"},"city":{"type":"string"},"country":{"description":"Hospital country. Valid values are 'Canada' or 'USA'. Aliases 'US' and 'United States' are accepted and normalized to 'USA'.","type":"string"},"description":{"nullable":true,"type":"string"},"full_name":{"type":"string"},"invitation_email_logo_link":{"nullable":true,"type":"string"},"invitation_email_logo_url":{"nullable":true,"type":"string"},"name":{"type":"string"},"photo":{"description":"photo in jpg or png","format":"binary","nullable":true,"type":"string"},"state":{"type":"string"},"zip_code":{"description":"zip code or postal code","type":"string"}},"required":["name","city","country"]},"CreateMealAudioRequest":{"properties":{"id":{"type":"integer"},"location":{"type":"string"}},"required":["id","location"]},"CreateMealItemFoodMatchDetailsRequest":{"properties":{"source_details":{"type":"object"},"source_name":{"enum":["im_lbl_auto","nlp_note","nlp_auto","mpq_im_lbl","search","external","custom","patient_history"],"type":"string"},"user_type":{"enum":["internal","system","patient","clinician"],"type":"string"}},"required":["source_name"]},"CreateMealItemFromQueueRequest":{"properties":{"addons":{"default":[],"example":[],"items":{"type":"string"},"type":"array"},"cc_columns":{"$ref":"#/components/schemas/CcColumnsRequest","nullable":true,"type":"object"},"custom_addons":{"items":{"$ref":"#/components/schemas/MealItemCustomAddonRequest"},"nullable":true,"type":"array"},"custom_item":{"default":false,"example":false,"nullable":true,"type":"boolean"},"custom_item_source":{"nullable":true,"type":"string"},"custom_item_source_id":{"nullable":true,"type":"string"},"custom_nutrient_estimates":{"$ref":"#/components/schemas/NutrientEstimatesRequest","nullable":true,"type":"object"},"custom_usda_id":{"description":"if available the nutrient database, use this ndbno","example":null,"nullable":true,"type":"integer"},"extra_addons":{"default":[],"example":[],"items":{"type":"string"},"type":"array"},"food_match_details":{"$ref":"#/components/schemas/CreateMealItemFoodMatchDetailsRequest","nullable":true,"type":"object"},"food_name":{"type":"string"},"food_name_alias":{"nullable":true,"type":"string"},"food_name_translations":{"nullable":true,"type":"object"},"food_replacement_name":{"example":null,"nullable":true,"type":"string"},"meal_push_question":{"$ref":"#/components/schemas/UpdateMealPushQuestionRequest","nullable":true,"type":"object"},"note":{"example":null,"nullable":true,"type":"string"},"nutrient_overrides":{"$ref":"#/components/schemas/NutrientOverrideCollection","nullable":true,"type":"object"},"percent_eaten":{"default":1,"example":1,"nullable":true,"type":"number"},"preparation_method":{"$ref":"#/components/schemas/PreparationMethodEnum","default":null,"nullable":true},"rxfood_id":{"nullable":true,"type":"string"},"serving_type_label":{"example":null,"nullable":true,"type":"string"},"serving_type_multiplier":{"example":null,"nullable":true,"type":"number"},"serving_unit_amount":{"example":1,"type":"number"},"serving_unit_label":{"example":"gram","type":"string"},"serving_unit_label_translations":{"nullable":true,"type":"object"},"servings":{"type":"number"}},"required":["food_name","serving_unit_label","serving_unit_amount","addons","extra_addons","servings"]},"CreateMealItemRequest":{"properties":{"addons":{"default":[],"example":[],"items":{"type":"string"},"type":"array"},"cc_columns":{"$ref":"#/components/schemas/CcColumnsRequest","nullable":true,"type":"object"},"change_context":{"$ref":"#/components/schemas/QA2ChangeContext","nullable":true,"type":"object"},"custom_addons":{"items":{"$ref":"#/components/schemas/MealItemCustomAddonRequest"},"nullable":true,"type":"array"},"custom_item":{"default":false,"nullable":true,"type":"boolean"},"custom_item_source":{"nullable":true,"type":"string"},"custom_item_source_id":{"nullable":true,"type":"string"},"custom_nutrient_estimates":{"$ref":"#/components/schemas/NutrientEstimatesRequest","nullable":true,"type":"object"},"custom_usda_id":{"description":"if available the nutrient database, use this ndbno","example":null,"nullable":true,"type":"integer"},"extra_addons":{"default":[],"example":[],"items":{"type":"string"},"type":"array"},"food_match_details":{"$ref":"#/components/schemas/CreateMealItemFoodMatchDetailsRequest","nullable":true,"type":"object"},"food_name":{"type":"string"},"food_name_alias":{"nullable":true,"type":"string"},"food_name_translations":{"nullable":true,"type":"object"},"food_ontology":{"items":{"type":"string"},"nullable":true,"type":"array"},"food_replacement_name":{"example":null,"nullable":true,"type":"string"},"meal_audio_id":{"example":null,"nullable":true,"type":"integer"},"meal_nlp_phrase":{"example":null,"nullable":true,"type":"string"},"meal_photo_id":{"example":null,"nullable":true,"type":"integer"},"meal_push_question":{"$ref":"#/components/schemas/UpdateMealPushQuestionRequest","nullable":true,"type":"object"},"note":{"example":null,"nullable":true,"type":"string"},"nutrient_overrides":{"$ref":"#/components/schemas/NutrientOverrideCollection","nullable":true,"type":"object"},"percent_eaten":{"default":1,"nullable":true,"type":"number"},"preparation_method":{"$ref":"#/components/schemas/PreparationMethodEnum","default":null,"nullable":true},"rxfood_id":{"nullable":true,"type":"string"},"serving_type_label":{"example":null,"nullable":true,"type":"string"},"serving_type_multiplier":{"example":null,"nullable":true,"type":"number"},"serving_unit_amount":{"example":1,"type":"number"},"serving_unit_label":{"example":"gram","type":"string"},"serving_unit_label_translations":{"nullable":true,"type":"object"},"servings":{"type":"number"},"source_meal_id":{"description":"meal id the row was copied from when logging from recent items","nullable":true,"type":"integer"},"source_meal_item_custom_addon_id":{"description":"custom addon id the row was copied from when logging from recent items","nullable":true,"type":"integer"},"source_meal_item_id":{"description":"meal item id the row was copied from when logging from recent items","nullable":true,"type":"integer"}},"required":["food_name","serving_unit_label","serving_unit_amount","addons","extra_addons"]},"CreateMealPhotoQueueRequest":{"properties":{"created_meal_id":{"type":"integer"},"data_reviewer_group_id":{"nullable":false,"type":"integer"},"id":{"type":"integer"},"is_processed":{"type":"boolean"},"is_reviewed":{"type":"boolean"},"meal_audio_id":{"description":"meal audio id","nullable":true,"type":"integer"},"meal_nlp_id":{"description":"meal nlp id","nullable":true,"type":"integer"},"meal_photo_id":{"description":"meal photo id","nullable":true,"type":"integer"},"queue_type":{"type":"string"}},"required":["id","queue_type","created_meal_id","data_reviewer_group_id","is_processed","is_reviewed"]},"CreateMealPhotoRequest":{"properties":{"id":{"type":"integer"},"location":{"type":"string"}},"required":["id","location"]},"CreateMealPlanRequest":{"properties":{"active_slots":{"nullable":true,"type":"object"},"diet_labels":{"items":{"type":"string"},"nullable":true,"type":"array"},"exclusions":{"items":{"type":"string"},"nullable":true,"type":"array"},"family_size":{"nullable":true,"type":"integer"},"health_labels":{"items":{"type":"string"},"nullable":true,"type":"array"},"intake_form_data":{"nullable":true,"type":"object"},"motivations":{"nullable":true,"type":"string"},"num_days":{"type":"integer"},"target_calories":{"nullable":true,"type":"integer"},"target_carbs_g":{"nullable":true,"type":"number"},"target_fat_g":{"nullable":true,"type":"number"},"target_protein_g":{"nullable":true,"type":"number"},"title":{"type":"string"}},"required":["title","num_days"]},"CreateMealRequest":{"properties":{"meal_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"},"meal_items":{"items":{"$ref":"#/components/schemas/CreateMealItemRequest"},"type":"array"},"meal_name":{"enum":["breakfast","lunch","dinner","snack"],"type":"string"},"meal_photo_id":{"example":null,"nullable":true,"type":"integer"},"meal_time":{"description":"time in format hh:mm:ss","example":"17:30:00","type":"string"}},"required":["meal_name","meal_date","meal_time"]},"CreatePatientBookmarkCollectionRequest":{"properties":{"description":{"example":"Some description of the collection","nullable":true,"type":"string"},"name":{"example":"Bookmarked Meals","nullable":false,"type":"string"},"system_key":{"$ref":"#/components/schemas/PatientBookmarkCollectionSystemKey","nullable":true}},"required":["name"],"type":"object"},"CreatePatientBookmarkRequest":{"properties":{"name":{"example":"Morning Granola","nullable":false,"type":"string"},"note":{"example":"Some bookmark notes","nullable":true,"type":"string"},"source_id":{"example":123,"nullable":false,"type":"integer"},"source_type":{"example":"meal","nullable":false,"type":"string"},"type":{"example":"meal","nullable":false,"type":"string"}},"required":["name","type","source_type","source_id"],"type":"object"},"CreatePatientCareTeamChallengePointsEventRequest":{"properties":{"challenge_id":{"description":"Required for plant events. Must be thirty-plant-challenge.","enum":["thirty-plant-challenge"],"maxLength":128,"type":"string"},"challenge_run_id":{"description":"Required for plant events.","maxLength":255,"type":"string"},"event_type":{"enum":["QUIZ_COMPLETED","TASK_COMPLETED","TASK_UNCHECKED","PLANT_LOGGED","PLANT_UNLOGGED"],"type":"string"},"idempotency_key":{"description":"For plant events, must be canonical: thirty-plant-challenge:{challenge_run_id}:plant:{plant_source}:{url_encoded_plant_key}:{logged|unlogged}:{client_event_id}.","maxLength":255,"type":"string"},"plant_key":{"description":"Required for plant events. Canonicalized by mobile.","maxLength":255,"type":"string"},"plant_source":{"description":"Required for plant events.","enum":["manual","meal_auto"],"type":"string"},"points_date":{"description":"Optional for plant events. Defaults to patient local date.","format":"date","type":"string"}},"required":["idempotency_key","event_type"],"type":"object"},"CreatePatientCareTeamChallengePointsRedeemRequest":{"properties":{"idempotency_key":{"maxLength":255,"type":"string"},"reward_type":{"description":"Canonical reward type.","enum":["dietitian_session","microbiome_test","vitamins_supplements"],"type":"string"}},"required":["idempotency_key"],"type":"object"},"CreatePatientDietRestrictionRequest":{"properties":{"comment":{"nullable":true,"type":"string"},"name":{"nullable":false,"type":"string"}},"required":["name"]},"CreatePatientEmotionRequest":{"properties":{"emotion":{"type":"string"},"emotion_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"},"emotion_time":{"description":"time in format hh:mm:ss","example":"17:30:00","type":"string"},"note":{"nullable":true,"type":"string"},"question":{"nullable":false,"type":"string"}},"required":["emotion_date","emotion_time","question","emotion"]},"CreatePatientEmotionalHealthRequest":{"properties":{"association":{"description":"association of emotional health","example":"breathing","nullable":true,"type":"string"},"emotional_health_activity_type":{"description":"selected activity type of emotional health","example":"breathing","nullable":true,"type":"string"},"emotional_health_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","nullable":false,"type":"string"},"emotional_health_time":{"description":"time in format hh:mm:ss","example":"17:30:00","nullable":false,"type":"string"},"kind":{"description":"kind of emotional health","example":"breathing","nullable":true,"type":"string"},"label":{"description":"label of emotional health","example":"breathing","nullable":true,"type":"string"},"note":{"description":"note that can be added to provide additional description Max 1024 char","nullable":true,"type":"string"},"source":{"description":"source of emotional health data","nullable":true,"type":"string"},"source_id":{"description":"id of emotional health from source","nullable":true,"type":"string"},"valence":{"description":"valence of emotional health","example":"breathing","nullable":true,"type":"string"}},"required":["emotional_health_date","emotional_health_time"]},"CreatePatientExerciseRequest":{"properties":{"duration_min":{"description":"time in minutes","example":"15","nullable":false,"type":"integer"},"exercise_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","nullable":false,"type":"string"},"exercise_time":{"description":"time in HH:MM:SS","example":"08:00:00","nullable":false,"type":"string"},"exercise_type":{"$ref":"#/components/schemas/ExerciseTypeInRequestEnum"},"intensity":{"example":"low","nullable":true,"type":"string"},"note":{"description":"note that can be added to provide additional description Max 1024 char","nullable":true,"type":"string"},"source":{"description":"source of exercise data","example":"healthkit","nullable":true,"type":"string"},"source_id":{"description":"id of exercise from source","example":"35C09300-FAB6-460E-95B5-8EF4EC5663A3","nullable":true,"type":"string"}},"required":["exercise_date","exercise_time","exercise_type","duration_min","intensity"]},"CreatePatientFromClinicianRequest":{"properties":{"clinic_id":{"description":"clinic id must be provided when clinic_invitation_code is not provided","oneOf":[{"type":"integer"},{"type":"string"}]},"clinic_invitation_code":{"allOf":[{"anyOf":[{"enum":[null]},{"type":"integer"},{"type":"string"}]}],"description":"if provided, clinic routing uses the clinic associated with the invitation code"},"diet_restrictions":{"items":{"$ref":"#/components/schemas/CreatePatientDietRestrictionRequest"},"nullable":true,"type":"array"},"email":{"type":"string"},"first_name":{"type":"string"},"first_report_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","nullable":true,"type":"string"},"flags_raw":{"$ref":"#/components/schemas/PostPatchPatientFlags","nullable":true},"hospital_patient_custom_fields":{"nullable":true,"type":"object"},"hospital_patient_external_id":{"nullable":true,"type":"string"},"last_name":{"type":"string"},"locale":{"nullable":true,"type":"string"},"motivations":{"items":{"$ref":"#/components/schemas/CreatePatientMotivationRequest"},"nullable":true,"type":"array"},"patient_type":{"enum":["research","collaboration","wellness","obesity","diabetes","metabolic syndrome","weight loss","migraine","gastroesophageal reflux","gi discomfort","vertigo","sleep apnea","rxlife","dexcom","menopause"],"nullable":true,"type":"string"},"phone_number":{"nullable":true,"type":"string"},"signup_metadata_non_sensitive":{"additionalProperties":true,"description":"Additional signup metadata that does not contain sensitive information. Safe to send to, ex, Metabase and product analytics providers. Currently included in a PatientSignupMetadata telemetry_event. UTM parameters (utm_source, utm_medium, utm_campaign, utm_term, utm_content) should be included here for marketing attribution.","nullable":true,"type":"object"},"signup_metadata_sensitive":{"additionalProperties":true,"description":"Additional signup metadata that contains sensitive information (PII, PHI, etc). Will not be sent to, ex, Metabase and product analytics providers. Currently included in a PatientSignupMetadata telemetry_event.","nullable":true,"type":"object"},"subscription_expiration_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","nullable":true,"type":"string"},"subscription_name":{"enum":["none","three-day","five-day","seven-day","ten-day","one-month","cgm14","14-day","21-day","28-day","custom"],"nullable":true,"type":"string"},"subscription_type":{"enum":["single","weekly","monthly","bi-weekly","4-weeks","custom"],"nullable":true,"type":"string"},"tracking_start_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","nullable":true,"type":"string"}},"required":["first_name","last_name","email"]},"CreatePatientMedicationRequest":{"properties":{"medication_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","nullable":false,"type":"string"},"medication_time":{"description":"time in HH:MM:SS","example":"08:00:00","nullable":false,"type":"string"},"name":{"description":"indicate the name of the medication","type":"string"},"note":{"description":"note that can be added to provide additional description Max 1024 char","nullable":true,"type":"string"},"quantity":{"description":"typical qty of medication taken","example":"15.4","nullable":false,"type":"number"},"side_effects":{"description":"side effects of the medication Max 1024 char","nullable":true,"type":"string"},"unit":{"nullable":false,"type":"string"}},"required":["medication_date","medication_time","name","quantity","unit"]},"CreatePatientMindfulnessRequest":{"properties":{"mindfulness_activity_type":{"description":"selected activity type of mindfulness","example":"breathing","nullable":true,"type":"string"},"mindfulness_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","nullable":false,"type":"string"},"mindfulness_end_time":{"description":"time in format hh:mm:ss","example":"17:30:00","nullable":false,"type":"string"},"mindfulness_start_time":{"description":"time in format hh:mm:ss","example":"17:30:00","nullable":false,"type":"string"},"note":{"description":"note that can be added to provide additional description Max 1024 char","nullable":true,"type":"string"},"source":{"description":"source of mindfulness data","nullable":true,"type":"string"},"source_id":{"description":"id of mindfulness from source","nullable":true,"type":"string"}},"required":["mindfulness_date","mindfulness_start_time","mindfulness_end_time"]},"CreatePatientMotivationRequest":{"properties":{"comment":{"description":"text for 'other' types, or other user comments. Max 256 char","nullable":true,"type":"string"},"name":{"nullable":false,"type":"string"}},"required":["name"]},"CreatePatientNoteRequest":{"properties":{"note":{"description":"note providing contextual information","type":"string"}},"required":["note"]},"CreatePatientRecipeListItemRequest":{"properties":{"recipe_id":{"example":"123","nullable":false,"type":"number"}},"required":["recipe_id"],"type":"object"},"CreatePatientRecipeListRequest":{"properties":{"label":{"example":"Favorites","nullable":false,"type":"string"},"type":{"example":"clinician_favorites","nullable":false,"type":"string"}},"required":["label"],"type":"object"},"CreatePatientReportImageRequest":{"properties":{"location":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"report_section":{"example":"nutrients_summary","type":"string"}},"required":["report_section","location"]},"CreatePatientReportLogRequest":{"properties":{"autogenerate":{"description":"available to disable automatic generation for testing purposes","nullable":true,"type":"boolean"},"autosend":{"description":"available to allow reports to bypass draft mode","nullable":true,"type":"boolean"},"comparison_report_id":{"nullable":true,"type":"integer"},"date_since":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","nullable":true,"type":"string"},"date_until":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","nullable":true,"type":"string"},"is_comparison_report":{"nullable":true,"type":"boolean"},"recipient_bcc_id":{"default":[],"description":"list of users to receive report in BCC","items":{"type":"integer"},"nullable":true,"type":"array"},"recipient_cc_id":{"default":[],"description":"list of users to receive report in CC","items":{"type":"integer"},"nullable":true,"type":"array"},"recipient_to_id":{"default":[],"description":"list of users to receive report in TO","items":{"type":"integer"},"nullable":true,"type":"array"},"report_template":{"default":[],"description":"list of report sections, order matters.","items":{"type":"string"},"nullable":true,"type":"array"},"report_type":{"enum":["rxfood","single","weekly","trial","custom","default","comparison_report"],"nullable":true,"type":"string"},"to_process_time":{"description":"time to be generated, patient local time with timezone in format date in format YYYY-MM-DD HH:MM:SS.fZ","format":"date-time","nullable":true,"type":"string"},"to_send_time":{"description":"patient local time w/timezone in format date in format YYYY-MM-DD HH:MM:SS.fZ","format":"date-time","nullable":true,"type":"string"}},"required":["to_send_time","to_process_time"]},"CreatePatientReportRequest":{"properties":{"patient_type":{"example":"default","type":"string"},"report_type":{"description":"template report type","example":"default","type":"string"},"sections":{"example":["summary","calories_by_period","carbs_by_period","fasting_windows","average_plate","macronutrient_distribution","micronutrient_trends","diet_score","nutrients_summary","carb_daily_intake","GI_food_list","glycemic_index_frequency","average_fats_frequency","average_water_frequency","average_grains_frequency","average_proteins_frequency","food_dump","supplements"],"items":{"type":"string"},"nullable":true,"type":"array"},"status":{"description":"status of email report","example":"draft","type":"string"},"sudo_clinician_id":{"description":"For use by admin only when creating on behalf of an existing clinician","nullable":true,"type":"integer"}},"required":["report_type"]},"CreatePatientReportSummaryBlockRequest":{"properties":{"evidence":{"description":"reference url for supporting evidence","example":[],"items":{"type":"string"},"nullable":true,"type":"array"},"report_section":{"example":"summary","type":"string"},"summary_text":{"nullable":true,"type":"string"}},"required":["report_section"]},"CreatePatientShoppingItemCollectionRequest":{"properties":{"description":{"nullable":true,"type":"string"},"display_name":{"nullable":true,"type":"string"},"kind":{"$ref":"#/components/schemas/ShoppingItemCollectionKind","nullable":true},"metadata":{"nullable":true,"type":"object"},"name":{"nullable":true,"type":"string"}},"type":"object"},"CreatePatientShoppingItemRequest":{"properties":{"added_by_user_id":{"nullable":true,"type":"integer"},"calculated_servings":{"nullable":true,"type":"number"},"category_label":{"nullable":true,"type":"string"},"custom_item":{"nullable":true,"type":"boolean"},"food_name":{"nullable":false,"type":"string"},"food_name_alias":{"nullable":true,"type":"string"},"food_name_alias_translations":{"nullable":true,"type":"object"},"food_name_translations":{"nullable":true,"type":"object"},"global_order":{"nullable":true,"type":"integer"},"net_serving_size_g":{"nullable":true,"type":"number"},"notes":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"origin_type":{"$ref":"#/components/schemas/ShoppingItemOriginType","nullable":true},"package_size_amount":{"nullable":true,"type":"number"},"package_size_unit_label":{"nullable":true,"type":"string"},"position":{"nullable":true,"type":"integer"},"preparation_method":{"$ref":"#/components/schemas/PreparationMethodEnum","nullable":true},"quantity":{"nullable":true,"type":"integer"},"serving_unit_amount":{"nullable":true,"type":"number"},"serving_unit_label":{"nullable":true,"type":"string"},"serving_unit_label_translations":{"nullable":true,"type":"object"},"servings":{"nullable":true,"type":"number"},"status":{"$ref":"#/components/schemas/ShoppingItemStatus","nullable":true},"tags":{"items":{"type":"string"},"nullable":true,"type":"array"}},"required":["food_name"],"type":"object"},"CreatePatientSleepRequest":{"properties":{"note":{"description":"note that can be added to provide additional description Max 1024 char","nullable":true,"type":"string"},"sleep_end_date_time":{"description":"datetime in format YYYY-MM-DD HH:MM:SS","example":"2019-01-02 08:00:00","nullable":false,"type":"string"},"sleep_start_date_time":{"description":"datetime in format YYYY-MM-DD HH:MM:SS","example":"2019-01-02 08:00:00","nullable":false,"type":"string"},"sleep_type":{"$ref":"#/components/schemas/SleepTypeInRequestEnum"},"source":{"description":"source of sleep data","example":"healthkit","nullable":true,"type":"string"},"source_id":{"description":"id of sleep from source","example":"35C09300-FAB6-460E-95B5-8EF4EC5663A3","nullable":true,"type":"string"}},"required":["sleep_start_date_time","sleep_end_date_time","sleep_type"]},"CreatePatientStressRequest":{"properties":{"note":{"description":"note that can be added to provide additional description Max 1024 char","nullable":true,"type":"string"},"source":{"description":"source of stress data","nullable":true,"type":"string"},"source_id":{"description":"id of stress from source","nullable":true,"type":"string"},"stress_activity_type":{"description":"selected activity type of stress","example":"breathing","nullable":true,"type":"string"},"stress_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","nullable":false,"type":"string"},"stress_end_time":{"description":"time in format hh:mm:ss","example":"17:30:00","nullable":false,"type":"string"},"stress_start_time":{"description":"time in format hh:mm:ss","example":"17:30:00","nullable":false,"type":"string"}},"required":["stress_date","stress_start_time","stress_end_time"]},"CreatePatientSubscriptionRequest":{"properties":{"clinic_id":{"description":"if relevant, provide the clinic id","nullable":true,"type":"integer"},"expiration_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"},"name":{"description":"name of the subscription","enum":["three-day","five-day","seven-day","ten-day","one-month","cgm14","14-day","21-day","28-day","custom"],"example":"three-day","type":"string"},"report_date":{"description":"calendar date in format YYYY-MM-DD. Must be equal to or greater than the expiration date","example":"2019-01-05","nullable":true,"type":"string"},"start_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"},"type":{"enum":["single","weekly","monthly","bi-weekly","4-weeks","custom"],"nullable":false,"type":"string"}},"required":["name","type","start_date","expiration_date"]},"CreatePatientSupplementRequest":{"properties":{"comment":{"description":"comments relating to the supplement","example":"under review by clinician","nullable":true,"type":"string"},"frequency":{"enum":["daily","weekly","monthly","hourly","irregular"],"nullable":false,"type":"string"},"instructions":{"description":"instructions","nullable":true,"type":"string"},"name":{"description":"name of the supplement","example":"vitamin c","type":"string"},"prescribed_by":{"description":"who has asked the patient to take the supplement","nullable":true,"type":"string"},"qty_per_frequency":{"type":"number"},"qty_unit_of_measure":{"description":"Unit of Measure","enum":["mcg","g","mg","iu","rae","dfe","ne","tablet"],"example":"mcg","type":"string"},"qty_unit_size":{"type":"number"},"reason_for_taking":{"description":"why is the patient taking the supplement?","nullable":true,"type":"string"},"related_usda_id":{"description":"if available in the food DB, include the USDA id for the nutrition link","nullable":true,"type":"integer"}},"required":["name","frequency","qty_per_frequency","qty_unit_size","qty_unit_of_measure"]},"CreatePatientWeightRequest":{"properties":{"note":{"description":"note that can be added to provide additional description Max 1024 char","nullable":true,"type":"string"},"weight_date":{"description":"calendar date in format YYYY-MM-DD","example":"2025-12-18","nullable":false,"type":"string"},"weight_kg":{"description":"weight in kilograms","example":68.4,"format":"float","maximum":1000,"minimum":0.01,"nullable":false,"type":"number"},"weight_time":{"description":"time in HH:MM:SS","example":"07:32:10","nullable":false,"type":"string"}},"required":["weight_date","weight_time","weight_kg"]},"CreateQualityAssuranceLogRequest":{"properties":{"confidence_identification":{"nullable":true,"type":"integer"},"confidence_sizing":{"nullable":true,"type":"integer"},"is_approved":{"nullable":false,"type":"boolean"},"is_escalated":{"nullable":false,"type":"boolean"},"is_reviewed":{"nullable":false,"type":"boolean"},"level_of_difficulty":{"nullable":true,"type":"integer"},"note":{"nullable":true,"type":"string"},"questionnaire":{"description":"JSON representing question with a binary response","nullable":true,"type":"object"},"review_type":{"nullable":true,"type":"string"}},"required":["is_reviewed","is_escalated","is_approved","note"]},"CreateQueueFeedbackRequest":{"properties":{"confidence_identification":{"example":"4","nullable":true,"type":"integer"},"confidence_sizing":{"example":"2","nullable":true,"type":"integer"},"data_reviewer_note":{"description":"very short description of issues experienced by the DR","nullable":true,"type":"string"}}},"CreateRecipeRequest":{"properties":{"calculated_servings":{"nullable":true,"type":"number"},"custom_item":{"example":false,"nullable":true,"type":"boolean"},"filter_tags":{"items":{"type":"string"},"nullable":true,"type":"array"},"food_name":{"nullable":true,"type":"string"},"food_name_alias":{"nullable":true,"type":"string"},"food_name_alias_translations":{"nullable":true,"type":"object"},"food_name_translations":{"nullable":true,"type":"object"},"image_url":{"example":"https://example.com","nullable":true,"type":"string"},"ingredient_groups":{"items":{"$ref":"#/components/schemas/RecipeIngredientGroup"},"nullable":true,"type":"array"},"ingredients":{"default":[],"items":{"$ref":"#/components/schemas/RecipeIngredient"},"nullable":false,"type":"array"},"instructions_str":{"nullable":true,"type":"string"},"internal_notes":{"nullable":true,"type":"string"},"label":{"example":"Quinoa Salad","nullable":false,"type":"string"},"net_serving_size_g":{"nullable":true,"type":"number"},"note":{"nullable":true,"type":"string"},"nutrient_overrides":{"$ref":"#/components/schemas/NutrientOverrideCollection","nullable":true},"nutrition":{"$ref":"#/components/schemas/RecipeNutrition"},"percent_eaten":{"nullable":true,"type":"number"},"preparation_method":{"$ref":"#/components/schemas/PreparationMethodEnum","default":null,"nullable":true},"raw_data_id":{"example":"123","nullable":false,"type":"number"},"recipe_details":{"$ref":"#/components/schemas/RecipeDetails","nullable":true},"serving_unit_amount":{"nullable":true,"type":"number"},"serving_unit_label":{"nullable":true,"type":"string"},"serving_unit_label_translations":{"nullable":true,"type":"object"},"servings":{"nullable":true,"type":"number"},"url":{"example":"https://example.com","nullable":true,"type":"string"},"visibility":{"description":"Chef/admin recipe audience. Patient recipe endpoints ignore this field and remain private.","enum":["private","public"],"nullable":true,"type":"string"},"yield_amount":{"nullable":true,"type":"number"},"yield_unit_label":{"nullable":true,"type":"string"}},"required":["label","image_url","url","ingredients"],"type":"object"},"CreateRecipeScanRequest":{"properties":{"pages":{"items":{"$ref":"#/components/schemas/RecipeScanPage"},"nullable":true,"type":"array"},"url":{"nullable":true,"type":"string"}},"type":"object"},"CreateSearchByTextNlpQueueRequest":{"properties":{"meal_date":{"description":"calendar date in format YYYY-MM-DD","example":"2021-04-02","type":"string"},"meal_name":{"enum":["breakfast","lunch","dinner","snack"],"type":"string"},"meal_time":{"description":"time in format hh:mm:ss","example":"17:30:00","type":"string"},"note":{"type":"string"},"queue_metadata":{"nullable":true,"type":"string"}},"required":["meal_name","meal_time","meal_date"]},"CreateUserSurveyFormRequest":{"properties":{"survey_form":{"$ref":"#/components/schemas/UserSurveyForm"},"survey_type":{"$ref":"#/components/schemas/UserSurveyTypeEnum"}},"required":["survey_type","survey_form"]},"CreateUserSurveyResponseRequest":{"properties":{"related_activity_id":{"nullable":false,"type":"integer"},"related_activity_type":{"nullable":false,"type":"string"},"survey_form_md5":{"nullable":false,"type":"string"},"survey_responses":{"$ref":"#/components/schemas/UserSurveyResponses"},"survey_type":{"$ref":"#/components/schemas/UserSurveyTypeEnum"}},"required":["survey_type","survey_form_md5","related_activity_type","related_activity_id"]},"DailyConsumptionQueryResponse":{"properties":{"more_data":{"type":"boolean"},"results":{"items":{"$ref":"#/components/schemas/DailyConsumptionResponse"},"type":"array"}},"required":["results","more_data"]},"DailyConsumptionResponse":{"properties":{"log_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"},"meals":{"items":{"$ref":"#/components/schemas/MealResponse"},"type":"array"},"water":{"$ref":"#/components/schemas/WaterResponse"}},"required":["log_date","meals"]},"DailyNutrientReportResponse":{"properties":{"nutrient_label":{"nullable":false,"type":"string"},"nutrient_name":{"nullable":false,"type":"string"},"rows":{"items":{"$ref":"#/components/schemas/DailyNutrientReportRowResponse"},"type":"array"}},"required":["nutrient_name","nutrient_label","rows"]},"DailyNutrientReportRowResponse":{"properties":{"meal_date":{"nullable":false,"type":"string"},"sum":{"type":"string"}},"required":["meal_date"]},"DailyReportGroupedMealResponse":{"properties":{"meal_entries":{"items":{"$ref":"#/components/schemas/DailyReportMealResponse"},"type":"array"},"meal_name":{"type":"string"}},"required":["meal_name"]},"DailyReportMealResponse":{"properties":{"foods":{"default":[],"items":{"type":"string"},"type":"array"},"meal_id":{"type":"integer"},"meal_source":{"enum":["photo_ffe_queue","text","photo","audio_queue","nlp_queue","custom"],"type":"string"},"meal_time":{"type":"string"},"photo_location":{"nullable":true,"type":"string"}},"required":["meal_id","meal_source","foods"]},"DailyReportResponse":{"properties":{"meal_count":{"type":"integer"},"meals":{"items":{"$ref":"#/components/schemas/DailyReportGroupedMealResponse"},"type":"array"},"report_date":{"type":"string"},"user_id":{"type":"integer"}},"required":["user_id","report_date","meals"]},"DashResponse":{"properties":{"daily_dash_scores":{"items":{"$ref":"#/components/schemas/DashRowResponse"},"type":"array"},"date_since":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"},"date_until":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-10","type":"string"},"patient_id":{"type":"integer"}},"required":["patient_id","date_since","date_until","daily_dash_scores"]},"DashRowResponse":{"properties":{"calcium_score":{"type":"number"},"cholesterol_score":{"type":"number"},"daily_dash_score":{"type":"number"},"fiber_score":{"type":"number"},"log_date":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"},"magnesium_score":{"type":"number"},"potassium_score":{"type":"number"},"protein_score":{"type":"number"},"saturated_fat_score":{"type":"number"},"sodium_score":{"type":"number"},"total_fat_score":{"type":"number"}},"required":["daily_dash_score","sodium_score","cholesterol_score","saturated_fat_score","total_fat_score","protein_score","calcium_score","magnesium_score","potassium_score","fiber_score","log_date"]},"DataReviewerClaimQueueResponse":{"properties":{"message":{"nullable":true,"type":"string"},"ok":{"type":"boolean"}},"required":["ok"]},"DataReviewerGroupResponse":{"properties":{"created_time":{"description":"time in UTC","format":"date-time","type":"string"},"data_reviewers":{"items":{"$ref":"#/components/schemas/DataReviewerResponse"},"type":"array"},"group_name":{"type":"string"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"updated_time":{"description":"time in UTC","format":"date-time","type":"string"}},"required":["id","group_name","is_active","data_reviewers","created_time","updated_time"]},"DataReviewerGroupSettingsResponse":{"properties":{"data_reviewer_group_id":{"type":"integer"},"data_reviewer_id":{"type":"integer"},"receive_data_review_emails":{"type":"boolean"}},"required":["data_reviewer_group_id","data_reviewer_id","receive_data_review_emails"]},"DataReviewerHelpRequest":{"properties":{"message":{"description":"details of the help being requested","example":"please confirm the item queued for tagging","type":"string"}},"required":["message"]},"DataReviewerResponse":{"properties":{"country_of_residence":{"nullable":true,"type":"string"},"created_time":{"description":"time in UTC","format":"date-time","type":"string"},"email":{"type":"string"},"first_name":{"type":"string"},"flags":{"$ref":"#/components/schemas/RxFeatureFlagsResponse","type":"object"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"is_admin":{"type":"boolean"},"is_data_reviewer_admin":{"type":"boolean"},"is_hospital_admin":{"type":"boolean"},"is_internal":{"type":"boolean"},"is_meal_admin":{"type":"boolean"},"is_report_admin":{"type":"boolean"},"is_report_previewer":{"type":"boolean"},"last_name":{"type":"string"},"review_groups":{"items":{"properties":{"id":{"type":"integer"},"is_active":{"type":"boolean"},"name":{"type":"string"}},"required":["id","name","is_active"],"type":"object"},"type":"array"},"review_level":{"enum":["analyst","reviewer","report_reviewer"],"type":"string"},"review_max_queue_level":{"nullable":true,"type":"integer"},"updated_time":{"description":"time in UTC","format":"date-time","type":"string"}},"required":["id","first_name","last_name","is_active","email","created_time","updated_time"]},"DefaultClinicLinkResponse":{"properties":{"clinic_type":{"type":"string"},"created_time":{"format":"date-time","type":"string"},"description":{"type":"string"},"id":{"type":"integer"},"link":{"type":"string"},"title":{"type":"string"},"updated_time":{"format":"date-time","type":"string"}},"required":["id","clinic_type","link"]},"DefaultClinicianLinkResponse":{"properties":{"clinician_id":{"type":"integer"},"created_time":{"format":"date-time","type":"string"},"description":{"type":"string"},"id":{"type":"integer"},"link":{"type":"string"},"title":{"type":"string"},"updated_time":{"format":"date-time","type":"string"}},"required":["id","clinician_id","link","created_time","updated_time"]},"DeletePatientBloodPressureRequest":{"properties":{"source_id":{"description":"id of blood pressure from source","example":"bp-uuid-123","nullable":false,"type":"string"}},"required":["source_id"]},"DeletePatientEmotionalHealthRequest":{"properties":{"source_id":{"description":"id of emotional health from source","example":"35C09300-FAB6-460E-95B5-8EF4EC5663A3","nullable":false,"type":"string"}},"required":["source_id"]},"DeletePatientExerciseRequest":{"properties":{"source_id":{"description":"id of exercise from source","example":"35C09300-FAB6-460E-95B5-8EF4EC5663A3","nullable":false,"type":"string"}},"required":["source_id"]},"DeletePatientMindfulnessRequest":{"properties":{"source_id":{"description":"id of mindfulness from source","example":"35C09300-FAB6-460E-95B5-8EF4EC5663A3","nullable":false,"type":"string"}},"required":["source_id"]},"DeletePatientSleepRequest":{"properties":{"source_id":{"description":"id of sleep from source","example":"35C09300-FAB6-460E-95B5-8EF4EC5663A3","nullable":false,"type":"string"}},"required":["source_id"]},"DeletePatientStepsRequest":{"properties":{"source_id":{"description":"id of steps from source","example":"35C09300-FAB6-460E-95B5-8EF4EC5663A3","nullable":false,"type":"string"}},"required":["source_id"]},"DeletePatientStressRequest":{"properties":{"source_id":{"description":"id of stress from source","example":"35C09300-FAB6-460E-95B5-8EF4EC5663A3","nullable":false,"type":"string"}},"required":["source_id"]},"DeletePatientWeightRequest":{"properties":{"source_id":{"description":"id of weight from source","example":"12345678-90ab-cdef-1234-567890abcdef","nullable":false,"type":"string"}},"required":["source_id"]},"DeregisterPatientsBatchRequest":{"properties":{"patient_ids":{"items":{"type":"integer"},"type":"array"}},"required":["patient_ids"]},"DetailedPatientUsageLogResponse":{"properties":{"date_since":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"},"date_until":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-12","type":"string"},"log_entries":{"items":{"$ref":"#/components/schemas/DetailedPatientUsageLogRowResponse"},"type":"array"},"patient_id":{"type":"integer"}},"required":["patient_id","date_since","date_until"]},"DetailedPatientUsageLogRowResponse":{"properties":{"clarifai_result":{"items":{"$ref":"#/components/schemas/SimplifiedClarifaiResponse"},"type":"array"},"created_time":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","format":"date-time","type":"string"},"food_name":{"description":"food name in database","nullable":true,"type":"string"},"ia_match_names":{"description":"recorded matches to the food ontology database","nullable":true,"type":"string"},"items_returned_to_user":{"description":"results returned to the user","nullable":true,"type":"string"},"log_type":{"enum":["photo_ffe","nlp","text","photo","meal_item","photo_ffe_queue","audio_queue","nlp_queue","audio_unassigned","nlp_unassigned","photo_unassigned"],"type":"string"},"meal_audio_id":{"description":"meal audio id","nullable":true,"type":"integer"},"meal_audio_url":{"description":"meal audio url if available","nullable":true,"type":"string"},"meal_photo_id":{"description":"meal photo id","nullable":true,"type":"integer"},"meal_photo_url":{"description":"meal photo url if available","nullable":true,"type":"string"},"nutrition_source":{"description":"source of food nutrition data","nullable":true,"type":"string"},"patient_id":{"type":"integer"},"search_text":{"description":"Text search string","nullable":true,"type":"string"},"third_party_match_names":{"description":"recorded matches to third party databases","nullable":true,"type":"string"},"updated_time":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","format":"date-time","type":"string"},"usda_match_names":{"description":"recorded matches to the USDA database","nullable":true,"type":"string"}},"required":["patient_id","created_time","log_type"]},"DietQualityScoreResponse":{"properties":{"fiber_score":{"nullable":false,"type":"number"},"fruit_vegetable_score":{"nullable":false,"type":"number"},"omega_unhealthy_fat_score":{"nullable":false,"type":"number"},"plant_based_score":{"nullable":false,"type":"number"},"protein_score":{"nullable":false,"type":"number"},"total_score":{"nullable":false,"type":"number"},"ultra_processed_score":{"nullable":false,"type":"number"}},"required":["fiber_score","fruit_vegetable_score","omega_unhealthy_fat_score","protein_score","ultra_processed_score","plant_based_score","total_score"]},"DietRestrictionFlags":{"properties":{"no_dairy":{"type":"boolean"},"no_gluten":{"type":"boolean"},"no_pork":{"type":"boolean"},"pescatarian":{"type":"boolean"},"vegan":{"type":"boolean"},"vegetarian":{"type":"boolean"}}},"DietRestrictionResponse":{"properties":{"description":{"example":"low CHO diet with preference for higher fat intake","nullable":false,"type":"string"},"description_translations":{"nullable":true,"type":"object"},"display":{"example":"ketogenic diet","nullable":false,"type":"string"},"display_translations":{"nullable":true,"type":"object"},"name":{"example":"ketogenic diet","nullable":false,"type":"string"},"name_translations":{"nullable":true,"type":"object"}},"required":["name","display","description"]},"DisaggregatedMealResponse":{"properties":{"created_by_user_id":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"last_updated_by_user_id":{"nullable":true,"type":"integer"},"meal_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"},"meal_items":{"items":{"$ref":"#/components/schemas/MealItemResponse"},"type":"array"},"meal_name":{"enum":["breakfast","lunch","dinner","snack"],"type":"string"},"meal_time":{"description":"time in format hh:mm:ss","example":"17:30:00","type":"string"},"patient_id":{"type":"integer"}},"required":["id","patient_id","meal_date","meal_time","meal_name","meal_items"]},"EliLillyConsent":{"properties":{"items":{"description":"One entry per accepted document. At least one is required: the endpoint documents a 400 when consent is missing, and without minItems an empty array satisfies the schema, so a generated client could construct a consent payload that records no consent at all.\n","items":{"$ref":"#/components/schemas/EliLillyConsentItem"},"minItems":1,"type":"array"},"locale":{"description":"Locale the consent copy was rendered in","example":"en","type":"string"}},"required":["locale","items"],"type":"object"},"EliLillyConsentItem":{"properties":{"document_key":{"description":"Stable identifier for the accepted document","example":"eli_lilly_terms_of_service","type":"string"},"document_version":{"description":"Version of that document as shown to the member","example":"2026-07-01","type":"string"}},"required":["document_key","document_version"],"type":"object"},"EliLillyLinkCompleteRequest":{"properties":{"link_session_token":{"type":"string"},"patient_id":{"description":"Patient returned by the signup webhook","type":"integer"}},"required":["link_session_token","patient_id"],"type":"object"},"EliLillyLinkCompleteResponse":{"properties":{"patient_id":{"type":"integer"},"status":{"description":"Terminal state of the link","enum":["linked"],"type":"string"}},"required":["status","patient_id"],"type":"object"},"EliLillyLinkProfile":{"properties":{"email":{"description":"Authoritative email; the patient is created or matched on this","type":"string"},"first_name":{"nullable":true,"type":"string"},"last_name":{"nullable":true,"type":"string"},"phone_number":{"nullable":true,"type":"string"}},"required":["email"],"type":"object"},"EliLillyLinkProfileRequest":{"properties":{"clinic_id":{"description":"Which Eli Lilly environment this link belongs to, named by the clinic the member will join. Eli Lilly run several gateways in parallel (dev, qa, staging) and each is provisioned as its own clinic under its own hospital, so the clinic resolves the gateway to call. Optional: when omitted the configured ELI_LILLY_CLINIC_ID is used, which keeps existing callers working. The link session records the resolved programme, so /link/complete does not repeat it.\n","nullable":true,"type":"integer"},"consent":{"$ref":"#/components/schemas/EliLillyConsent"},"correlation_id":{"description":"Correlation ID issued by Eli Lilly, held server-side by signup","type":"string"},"email":{"description":"Email the member typed; verified against the Eli Lilly profile","type":"string"}},"required":["correlation_id","email"],"type":"object"},"EliLillyLinkProfileResponse":{"properties":{"is_existing_member":{"description":"True when this email already has an RxFood account, so signup can show the existing-member confirmation rather than the new-account one","type":"boolean"},"link_session_token":{"description":"Opaque handle to the server-side link session","type":"string"},"profile":{"$ref":"#/components/schemas/EliLillyLinkProfile"}},"required":["link_session_token","profile","is_existing_member"],"type":"object"},"EmailHistoryResponse":{"properties":{"clinic_id":{"type":"integer"},"created_time":{"format":"date-time","type":"string"},"hospital_id":{"type":"integer"},"id":{"type":"integer"},"message_type":{"type":"string"},"patient_subscription_id":{"type":"integer"},"response_code":{"type":"string"},"user_id":{"type":"integer"}},"required":["id"]},"EmailMealPlanRequest":{"properties":{"message":{"nullable":true,"type":"string"}}},"EmotionQuestionResponse":{"properties":{"options":{"items":{"type":"string"},"type":"array"},"question":{"type":"string"}},"required":["question","options"]},"EmotionResponse":{"properties":{"emotion":{"type":"string"},"id":{"type":"integer"},"log_date":{"type":"string"},"note":{"type":"string"}},"required":["id","log_date","emotion"]},"ExerciseResponse":{"properties":{"description":{"example":"Weightlifting, exercise bands, etc.","nullable":false,"type":"string"},"display":{"example":"Strength/Resistance","nullable":false,"type":"string"},"exercise_type":{"$ref":"#/components/schemas/ExerciseTypeInRequestEnum"}},"required":["exercise_type","display","description"]},"ExerciseTypeInRequestEnum":{"enum":["strength-resistance","aerobic training","balance and stability","flexibility-stretching","mixed cardio/strength","other"],"type":"string"},"ExerciseTypeInResponseEnum":{"enum":["logged by cgm","strength-resistance","aerobic training","balance and stability","flexibility-stretching","mixed cardio/strength","other"],"type":"string"},"ExpertContext":{"description":"Expert-provided context for a meal photo queue item to improve LLM processing","properties":{"consensus_round":{"description":"Groups entries for consensus comparison. When null, entries are processed sequentially. When set, entries with the same round are compared for consensus before processing.","nullable":true,"type":"integer"},"meal_items":{"items":{"$ref":"#/components/schemas/ExpertContextMealItem"},"nullable":true,"type":"array"},"note":{"description":"Free-text description of foods in the photo","nullable":true,"type":"string"},"result":{"description":"Result of processing with this expert context: approved or escalated","nullable":true,"type":"string"},"result_at":{"description":"ISO timestamp when the result was determined","nullable":true,"type":"string"},"result_reason":{"description":"Reason for escalation if result is escalated","nullable":true,"type":"string"},"submitted_at":{"description":"ISO timestamp when this expert context was submitted","nullable":true,"type":"string"},"submitted_by_data_reviewer_id":{"description":"ID of the data reviewer who submitted this expert context","nullable":true,"type":"integer"}},"type":"object"},"ExpertContextMealItem":{"description":"A meal item provided by an expert reviewer for structured food hints","properties":{"brand":{"nullable":true,"type":"string"},"food_name":{"type":"string"},"id":{"nullable":true,"type":"integer"},"meal_item_custom_addons":{"items":{"$ref":"#/components/schemas/ExpertContextMealItemAddon"},"nullable":true,"type":"array"},"preparation_method":{"$ref":"#/components/schemas/PreparationMethodEnum","nullable":true},"serving_unit_amount":{"type":"number"},"servings":{"type":"number"}},"type":"object"},"ExpertContextMealItemAddon":{"description":"A meal item addon provided by an expert reviewer for structured food hints","properties":{"brand":{"nullable":true,"type":"string"},"food_name":{"type":"string"},"id":{"nullable":true,"type":"integer"},"preparation_method":{"$ref":"#/components/schemas/PreparationMethodEnum","nullable":true},"serving_unit_amount":{"type":"number"},"servings":{"type":"number"}},"type":"object"},"ExpertContextRequest":{"description":"Request body for updating expert context on a meal photo queue","properties":{"meal_items":{"items":{"$ref":"#/components/schemas/ExpertContextMealItem"},"nullable":true,"type":"array"},"note":{"description":"Free-text description of foods in the photo","nullable":true,"type":"string"}},"type":"object"},"ExternalOauthTokenFlowAuthorization":{"properties":{"url":{"type":"string"}}},"FastingReportResponse":{"properties":{"date_since":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"},"date_until":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-10","type":"string"},"fasting_avg":{"description":"avg of difference between first meal of the day and the last meal of the previous day","type":"number"},"fasting_max":{"description":"max of difference between first meal of the day and the last meal of the previous day","type":"number"},"fasting_median":{"description":"median of difference between first meal of the day and the last meal of the previous day","type":"number"},"fasting_min":{"description":"min of difference between first meal of the day and the last meal of the previous day","type":"number"},"intervals":{"items":{"$ref":"#/components/schemas/FastingReportRowResponse"},"type":"array"},"n_days_skipped":{"description":"number of days not included in the date range, generally due to missed logging days","example":"1","type":"integer"},"overnight_fasting_avg":{"description":"includes fast starting and ending on different days","type":"number"},"overnight_fasting_max":{"description":"includes fast starting and ending on different days","type":"number"},"overnight_fasting_median":{"description":"includes fast starting and ending on different days","type":"number"},"overnight_fasting_min":{"description":"includes fast starting and ending on different days","type":"number"},"patient_id":{"type":"integer"},"unit":{"description":"unit of calculation","example":"hour","type":"string"}},"required":["patient_id","date_since","date_until"]},"FastingReportRowResponse":{"properties":{"duration_hours":{"type":"number"},"end_time":{"format":"date-time","type":"string"},"interval_type":{"enum":["fasting","eating","overnight_fasting","leading_fast","trailing_fast","day_fasting"],"type":"string"},"meals":{"items":{"$ref":"#/components/schemas/MealResponse"},"type":"array"},"start_time":{"format":"date-time","type":"string"}},"required":["start_time","end_time","interval_type"]},"FatResponse":{"properties":{"both_fat_foods":{"items":{"type":"string"},"type":"array"},"date_since":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"},"date_until":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"},"healthy_fat_foods":{"items":{"type":"string"},"type":"array"},"omega_3_foods":{"items":{"type":"string"},"type":"array"},"patient_id":{"type":"integer"},"unhealthy_fat_foods":{"items":{"type":"string"},"type":"array"}},"required":["patient_id","date_since","date_until","healthy_fat_foods","unhealthy_fat_foods","both_fat_foods","omega_3_foods"]},"FavoriteFoodResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/FoodResponse"},"type":"array"}},"required":["results"]},"FavoriteItemResponse":{"properties":{"addon_names":{"items":{"type":"string"},"nullable":true,"type":"array"},"carbohydrate_g":{"type":"number"},"custom_label":{"description":"user-defined label to identify the favorite.","nullable":true,"type":"string"},"favorite_id":{"description":"id of the favorited item","type":"number"},"food_name":{"description":"food name","example":"pizza","type":"string"},"note":{"description":"note to be stored with the favorite.","nullable":true,"type":"string"},"replacement_food_name":{"description":"replacement food as generated by the system","example":"thin crust pizza","nullable":true,"type":"string"},"serving_type_label":{"description":"special label indicating custom servings, such pizza size","nullable":true,"type":"string"},"serving_type_multiplier":{"description":"multiplier applied to a serving to account for sizing, such as a large pizza when the reference is a small pizza","nullable":true,"type":"number"},"serving_unit_amount":{"description":"unit amount in grams per serving","nullable":true,"type":"number"},"serving_unit_label":{"description":"unit of measure coinciding with the unit amount","nullable":true,"type":"string"},"serving_unit_label_translations":{"nullable":true,"type":"object"},"servings":{"description":"number of servings to be stored","nullable":true,"type":"number"},"similar_items":{"default":[],"items":{"type":"string"},"type":"array"}},"required":["favorite_id","food_name"]},"FoodAddonInfoResponse":{"properties":{"carbohydrate_g":{"description":"carbohydrate_g per 100g of main food","type":"number"},"name":{"type":"string"},"name_translations":{"nullable":true,"type":"object"},"serving_units":{"items":{"$ref":"#/components/schemas/FoodServingUnit"},"type":"array"}},"required":["name","carbohydrate_g"]},"FoodAddonResponse":{"properties":{"addon_group_name":{"type":"string"},"addon_infos":{"items":{"$ref":"#/components/schemas/FoodAddonInfoResponse"},"type":"array"},"addon_names":{"items":{"type":"string"},"nullable":true,"type":"array"}},"required":["addon_group_name","addon_infos"]},"FoodAssignmentRequest":{"properties":{"reviewed_by_user_id":{"nullable":true,"type":"number"},"scraped_by_user_id":{"nullable":true,"type":"number"}}},"FoodAssignmentResponse":{"properties":{"assigned_to_user_id":{"type":"number"},"food":{"type":"string"},"next_status":{"type":"string"}},"required":["food","next_status","assigned_to_user_id"]},"FoodCanonicalDetailsRequest":{"properties":{"canonical_name":{"nullable":true,"type":"string"},"canonical_ontology_qwen3_06b_embedding":{"items":{"type":"number"},"nullable":true,"type":"array"},"cc_added_sugars":{"nullable":true,"type":"boolean"},"cc_composite_dish":{"nullable":true,"type":"boolean"},"cc_standalone_food":{"nullable":true,"type":"boolean"},"cc_sugar_free":{"nullable":true,"type":"boolean"},"consumption_context":{"nullable":true,"type":"string"},"inferred_properties":{"nullable":true,"type":"object"},"physical_form":{"nullable":true,"type":"string"},"preparation_state":{"nullable":true,"type":"string"},"processing_level":{"nullable":true,"type":"string"}}},"FoodChangeLogResponse":{"properties":{"food_changes":{"items":{"$ref":"#/components/schemas/ChangeLogItem"},"type":"array"},"food_name":{"type":"string"}}},"FoodClassifierClassifyAdHocRequest":{"properties":{"canonical_name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"food_name":{"type":"string"},"model_preset":{"default":"flash","enum":["flash","hybrid_pro_glycemic_index","all_pro"],"type":"string"},"nutrition":{"additionalProperties":true,"description":"Per-serving NFT values keyed by DBUsdaNutrition column names.","nullable":true,"type":"object"},"ontology":{"additionalProperties":true,"description":"Optional dict with keys level1..level4.","nullable":true,"type":"object"},"ontology_serving_size_g":{"nullable":true,"type":"number"}},"required":["food_name"]},"FoodClassifierClassifyOntologyAdHocRequest":{"properties":{"canonical_name":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"food_name":{"type":"string"},"mode":{"default":"single_shot","enum":["single_shot","cascading"],"type":"string"},"nutrition":{"additionalProperties":true,"description":"Per-serving NFT values keyed by DBUsdaNutrition column names.","nullable":true,"type":"object"},"ontology_serving_size_g":{"nullable":true,"type":"number"}},"required":["food_name"]},"FoodClassifierClassifyOntologyRequest":{"properties":{"mode":{"default":"single_shot","enum":["single_shot","cascading"],"type":"string"},"rxfood_id":{"type":"string"}},"required":["rxfood_id"]},"FoodClassifierClassifyOntologyResponse":{"properties":{"current_ontology":{"additionalProperties":true,"nullable":true,"type":"object"},"invalid_selections":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"json_parse_failures":{"items":{"type":"string"},"type":"array"},"llm_metadata":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"matches_current":{"nullable":true,"type":"boolean"},"mode":{"type":"string"},"prediction":{"additionalProperties":true,"type":"object"},"rationale_per_level":{"additionalProperties":true,"type":"object"},"rxfood_id":{"nullable":true,"type":"string"},"total_cost_cents":{"type":"number"}},"required":["prediction"]},"FoodClassifierClassifyRequest":{"properties":{"commit":{"default":false,"description":"When true, writes predictions to the DB (food / food_cc / food_ranking) and records food_data_source provenance. Fill-only-empty for clinician-reviewed foods.\n","type":"boolean"},"model_preset":{"default":"flash","enum":["flash","hybrid_pro_glycemic_index","all_pro"],"type":"string"},"rxfood_id":{"type":"string"}},"required":["rxfood_id"]},"FoodClassifierClassifyResponse":{"properties":{"committed":{"default":false,"type":"boolean"},"db_rows_written":{"items":{"additionalProperties":true,"type":"object"},"nullable":true,"type":"array"},"deterministic_overrides":{"additionalProperties":true,"type":"object"},"disagreements":{"additionalProperties":true,"nullable":true,"type":"object"},"json_parse_failures":{"items":{"type":"string"},"type":"array"},"llm_metadata":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"model_preset":{"type":"string"},"predictions":{"additionalProperties":true,"type":"object"},"rxfood_id":{"nullable":true,"type":"string"},"total_cost_cents":{"type":"number"}},"required":["predictions"]},"FoodComponentResponse":{"properties":{"component_addons":{"items":{"$ref":"#/components/schemas/FoodComponentResponse"},"type":"array"},"created_by_user_id":{"nullable":true,"type":"integer"},"created_time":{"format":"date-time","type":"string"},"custom_tip":{"nullable":true,"type":"string"},"food_id":{"nullable":false,"type":"string"},"food_name":{"nullable":false,"type":"string"},"food_name_translations":{"nullable":true,"type":"object"},"id":{"nullable":false,"type":"integer"},"last_updated_by_user_id":{"nullable":true,"type":"integer"},"parent_food_id":{"nullable":false,"type":"string"},"parent_food_name":{"nullable":false,"type":"string"},"serving_unit_amount":{"example":1,"type":"number"},"serving_unit_label":{"example":"gram","type":"string"},"serving_unit_label_translations":{"nullable":true,"type":"object"},"servings":{"type":"number"},"updated_time":{"format":"date-time","type":"string"}}},"FoodComponentUpdateRequest":{"properties":{"component_addons":{"items":{"$ref":"#/components/schemas/FoodComponentResponse"},"type":"array"},"food_id":{"nullable":false,"type":"string"},"food_name":{"nullable":false,"type":"string"},"id":{"nullable":true,"type":"integer"},"parent_food_id":{"nullable":false,"type":"string"},"parent_food_name":{"nullable":false,"type":"string"},"serving_unit_amount":{"example":1,"type":"number"},"serving_unit_label":{"example":"gram","type":"string"},"serving_unit_label_translations":{"nullable":true,"type":"object"},"servings":{"type":"number"}}},"FoodCompositeDetailsResponse":{"properties":{"food_cc_calculated_values":{"$ref":"#/components/schemas/CcColumnsRequest","nullable":true},"food_cc_override_values":{"nullable":true,"type":"object"},"food_mixed_dish_components_calculated_values":{"nullable":true,"type":"object"},"food_mixed_dish_components_override_values":{"nullable":true,"type":"object"},"listed_serving_unit_amount":{"nullable":true,"type":"number"},"listed_serving_unit_label":{"nullable":true,"type":"string"},"listed_servings":{"nullable":true,"type":"number"}}},"FoodDatabaseTableResponseRow":{"properties":{"created_time":{"format":"date-time","type":"string"},"definition_type":{"type":"string"},"first_report_date":{"description":"First date of draft report containing this food item","format":"date-time","type":"string"},"food_name":{"type":"string"},"is_associated_with_me":{"type":"boolean"},"is_custom_item":{"type":"boolean"},"last_updated_by_user_id":{"type":"integer"},"meal_count":{"description":"Total number of meals containing this food item","type":"integer"},"option_value_preparation_method":{"type":"string"},"option_values":{"type":"object"},"recent_meals":{"items":{"$ref":"#/components/schemas/RecentMeal"},"type":"array"},"related_patient_draft_reports":{"items":{"properties":{"patient_id":{"type":"integer"},"patient_report_id":{"type":"integer"}},"type":"object"},"type":"array"},"reviewed_by_user_id":{"type":"integer"},"reviewed_time":{"format":"date-time","type":"string"},"scraped_by_user_id":{"type":"integer"},"scraped_time":{"format":"date-time","type":"string"},"status":{"type":"string"},"triaged_by_user_id":{"type":"integer"},"triaged_time":{"format":"date-time","type":"string"},"updated_time":{"format":"date-time","type":"string"}},"required":["food_name","is_custom_item","status","created_time","updated_time"]},"FoodDetailsResponse":{"properties":{"cc":{"$ref":"#/components/schemas/CcColumnsRequest","nullable":true},"components":{"items":{"$ref":"#/components/schemas/FoodComponentResponse"},"nullable":true,"type":"array"},"composite_details":{"$ref":"#/components/schemas/FoodCompositeDetailsResponse","nullable":true},"food":{"$ref":"#/components/schemas/FoodVTO","nullable":true},"ontology":{"$ref":"#/components/schemas/FoodOntologyVTO","nullable":true},"option_collection":{"$ref":"#/components/schemas/FoodOptionCollection","nullable":false},"option_values_raw":{"nullable":true,"type":"object"},"ranking":{"$ref":"#/components/schemas/FoodRankingVTO","nullable":true},"translations":{"default":[],"items":{"$ref":"#/components/schemas/TranslatedStringResponse"},"nullable":false,"type":"array"},"usda_measures":{"$ref":"#/components/schemas/UsdaMeasuresList","nullable":true},"usda_nutrition":{"$ref":"#/components/schemas/UsdaNutritionResponse","nullable":true},"warnings":{"items":{"$ref":"#/components/schemas/FoodDetailsWarning"},"nullable":false,"type":"array"}}},"FoodDetailsUpdateRequest":{"properties":{"cc":{"$ref":"#/components/schemas/CcColumnsRequest","nullable":false},"components":{"items":{"$ref":"#/components/schemas/FoodComponentUpdateRequest"},"nullable":true,"type":"array"},"composite_details":{"$ref":"#/components/schemas/FoodCompositeDetailsResponse","nullable":true},"food":{"$ref":"#/components/schemas/FoodVTO","nullable":false},"ontology":{"properties":{"levels":{"$ref":"#/components/schemas/FoodOntologyLevels"}}},"option_collection_id":{"nullable":true,"type":"number"},"option_values_raw":{"nullable":true,"type":"object"},"ranking":{"$ref":"#/components/schemas/FoodRankingVTO","nullable":false},"translations":{"default":[],"items":{"properties":{"lang":{"nullable":false,"type":"string"},"translation":{"default":"","nullable":false,"type":"string"}},"required":["lang"],"type":"object"},"nullable":false,"type":"array"},"usda_measures":{"$ref":"#/components/schemas/UsdaMeasuresList","nullable":true},"usda_nutrition":{"$ref":"#/components/schemas/UsdaNutritionResponse","nullable":true}},"required":["food","ontology"]},"FoodDetailsWarning":{"properties":{"field":{"type":"string"},"level":{"type":"number"},"message":{"type":"string"},"type":{"enum":["database","nutrient","cc"],"type":"string"}},"required":["nutrient","message","type","level"]},"FoodDumpResponse":{"properties":{"data_fields":{"items":{"type":"string"},"nullable":true,"type":"array"},"rows":{"items":{"$ref":"#/components/schemas/FoodDumpRowResponse"},"nullable":true,"type":"array"}},"required":["data_fields","rows"]},"FoodDumpRowResponse":{"properties":{"addon_objs":{"items":{"$ref":"#/components/schemas/MealItemCustomAddonResponse","nullable":true,"type":"object"},"nullable":true,"type":"array"},"addons":{"items":{"type":"string"},"nullable":true,"type":"array"},"carbohydrate_g":{"nullable":true,"type":"number"},"energy_kcal":{"nullable":true,"type":"number"},"fat_g":{"nullable":true,"type":"number"},"fiber_g":{"nullable":true,"type":"number"},"food_name":{"nullable":true,"type":"string"},"food_name_translations":{"nullable":true,"type":"object"},"meal_date":{"nullable":false,"type":"string"},"meal_name":{"nullable":true,"type":"string"},"meal_name_translations":{"nullable":true,"type":"object"},"meal_note":{"nullable":true,"type":"string"},"netcarb_g":{"nullable":true,"type":"number"},"patient_note":{"nullable":true,"type":"string"},"percent_eaten":{"nullable":true,"type":"number"},"potassium_mg":{"nullable":true,"type":"number"},"protein_g":{"nullable":true,"type":"number"},"serving_unit_label":{"nullable":true,"type":"string"},"serving_unit_label_translations":{"nullable":true,"type":"object"},"servings":{"nullable":true,"type":"number"},"type":{"enum":["meal","emotion"],"type":"string"}},"required":["type","meal_date"]},"FoodNlpPhraseMatchResult":{"properties":{"fail_detail":{"nullable":true,"type":"object"},"fail_reason":{"nullable":true,"type":"string"},"meal_item":{"$ref":"#/components/schemas/CreateMealItemRequest","nullable":true,"type":"object"},"parsed":{"$ref":"#/components/schemas/FoodNlpPhraseParserResult","nullable":false,"type":"object"}},"required":["parsed"]},"FoodNlpPhraseParserResult":{"properties":{"addon_of":{"nullable":true,"type":"string"},"food_name":{"nullable":false,"type":"string"},"modifiers":{"items":{"type":"string"},"type":"array"},"serving_count_float":{"nullable":true,"type":"number"},"serving_count_str":{"nullable":true,"type":"string"},"serving_unit_label":{"nullable":true,"type":"string"},"text_span":{"nullable":false,"type":"string"}},"required":["text_span","food_name"]},"FoodOntologyLevels":{"default":[],"items":{"example":"food","nullable":false,"type":"string"},"nullable":false,"type":"array"},"FoodOntologyVTO":{"properties":{"adult_serving_size_g":{"nullable":true,"type":"number"},"ghg_equivalent_kg":{"nullable":true,"type":"number"},"id":{"example":42,"nullable":true,"type":"integer"},"levels":{"default":[],"items":{"example":"food","nullable":false,"type":"string"},"nullable":false,"type":"array"}},"required":["levels"]},"FoodOption":{"properties":{"cardinality":{"$ref":"#/components/schemas/FoodOptionCardinality","nullable":false},"category_id":{"example":"preparation","nullable":false,"type":"string"},"description":{"example":"Food's preparation method","nullable":false,"type":"string"},"id":{"example":"preparation.method","nullable":false,"type":"string"},"label":{"example":"Method","nullable":false,"type":"string"},"name":{"example":"method","nullable":false,"type":"string"},"restrictions":{"default":[],"items":{"$ref":"#/components/schemas/FoodOptionRestriction"},"nullable":false,"type":"array"},"type":{"default":"FoodOption","enum":["FoodOption"],"nullable":false},"value_type":{"default":"FoodOptionValue","nullable":false,"type":"string"}},"required":["id","type","name","label","description","cardinality","value_type","restrictions"],"type":"object"},"FoodOptionCardinality":{"enum":["single","multiple"]},"FoodOptionCategory":{"properties":{"description":{"example":"Food's preparation","nullable":false,"type":"string"},"id":{"example":"preparation","nullable":false,"type":"string"},"label":{"example":"Preparation","nullable":false,"type":"string"},"name":{"example":"preparation","nullable":false,"type":"string"},"restrictions":{"default":[],"items":{"$ref":"#/components/schemas/FoodOptionRestriction"},"nullable":false,"type":"array"},"type":{"default":"FoodOptionCategory","enum":["FoodOptionCategory"],"nullable":false}},"required":["id","type","name","label","description","restrictions"],"type":"object"},"FoodOptionCollection":{"properties":{"categories":{"default":[],"items":{"$ref":"#/components/schemas/FoodOptionCategory"},"nullable":false,"type":"array"},"id":{"example":123,"nullable":true,"type":"number"},"options":{"default":[],"items":{"$ref":"#/components/schemas/FoodOption"},"nullable":false,"type":"array"},"values":{"default":[],"items":{"$ref":"#/components/schemas/FoodOptionValue"},"nullable":false,"type":"array"}},"required":["categories","options","values"],"type":"object"},"FoodOptionNodeType":{"enum":["FoodOptionCategory","FoodOption","FoodOptionValue"]},"FoodOptionOntologyId":{"properties":{"id":{"example":"1234","nullable":false,"type":"string"}},"required":["id"],"type":"object"},"FoodOptionRestriction":{"properties":{"source_string":{"example":"xb: dairy = non-dairy","nullable":true,"type":"string"},"target_id":{"example":"dairy.dairy","nullable":false,"type":"string"},"target_type":{"$ref":"#/components/schemas/FoodOptionRestrictionTargetType","nullable":false},"target_value":{"example":"non-dairy","nullable":true,"type":"string"},"type":{"$ref":"#/components/schemas/FoodOptionRestrictionType","nullable":false}},"required":["type","target_type","target_id"],"type":"object"},"FoodOptionRestrictionTargetType":{"enum":["FoodOption","FoodOptionOntologyId"]},"FoodOptionRestrictionType":{"enum":["includes","included_by","excludes","excluded_by","implies","implied_by","suggests","suggested_by"]},"FoodOptionValue":{"properties":{"description":{"example":"Food is raw","nullable":false,"type":"string"},"id":{"example":"preparation.method:yes","nullable":false,"type":"string"},"label":{"example":"Raw","nullable":false,"type":"string"},"option_id":{"example":"preparation.method","nullable":false,"type":"string"},"restrictions":{"default":[],"items":{"$ref":"#/components/schemas/FoodOptionRestriction"},"nullable":false,"type":"array"},"synonyms":{"default":[],"items":{"example":"uncooked","type":"string"},"nullable":false,"type":"array"},"type":{"default":"FoodOptionValue","enum":["FoodOptionValue"],"nullable":false},"value":{"example":"raw","nullable":false,"type":"string"}},"required":["id","type","name","label","description","restrictions"],"type":"object"},"FoodRankingVTO":{"properties":{"both_fat":{"type":"integer"},"fruit":{"type":"integer"},"healthy_fat":{"type":"integer"},"high_gi":{"type":"integer"},"high_k":{"type":"integer"},"low_gi":{"type":"integer"},"low_k":{"type":"integer"},"name":{"type":"string"},"plant_based":{"type":"integer"},"refined_grain":{"type":"integer"},"ultra_processed":{"type":"integer"},"unhealthy_fat":{"type":"integer"},"vegetable":{"type":"integer"},"whole_grain":{"type":"integer"}},"required":["name","ultra_processed","plant_based","healthy_fat","unhealthy_fat","both_fat","whole_grain","refined_grain"]},"FoodReplacement":{"properties":{"food_name":{"type":"string"},"question":{"nullable":true,"type":"string"}},"required":["food_name"]},"FoodResponse":{"properties":{"addons":{"items":{"$ref":"#/components/schemas/FoodAddonResponse"},"type":"array"},"adult_serving_size_g":{"nullable":true,"type":"number"},"base_name":{"type":"string"},"brand":{"type":"string"},"carbohydrate_g":{"type":"number"},"custom_item_source":{"description":"See documentation regarding these values in the \"Engineering Loop ->\nReference Documents -> Referencing Foods by Source and ID\" page:\n\n  https://rxfood.sharepoint.com/:fl:/r/contentstorage/CSP_14a5252e-2526-4d18-8a2e-c2c70eba2ba3/Document%20Library/LoopAppData/Food%20ID%20and%20Nutrition%20Source%20fields.loop?d=w91a1be15daed463590155c82c9ef2034&csf=1&web=1&e=orgDCL&nav=cz0lMkZjb250ZW50c3RvcmFnZSUyRkNTUF8xNGE1MjUyZS0yNTI2LTRkMTgtOGEyZS1jMmM3MGViYTJiYTMmZD1iJTIxTGlXbEZDWWxHRTJLTHNMSERyb3JvOFlodG0wcEcwMUR1OVNOSTZ2RjhPLTJEVGktMXNmb1M0X29CQmpBWXZFbiZmPTAxVUxTRUVWQVZYMlFaRDNPMkdWREpBRks0UUxFNjZJQlUmYz0lMkYmYT1Mb29wQXBwJnA9JTQwZmx1aWR4JTJGbG9vcC1wYWdlLWNvbnRhaW5lciZ4PSU3QiUyMnclMjIlM0ElMjJUMFJUVUh4eWVHWnZiMlF1YzJoaGNtVndiMmx1ZEM1amIyMThZaUZNYVZkc1JrTlpiRWRGTWt0TWMweElSSEp2Y204NFdXaDBiVEJ3UnpBeFJIVTVVMDVKTm5aR09FOHRNa1JVYVMweGMyWnZVelJmYjBKQ2FrRlpka1Z1ZkRBeFZVeFRSVVZXUkVKYVR6UlRSa0pNUzFwT1EwbFBVbHBGVGxVelFsaE5XVEklM0QlMjIlMkMlMjJpJTIyJTNBJTIyYmE3ODVlMDQtMGQ4Yy00ZDAxLTgxZDYtMWYwYTUzYzBlNTViJTIyJTdE\n\nNote: this field is currently only used by\n`food_engine_food_response_to_food_response`, although it may be\nused by other services in the future.\n","nullable":true,"type":"string"},"custom_item_source_id":{"description":"See documentation regarding these values in the \"Engineering Loop ->\nReference Documents -> Referencing Foods by Source and ID\" page:\n\n  https://rxfood.sharepoint.com/:fl:/r/contentstorage/CSP_14a5252e-2526-4d18-8a2e-c2c70eba2ba3/Document%20Library/LoopAppData/Food%20ID%20and%20Nutrition%20Source%20fields.loop?d=w91a1be15daed463590155c82c9ef2034&csf=1&web=1&e=orgDCL&nav=cz0lMkZjb250ZW50c3RvcmFnZSUyRkNTUF8xNGE1MjUyZS0yNTI2LTRkMTgtOGEyZS1jMmM3MGViYTJiYTMmZD1iJTIxTGlXbEZDWWxHRTJLTHNMSERyb3JvOFlodG0wcEcwMUR1OVNOSTZ2RjhPLTJEVGktMXNmb1M0X29CQmpBWXZFbiZmPTAxVUxTRUVWQVZYMlFaRDNPMkdWREpBRks0UUxFNjZJQlUmYz0lMkYmYT1Mb29wQXBwJnA9JTQwZmx1aWR4JTJGbG9vcC1wYWdlLWNvbnRhaW5lciZ4PSU3QiUyMnclMjIlM0ElMjJUMFJUVUh4eWVHWnZiMlF1YzJoaGNtVndiMmx1ZEM1amIyMThZaUZNYVZkc1JrTlpiRWRGTWt0TWMweElSSEp2Y204NFdXaDBiVEJ3UnpBeFJIVTVVMDVKTm5aR09FOHRNa1JVYVMweGMyWnZVelJmYjBKQ2FrRlpka1Z1ZkRBeFZVeFRSVVZXUkVKYVR6UlRSa0pNUzFwT1EwbFBVbHBGVGxVelFsaE5XVEklM0QlMjIlMkMlMjJpJTIyJTNBJTIyYmE3ODVlMDQtMGQ4Yy00ZDAxLTgxZDYtMWYwYTUzYzBlNTViJTIyJTdE\n\nNote: this field is currently only used by\n`food_engine_food_response_to_food_response`, although it may be\nused by other services in the future.\n","nullable":true,"type":"string"},"custom_tip":{"nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"diet_restriction_flags":{"$ref":"#/components/schemas/DietRestrictionFlags"},"favorite":{"description":"if this food is set favorite of the queried user","type":"boolean"},"food_image_url":{"nullable":true,"type":"string"},"ingredients_str":{"nullable":true,"type":"string"},"level1":{"nullable":true,"type":"string"},"level2":{"nullable":true,"type":"string"},"level3":{"nullable":true,"type":"string"},"level4":{"nullable":true,"type":"string"},"name":{"type":"string"},"name_translations":{"nullable":true,"type":"object"},"note":{"nullable":true,"type":"string"},"nutrient_overrides":{"$ref":"#/components/schemas/NutrientOverrideCollection","nullable":true,"type":"object"},"nutrition_source":{"type":"string"},"nutrition_source_id":{"type":"integer"},"previously_logged":{"description":"if this food is previously logged by the queried user","type":"boolean"},"primary_data_origin_code":{"description":"Stable provenance code from food.primary_data_origin_code when the hit came from DBFood","nullable":true,"type":"string"},"replacements":{"items":{"$ref":"#/components/schemas/FoodReplacement"},"type":"array"},"rxfood_id":{"nullable":true,"type":"string"},"serving_types":{"items":{"$ref":"#/components/schemas/FoodServingType"},"type":"array"},"serving_units":{"items":{"$ref":"#/components/schemas/FoodServingUnit"},"type":"array"},"similar_items":{"default":[],"items":{"type":"string"},"type":"array"},"status":{"nullable":false,"type":"string"}},"required":["rxfood_id","name","name_translations","food_image_url","serving_units"]},"FoodRowMixedDishComponents":{"properties":{"cc_fish":{"nullable":true,"type":"number"},"cc_fruit":{"nullable":true,"type":"number"},"cc_grains":{"nullable":true,"type":"number"},"cc_legume":{"nullable":true,"type":"number"},"cc_meat":{"nullable":true,"type":"number"},"cc_non_meat_animal_protein":{"nullable":true,"type":"number"},"cc_nuts_seeds":{"nullable":true,"type":"number"},"cc_pork":{"nullable":true,"type":"number"},"cc_poultry":{"nullable":true,"type":"number"},"cc_protein":{"nullable":true,"type":"number"},"cc_redmeat":{"nullable":true,"type":"number"},"cc_shellfish":{"nullable":true,"type":"number"},"cc_vegetable":{"nullable":true,"type":"number"}}},"FoodScrapingResponse":{"properties":{"brand":{"nullable":true,"type":"string"},"created_time":{"format":"date-time","type":"string"},"food_name":{"nullable":false,"type":"string"},"id":{"example":2,"nullable":false,"type":"integer"},"manufacturer":{"nullable":true,"type":"string"},"processed_time":{"format":"date-time","nullable":true,"type":"string"},"reference_url":{"nullable":true,"type":"string"},"scraped_by_user_id":{"example":2,"nullable":true,"type":"integer"},"updated_time":{"format":"date-time","type":"string"},"user_id":{"example":2,"nullable":false,"type":"integer"}},"required":["id","user_id","food_name"]},"FoodSearchByAudioResponse":{"properties":{"meal_audio_id":{"type":"integer"},"results":{"items":{"$ref":"#/components/schemas/FoodResponse"},"type":"array"}},"required":["meal_audio_id","results"]},"FoodSearchByNlpPhraseResponse":{"properties":{"debug":{"nullable":true,"type":"object"},"results":{"items":{"$ref":"#/components/schemas/FoodNlpPhraseMatchResult"},"type":"array"},"search_id":{"type":"integer"},"search_text":{"type":"string"}},"required":["search_text","results"]},"FoodSearchByPhotoResponse":{"properties":{"meal_photo_id":{"type":"integer"},"results":{"items":{"$ref":"#/components/schemas/FoodResponse"},"type":"array"}},"required":["meal_photo_id","results"]},"FoodSearchByTextResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/FoodResponse"},"type":"array"},"search_id":{"type":"integer"},"search_text":{"type":"string"}},"required":["search_text","results"]},"FoodSearchV2MatchResponse":{"properties":{"custom_addons":{"items":{"$ref":"#/components/schemas/MealItemCustomAddonResponse"},"nullable":false,"type":"array"},"food_name":{"nullable":false,"type":"string"},"food_name_alias":{"nullable":true,"type":"string"},"food_name_alias_translations":{"nullable":true,"type":"object"},"food_name_translations":{"nullable":true,"type":"object"},"food_photo_url":{"nullable":true,"type":"string"},"food_status":{"nullable":true,"type":"string"},"id":{"nullable":false,"type":"string"},"is_from_user_recents":{"type":"boolean"},"meta":{"nullable":true,"type":"object"},"nutrition_source":{"nullable":true,"type":"string"},"score":{"nullable":false,"type":"number"},"serving_units":{"items":{"$ref":"#/components/schemas/FoodServingUnit"},"nullable":false,"type":"array"}},"required":["id","score","is_from_user_recents","food_name","food_name_translations","food_name_alias","food_name_alias_translations","food_photo_url","food_status","serving_units","custom_addons"]},"FoodSearchV2Response":{"properties":{"count":{"nullable":false,"type":"integer"},"debug_telemetry":{"nullable":true,"type":"object"},"matches":{"items":{"$ref":"#/components/schemas/FoodSearchV2MatchResponse"},"nullable":false,"type":"array"},"suggestions":{"items":{"$ref":"#/components/schemas/FoodSearchV2SuggestionResponse"},"nullable":false,"type":"array"}},"required":["count","matches","suggestions"]},"FoodSearchV2SuggestionOption":{"properties":{"score":{"nullable":false,"type":"number"},"text":{"nullable":false,"type":"string"}},"required":["score","text"]},"FoodSearchV2SuggestionResponse":{"properties":{"length":{"nullable":false,"type":"integer"},"offset":{"nullable":false,"type":"integer"},"options":{"items":{"$ref":"#/components/schemas/FoodSearchV2SuggestionOption"},"nullable":false,"type":"array"},"text":{"nullable":false,"type":"string"}},"required":["text","offset","length","options"]},"FoodServingType":{"properties":{"label":{"type":"string"},"multiplier":{"type":"number"}},"required":["label","multiplier"]},"FoodServingUnit":{"properties":{"addon":{"type":"boolean"},"amount":{"type":"number"},"default_label_qty":{"type":"number"},"food_sizing_options":{"default":[],"items":{"type":"string"},"type":"array"},"label":{"type":"string"},"label_translations":{"nullable":true,"type":"object"},"ranking":{"type":"integer"},"root_label":{"type":"string"}},"required":["label","amount","label_translations","default_label_qty"]},"FoodSubstitutionSuggestionReason":{"properties":{"placeholder_description":{"type":"string"}},"required":["placeholder_description"]},"FoodSuggestionResponse":{"properties":{"description":{"type":"string"},"food_name_to_replace":{"type":"string"},"suggestion":{"type":"string"}},"required":["food_name_to_replace","suggestion","description"]},"FoodVTO":{"properties":{"adult_serving_size_g":{"nullable":true,"type":"number"},"base_food_name":{"nullable":true,"type":"string"},"brand":{"nullable":true,"type":"string"},"canonical_name":{"nullable":true,"type":"string"},"cn_food_id":{"nullable":true,"type":"number"},"consumption_context":{"enum":["meal","snack","beverage","condiment","ingredient","supplement","dessert"],"nullable":true,"type":"string"},"created_by_user_id":{"nullable":true,"type":"number"},"created_time":{"format":"date-time","type":"string"},"custom_tip":{"nullable":true,"type":"string"},"definition_type":{"enum":["atomic","composite"],"nullable":false,"type":"string"},"description":{"description":"USDA item name or a general description","nullable":true,"type":"string"},"fdcid":{"nullable":true,"type":"number"},"food_image_url":{"nullable":true,"type":"string"},"ghg_equivalent_kg":{"nullable":true,"type":"number"},"glycemic_load":{"enum":["low","medium","high",""],"nullable":true,"type":"string"},"is_clinician_reviewed":{"default":false,"type":"boolean"},"k_level":{"enum":["low","medium","high",""],"nullable":true,"type":"string"},"last_updated_by_user_id":{"nullable":true,"type":"number"},"manufacturer":{"nullable":true,"type":"string"},"mixed_dish_components":{"$ref":"#/components/schemas/FoodRowMixedDishComponents"},"name":{"type":"string"},"name_plural":{"nullable":true,"type":"string"},"name_singular":{"nullable":true,"type":"string"},"notes":{"nullable":true,"type":"string"},"nutrition_source":{"default":"usda","nullable":false,"type":"string"},"nutrition_source_id":{"nullable":true,"type":"integer"},"nutrition_source_url":{"nullable":true,"type":"string"},"other_names":{"default":[],"items":{"type":"string"},"nullable":true,"type":"array"},"physical_form":{"enum":["solid","liquid","powder","concentrate"],"nullable":true,"type":"string"},"preferred_addon":{"default":false,"nullable":true,"type":"boolean"},"preparation_state":{"enum":["dry","prepared"],"nullable":true,"type":"string"},"processing_level":{"enum":["minimal","processed","highly_processed"],"nullable":true,"type":"string"},"reviewed_by_user_id":{"nullable":true,"type":"number"},"reviewed_time":{"format":"date-time","nullable":true,"type":"string"},"root_food_name":{"nullable":true,"type":"string"},"rxfood_id":{"nullable":true,"type":"string"},"scraped_by_user_id":{"nullable":true,"type":"number"},"scraped_time":{"format":"date-time","nullable":true,"type":"string"},"similar_items":{"default":[],"items":{"type":"string"},"nullable":true,"type":"array"},"status":{"nullable":false,"type":"string"},"suggested_serving_amount_g":{"nullable":true,"type":"number"},"suggested_serving_count":{"nullable":true,"type":"number"},"suggested_serving_unit_label":{"nullable":true,"type":"string"},"synonyms":{"default":[],"items":{"type":"string"},"nullable":true,"type":"array"},"triaged_by_user_id":{"nullable":true,"type":"number"},"triaged_time":{"format":"date-time","nullable":true,"type":"string"},"updated_time":{"format":"date-time","type":"string"}},"required":["name"]},"FoodWhiteboardCreateUpdateRequest":{"properties":{"id":{"nullable":true,"type":"number"},"image_hash":{"nullable":true,"type":"string"},"image_uri":{"nullable":true,"type":"string"},"order":{"nullable":false,"type":"number"},"text":{"nullable":true,"type":"string"},"type":{"nullable":false,"type":"string"},"whiteboard_metadata":{"$ref":"#/components/schemas/FoodWhiteboardItemMetadata","nullable":true}},"required":["id","type","order","text","image_uri","whiteboard_metadata"]},"FoodWhiteboardItemMetadata":{"type":"object"},"FoodWhiteboardItemResponse":{"properties":{"id":{"nullable":false,"type":"number"},"image_hash":{"nullable":true,"type":"string"},"image_uri":{"nullable":true,"type":"string"},"order":{"nullable":false,"type":"number"},"text":{"nullable":true,"type":"string"},"type":{"nullable":false,"type":"string"},"whiteboard_metadata":{"$ref":"#/components/schemas/FoodWhiteboardItemMetadata","nullable":true}},"required":["id","type","order","text","image_uri","whiteboard_metadata"]},"GhgEquivalentDataResponse":{"properties":{"co2_kg":{"type":"number"},"liters_gasoline_consumed":{"type":"number"},"patient_id":{"type":"integer"},"smartphone_charges":{"type":"number"},"vehicle_km_per_kg":{"type":"number"},"vehicle_miles_per_kg":{"type":"number"}},"required":["patient_id","co2_kg","smartphone_charges","liters_gasoline_consumed","vehicle_miles_per_kg","vehicle_km_per_kg"]},"GlucoseDeltaFoodResponse":{"properties":{"energy_kcal":{"description":"total energy_kcal for the time period","example":"5","type":"number"},"exercise":{"items":{"$ref":"#/components/schemas/PatientExerciseResponse"},"type":"array"},"fat_g":{"description":"total fat for the time period","example":"3","type":"number"},"fiber_g":{"description":"total fiber for teh time period","example":"5","type":"number"},"food_alpha_index":{"description":"chr(ord(\"A\") + meal_index)","example":"A1","type":"string"},"food_photo_name":{"description":"name for food photo","type":"string"},"food_photo_url":{"description":"path to the food photo eg /api/foods/....","example":".../foods","type":"string"},"food_string":{"description":"food with addons","type":"string"},"food_string_with_gi":{"description":"food string with gi","example":"beets (2.2g/low)","type":"string"},"glucose":{"items":{"$ref":"#/components/schemas/PatientGlucoseDataResponse"},"type":"array"},"glucose_max_time":{"description":"time of max glucose within 4 hrs after food","example":"2022-03-03 04:00:00","type":"string"},"glucose_max_value":{"description":"value of max glucose within 4 hrs after food","example":"4","type":"number"},"glucose_min_time":{"description":"time of min glucose within 4 hrs after food","example":"2022-03-03 04:00:00","type":"string"},"glucose_min_value":{"description":"value of min glucose within 4 hrs after food","example":"4","type":"number"},"glucose_two_hour_delta":{"description":"change in bg data after two hours, in mmoL/l","example":"4","nullable":true,"type":"number"},"increase_in_mmol_l":{"description":"to increase in mmol/L of which the BG spiked after eating the food","type":"number"},"insulin":{"items":{"$ref":"#/components/schemas/PatientMedicationResponse"},"type":"array"},"key_contributor":{"description":"to be highlighted in the report as the key contributor to the glucose spike","type":"boolean"},"meal_date":{"description":"approximate calendar date in format YYYY-MM-DD","example":"2021-05-02","type":"string"},"meal_photo_id":{"description":"meal photo id","type":"integer"},"meal_time":{"description":"approxiamte time in HH:MM:SS","example":"09:33:02","type":"string"},"net_serving_size_g":{"description":"total serving size in g","example":"7","type":"number"},"netcarb_g":{"description":"total net carbs for teh time period","example":"5","type":"number"},"protein_g":{"description":"total protein for the time period","example":"4","type":"number"},"summary_statements":{"items":{"$ref":"#/components/schemas/PatientCgmSummaryStatement"},"type":"array"},"time_lower_bound":{"description":"defined lower bound for reporting on the glucose overlaid with this item","format":"date-time","type":"string"},"time_upper_bound":{"description":"defined upper bound for reporting on the glucose overlaid with this item","format":"date-time","type":"string"}}},"GlucoseTimeInRange":{"properties":{"minutes_total":{"description":"total minutes observed for all ranges provided in values","example":"400","type":"number"},"values":{"items":{"$ref":"#/components/schemas/GlucoseTimeInRangeValue"},"type":"array"}},"required":["minutes_total","values"]},"GlucoseTimeInRangeValue":{"properties":{"minutes_in_range":{"description":"number of minutes between mmol_lower and mmol_upper","example":"7","type":"number"},"mmol_lower":{"description":"bottom of the range given by target_name in mmol/l","example":"4","type":"number"},"mmol_upper":{"description":"top of the range given by target_name in mmol/l","example":"7","type":"number"},"target_name":{"enum":["low_danger","low","target","high","high_danger"],"type":"string"}},"required":["target_name","mmol_lower","mmol_upper","minutes_in_range"]},"GlycemicIndexFrequencyResponse":{"properties":{"breakfast":{"properties":{"high":{"type":"number"},"low":{"type":"number"},"medium":{"type":"number"}},"required":["low","medium","high"],"type":"object"},"dinner":{"properties":{"high":{"type":"number"},"low":{"type":"number"},"medium":{"type":"number"}},"required":["low","medium","high"],"type":"object"},"lunch":{"properties":{"high":{"type":"number"},"low":{"type":"number"},"medium":{"type":"number"}},"required":["low","medium","high"],"type":"object"},"snack":{"properties":{"high":{"type":"number"},"low":{"type":"number"},"medium":{"type":"number"}},"required":["low","medium","high"],"type":"object"}},"required":["breakfast","lunch","dinner","snack"]},"GoalExtendedWeeklyReportResponse":{"properties":{"change":{"example":"increase, decrease","type":"string"},"dates_exclude":{"items":{"format":"date-time","type":"string"},"nullable":true,"type":"array"},"end_date":{"format":"date-time","type":"string"},"goal_id":{"type":"integer"},"goal_image_url":{"nullable":true,"type":"string"},"goal_type":{"example":"frequency, nutrient","type":"string"},"missed_logging_opportunities":{"type":"integer"},"patient_id":{"type":"integer"},"period":{"enum":["day","week","breakfast","lunch","dinner","snack","meal"],"type":"string"},"range_success_count":{"type":"integer"},"range_total_count":{"type":"integer"},"range_value":{"type":"number"},"start_date":{"format":"date-time","type":"string"},"statement":{"example":"you met your goal 5 times out of 6","type":"string"},"target_display_name":{"example":"vitamin c","type":"string"},"target_name":{"example":"vitamin_c_mg","type":"string"},"target_unit":{"example":"mg","nullable":true,"type":"string"},"target_value":{"type":"number"}},"required":["patient_id","goal_id","goal_type","change","target_name","target_display_name","target_value","period","range_success_count","range_total_count","start_date","end_date","statement"]},"GoalLogProgressRequest":{"properties":{"goal_id":{"type":"integer"},"log_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"},"log_meal_name":{"enum":["breakfast","lunch","dinner","snack"],"type":"string"},"log_time":{"description":"time in format hh:mm:ss","example":"17:30:00","type":"string"},"value_delta":{"type":"number"}},"required":["goal_id","log_date","log_time","value_delta"]},"GoalProgressLogResponse":{"properties":{"goal_id":{"type":"integer"},"id":{"type":"integer"},"log_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"},"log_meal_name":{"enum":["breakfast","lunch","dinner","snack"],"type":"string"},"log_time":{"description":"time in format hh:mm:ss","example":"17:30:00","type":"string"},"patient_id":{"type":"integer"},"value_delta":{"type":"number"}},"required":["id","patient_id","goal_id","log_date","log_time","log_meal_name","value_delta"]},"GoalProgressResponse":{"properties":{"change":{"example":"increase, decrease","type":"string"},"current_value":{"type":"number"},"goal_image_url":{"nullable":true,"type":"string"},"goal_type":{"example":"frequency, nutrient","type":"string"},"id":{"type":"integer"},"meal_slots":{"items":{"enum":["breakfast","lunch","dinner","snack"],"type":"string"},"nullable":true,"type":"array"},"patient_id":{"type":"integer"},"period":{"enum":["day","week","breakfast","lunch","dinner","snack","meal"],"type":"string"},"recent_meal_items":{"items":{"$ref":"#/components/schemas/MealItemResponse"},"type":"array"},"recent_meals":{"items":{"$ref":"#/components/schemas/MealResponse"},"type":"array"},"recent_progress_logs":{"items":{"$ref":"#/components/schemas/GoalProgressLogResponse"},"type":"array"},"statement":{"example":"you met your goal 5 times out of 6","type":"string"},"target_display_name":{"example":"vitamin c","type":"string"},"target_name":{"example":"vitamin_c_mg","type":"string"},"target_range_high":{"nullable":true,"type":"number"},"target_range_low":{"nullable":true,"type":"number"},"target_range_type":{"enum":["above","below","within"],"nullable":true,"type":"string"},"target_unit":{"example":"mg","nullable":true,"type":"string"},"target_value":{"type":"number"}},"required":["id","patient_id","goal_type","change","target_name","target_display_name","target_value","current_value","period","statement"]},"GoalProgressResponseList":{"items":{"$ref":"#/components/schemas/GoalProgressResponse"},"type":"array"},"GoalRecentFrequencyBreakdownResponse":{"properties":{"num_days":{"type":"integer"},"values":{"items":{"properties":{"nutrient_name":{"example":"cc_refined_grains","type":"string"},"value":{"type":"number"}},"type":"object"},"type":"array"}},"required":["num_days","values"]},"GoalTargetResponse":{"properties":{"goal_type":{"enum":["nutrient","frequency"],"type":"string"},"target_display_name":{"example":"vitamin c","type":"string"},"target_name":{"example":"vitamin_c_mg","type":"string"},"target_unit":{"example":"mg","nullable":true,"type":"string"}},"required":["goal_type","target_name","target_display_name"]},"GoalWeeklyReportResponse":{"properties":{"change":{"example":"increase, decrease","type":"string"},"goal_id":{"type":"integer"},"goal_image_url":{"type":"string"},"goal_type":{"example":"frequency, nutrient","type":"string"},"last_week_success_count":{"type":"integer"},"last_week_total_count":{"type":"integer"},"patient_id":{"type":"integer"},"period":{"enum":["day","week","breakfast","lunch","dinner","snack","meal"],"type":"string"},"target_display_name":{"example":"vitamin c","type":"string"},"target_name":{"example":"vitamin_c_mg","type":"string"},"target_unit":{"example":"mg","nullable":true,"type":"string"},"target_value":{"type":"number"},"this_week_success_count":{"type":"integer"},"this_week_total_count":{"type":"integer"}},"required":["patient_id","goal_id","goal_type","change","target_name","target_display_name","target_value","period","last_week_success_count","last_week_total_count","this_week_success_count","this_week_total_count"]},"GroceryListResponse":{"properties":{"categories":{"items":{"properties":{"items":{"items":{"properties":{"name":{"type":"string"},"quantity":{"nullable":true,"type":"string"}},"type":"object"},"type":"array"},"name":{"type":"string"}},"type":"object"},"type":"array"},"meal_plan_id":{"type":"integer"}},"required":["meal_plan_id","categories"]},"GroundingTestResolveCustomItemRequest":{"properties":{"apply_to_meal":{"default":false,"description":"When true, apply reconciled UPN to meal_item or meal_item_custom_addon.","type":"boolean"},"brand":{"nullable":true,"type":"string"},"composite_food_id":{"nullable":true,"type":"string"},"food":{"description":"Required for synthetic mode (when imdr_row_index is omitted).","nullable":true,"type":"string"},"grounding_mode":{"description":"Required for synthetic mode (when imdr_row_index is omitted).","enum":["cpg","restaurant","whole_food"],"nullable":true,"type":"string"},"imdr_row_index":{"description":"0-based index into MPQ_IM_LBL_MATCH_V2 result; requires meal_photo_queue_id.","nullable":true,"type":"integer"},"is_composite_food":{"default":false,"type":"boolean"},"meal_item_custom_addon_id":{"description":"Optional custom addon row override when apply_to_meal is true.","nullable":true,"type":"integer"},"meal_item_id":{"description":"Optional meal row override when apply_to_meal is true.","nullable":true,"type":"integer"},"meal_photo_queue_id":{"description":"When set, builds QueueLabelContext from this MPQ. Required when imdr_row_index is set.","nullable":true,"type":"integer"},"patient_id":{"description":"Required when meal_photo_queue_id is omitted; patient used for OpenAI context.","nullable":true,"type":"integer"},"persist":{"default":false,"description":"When true, persist v3 grounding_request + outcome.","type":"boolean"},"preparation_method":{"description":"Stored on the synthetic raw (e.g. cpg, restaurant); defaults to grounding_mode.","nullable":true,"type":"string"}}},"GroundingTestResolveCustomItemResponse":{"properties":{"applied":{"type":"boolean"},"dedup_skipped_sg":{"type":"boolean"},"food_engine_candidates":{"items":{"additionalProperties":true,"type":"object"},"nullable":true,"type":"array"},"food_engine_ran":{"type":"boolean"},"food_engine_selected":{"additionalProperties":true,"nullable":true,"type":"object"},"food_engine_sources":{"nullable":true,"type":"string"},"grounding_mode":{"enum":["cpg","restaurant","whole_food"],"type":"string"},"grounding_request_id":{"nullable":true,"type":"integer"},"grounding_request_outcome_id":{"nullable":true,"type":"integer"},"input_summary":{"additionalProperties":true,"nullable":true,"type":"object"},"meal_item_custom_addon_id":{"nullable":true,"type":"integer"},"meal_item_id":{"nullable":true,"type":"integer"},"message":{"nullable":true,"type":"string"},"reconciliation":{"additionalProperties":true,"nullable":true,"type":"object"},"resolved":{"type":"boolean"},"search_grounding_result":{"additionalProperties":true,"nullable":true,"type":"object"},"user_provided_nutrition":{"additionalProperties":true,"nullable":true,"type":"object"},"winner":{"enum":["search_grounding","food_engine","combined"],"nullable":true,"type":"string"}},"required":["resolved","grounding_mode","dedup_skipped_sg","food_engine_ran","applied"]},"GroundingTestSearchGroundingRequest":{"properties":{"brand":{"nullable":true,"type":"string"},"composite_food_id":{"nullable":true,"type":"string"},"food":{"type":"string"},"grounding_mode":{"enum":["cpg","restaurant","whole_food"],"type":"string"},"is_composite_food":{"default":false,"type":"boolean"},"meal_photo_queue_id":{"description":"When set, builds QueueLabelContext from this MPQ (same as pipeline).","nullable":true,"type":"integer"},"patient_id":{"description":"Required when meal_photo_queue_id is omitted; patient used for OpenAI context.","nullable":true,"type":"integer"},"preparation_method":{"description":"Stored on the synthetic raw (e.g. cpg, restaurant); defaults to grounding_mode.","nullable":true,"type":"string"}},"required":["food","grounding_mode"]},"GroundingTestSearchGroundingResponse":{"properties":{"grounded":{"type":"boolean"},"grounding_request_id":{"nullable":true,"type":"integer"},"message":{"nullable":true,"type":"string"},"search_grounding_result":{"additionalProperties":true,"nullable":true,"type":"object"},"user_provided_nutrition":{"additionalProperties":true,"nullable":true,"type":"object"}},"required":["grounded"]},"HeiComponentsResponse":{"properties":{"added_sugars_tsp":{"nullable":true,"type":"number"},"dairy_cups":{"nullable":true,"type":"number"},"date_since":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"},"date_until":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"},"energy_kcal":{"nullable":true,"type":"number"},"fatty_acids_g":{"nullable":true,"type":"number"},"greens_beans_cups":{"nullable":true,"type":"number"},"hei_score":{"type":"number"},"patient_id":{"type":"integer"},"refined_grains_oz":{"nullable":true,"type":"number"},"saturated_fats_g":{"nullable":true,"type":"number"},"seafood_plant_proteins_oz":{"nullable":true,"type":"number"},"sodium_mg":{"nullable":true,"type":"number"},"total_fruits_cups":{"nullable":true,"type":"number"},"total_protein_foods_oz":{"nullable":true,"type":"number"},"total_vegetables_cups":{"nullable":true,"type":"number"},"whole_fruits_cups":{"nullable":true,"type":"number"},"whole_grains_oz":{"nullable":true,"type":"number"}},"required":["patient_id","date_since","date_until","total_fruits_cups","whole_fruits_cups","total_vegetables_cups","greens_beans_cups","whole_grains_oz","dairy_cups","total_protein_foods_oz","seafood_plant_proteins_oz","fatty_acids_g","refined_grains_oz","sodium_mg","added_sugars_tsp","saturated_fats_g","energy_kcal"]},"HeiDateRangeResponse":{"properties":{"added_sugars_score":{"nullable":true,"type":"number"},"dairy_score":{"nullable":true,"type":"number"},"energy_kcal":{"nullable":true,"type":"number"},"fatty_acids_score":{"nullable":true,"type":"number"},"greens_beans_score":{"nullable":true,"type":"number"},"hei_score":{"type":"number"},"refined_grains_score":{"nullable":true,"type":"number"},"saturated_fats_score":{"nullable":true,"type":"number"},"seafood_plant_proteins_score":{"nullable":true,"type":"number"},"sodium_score":{"nullable":true,"type":"number"},"total_fruits_score":{"nullable":true,"type":"number"},"total_protein_foods_score":{"nullable":true,"type":"number"},"total_vegetables_score":{"nullable":true,"type":"number"},"whole_fruits_score":{"nullable":true,"type":"number"},"whole_grains_score":{"nullable":true,"type":"number"}},"required":["hei_score","energy_kcal","total_fruits_score","whole_fruits_score","total_vegetables_score","greens_beans_score","whole_grains_score","dairy_score","total_protein_foods_score","seafood_plant_proteins_score","fatty_acids_score","refined_grains_score","sodium_score","added_sugars_score","saturated_fats_score"]},"HeiDayRowResponse":{"properties":{"added_sugars_score":{"nullable":true,"type":"number"},"dairy_score":{"nullable":true,"type":"number"},"energy_kcal":{"nullable":true,"type":"number"},"fatty_acids_score":{"nullable":true,"type":"number"},"greens_beans_score":{"nullable":true,"type":"number"},"hei_score":{"type":"number"},"log_date":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"},"refined_grains_score":{"nullable":true,"type":"number"},"saturated_fats_score":{"nullable":true,"type":"number"},"seafood_plant_proteins_score":{"nullable":true,"type":"number"},"sodium_score":{"nullable":true,"type":"number"},"total_fruits_score":{"nullable":true,"type":"number"},"total_protein_foods_score":{"nullable":true,"type":"number"},"total_vegetables_score":{"nullable":true,"type":"number"},"whole_fruits_score":{"nullable":true,"type":"number"},"whole_grains_score":{"nullable":true,"type":"number"}},"required":["log_date","hei_score","total_fruits_score","whole_fruits_score","total_vegetables_score","greens_beans_score","whole_grains_score","dairy_score","total_protein_foods_score","seafood_plant_proteins_score","fatty_acids_score","refined_grains_score","sodium_score","added_sugars_score","saturated_fats_score","energy_kcal"]},"HeiMealResponse":{"properties":{"added_sugars_tsp":{"nullable":true,"type":"number"},"dairy_cups":{"nullable":true,"type":"number"},"energy_kcal":{"nullable":true,"type":"number"},"fatty_acids_g":{"nullable":true,"type":"number"},"greens_beans_cups":{"nullable":true,"type":"number"},"hei_score":{"type":"number"},"meal_id":{"type":"integer"},"patient_id":{"type":"integer"},"refined_grains_oz":{"nullable":true,"type":"number"},"saturated_fats_g":{"nullable":true,"type":"number"},"seafood_plant_proteins_oz":{"nullable":true,"type":"number"},"sodium_mg":{"nullable":true,"type":"number"},"total_fruits_cups":{"nullable":true,"type":"number"},"total_protein_foods_oz":{"nullable":true,"type":"number"},"total_vegetables_cups":{"nullable":true,"type":"number"},"whole_fruits_cups":{"nullable":true,"type":"number"},"whole_grains_oz":{"nullable":true,"type":"number"}},"required":["patient_id","meal_id","hei_score"]},"HeiResponse":{"properties":{"daily_hei_scores":{"items":{"$ref":"#/components/schemas/HeiDayRowResponse"},"type":"array"},"date_since":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"},"date_until":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-10","type":"string"},"patient_id":{"type":"integer"},"summary_hei_score":{"items":{"$ref":"#/components/schemas/HeiDateRangeResponse"},"maxItems":1,"type":"array"}},"required":["patient_id","date_since","date_until","summary_hei_score","daily_hei_scores"]},"HospitalResponse":{"properties":{"address":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"country":{"description":"Hospital country (Canada or USA)","nullable":true,"type":"string"},"created_time":{"format":"date-time","type":"string"},"description":{"nullable":true,"type":"string"},"full_name":{"nullable":true,"type":"string"},"id":{"type":"integer"},"invitation_email_logo_link":{"nullable":true,"type":"string"},"invitation_email_logo_url":{"nullable":true,"type":"string"},"name":{"type":"string"},"state":{"nullable":true,"type":"string"},"updated_time":{"format":"date-time","type":"string"},"zip_code":{"nullable":true,"type":"string"}},"required":["id","name","created_time","updated_time"]},"HospitalSearchHit":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"type":{"enum":["hospital"],"type":"string"}},"required":["type","id","name"],"type":"object"},"ImLblCcColumnEstimationResult":{"properties":{"cc_columns":{"$ref":"#/components/schemas/CcColumnsRequest","type":"object"},"debug_info":{"additionalProperties":true,"nullable":false,"type":"object"},"version":{"nullable":false,"type":"string"}},"required":["version","cc_columns","debug_info"]},"ImLblDecompositionResult":{"allOf":[{"$ref":"#/components/schemas/OpenAIChatGPTMPQImLblRawResult"},{"properties":{"components":{"items":{"$ref":"#/components/schemas/OpenAIChatGPTMPQImLblRawResult"},"type":"array"},"debug_extractor_raws":{"items":{"$ref":"#/components/schemas/OpenAIChatGPTMPQImLblRawResult"},"type":"array"}},"type":"object"}]},"ImLblFoodMatchResult":{"properties":{"debug_info":{"additionalProperties":true,"nullable":false,"type":"object"},"food":{"$ref":"#/components/schemas/FoodResponse","type":"object"},"food_name_alias":{"nullable":true,"type":"string"},"is_composite_base":{"nullable":true,"type":"boolean"},"is_custom_item":{"nullable":true,"type":"boolean"},"version":{"nullable":false,"type":"string"}},"required":["version","food","debug_info"]},"ImLblMatchResult":{"description":"The central model that represents the result of the image/text matching process.\n","properties":{"canonical_match_score":{"nullable":true,"type":"number"},"composite_food_id":{"description":"id of the composite food that this match belongs to (or ``null``, if it is not a composite food)","nullable":true,"type":"string"},"custom_addon":{"$ref":"#/components/schemas/MealItemCustomAddonRequest","description":"When this match is a component of a composite food, this will be the CreateMealItemCustomAddonRequest for the component.\n","nullable":true,"type":"object"},"debug_info":{"additionalProperties":true,"nullable":false,"type":"object"},"estimated_cc_cols":{"$ref":"#/components/schemas/ImLblCcColumnEstimationResult","nullable":true,"type":"object"},"estimated_nutrients":{"$ref":"#/components/schemas/ImLblNutrientEstimationResult","nullable":true,"type":"object"},"estimated_ontology":{"$ref":"#/components/schemas/ImLblOntologyEstimationResult","nullable":true,"type":"object"},"flags":{"$ref":"#/components/schemas/MPQImLblMatchResultFlags","nullable":true,"type":"object"},"food":{"$ref":"#/components/schemas/ImLblFoodMatchResult","type":"object"},"is_composite_food":{"description":"indicates that this match is the 'parent' of a the composite food ``composite_food_id``","nullable":true,"type":"boolean"},"is_search_grounded":{"default":false,"description":"indicates that the food name has been search grounded","nullable":false,"type":"boolean"},"meal_item":{"$ref":"#/components/schemas/CreateMealItemRequest","description":"When this match is a \"top level\" match (ie, not a component in a composite food), this will be the meal item that will be created + added to the patient's meal.\nWhen this is is a composite food (ie, ``is_composite_food`` is ``true``), the ``meal_item`` will have ``custom_addons`` for each of the components.\n","nullable":true,"type":"object"},"nutrient_overrides":{"$ref":"#/components/schemas/NutrientOverrideCollection","nullable":true,"type":"object"},"raw":{"$ref":"#/components/schemas/OpenAIChatGPTMPQImLblRawResult","type":"object"},"size":{"$ref":"#/components/schemas/ImLblSizeEstimationResult","nullable":true,"type":"object"},"user_provided_nutrition":{"$ref":"#/components/schemas/UserProvidedNutritionExtractionResult","nullable":true,"type":"object"},"version":{"nullable":false,"type":"string"}},"required":["version","food","raw","debug_info"]},"ImLblNutrientEstimationResult":{"properties":{"debug_info":{"additionalProperties":true,"nullable":false,"type":"object"},"food_name":{"nullable":false,"type":"string"},"ingredients_str":{"nullable":true,"type":"string"},"nutrients":{"$ref":"#/components/schemas/NutrientEstimatesRequest","type":"object"},"source":{"nullable":false,"type":"string"},"version":{"nullable":false,"type":"string"}},"required":["version","food_name","source","nutrients","ingredients_str","debug_info"]},"ImLblOntologyEstimationResult":{"properties":{"debug_info":{"additionalProperties":true,"nullable":false,"type":"object"},"ontology":{"additionalProperties":{"nullable":true,"type":"string"},"nullable":false,"type":"object"},"version":{"nullable":false,"type":"string"}},"required":["version","ontology","debug_info"]},"ImLblRawResultRegion":{"properties":{"bounding_box":{"description":"bounding box in the format [ymin, xmin, ymax, xmax], in normalized coordinates (0-1)","items":{"type":"number"},"nullable":true,"type":"array"},"source":{"enum":["photo","note"],"type":"string"},"text_span":{"nullable":true,"type":"string"}},"required":["source"]},"ImLblSizeEstimationResult":{"properties":{"debug_info":{"additionalProperties":true,"nullable":false,"type":"object"},"percent_eaten":{"nullable":true,"type":"number"},"serving_unit_amount":{"nullable":true,"type":"number"},"serving_unit_label":{"nullable":true,"type":"string"},"servings":{"nullable":true,"type":"number"},"version":{"nullable":false,"type":"string"}},"required":["version","debug_info"]},"ImageDetectionResultOcrMatch":{"properties":{"name":{"nullable":false,"type":"string"},"regions":{"items":{"$ref":"#/components/schemas/ImageDetectionResultOcrRegion"},"nullable":false,"type":"array"},"span":{"nullable":false,"type":"string"}},"required":["type","value","match"],"type":"object"},"ImageDetectionResultOcrNftParsedNutrient":{"properties":{"amount":{"example":10,"nullable":true,"type":"number"},"amount_unit":{"example":"mg","nullable":true,"type":"string"},"nutrient":{"example":"protein_g","nullable":false,"type":"string"},"rdi_pct":{"example":0.3,"nullable":true,"type":"number"}},"required":["nutrient"],"type":"object"},"ImageDetectionResultOcrNftParsedResult":{"oneOf":[{"$ref":"#/components/schemas/ImageDetectionResultOcrNftParsedResultNftParsedServing"},{"$ref":"#/components/schemas/ImageDetectionResultOcrNftParsedResultNftParsedNutrient"}]},"ImageDetectionResultOcrNftParsedResultNftParsedNutrient":{"properties":{"match":{"$ref":"#/components/schemas/ImageDetectionResultOcrMatch","nullable":false,"type":"object"},"type":{"enum":["NftParsedNutrient"],"type":"string"},"value":{"$ref":"#/components/schemas/ImageDetectionResultOcrNftParsedNutrient","nullable":false,"type":"object"}},"required":["type","value","match"],"type":"object"},"ImageDetectionResultOcrNftParsedResultNftParsedServing":{"properties":{"match":{"$ref":"#/components/schemas/ImageDetectionResultOcrMatch","nullable":false,"type":"object"},"type":{"enum":["NftParsedServing"],"type":"string"},"value":{"$ref":"#/components/schemas/ImageDetectionResultOcrNftParsedServing","nullable":false,"type":"object"}},"required":["type","value","match"],"type":"object"},"ImageDetectionResultOcrNftParsedServing":{"properties":{"serving_amount_g":{"example":100,"nullable":false,"type":"number"},"serving_count":{"example":1,"nullable":false,"type":"number"},"serving_unit":{"example":"cup","nullable":false,"type":"string"}},"required":["serving_unit","serving_count","serving_amount_g"],"type":"object"},"ImageDetectionResultOcrNftResponse":{"properties":{"values":{"items":{"$ref":"#/components/schemas/ImageDetectionResultOcrNftParsedResult"},"nullable":false,"type":"array"}},"required":["values"],"type":"object"},"ImageDetectionResultOcrPoint":{"properties":{"x":{"nullable":false,"type":"number"},"y":{"nullable":false,"type":"number"}},"required":["x","y"],"type":"object"},"ImageDetectionResultOcrRegion":{"properties":{"text":{"nullable":false,"type":"string"},"vertices":{"items":{"$ref":"#/components/schemas/ImageDetectionResultOcrPoint"},"nullable":false,"type":"array"}},"required":["text","vertices"],"type":"object"},"ImageDetectionResultResponse":{"properties":{"created_time":{"example":"2020-01-01T00:00:00Z","nullable":false,"type":"string"},"detect_type":{"$ref":"#/components/schemas/ImageDetectionTypeEnum"},"detect_version":{"example":"nft:v1","nullable":false,"type":"string"},"id":{"example":1,"nullable":false,"type":"integer"},"image_id":{"example":"123","nullable":false,"type":"string"},"image_source":{"example":"food_whiteboard_item","nullable":false,"type":"string"},"image_url":{"example":"https://example.com","nullable":false,"type":"string"},"result":{"oneOf":[{"$ref":"#/components/schemas/ImageDetectionResultOcrNftResponse"}]}},"required":["finish_reason"],"type":"object"},"ImageDetectionTypeEnum":{"enum":["ocr_raw","ocr_nft","mpq_im_lbl_raw","mpq_im_lbl_pre_extractor","mpq_im_lbl_match_v2","mpq_im_lbl_raw_simple","mpq_im_lbl_match_simple","mpq_im_lbl_raw_packaged","mpq_im_lbl_match_packaged","mpq_qa_ai","ml_gd_regions","ml_em_vecs"],"type":"string"},"LangfuseSessionUrlResponse":{"properties":{"url":{"nullable":true,"type":"string"}}},"MPQImLblMatchResultFlags":{"description":"Flags set during the matching process to indicate match details, for use by meal_photo_queue_service to determine whether to escalate the match for review.\n","properties":{"could_skip_review":{"description":"indicates that this match could (in theory) skip review, but policy has determined it should be reviewed.","nullable":true,"type":"boolean"},"debug":{"additionalProperties":true,"nullable":true,"type":"object"},"is_cpg_match":{"nullable":true,"type":"boolean"},"ontology1":{"nullable":true,"type":"string"},"ontology2":{"nullable":true,"type":"string"},"policy_skip_review":{"nullable":true,"type":"boolean"},"policy_skip_review_reason":{"nullable":true,"type":"string"}}},"MPQMetadataPrelblAvailabilityEnum":{"enum":["generating","available","holdout","error"],"type":"string"},"MacroCalBreakdownResponse":{"properties":{"afternoon_avg":{"$ref":"#/components/schemas/MacroCalBreakdownResponseAvgVals"},"breakfast_avg":{"$ref":"#/components/schemas/MacroCalBreakdownResponseAvgVals"},"dinner_avg":{"$ref":"#/components/schemas/MacroCalBreakdownResponseAvgVals"},"dinnertime_avg":{"$ref":"#/components/schemas/MacroCalBreakdownResponseAvgVals"},"evening_avg":{"$ref":"#/components/schemas/MacroCalBreakdownResponseAvgVals"},"lunch_avg":{"$ref":"#/components/schemas/MacroCalBreakdownResponseAvgVals"},"lunchtime_avg":{"$ref":"#/components/schemas/MacroCalBreakdownResponseAvgVals"},"morning_avg":{"$ref":"#/components/schemas/MacroCalBreakdownResponseAvgVals"},"overall_avg":{"$ref":"#/components/schemas/MacroCalBreakdownResponseAvgVals"},"snack_avg":{"$ref":"#/components/schemas/MacroCalBreakdownResponseAvgVals"}}},"MacroCalBreakdownResponseAvgVals":{"properties":{"alcohol_g":{"description":"alcohol in grams","nullable":true,"type":"number"},"alcohol_pct":{"description":"alcohol as a percentage of total calories","nullable":true,"type":"number"},"carbohydrate_g":{"description":"carbohydrate in grams","nullable":true,"type":"number"},"carbohydrate_pct":{"description":"carbohydrate as a percentage of total calories","nullable":true,"type":"number"},"energy_kcal":{"description":"energy in kcal","nullable":true,"type":"number"},"healthy_fat_g":{"description":"healthy fat in grams","nullable":true,"type":"number"},"healthy_fat_pct":{"description":"healthy fat as a percentage of total calories","nullable":true,"type":"number"},"n_days":{"description":"number of days","nullable":true,"type":"number"},"n_meals":{"description":"number of meals","nullable":true,"type":"number"},"protein_g":{"description":"protein in grams","nullable":true,"type":"number"},"protein_pct":{"description":"protein as a percentage of total calories","nullable":true,"type":"number"},"unhealthy_fat_g":{"description":"unhealthy fat in grams","nullable":true,"type":"number"},"unhealthy_fat_pct":{"description":"unhealthy fat as a percentage of total calories","nullable":true,"type":"number"}}},"MatcherTestMatchRequest":{"properties":{"brand":{"nullable":true,"type":"string"},"food":{"type":"string"},"include_debug":{"default":false,"description":"When true, include detailed canonical algorithm debug in results[].debug_info for the canonical module: query_inference (LLM canonical name, ontology, inferred properties), canonical_algorithm_weights, per-candidate score breakdowns (ontology_breakdown, property_breakdown.property_scores), and all ranked candidates.\n","type":"boolean"},"include_health_context":{"default":false,"description":"When true, include the patient's health/dietary context (diet restrictions, recent meals and meal sizes) in the matcher context, and therefore in the LLM prompt and Langfuse trace. Defaults to false so test runs do not send patient health signals unless explicitly requested. Only applies when patient_id is used.\n","type":"boolean"},"meal_photo_queue_id":{"description":"When set, builds QueueLabelContext from this MPQ (same as pipeline).","nullable":true,"type":"integer"},"modules":{"description":"Override preset with explicit module list (send preset or modules, not both).","items":{"enum":["composite_matcher","simple_matcher","packaged_matcher","cpg","patient_history_pre","patient_history_post","direct_db","es_direct","es_semantic","embedding","no_brand_retry","text_decomp","canonical"],"type":"string"},"nullable":true,"type":"array"},"patient_id":{"description":"Required when meal_photo_queue_id is omitted.","nullable":true,"type":"integer"},"patient_note":{"description":"Optional patient note override when using patient_id.","nullable":true,"type":"string"},"preparation_method":{"nullable":true,"type":"string"},"preset":{"default":"composite_production","description":"Matcher pipeline preset. Defaults to composite_production when omitted and modules unset.\n","enum":["composite_matcher","simple_matcher","packaged_matcher","composite_production","composite_batch_production","simple_production","packaged_production"],"nullable":true,"type":"string"}},"required":["food"]},"MatcherTestMatchResponse":{"properties":{"langfuse_session_id":{"type":"string"},"matcher_modules_requested":{"items":{"type":"string"},"nullable":true,"type":"array"},"matcher_modules_resolved":{"items":{"type":"string"},"type":"array"},"matcher_preset":{"nullable":true,"type":"string"},"module_order_applied":{"enum":["production","caller"],"type":"string"},"modules_executed":{"items":{"type":"string"},"type":"array"},"modules_skipped":{"items":{"$ref":"#/components/schemas/MatcherTestModuleSkip"},"type":"array"},"results":{"items":{"$ref":"#/components/schemas/MatcherTestModuleResult"},"type":"array"},"text_decomp":{"additionalProperties":true,"nullable":true,"type":"object"}},"required":["langfuse_session_id","matcher_modules_resolved","module_order_applied","modules_executed","modules_skipped","results"]},"MatcherTestModuleResult":{"properties":{"debug_info":{"additionalProperties":true,"nullable":true,"type":"object"},"food_name":{"nullable":true,"type":"string"},"is_custom_item":{"nullable":true,"type":"boolean"},"matched":{"type":"boolean"},"module":{"type":"string"},"rxfood_id":{"nullable":true,"type":"string"},"source":{"nullable":true,"type":"string"}},"required":["module","matched"]},"MatcherTestModuleSkip":{"properties":{"module":{"type":"string"},"reason":{"type":"string"}},"required":["module","reason"]},"MealAnnotationRequest":{"properties":{"meal_annotation":{"nullable":true,"type":"string"}},"required":["meal_annotation"]},"MealChangeLogResponse":{"properties":{"changes":{"items":{"$ref":"#/components/schemas/ChangeLogItem"},"type":"array"},"meal_id":{"type":"integer"}}},"MealDateRangeResponse":{"properties":{"meal_dates":{"default":[],"description":"List of meals dates within the specified date range","example":[],"items":{"example":"2023-09-08","format":"date","type":"string"},"type":"array"},"period_name":{"description":"name of the period described by the dates","type":"string"}},"required":["period_name","meal_dates"]},"MealFrequencyResponse":{"properties":{"avg_items_per_meal":{"properties":{"breakfast":{"type":"number"},"dinner":{"type":"number"},"lunch":{"type":"number"},"snack":{"type":"number"}},"required":["breakfast","lunch","dinner","snack"],"type":"object"},"date_since":{"format":"date-time","type":"string"},"date_until":{"format":"date-time","type":"string"},"meal_items_per_day":{"properties":{"breakfast":{"type":"number"},"dinner":{"type":"number"},"lunch":{"type":"number"},"snack":{"type":"number"}},"required":["breakfast","lunch","dinner","snack"],"type":"object"},"meal_statement":{"properties":{"breakfast":{"type":"string"},"dinner":{"type":"string"},"lunch":{"type":"string"},"snack":{"type":"string"}},"required":["breakfast","lunch","dinner","snack"],"type":"object"},"meals_per_day":{"properties":{"breakfast":{"type":"number"},"dinner":{"type":"number"},"lunch":{"type":"number"},"snack":{"type":"number"}},"required":["breakfast","lunch","dinner","snack"],"type":"object"},"statement":{"type":"string"}},"required":["date_since","date_until","statement","meals_per_day","meal_items_per_day","avg_items_per_meal","meal_statement"]},"MealGalleryFilter":{"properties":{"clinic_id":{"nullable":true,"type":"integer"},"date_since":{"format":"date","nullable":true,"type":"string"},"date_until":{"format":"date","nullable":true,"type":"string"},"has_user_feedback":{"nullable":true,"type":"boolean"},"item_count_max":{"nullable":true,"type":"integer"},"item_count_min":{"nullable":true,"type":"integer"},"patient_id":{"nullable":true,"type":"integer"},"qa_status":{"enum":["approved","rejected","escalated","all"],"nullable":true,"type":"string"},"tags":{"items":{"type":"string"},"nullable":true,"type":"array"}},"required":["date_since","date_until","clinic_id","patient_id","qa_status","item_count_min","item_count_max","tags","has_user_feedback"]},"MealGalleryItemResponse":{"properties":{"clinic_id":{"type":"integer"},"clinic_name":{"type":"string"},"created_time":{"format":"date-time","type":"string"},"item_count":{"type":"integer"},"langfuse_session_url":{"nullable":true,"type":"string"},"meal_annotation":{"nullable":true,"type":"string"},"meal_id":{"type":"integer"},"meal_photo_url":{"nullable":true,"type":"string"},"mpq_id":{"type":"integer"},"patient_id":{"type":"integer"},"qa_status":{"enum":["approved","rejected","escalated"],"type":"string"},"tags":{"items":{"type":"string"},"type":"array"}},"required":["mpq_id","meal_id","patient_id","clinic_id","clinic_name","meal_photo_url","qa_status","created_time","item_count","tags"]},"MealGalleryRequest":{"properties":{"filter":{"$ref":"#/components/schemas/MealGalleryFilter","nullable":true,"type":"object"},"limit":{"nullable":true,"type":"integer"},"offset":{"nullable":true,"type":"integer"}},"required":["filter","limit","offset"]},"MealGalleryResponse":{"items":{"$ref":"#/components/schemas/MealGalleryItemResponse"},"type":"array"},"MealHistoryResponse":{"properties":{"meals":{"items":{"$ref":"#/components/schemas/MealResponse"},"type":"array"}},"required":["meals"]},"MealItemCustomAddonRequest":{"nullable":true,"properties":{"custom_item":{"default":false,"nullable":true,"type":"boolean"},"food_match_details":{"$ref":"#/components/schemas/CreateMealItemFoodMatchDetailsRequest","nullable":true,"type":"object"},"food_name":{"type":"string"},"food_name_translations":{"nullable":true,"type":"object"},"id":{"nullable":true,"type":"integer"},"internal_custom_item_see_docs":{"description":"This flag is used specifically by `_policy_check_match_get_needs_review_reason` to determine if the custom item should be flagged for review. It shoudl not be used elsewhere (probably?)\n","nullable":true,"type":"boolean"},"nutrient_overrides":{"$ref":"#/components/schemas/NutrientOverrideCollection","nullable":true,"type":"object"},"rxfood_id":{"nullable":true,"type":"string"},"serving_unit_amount":{"example":1,"type":"number"},"serving_unit_label":{"example":"gram","type":"string"},"serving_unit_label_translations":{"nullable":true,"type":"object"},"servings":{"type":"number"},"source_meal_id":{"description":"meal id the row was copied from when logging from recent items","nullable":true,"type":"integer"},"source_meal_item_custom_addon_id":{"description":"custom addon id the row was copied from when logging from recent items","nullable":true,"type":"integer"},"source_meal_item_id":{"description":"meal item id the row was copied from when logging from recent items","nullable":true,"type":"integer"}},"required":["food_name","serving_unit_label","serving_unit_amount","servings"]},"MealItemCustomAddonResponse":{"properties":{"calculated_servings":{"nullable":true,"type":"number"},"carbohydrate_g":{"type":"number"},"cc_columns":{"$ref":"#/components/schemas/CcColumnsRequest","nullable":true,"type":"object"},"cc_servings":{"$ref":"#/components/schemas/CcServingsResponse","nullable":true,"type":"object"},"custom_item":{"default":false,"nullable":true,"type":"boolean"},"energy_kcal":{"type":"number"},"fat_g":{"type":"number"},"fiber_g":{"type":"number"},"food_image_url":{"nullable":true,"type":"string"},"food_name":{"type":"string"},"food_name_translations":{"nullable":true,"type":"object"},"id":{"type":"integer"},"is_foundational_item":{"description":"Derived from the resolved food ontology; true for structural container items that do not contribute numeric CC servings.","type":"boolean"},"netcarb_g":{"type":"number"},"nutrient_overrides":{"$ref":"#/components/schemas/NutrientOverrideCollection","nullable":true,"type":"object"},"preparation_method":{"$ref":"#/components/schemas/PreparationMethodEnum","default":null,"nullable":true},"protein_g":{"type":"number"},"rxfood_id":{"nullable":true,"type":"string"},"serving_unit_amount":{"example":1,"type":"number"},"serving_unit_label":{"example":"gram","type":"string"},"serving_unit_label_translations":{"nullable":true,"type":"object"},"servings":{"type":"number"},"source_meal_id":{"description":"meal id the row was copied from when logging from recent items","nullable":true,"type":"integer"},"source_meal_item_custom_addon_id":{"description":"custom addon id the row was copied from when logging from recent items","nullable":true,"type":"integer"},"source_meal_item_id":{"description":"meal item id the row was copied from when logging from recent items","nullable":true,"type":"integer"}},"required":["food_name","food_name_translations","serving_unit_label","serving_unit_label_translations","serving_unit_amount","servings","food_image_url"]},"MealItemCustomResponse":{"properties":{"created_time":{"format":"date-time","type":"string"},"food_name":{"type":"string"},"food_status":{"type":"string"},"meal_ids":{"items":{"type":"number"},"nullable":true,"type":"array"},"meal_photo_queue_ids":{"items":{"type":"number"},"nullable":true,"type":"array"},"most_recently_used":{"format":"date-time","type":"string"},"patient_ids":{"items":{"type":"number"},"nullable":true,"type":"array"},"patient_is_priority":{"nullable":true,"type":"boolean"}},"required":["food_name"]},"MealItemResponse":{"properties":{"addons":{"items":{"type":"string"},"type":"array"},"audio_photo_id":{"nullable":true,"type":"integer"},"base_food_name":{"type":"string"},"calcium_mg":{"nullable":true,"type":"number"},"calculated_servings":{"type":"number"},"carbohydrate_g":{"type":"number"},"cc_columns":{"$ref":"#/components/schemas/CcColumnsRequest","nullable":true,"type":"object"},"cc_servings":{"$ref":"#/components/schemas/CcServingsResponse","nullable":true,"type":"object"},"cholesterol_mg":{"nullable":true,"type":"number"},"created_by_user_id":{"nullable":true,"type":"integer"},"created_time":{"format":"date-time","type":"string"},"custom_addons":{"items":{"$ref":"#/components/schemas/MealItemCustomAddonResponse"},"nullable":true,"type":"array"},"custom_item":{"default":false,"nullable":true,"type":"boolean"},"custom_item_source":{"nullable":true,"type":"string"},"custom_item_source_id":{"nullable":true,"type":"string"},"custom_nutrient_estimates":{"$ref":"#/components/schemas/NutrientEstimatesRequest","nullable":true,"type":"object"},"energy_kcal":{"type":"number"},"extra_addons":{"items":{"type":"string"},"type":"array"},"fat_g":{"type":"number"},"fiber_g":{"type":"number"},"food_name":{"type":"string"},"food_name_alias":{"nullable":true,"type":"string"},"food_name_alias_translations":{"nullable":true,"type":"object"},"food_name_translations":{"nullable":true,"type":"object"},"food_ontology":{"items":{"type":"string"},"nullable":true,"type":"array"},"food_photo_url":{"nullable":true,"type":"string"},"food_replacement_name":{"nullable":true,"type":"string"},"ghg_equivalent_kg":{"nullable":true,"type":"number"},"glycemic_load":{"nullable":true,"type":"string"},"grams_per_cubic_inch":{"nullable":true,"type":"number"},"id":{"type":"integer"},"is_foundational_item":{"description":"Derived from the resolved food ontology; true for structural container items that do not contribute numeric CC servings.","type":"boolean"},"k_level":{"nullable":true,"type":"string"},"last_updated_by_user_id":{"nullable":true,"type":"integer"},"meal_audio_url":{"nullable":true,"type":"string"},"meal_nlp_phrase":{"nullable":true,"type":"string"},"meal_photo_id":{"nullable":true,"type":"integer"},"meal_photo_url":{"nullable":true,"type":"string"},"net_serving_size_g":{"type":"number"},"netcarb_g":{"type":"number"},"note":{"nullable":true,"type":"string"},"nutrient_overrides":{"$ref":"#/components/schemas/NutrientOverrideCollection","nullable":true,"type":"object"},"nutrition_response":{"$ref":"#/components/schemas/UsdaNutritionResponse","type":"object"},"nutrition_source":{"nullable":true,"type":"string"},"original_meal_photo_url":{"nullable":true,"type":"string"},"parent_food_name":{"nullable":true,"type":"string"},"patient_id":{"type":"integer"},"percent_eaten":{"type":"number"},"preparation_method":{"$ref":"#/components/schemas/PreparationMethodEnum","default":null,"nullable":true},"protein_g":{"type":"number"},"rxfood_id":{"nullable":true,"type":"string"},"serving_type_label":{"nullable":true,"type":"string"},"serving_type_multiplier":{"nullable":true,"type":"number"},"serving_unit_amount":{"type":"number"},"serving_unit_label":{"type":"string"},"serving_unit_label_translations":{"nullable":true,"type":"object"},"servings":{"type":"number"},"similar_items":{"default":[],"items":{"type":"string"},"type":"array"},"sodium_mg":{"nullable":true,"type":"number"},"source_meal_id":{"description":"meal id the row was copied from when logging from recent items","nullable":true,"type":"integer"},"source_meal_item_custom_addon_id":{"description":"custom addon id the row was copied from when logging from recent items","nullable":true,"type":"integer"},"source_meal_item_id":{"description":"meal item id the row was copied from when logging from recent items","nullable":true,"type":"integer"},"updated_time":{"format":"date-time","type":"string"},"vitamin_d_iu":{"nullable":true,"type":"number"}},"required":["id","patient_id","food_name","food_name_translations","servings","serving_unit_label","serving_unit_label_translations","food_photo_url","addons","serving_unit_amount","carbohydrate_g","energy_kcal","created_time","updated_time"]},"MealPhotoCVResponse":{"properties":{"classifier":{"type":"string"},"id":{"type":"integer"},"prediction":{"type":"string"},"predictions":{"type":"object"},"score":{"type":"number"}}},"MealPhotoQueueBatchTagRequest":{"properties":{"items":{"items":{"properties":{"meal_photo_queue_id":{"type":"integer"},"tags":{"items":{"type":"string"},"type":"array"}},"type":"object"},"type":"array"}},"required":["items"]},"MealPhotoQueueBatchTagResponse":{"properties":{"failed_items":{"items":{"$ref":"#/components/schemas/MealPhotoQueueBatchTagResponseFailedItem","type":"object"},"type":"array"}},"required":["failed_items"]},"MealPhotoQueueBatchTagResponseFailedItem":{"properties":{"meal_photo_queue_id":{"type":"integer"},"reason":{"type":"string"},"tags":{"items":{"type":"string"},"type":"array"}},"required":["meal_photo_queue_id","tags","reason"]},"MealPhotoQueueMetadata":{"properties":{"app_validation_meal_weight":{"description":"meal weight recorded by the app, to be used for validation","type":"number"},"copied_from":{"properties":{"env":{"type":"string"},"queue_id":{"type":"number"}},"required":["env","queue_id"]},"expert_context":{"description":"Array of expert-provided contexts, most recent last. Processing uses the first pending entry (the first element without a result field), not necessarily the last element.","items":{"$ref":"#/components/schemas/ExpertContext"},"nullable":true,"type":"array"},"is_training":{"description":"true if this is a training queue","type":"boolean"},"patient_context":{"properties":{"diet_restrictions":{"items":{"$ref":"#/components/schemas/PatientDietRestrictionResponse"},"type":"array"}},"type":"object"},"patient_last_seen_ago_at_processing":{"description":"time (in seconds) since the patient was last seen online at the time of processing","type":"number"},"prelbl_availability":{"$ref":"#/components/schemas/MPQMetadataPrelblAvailabilityEnum"},"review_effective_level":{"type":"number"},"training_reference_meal_items":{"items":{"$ref":"#/components/schemas/MealItemResponse"},"type":"array"}}},"MealPhotoQueuePriorityResponse":{"properties":{"is_priority":{"type":"boolean"},"is_ultra_priority":{"type":"boolean"},"reason":{"nullable":true,"type":"string"}},"required":["is_ultra_priority","is_priority"]},"MealPhotoQueueQoSDetailsResponse":{"properties":{"overlapping_queues":{"items":{"properties":{"item":{"$ref":"#/components/schemas/MealPhotoQueueResponse","type":"object"},"overlap_type":{"$ref":"#/components/schemas/MealPhotoQueueQoSOverlapType","type":"string"},"same_reviewer":{"type":"boolean"}},"required":["overlap_type","same_reviewer","item"],"type":"object"},"type":"array"}},"required":["overlapping_queues"]},"MealPhotoQueueQoSOverlapType":{"enum":["created_before_finished_before","created_before_finished_after","created_after_finished_before","created_after_finished_after","other","self"]},"MealPhotoQueueQualityAssuranceResponse":{"properties":{"created_time":{"description":"time in UTC","format":"date-time","type":"string"},"has_custom_items":{"description":"whether the meal has custom items","type":"boolean"},"meal_photo_queue_id":{"type":"integer"},"n_days_logged":{"description":"number of days until ","type":"integer"},"n_days_until_report":{"description":"expected number of days until a report is run","type":"integer"},"patient_id":{"type":"integer"},"qa_flags":{"$ref":"#/components/schemas/QualityAssuranceFlags","nullable":true,"type":"object"},"qa_logs":{"items":{"$ref":"#/components/schemas/QualityAssuranceLogResponse"},"nullable":false,"type":"array"},"queue_item":{"$ref":"#/components/schemas/MealPhotoQueueResponse","nullable":false,"type":"object"},"report_date":{"description":"date in YYYY-MM-DD","type":"string"}},"required":["meal_photo_queue_id","patient_id"]},"MealPhotoQueueResponse":{"properties":{"clinic_type":{"type":"string"},"confidence_identification":{"type":"integer"},"confidence_sizing":{"type":"integer"},"created_meal_id":{"type":"integer"},"created_time":{"description":"time in UTC","format":"date-time","type":"string"},"data_reviewer_group_id":{"description":"DRG under which the patient logged the item","type":"integer"},"data_reviewer_id":{"type":"integer"},"data_reviewer_note":{"type":"string"},"existing_items":{"items":{"$ref":"#/components/schemas/MealItemResponse"},"type":"array"},"first_reviewer_access_time":{"description":"time in UTC","format":"date-time","type":"string"},"first_reviewer_user_id":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"is_priority_patient":{"type":"boolean"},"is_processed":{"type":"boolean"},"is_reviewed":{"type":"boolean"},"is_ultra_priority_patient":{"type":"boolean"},"meal_audio_id":{"description":"meal audio id","nullable":true,"type":"integer"},"meal_audio_url":{"description":"meal audio url if available","nullable":true,"type":"string"},"meal_nlp_id":{"description":"meal nlp id","nullable":true,"type":"integer"},"meal_photo_id":{"description":"meal photo id","nullable":true,"type":"integer"},"meal_photo_url":{"description":"meal photo url if available","nullable":true,"type":"string"},"meal_search_text":{"description":"meal search text if available from nlp queue","nullable":true,"type":"string"},"patient_id":{"type":"integer"},"patient_note":{"type":"string"},"patient_note_translations":{"type":"object"},"patient_number_of_items":{"type":"integer"},"patient_sizing_estimate":{"enum":["small","medium","large","x-large"],"type":"string"},"photo_cv_results":{"items":{"$ref":"#/components/schemas/MealPhotoCVResponse"},"nullable":true,"type":"array"},"preparation_method":{"$ref":"#/components/schemas/PreparationMethodEnum","default":null,"nullable":true},"qa_logs":{"items":{"$ref":"#/components/schemas/QualityAssuranceLogResponse"},"nullable":true,"type":"array"},"queue_metadata":{"$ref":"#/components/schemas/MealPhotoQueueMetadata","nullable":true},"queue_priority":{"$ref":"#/components/schemas/MealPhotoQueuePriorityResponse"},"queue_state":{"nullable":true,"type":"string"},"queue_state_updated_time":{"description":"time in UTC","format":"date-time","nullable":true,"type":"string"},"queue_type":{"type":"string"},"reviewed_time":{"description":"time in UTC","format":"date-time","type":"string"},"updated_time":{"description":"time in UTC","format":"date-time","type":"string"}},"required":["id","data_reviewer_group_id","created_meal_id","queue_type","patient_id","queue_state","queue_state_updated_time","is_processed","is_reviewed","created_time","updated_time"]},"MealPhotoQueueSnapshotResponse":{"properties":{"changes":{"items":{"$ref":"#/components/schemas/ChangeLogItem"},"type":"array"},"meal_items":{"items":{"$ref":"#/components/schemas/MealItemResponse"},"type":"array"},"mpq_id":{"type":"integer"},"timestamp":{"description":"time in UTC","format":"date-time","type":"string"},"user_id":{"nullable":true,"type":"integer"},"user_type":{"enum":["patient","data_reviewer","engine"],"type":"string"}},"required":["mpq_id","timestamp","user_id","user_type","items","changes"]},"MealPlanDayResponse":{"properties":{"daily_summary":{"nullable":true,"type":"object"},"day_number":{"type":"integer"},"id":{"type":"integer"},"slots":{"items":{"$ref":"#/components/schemas/MealPlanSlotResponse"},"type":"array"}},"required":["id","day_number"]},"MealPlanDetailResponse":{"properties":{"active_slots":{"nullable":true,"type":"object"},"ai_insight":{"nullable":true,"type":"string"},"clinic_id":{"type":"integer"},"clinician_user_id":{"type":"integer"},"created_time":{"format":"date-time","type":"string"},"days":{"items":{"$ref":"#/components/schemas/MealPlanDayResponse"},"type":"array"},"diet_labels":{"items":{"type":"string"},"nullable":true,"type":"array"},"exclusions":{"items":{"type":"string"},"nullable":true,"type":"array"},"family_size":{"nullable":true,"type":"integer"},"grocery_list":{"nullable":true,"type":"object"},"health_labels":{"items":{"type":"string"},"nullable":true,"type":"array"},"id":{"type":"integer"},"intake_form_data":{"nullable":true,"type":"object"},"motivations":{"nullable":true,"type":"string"},"num_days":{"type":"integer"},"patient_id":{"type":"integer"},"status":{"type":"string"},"target_calories":{"nullable":true,"type":"integer"},"target_carbs_g":{"nullable":true,"type":"number"},"target_fat_g":{"nullable":true,"type":"number"},"target_protein_g":{"nullable":true,"type":"number"},"title":{"type":"string"},"updated_time":{"format":"date-time","type":"string"}},"required":["id","patient_id","clinician_user_id","title","status","num_days"]},"MealPlanResponse":{"properties":{"active_slots":{"nullable":true,"type":"object"},"clinic_id":{"type":"integer"},"clinician_user_id":{"type":"integer"},"created_time":{"format":"date-time","type":"string"},"diet_labels":{"items":{"type":"string"},"nullable":true,"type":"array"},"exclusions":{"items":{"type":"string"},"nullable":true,"type":"array"},"family_size":{"nullable":true,"type":"integer"},"health_labels":{"items":{"type":"string"},"nullable":true,"type":"array"},"id":{"type":"integer"},"intake_form_data":{"nullable":true,"type":"object"},"motivations":{"nullable":true,"type":"string"},"num_days":{"type":"integer"},"patient_id":{"type":"integer"},"status":{"type":"string"},"target_calories":{"nullable":true,"type":"integer"},"target_carbs_g":{"nullable":true,"type":"number"},"target_fat_g":{"nullable":true,"type":"number"},"target_protein_g":{"nullable":true,"type":"number"},"title":{"type":"string"},"updated_time":{"format":"date-time","type":"string"}},"required":["id","patient_id","clinician_user_id","title","status","num_days"]},"MealPlanSlotResponse":{"properties":{"id":{"type":"integer"},"recipe_data":{"nullable":true,"type":"object"},"slot_type":{"type":"string"},"sort_order":{"type":"integer"}},"required":["id","slot_type","sort_order"]},"MealPlanSummaryResponse":{"properties":{"active_slots":{"nullable":true,"type":"object"},"clinic_id":{"type":"integer"},"clinician_user_id":{"type":"integer"},"created_time":{"format":"date-time","type":"string"},"family_size":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"motivations":{"nullable":true,"type":"string"},"num_days":{"type":"integer"},"patient_id":{"type":"integer"},"status":{"type":"string"},"target_calories":{"nullable":true,"type":"integer"},"title":{"type":"string"},"updated_time":{"format":"date-time","type":"string"}},"required":["id","patient_id","clinician_user_id","title","status","num_days"]},"MealPushQuestionFocusRegion":{"discriminator":{"mapping":{"image":"#/components/schemas/MealPushQuestionFocusRegionImage","patient-note":"#/components/schemas/MealPushQuestionFocusRegionPatientNote"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/MealPushQuestionFocusRegionImage"},{"$ref":"#/components/schemas/MealPushQuestionFocusRegionPatientNote"}]},"MealPushQuestionFocusRegionImage":{"properties":{"region":{"properties":{"heightPct":{"type":"number"},"imageId":{"type":"string"},"widthPct":{"type":"number"},"xPct":{"type":"number"},"yPct":{"type":"number"}},"type":"object"},"type":{"enum":["image"],"type":"string"}}},"MealPushQuestionFocusRegionPatientNote":{"properties":{"region":{"properties":{"endIdx":{"type":"number"},"fullText":{"type":"string"},"startIdx":{"type":"number"},"textSpan":{"type":"string"}},"required":["startIdx","endIdx","textSpan","fullText"],"type":"object"},"type":{"enum":["patient-note"],"type":"string"}}},"MealPushQuestionResponse":{"properties":{"created_by_user_id":{"type":"integer"},"created_time":{"format":"date-time","type":"string"},"id":{"type":"integer"},"last_updated_by_user_id":{"type":"integer"},"meal_id":{"type":"integer"},"meal_item_id":{"type":"integer"},"patient_id":{"type":"integer"},"question_focus_region":{"$ref":"#/components/schemas/MealPushQuestionFocusRegion"},"question_resolved_time":{"format":"date-time","type":"string"},"question_response":{"$ref":"#/components/schemas/UserSurveyResponses"},"question_response_time":{"format":"date-time","type":"string"},"question_status":{"$ref":"#/components/schemas/MealPushQuestionStatusEnum"},"question_type":{"$ref":"#/components/schemas/MealPushQuestionTypeEnum"},"resolved_by_user_id":{"type":"integer"},"updated_time":{"format":"date-time","type":"string"}},"required":["id","patient_id","meal_id"]},"MealPushQuestionStatusEnum":{"enum":["pending:patient","pending:system","resolved","deleted"],"type":"string"},"MealPushQuestionSubmitResponseRequest":{"properties":{"question_response":{"$ref":"#/components/schemas/UserSurveyResponses"}}},"MealPushQuestionTypeEnum":{"enum":["describe_item","clarify_nft"],"type":"string"},"MealReminderPreferencesResponse":{"properties":{"can_enable":{"description":"Whether an explicit enabled preference can currently take effect","type":"boolean"},"explicit_delivery_ready":{"description":"Whether the delivery policy currently permits the explicit-enabled Customer.io path","type":"boolean"},"mode":{"enum":["automatic","enabled","disabled"],"type":"string"},"scheduling_enabled":{"description":"Whether MNT can currently schedule meal reminders for this patient","type":"boolean"}},"required":["mode","scheduling_enabled","can_enable","explicit_delivery_ready"]},"MealResponse":{"properties":{"created_by_user_id":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"is_deleted":{"default":false,"type":"boolean"},"last_updated_by_user_id":{"nullable":true,"type":"integer"},"meal_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"},"meal_items":{"items":{"$ref":"#/components/schemas/MealItemResponse"},"type":"array"},"meal_name":{"enum":["breakfast","lunch","dinner","snack"],"type":"string"},"meal_name_translations":{"nullable":true,"type":"object"},"meal_photo_id":{"example":null,"nullable":true,"type":"integer"},"meal_photo_original_url":{"example":null,"nullable":true,"type":"string"},"meal_photo_resized_url":{"example":null,"nullable":true,"type":"string"},"meal_time":{"description":"time in format hh:mm:ss","example":"17:30:00","type":"string"},"patient_id":{"type":"integer"}},"required":["id","patient_id","meal_date","meal_time","meal_name","meal_items"]},"MealSubstitutionSuggestionResponse":{"properties":{"food_name_to_add":{"type":"string"},"food_name_to_add_translations":{"nullable":true,"type":"object"},"food_name_to_remove":{"type":"string"},"food_name_to_remove_translations":{"nullable":true,"type":"object"},"id":{"type":"integer"},"meal_id":{"type":"integer"},"meal_item_id":{"type":"integer"},"patient_id":{"type":"integer"},"photo_url":{"nullable":true,"type":"string"},"suggestion_reason":{"$ref":"#/components/schemas/FoodSubstitutionSuggestionReason"}},"required":["meal_id","meal_item_id"]},"MealSubstitutionSuggestionsResponse":{"properties":{"debug":{"nullable":true,"type":"object"},"suggestions":{"items":{"$ref":"#/components/schemas/MealSubstitutionSuggestionResponse"},"type":"array"}},"required":["suggestions"]},"MealSuggestionResponse":{"properties":{"meal_id":{"type":"integer"},"patient_id":{"type":"integer"},"tips":{"items":{"$ref":"#/components/schemas/MealSuggestionTipResponse"},"type":"array"},"whole_foods":{"type":"string"}},"required":["patient_id","meal_id"]},"MealSuggestionTipResponse":{"properties":{"meal_id":{"type":"integer"},"patient_id":{"type":"integer"},"tip_data":{"type":"string"},"tip_title":{"type":"string"}},"required":["patient_id","meal_id"]},"MediterraneanScoreHistoryResponse":{"properties":{"daily_mediterranean_scores":{"description":"Full day series from date_since..date_until, sorted ascending by log_date.","items":{"$ref":"#/components/schemas/MediterraneanScoreHistoryRowResponse"},"type":"array"},"date_since":{"description":"calendar date in format YYYY-MM-DD","example":"2026-01-01","type":"string"},"date_until":{"description":"calendar date in format YYYY-MM-DD","example":"2026-03-09","type":"string"},"patient_id":{"type":"integer"},"version":{"enum":["1","2"],"example":"2","type":"string"},"window_days":{"example":7,"type":"integer"}},"required":["patient_id","date_since","date_until","window_days","version","daily_mediterranean_scores"]},"MediterraneanScoreHistoryRowResponse":{"properties":{"has_data":{"example":true,"type":"boolean"},"log_date":{"description":"calendar date in format YYYY-MM-DD","example":"2026-03-01","type":"string"},"max_score":{"example":10,"type":"number"},"total_score":{"example":6.4,"nullable":true,"type":"number"},"window_end_date":{"description":"calendar date in format YYYY-MM-DD","example":"2026-03-01","type":"string"},"window_start_date":{"description":"calendar date in format YYYY-MM-DD","example":"2026-02-23","type":"string"}},"required":["log_date","window_start_date","window_end_date","total_score","max_score","has_data"]},"MediterraneanScoreResponse":{"properties":{"alcohol_score":{"nullable":true,"type":"number"},"desserts_score":{"nullable":true,"type":"number"},"fat_score":{"type":"number"},"fish_score":{"type":"number"},"fruit_score":{"type":"number"},"legume_score":{"type":"number"},"max_score":{"type":"number"},"nuts_seeds_score":{"type":"number"},"red_meat_score":{"type":"number"},"sugary_beverage_score":{"nullable":true,"type":"number"},"total_score":{"type":"number"},"ultraprocessed_desserts_score":{"nullable":true,"type":"number"},"vegetable_score":{"type":"number"},"version":{"nullable":true,"type":"string"},"whole_grains_score":{"type":"number"}},"required":["vegetable_score","fruit_score","nuts_seeds_score","whole_grains_score","fish_score","legume_score","red_meat_score","fat_score","desserts_score","total_score","max_score"]},"MindScoreResponse":{"properties":{"cheese_score":{"type":"number"},"desserts_score":{"type":"number"},"fish_score":{"type":"number"},"fried_food_score":{"type":"number"},"fruit_score":{"type":"number"},"legume_score":{"type":"number"},"nuts_seeds_score":{"type":"number"},"poultry_score":{"type":"number"},"red_meat_score":{"type":"number"},"total_score":{"type":"number"},"vegetable_score":{"type":"number"},"whole_grains_score":{"type":"number"}},"required":["vegetable_score","fruit_score","nuts_seeds_score","cheese_score","whole_grains_score","fish_score","legume_score","poultry_score","red_meat_score","fried_food_score","desserts_score","total_score"]},"MobileProtoGeminiError":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"}},"required":["code","message","retryable"],"type":"object"},"trace_id":{"type":"string"}},"required":["error","trace_id"],"type":"object"},"MobileProtoGeminiRequest":{"properties":{"metadata":{"nullable":true,"properties":{"locale":{"nullable":true,"type":"string"},"screen":{"nullable":true,"type":"string"}},"type":"object"},"prompt":{"type":"string"},"session_id":{"nullable":true,"type":"string"}},"required":["prompt"],"type":"object"},"MobileProtoGeminiResponse":{"properties":{"finish_reason":{"nullable":true,"type":"string"},"text":{"type":"string"},"trace_id":{"type":"string"},"usage":{"properties":{"completion_price_cents":{"type":"number"},"completion_tokens":{"type":"integer"},"prompt_price_cents":{"type":"number"},"prompt_tokens":{"type":"integer"},"total_price_cents":{"type":"number"},"total_tokens":{"type":"integer"}},"required":["prompt_tokens","completion_tokens","total_tokens","prompt_price_cents","completion_price_cents","total_price_cents"],"type":"object"}},"required":["text","usage","trace_id"],"type":"object"},"MotivationResponse":{"properties":{"description":{"example":"i really enjoy carbs and it is not working","nullable":false,"type":"string"},"description_translations":{"nullable":true,"type":"object"},"display":{"example":"Blood Sugar","nullable":false,"type":"string"},"display_translations":{"nullable":true,"type":"object"},"name":{"example":"my blood sugar (diabetes)","nullable":false,"type":"string"},"name_translations":{"nullable":true,"type":"object"}},"required":["name","display","description"]},"MovanoIsLinkedResponse":{"properties":{"linked":{"type":"boolean"}},"type":"object"},"MovanoLinkRequest":{"properties":{"step":{"description":"Represents the stage of the link","enum":["init","link"],"nullable":false,"type":"string"}},"required":["step"],"type":"object"},"MovanoLinkResponse":{"properties":{"linked":{"type":"boolean"},"movano_partner_id":{"nullable":true,"type":"string"},"movano_patient_id":{"nullable":true,"type":"string"}},"required":["linked"],"type":"object"},"MovanoSyncRequest":{"properties":{"end":{"format":"date","type":"string"},"start":{"format":"date","type":"string"}},"type":"object"},"MovePatientClinicRequest":{"properties":{"from_clinic_id":{"type":"integer"},"move":{"description":"Clinic-scoped resource types to retarget to the destination clinic. Omitted defaults to [reports, subscriptions]. Empty array moves membership only.\n","items":{"enum":["reports","subscriptions"],"type":"string"},"type":"array"},"to_clinic_id":{"type":"integer"}},"required":["from_clinic_id","to_clinic_id"]},"NFTSummaryResponse":{"properties":{"image_location":{"type":"string"},"is_nft":{"type":"boolean"},"nft_analysis_body_markdown":{"type":"string"},"product_name":{"type":"string"}},"required":["image_location","nft_analysis_body_markdown","is_nft"]},"NotificationEngineTokenAuthResponse":{"properties":{"can_view_all_queues":{"example":false,"nullable":false,"type":"boolean"},"user_id":{"example":"1234","nullable":false,"type":"string"}},"required":["user_id","can_view_all_queues"]},"NutrientByPeriodResponse":{"properties":{"afternoon_avg":{"description":"morning fiber(g) sum","example":"10","type":"string"},"afternoon_pct":{"description":"morning fiber(g) as percentage of all meals","example":"25%","type":"string"},"afternoon_sum":{"description":"morning fiber(g) sum","example":"10","type":"string"},"dinnertime_avg":{"description":"morning fiber(g) sum","example":"10","type":"string"},"dinnertime_pct":{"description":"morning fiber(g) as percentage of all meals","example":"25%","type":"string"},"dinnertime_sum":{"description":"morning fiber(g) sum","example":"10","type":"string"},"evening_avg":{"description":"morning fiber(g) sum","example":"10","type":"string"},"evening_pct":{"description":"morning fiber(g) as percentage of all meals","example":"15%","type":"string"},"evening_sum":{"description":"morning fiber(g) sum","example":"10","type":"string"},"lunchtime_avg":{"description":"morning fiber(g) sum","example":"10","type":"string"},"lunchtime_pct":{"description":"morning fiber(g) as percentage of all meals","example":"25%","type":"string"},"lunchtime_sum":{"description":"morning fiber(g) sum","example":"10","type":"string"},"morning_avg":{"description":"morning fiber(g) sum","example":"10","type":"string"},"morning_pct":{"description":"morning fiber(g) as percentage of all meals","example":"10%","type":"string"},"morning_sum":{"description":"morning fiber(g) sum","example":"10","type":"string"},"nutrient_name":{"nullable":false,"type":"string"},"nutrient_unit":{"nullable":false,"type":"string"},"statements":{"items":{"type":"string"},"nullable":true,"type":"array"}},"required":["nutrient_name","nutrient_unit","morning_pct","lunchtime_pct","afternoon_pct","dinnertime_pct","evening_pct","morning_sum","lunchtime_sum","afternoon_sum","dinnertime_sum","evening_sum"]},"NutrientEstimatesRequest":{"properties":{"added_sugars_g":{"example":null,"nullable":true,"type":"number"},"alcohol_g":{"example":null,"nullable":true,"type":"number"},"caffeine_mg":{"example":null,"nullable":true,"type":"number"},"calcium_mg":{"example":null,"nullable":true,"type":"number"},"carbohydrate_g":{"example":null,"nullable":true,"type":"number"},"cholesterol_mg":{"example":null,"nullable":true,"type":"number"},"choline_mg":{"example":null,"nullable":true,"type":"number"},"energy_kcal":{"example":null,"nullable":true,"type":"number"},"fat_g":{"example":null,"nullable":true,"type":"number"},"fattyacids_totalmonounsaturated_g":{"example":null,"nullable":true,"type":"number"},"fattyacids_totalpolyunsaturated_g":{"example":null,"nullable":true,"type":"number"},"fattyacids_totalsaturated_g":{"example":null,"nullable":true,"type":"number"},"fattyacids_totaltrans_g":{"example":null,"nullable":true,"type":"number"},"fiber_g":{"example":null,"nullable":true,"type":"number"},"folate_dfe_ug":{"example":null,"nullable":true,"type":"number"},"grams_per_cubic_inch":{"nullable":true,"type":"number"},"insoluble_dietary_fiber_g":{"example":null,"nullable":true,"type":"number"},"iron_mg":{"example":null,"nullable":true,"type":"number"},"magnesium_mg":{"example":null,"nullable":true,"type":"number"},"netcarb_g":{"example":null,"nullable":true,"type":"number"},"niacin_mg":{"example":null,"nullable":true,"type":"number"},"omega_three_fatty_acids_g":{"nullable":true,"type":"number"},"pantothenic_acid_mg":{"example":null,"nullable":true,"type":"number"},"phosphorus_mg":{"example":null,"nullable":true,"type":"number"},"polyols_g":{"example":null,"nullable":true,"type":"number"},"potassium_mg":{"example":null,"nullable":true,"type":"number"},"protein_g":{"example":null,"nullable":true,"type":"number"},"riboflavin_mg":{"example":null,"nullable":true,"type":"number"},"selenium_mcg":{"example":null,"nullable":true,"type":"number"},"sodium_mg":{"example":null,"nullable":true,"type":"number"},"soluble_dietary_fiber_g":{"example":null,"nullable":true,"type":"number"},"sugars_g":{"example":null,"nullable":true,"type":"number"},"thiamin_mg":{"example":null,"nullable":true,"type":"number"},"vitamin_a_iu":{"example":null,"nullable":true,"type":"number"},"vitamin_a_rae_ug":{"example":null,"nullable":true,"type":"number"},"vitamin_b12_ug":{"example":null,"nullable":true,"type":"number"},"vitamin_b6_mg":{"example":null,"nullable":true,"type":"number"},"vitamin_c_mg":{"example":null,"nullable":true,"type":"number"},"vitamin_d2d3_ug":{"example":null,"nullable":true,"type":"number"},"vitamin_d_iu":{"example":null,"nullable":true,"type":"number"},"vitamin_e_mg":{"example":null,"nullable":true,"type":"number"},"vitamin_k_ug":{"example":null,"nullable":true,"type":"number"},"water_g":{"nullable":true,"type":"number"},"zinc_mg":{"example":null,"nullable":true,"type":"number"}}},"NutrientOverrideCollection":{"properties":{"aa_patient":{"$ref":"#/components/schemas/NutrientOverridesResponse","nullable":true,"type":"object"},"bb_reviewer":{"$ref":"#/components/schemas/NutrientOverridesResponse","nullable":true,"type":"object"},"cc_external":{"$ref":"#/components/schemas/NutrientOverridesResponse","nullable":true,"type":"object"},"dd_estimate":{"$ref":"#/components/schemas/NutrientOverridesResponse","nullable":true,"type":"object"},"ee_validation":{"$ref":"#/components/schemas/NutrientOverridesResponse","description":"Post-meal validation audit (shadow mode); excluded from meal nutrient calculation.","nullable":true,"type":"object"}}},"NutrientOverridesResponse":{"properties":{"cc_columns":{"$ref":"#/components/schemas/CcColumnsRequest","nullable":true,"type":"object"},"created_time":{"format":"date-time","nullable":false,"type":"string"},"metadata":{"additionalProperties":true,"nullable":true,"type":"object"},"nutrients":{"$ref":"#/components/schemas/NutrientEstimatesRequest","nullable":true,"type":"object"},"ontology":{"$ref":"#/components/schemas/FoodOntologyVTO","nullable":true,"type":"object"},"source_id":{"nullable":false,"type":"string"},"source_name":{"enum":["patient","reviewer","external","estimate","validation"],"type":"string"},"updated_time":{"format":"date-time","nullable":false,"type":"string"}},"required":["source_name","source_id","created_time","updated_time"]},"NutritionPlanAchievementResponse":{"properties":{"days_met":{"nullable":false,"type":"integer"},"days_possible":{"nullable":false,"type":"integer"}},"required":["days_met","days_possible"]},"NutritionPlanActiveMetricResponse":{"properties":{"achievement":{"$ref":"#/components/schemas/NutritionPlanAchievementResponse"},"id":{"nullable":false,"type":"string"},"target":{"$ref":"#/components/schemas/NutritionPlanMetricTargetResponse","nullable":true},"values":{"items":{"$ref":"#/components/schemas/NutritionPlanDailyMetricValueResponse"},"nullable":false,"type":"array"}},"required":["id","achievement","values"]},"NutritionPlanActiveMetricsResponse":{"properties":{"default_metric_ids":{"items":{"type":"string"},"nullable":false,"type":"array"},"metric_ids":{"items":{"type":"string"},"nullable":false,"type":"array"},"patient_id":{"nullable":false,"type":"integer"},"recommended_metrics":{"items":{"$ref":"#/components/schemas/NutritionPlanRecommendedMetricResponse"},"nullable":false,"type":"array"},"recommended_pinned_health_targets":{"items":{"$ref":"#/components/schemas/NutritionPlanRecommendedPinnedHealthTargetResponse"},"nullable":false,"type":"array"},"selection_mode":{"$ref":"#/components/schemas/NutritionPlanSelectionModeEnum"}},"required":["patient_id","selection_mode","metric_ids","default_metric_ids","recommended_metrics","recommended_pinned_health_targets"]},"NutritionPlanContentReasonEnum":{"enum":["no_content","no_qualified_candidate","metric_not_meal_based","copy_generation_failed","generation_failed","queued_or_running","stale_fallback"],"type":"string"},"NutritionPlanContentRebuildRequest":{"properties":{"content_types":{"items":{"enum":["summary","meal_spotlights","food","recipe"],"type":"string"},"nullable":true,"type":"array"},"force":{"nullable":true,"type":"boolean"},"plan_date":{"description":"Date in YYYY-MM-DD format","nullable":true,"type":"string"}}},"NutritionPlanContentRebuildResponse":{"properties":{"patient_id":{"nullable":false,"type":"integer"},"plan_date":{"description":"Date in YYYY-MM-DD format","nullable":false,"type":"string"},"status":{"enum":["queued"],"nullable":false,"type":"string"}},"required":["patient_id","plan_date","status"]},"NutritionPlanContentStatusEnum":{"enum":["ready","partial","pending","missing","unavailable","stale"],"type":"string"},"NutritionPlanDailyMetricValueResponse":{"properties":{"log_date":{"description":"Date in YYYY-MM-DD format","nullable":false,"type":"string"},"status":{"enum":["met","not_met","no_data","no_target","unknown"],"nullable":false,"type":"string"},"target_range":{"$ref":"#/components/schemas/NutritionPlanTargetRangeResponse","nullable":true},"value":{"nullable":true,"type":"number"}},"required":["log_date","value","status"]},"NutritionPlanFoodRecommendationResponse":{"allOf":[{"$ref":"#/components/schemas/NutritionPlanGeneratedSectionBase"},{"properties":{"category":{"nullable":true,"type":"string"},"category_translations":{"nullable":true,"type":"object"},"copy":{"nullable":true,"type":"string"},"food_name":{"nullable":true,"type":"string"},"food_name_translations":{"nullable":true,"type":"object"},"id":{"nullable":true,"type":"string"},"image_url":{"nullable":true,"type":"string"},"key_nutrient":{"nullable":true,"type":"string"},"key_nutrient_translations":{"nullable":true,"type":"object"},"shopping_item":{"nullable":true,"type":"object"}},"type":"object"}]},"NutritionPlanGeneratedContentDebugEventResponse":{"properties":{"content_version":{"nullable":true,"type":"string"},"generated_at":{"format":"date-time","nullable":true,"type":"string"},"id":{"nullable":false,"type":"integer"},"key":{"nullable":false,"type":"string"},"metadata":{"additionalProperties":true,"nullable":false,"type":"object"},"name":{"nullable":false,"type":"string"},"reason":{"nullable":true,"type":"string"},"status":{"nullable":true,"type":"string"}},"required":["id","name","key","status","reason","generated_at","content_version","metadata"]},"NutritionPlanGeneratedContentDebugResponse":{"properties":{"active_metric_ids":{"items":{"type":"string"},"nullable":false,"type":"array"},"events":{"items":{"$ref":"#/components/schemas/NutritionPlanGeneratedContentDebugEventResponse"},"nullable":false,"type":"array"},"patient_id":{"nullable":false,"type":"integer"},"plan_date":{"description":"Date in YYYY-MM-DD format","nullable":false,"type":"string"}},"required":["patient_id","plan_date","active_metric_ids","events"]},"NutritionPlanGeneratedContentResponse":{"properties":{"food":{"$ref":"#/components/schemas/NutritionPlanFoodRecommendationResponse"},"meal_spotlights":{"items":{"$ref":"#/components/schemas/NutritionPlanMealSpotlightResponse"},"nullable":false,"type":"array"},"patient_id":{"nullable":false,"type":"integer"},"plan_date":{"description":"Date in YYYY-MM-DD format","nullable":false,"type":"string"},"recipe":{"$ref":"#/components/schemas/NutritionPlanRecipeRecommendationResponse"},"summary":{"$ref":"#/components/schemas/NutritionPlanSummaryResponse"}},"required":["patient_id","plan_date","summary","meal_spotlights","food","recipe"]},"NutritionPlanGeneratedSectionBase":{"properties":{"content_key":{"nullable":true,"type":"string"},"content_version":{"nullable":true,"type":"string"},"generated_at":{"format":"date-time","nullable":true,"type":"string"},"reason":{"$ref":"#/components/schemas/NutritionPlanContentReasonEnum","nullable":true},"status":{"$ref":"#/components/schemas/NutritionPlanContentStatusEnum"}},"required":["status"]},"NutritionPlanImpactDirectionEnum":{"enum":["positive","negative","neutral"],"type":"string"},"NutritionPlanMealSpotlightResponse":{"allOf":[{"$ref":"#/components/schemas/NutritionPlanGeneratedSectionBase"},{"properties":{"commentary":{"items":{"$ref":"#/components/schemas/NutritionPlanSpotlightCommentaryResponse"},"nullable":true,"type":"array"},"impact_direction":{"$ref":"#/components/schemas/NutritionPlanImpactDirectionEnum","nullable":true},"meal_id":{"nullable":true,"type":"integer"},"metric_amount":{"nullable":true,"type":"number"},"metric_id":{"nullable":false,"type":"string"},"source_window":{"$ref":"#/components/schemas/NutritionPlanWindowResponse","nullable":true},"suggested_question":{"nullable":true,"type":"string"}},"required":["metric_id"],"type":"object"}]},"NutritionPlanMetricTargetResponse":{"properties":{"range":{"$ref":"#/components/schemas/NutritionPlanTargetRangeResponse","nullable":true}}},"NutritionPlanRecipeRecommendationResponse":{"allOf":[{"$ref":"#/components/schemas/NutritionPlanGeneratedSectionBase"},{"properties":{"copy":{"nullable":true,"type":"string"},"id":{"nullable":true,"type":"integer"},"image_url":{"nullable":true,"type":"string"},"label":{"nullable":true,"type":"string"},"label_translations":{"nullable":true,"type":"object"},"save_action":{"nullable":true,"type":"object"}},"type":"object"}]},"NutritionPlanRecommendedMetricResponse":{"properties":{"id":{"nullable":false,"type":"string"},"priority_tier":{"nullable":false,"type":"integer"}},"required":["id","priority_tier"]},"NutritionPlanRecommendedPinnedHealthTargetResponse":{"properties":{"rank":{"nullable":false,"type":"integer"},"source":{"enum":["nutrition_plan","default"],"nullable":false,"type":"string"},"source_metric_id":{"nullable":true,"type":"string"},"target":{"$ref":"#/components/schemas/PatientHealthTargetRequest"}},"required":["rank","source","source_metric_id","target"]},"NutritionPlanReplaceActiveMetricsRequest":{"properties":{"metric_ids":{"description":"Active nutrition metric IDs to store.","items":{"type":"string"},"maxItems":2,"minItems":1,"nullable":false,"type":"array"}},"required":["metric_ids"]},"NutritionPlanResponse":{"properties":{"achievement_window":{"$ref":"#/components/schemas/NutritionPlanWindowResponse"},"active_metrics":{"items":{"$ref":"#/components/schemas/NutritionPlanActiveMetricResponse"},"nullable":false,"type":"array"},"patient_id":{"nullable":false,"type":"integer"},"plan_date":{"description":"Date in YYYY-MM-DD format","nullable":false,"type":"string"},"selection_mode":{"$ref":"#/components/schemas/NutritionPlanSelectionModeEnum"}},"required":["patient_id","plan_date","selection_mode","achievement_window","active_metrics"]},"NutritionPlanSelectionModeEnum":{"enum":["automatic","manual"],"type":"string"},"NutritionPlanSpotlightCommentaryResponse":{"properties":{"sentiment":{"enum":["positive","neutral","negative"],"nullable":false,"type":"string"},"text":{"nullable":false,"type":"string"}},"required":["text","sentiment"]},"NutritionPlanSummaryResponse":{"allOf":[{"$ref":"#/components/schemas/NutritionPlanGeneratedSectionBase"},{"properties":{"stale_date":{"description":"Date in YYYY-MM-DD format","nullable":true,"type":"string"},"text":{"nullable":true,"type":"string"},"title":{"nullable":true,"type":"string"}},"type":"object"}]},"NutritionPlanTargetRangeResponse":{"properties":{"max":{"nullable":true,"type":"number"},"min":{"nullable":true,"type":"number"}},"required":["min","max"]},"NutritionPlanWindowResponse":{"properties":{"date_since":{"description":"Date in YYYY-MM-DD format","nullable":false,"type":"string"},"date_until":{"description":"Date in YYYY-MM-DD format","nullable":false,"type":"string"}},"required":["date_since","date_until"]},"OAuthImplicitGrant":{"properties":{"client_id":{"type":"string"},"password":{"format":"password","type":"string"},"redirect_uri":{"type":"string"},"response_type":{"description":"indicate token here","type":"string"},"token":{"description":"mfa token","type":"string"},"user_scope":{"description":"user scope, either patient or reviewer","type":"string"},"username":{"type":"string"}},"required":["username","password","response_type","client_id","redirect_uri"],"type":"object"},"OAuthToken":{"properties":{"access_token":{"type":"string"},"expires_in":{"type":"integer"},"token_type":{"type":"string"}},"required":["access_token","expires_in","token_type"],"type":"object"},"OpenAIChatCompletionRequest":{"properties":{"prompt":{"example":"I am feeling","nullable":false,"type":"string"},"temperature":{"default":1,"example":0.7,"nullable":true,"type":"number"}},"required":["prompt"],"type":"object"},"OpenAIChatCompletionResponse":{"properties":{"debug_info":{"nullable":true,"type":"object"},"finish_reason":{"example":"stop","nullable":false,"type":"string"},"function_call":{"nullable":true,"type":"object"},"text":{"example":"I am feeling great today","type":"string"}},"required":["finish_reason"],"type":"object"},"OpenAIChatGPTMPQImLblRawResult":{"properties":{"amount":{"$ref":"#/components/schemas/OpenAIChatGPTMPQImLblRawResultAmount"},"basic_name":{"nullable":true,"type":"string"},"brand":{"nullable":true,"type":"string"},"composite_components":{"nullable":true,"type":"string"},"composite_food_id":{"nullable":true,"type":"string"},"debug_info":{"additionalProperties":true,"nullable":false,"type":"object"},"debug_raw_fields":{"additionalProperties":true,"description":"certain fields from the raw response are used to derive values in this result, but are not included directly. This object contains those raw values, for debugging and future analysis purposes.\n","nullable":true,"type":"object"},"description":{"nullable":true,"type":"string"},"food":{"nullable":false,"type":"string"},"has_specific_nutritional_information":{"nullable":true,"type":"boolean"},"is_composite_food":{"nullable":true,"type":"boolean"},"preparation_method":{"nullable":true,"type":"string"},"regions":{"items":{"$ref":"#/components/schemas/ImLblRawResultRegion"},"nullable":true,"type":"array"},"source":{"enum":["photo","note","both"],"nullable":true,"type":"string"},"source_type":{"enum":["meal_kit","chain_restaurant"],"nullable":true,"type":"string"},"version":{"nullable":false,"type":"string"}},"required":["food","amount"]},"OpenAIChatGPTMPQImLblRawResultAmount":{"nullable":false,"properties":{"estimated":{"description":"(deprecated, do not use)","nullable":true,"type":"boolean"},"gram_amount":{"nullable":true,"type":"number"},"gram_amount_provided":{"description":"indicates that the gram amount was explicitly provided by the user","nullable":true,"type":"boolean"},"quantity":{"nullable":true,"type":"number"},"quantity_provided":{"description":"indicates that the quantity was explicitly provided by the user","nullable":true,"type":"boolean"},"unit":{"nullable":true,"type":"string"},"unit_provided":{"description":"indicates that the unit was explicitly provided by the user","nullable":true,"type":"boolean"}},"type":"object"},"OpenAIChatGPTMPQImLblRawResult_legacy_v2":{"description":"Legacy version 2 of the OpenAIChatGPTMPQImLblRawResult schema. Kept as a reference in case it becomes useful to load older data, but not currently used.\n","properties":{"amount":{"$ref":"#/components/schemas/OpenAIChatGPTMPQImLblRawResultAmount"},"brand":{"nullable":true,"type":"string"},"combined_food_id":{"nullable":true,"type":"string"},"comments":{"deprecated":true,"nullable":true,"type":"string"},"debug_raw_fields":{"additionalProperties":true,"description":"certain fields from the raw response are used to derive values in this result, but are not included directly. This object contains those raw values, for debugging and future analysis purposes.\n","nullable":true,"type":"object"},"food":{"nullable":false,"type":"string"},"possible_alternatives":{"deprecated":true,"items":{"type":"string"},"nullable":false,"type":"array"},"preparation_method":{"nullable":true,"type":"string"},"regions":{"items":{"$ref":"#/components/schemas/ImLblRawResultRegion"},"nullable":true,"type":"array"},"source":{"enum":["photo","note"],"nullable":true,"type":"string"},"version":{"nullable":false,"type":"string"}},"required":["food","amount","possible_alternatives"]},"PartnerApiMeal":{"properties":{"created_time":{"format":"date-time","nullable":true,"type":"string"},"id":{"type":"integer"},"meal_date":{"format":"date","type":"string"},"meal_items":{"items":{"$ref":"#/components/schemas/PartnerApiMealItem"},"type":"array"},"meal_name":{"enum":["breakfast","lunch","dinner","snack"],"type":"string"},"meal_time":{"description":"time in format hh:mm:ss","type":"string"},"updated_time":{"format":"date-time","nullable":true,"type":"string"}},"required":["id","meal_date","meal_time","meal_name","meal_items","created_time","updated_time"],"type":"object"},"PartnerApiMealCustomAddon":{"properties":{"created_time":{"format":"date-time","nullable":true,"type":"string"},"food_name":{"description":"Display name (food_name_alias when set, otherwise food_name).","type":"string"},"id":{"type":"integer"},"nutrients":{"$ref":"#/components/schemas/PartnerApiMealItemNutrients"},"sizing":{"$ref":"#/components/schemas/PartnerApiMealItemSizing"},"updated_time":{"format":"date-time","nullable":true,"type":"string"}},"required":["id","food_name","sizing","nutrients","created_time","updated_time"],"type":"object"},"PartnerApiMealItem":{"properties":{"created_time":{"format":"date-time","nullable":true,"type":"string"},"custom_addons":{"items":{"$ref":"#/components/schemas/PartnerApiMealCustomAddon"},"type":"array"},"food_name":{"description":"Display name (food_name_alias when set, otherwise food_name).","type":"string"},"id":{"type":"integer"},"nutrients":{"$ref":"#/components/schemas/PartnerApiMealItemNutrients"},"sizing":{"$ref":"#/components/schemas/PartnerApiMealItemSizing"},"updated_time":{"format":"date-time","nullable":true,"type":"string"}},"required":["id","food_name","sizing","nutrients","custom_addons","created_time","updated_time"],"type":"object"},"PartnerApiMealItemNutrients":{"additionalProperties":false,"description":"Enforced partner-facing nutrient map for each meal line item and custom add-on. Exactly these keys are returned (numeric values, or null). This contract is security-sensitive; changes require explicit review before release. Align with ``_MEAL_ITEM_NUTRIENT_COLUMN_NAMES`` in ``app/api/partner_api/meal_projection.py``.","properties":{"added_sugars_g":{"nullable":true,"type":"number"},"alcohol_g":{"nullable":true,"type":"number"},"caffeine_mg":{"nullable":true,"type":"number"},"calcium_mg":{"nullable":true,"type":"number"},"carbohydrate_g":{"nullable":true,"type":"number"},"cholesterol_mg":{"nullable":true,"type":"number"},"choline_mg":{"nullable":true,"type":"number"},"energy_kcal":{"nullable":true,"type":"number"},"fat_g":{"nullable":true,"type":"number"},"fattyacids_totalmonounsaturated_g":{"nullable":true,"type":"number"},"fattyacids_totalpolyunsaturated_g":{"nullable":true,"type":"number"},"fattyacids_totalsaturated_g":{"nullable":true,"type":"number"},"fattyacids_totaltrans_g":{"nullable":true,"type":"number"},"fiber_g":{"nullable":true,"type":"number"},"folate_dfe_ug":{"nullable":true,"type":"number"},"insoluble_dietary_fiber_g":{"nullable":true,"type":"number"},"iron_mg":{"nullable":true,"type":"number"},"magnesium_mg":{"nullable":true,"type":"number"},"netcarb_g":{"nullable":true,"type":"number"},"niacin_mg":{"nullable":true,"type":"number"},"omega_three_fatty_acids_g":{"nullable":true,"type":"number"},"pantothenic_acid_mg":{"nullable":true,"type":"number"},"phosphorus_mg":{"nullable":true,"type":"number"},"polyols_g":{"nullable":true,"type":"number"},"potassium_mg":{"nullable":true,"type":"number"},"protein_g":{"nullable":true,"type":"number"},"riboflavin_mg":{"nullable":true,"type":"number"},"selenium_mcg":{"nullable":true,"type":"number"},"sodium_mg":{"nullable":true,"type":"number"},"soluble_dietary_fiber_g":{"nullable":true,"type":"number"},"sugars_g":{"nullable":true,"type":"number"},"thiamin_mg":{"nullable":true,"type":"number"},"vitamin_a_iu":{"nullable":true,"type":"number"},"vitamin_a_rae_ug":{"nullable":true,"type":"number"},"vitamin_b12_ug":{"nullable":true,"type":"number"},"vitamin_b6_mg":{"nullable":true,"type":"number"},"vitamin_c_mg":{"nullable":true,"type":"number"},"vitamin_d2d3_ug":{"nullable":true,"type":"number"},"vitamin_d_iu":{"nullable":true,"type":"number"},"vitamin_e_mg":{"nullable":true,"type":"number"},"vitamin_k_ug":{"nullable":true,"type":"number"},"water_g":{"nullable":true,"type":"number"},"zinc_mg":{"nullable":true,"type":"number"}},"required":["protein_g","fat_g","carbohydrate_g","energy_kcal","alcohol_g","water_g","caffeine_mg","sugars_g","fiber_g","calcium_mg","iron_mg","magnesium_mg","phosphorus_mg","potassium_mg","sodium_mg","zinc_mg","vitamin_a_iu","vitamin_a_rae_ug","vitamin_e_mg","vitamin_d_iu","vitamin_d2d3_ug","vitamin_c_mg","thiamin_mg","riboflavin_mg","niacin_mg","vitamin_b6_mg","vitamin_b12_ug","vitamin_k_ug","folate_dfe_ug","cholesterol_mg","fattyacids_totaltrans_g","fattyacids_totalsaturated_g","fattyacids_totalmonounsaturated_g","fattyacids_totalpolyunsaturated_g","insoluble_dietary_fiber_g","soluble_dietary_fiber_g","selenium_mcg","pantothenic_acid_mg","choline_mg","added_sugars_g","omega_three_fatty_acids_g","polyols_g","netcarb_g"],"type":"object"},"PartnerApiMealItemSizing":{"description":"Portion and unit fields for a meal line item (no CC classification).","properties":{"net_serving_size_g":{"nullable":true,"type":"number"},"percent_eaten":{"nullable":true,"type":"number"},"serving_unit_amount":{"nullable":true,"type":"number"},"serving_unit_label":{"nullable":true,"type":"string"},"servings":{"nullable":true,"type":"number"}},"type":"object"},"PartnerApiMediterraneanDietScoreCurrent":{"description":"The single score to show on a dashboard. Always the patient's most recent usable score, and never today: windows end yesterday or earlier, so the number is stable for the whole day rather than drifting as meals are logged.\n\nIf the patient has not logged enough recently, this falls back through up to 30 days to their last usable score -- so a few days off does not blank the dashboard. Compare `date` against today to see how current it is.\n\nWhen nothing in that lookback is usable, `score` is null and `status` explains why. Independent of date_since/date_until, and brought up to date when you call this endpoint, so it may be newer than the matching entry in `scores`.\n","properties":{"date":{"description":"The day this score is reported for. The score covers the window_days days ending on it, inclusive.","format":"date","type":"string"},"qualifying_days":{"description":"Days in the window on which the patient logged at least 500 kcal across at least 2 meals. Three are needed for a score. Use it to show progress when status is `insufficient_meals`, e.g. \"2 of 3 days logged\".\n","type":"integer"},"score":{"description":"Mediterranean diet score, from 0 to max_score. Populated only when status is `ok`, so an unreliable number can never be displayed by accident.","nullable":true,"type":"number"},"score_percent":{"description":"score as a percentage of max_score, 0-100, to one decimal. Null whenever score is null. The safest field to display: it needs no knowledge of the scoring scale.","nullable":true,"type":"number"},"status":{"description":"Whether there is a score to show, and if not, why. Treat this list as open-ended: handle unrecognized values as \"no score to show\". Current values: `ok` - score is present and reliable; `no_meals` - the patient has logged no meals at all since joining; prompt them to start logging; `insufficient_meals` - fewer than 3 qualifying days; prompt them to log a few more; `not_yet_computed` - enough meals were logged, but the score is not calculated yet; retry later. Do not treat this as a closed enum \u2014 new values may be added.\n","type":"string"}},"required":["date","score","score_percent","status","qualifying_days"],"type":"object"},"PartnerApiMediterraneanDietScorePoint":{"description":"One day of history. `score` covers the seven days ending on `date`.\n","properties":{"date":{"description":"The day this score is reported for. The score covers the window_days days ending on it, inclusive.","format":"date","type":"string"},"score":{"description":"Mediterranean diet score for the window, from 0 to max_score. Null when the patient did not log enough that week to be scored. A returned 0 is a real score.","nullable":true,"type":"number"}},"required":["date","score"],"type":"object"},"PartnerApiMediterraneanDietScoreSeries":{"properties":{"current":{"$ref":"#/components/schemas/PartnerApiMediterraneanDietScoreCurrent"},"max_score":{"description":"Highest attainable score. Depends on the scoring version configured for the patient's clinic, which is not exposed and may change, so read it here rather than hard-coding it.","type":"number"},"patient_id":{"type":"integer"},"scores":{"description":"History, one entry per calendar day from date_since to date_until, ascending. Recomputed nightly, so the most recent entries can lag `current`.\n","items":{"$ref":"#/components/schemas/PartnerApiMediterraneanDietScorePoint"},"type":"array"},"window_days":{"description":"Length of every scoring window in days. Each score covers the window_days days ending on its date.","type":"integer"}},"required":["patient_id","window_days","max_score","current","scores"],"type":"object"},"PartnerOAuthClientRequest":{"properties":{"allow_refresh_token":{"type":"boolean"},"allowed_scopes":{"items":{"enum":["meals:read","reports:read","profile:read"],"type":"string"},"type":"array"},"client_type":{"enum":["confidential","public"],"type":"string"},"display_name":{"type":"string"},"homepage_url":{"nullable":true,"type":"string"},"is_active":{"description":"Update only","type":"boolean"},"privacy_policy_url":{"nullable":true,"type":"string"},"redirect_uris":{"description":"Exact-match allowlist. No wildcards or prefix matching.","items":{"type":"string"},"type":"array"}},"type":"object"},"PartnerOAuthClientResponse":{"properties":{"active_grant_count":{"type":"integer"},"allow_refresh_token":{"type":"boolean"},"allowed_scopes":{"items":{"type":"string"},"type":"array"},"client_id":{"type":"string"},"client_secret":{"description":"Returned once, at creation and at rotation only","type":"string"},"client_type":{"type":"string"},"created_time":{"format":"date-time","nullable":true,"type":"string"},"display_name":{"type":"string"},"has_logo":{"description":"Whether an RxFood-hosted logo has been uploaded","type":"boolean"},"has_secret":{"type":"boolean"},"homepage_url":{"nullable":true,"type":"string"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"partner_id":{"type":"integer"},"previous_secret_expires_at":{"description":"When the superseded secret stops being accepted","format":"date-time","nullable":true,"type":"string"},"privacy_policy_url":{"nullable":true,"type":"string"},"redirect_uris":{"items":{"type":"string"},"type":"array"},"require_hospital_membership":{"type":"boolean"},"secret_rotated_time":{"format":"date-time","nullable":true,"type":"string"},"updated_time":{"format":"date-time","nullable":true,"type":"string"}},"type":"object"},"PartnerOAuthConnection":{"properties":{"client_id":{"nullable":true,"type":"string"},"consent_version":{"type":"string"},"display_name":{"nullable":true,"type":"string"},"expires_at":{"format":"date-time","nullable":true,"type":"string"},"grant_id":{"type":"integer"},"granted_time":{"format":"date-time","nullable":true,"type":"string"},"homepage_url":{"nullable":true,"type":"string"},"is_active":{"type":"boolean"},"last_used_time":{"format":"date-time","nullable":true,"type":"string"},"logo_url":{"nullable":true,"type":"string"},"partner_id":{"type":"integer"},"privacy_policy_url":{"nullable":true,"type":"string"},"revoked_by":{"nullable":true,"type":"string"},"revoked_time":{"format":"date-time","nullable":true,"type":"string"},"scope_descriptions":{"items":{"$ref":"#/components/schemas/PartnerOAuthScopeDescription"},"type":"array"},"scopes":{"items":{"type":"string"},"type":"array"},"updated_time":{"format":"date-time","nullable":true,"type":"string"}},"type":"object"},"PartnerOAuthRevokeRequest":{"properties":{"client_id":{"type":"string"},"client_secret":{"type":"string"},"token":{"type":"string"},"token_type_hint":{"enum":["access_token","refresh_token"],"type":"string"}},"required":["token"],"type":"object"},"PartnerOAuthScopeDescription":{"properties":{"description":{"type":"string"},"scope":{"type":"string"},"title":{"type":"string"}},"type":"object"},"PartnerOAuthTokenRequest":{"properties":{"client_id":{"type":"string"},"client_secret":{"description":"Confidential clients only. Prefer HTTP Basic.","type":"string"},"code":{"description":"authorization_code grant only","type":"string"},"code_verifier":{"description":"authorization_code grant only; PKCE S256 verifier","type":"string"},"grant_type":{"description":"authorization_code or refresh_token","type":"string"},"redirect_uri":{"description":"authorization_code grant only; must match the value used at /authorize","type":"string"},"refresh_token":{"description":"refresh_token grant only","type":"string"},"scope":{"description":"refresh_token grant only; may narrow but never widen the grant","type":"string"}},"required":["grant_type"],"type":"object"},"PartnerOAuthTransactionView":{"properties":{"authenticated":{"type":"boolean"},"client":{"properties":{"client_id":{"type":"string"},"display_name":{"type":"string"},"homepage_url":{"nullable":true,"type":"string"},"logo_url":{"description":"Short-lived RxFood-signed URL. Never a partner-hosted URL.","nullable":true,"type":"string"},"privacy_policy_url":{"nullable":true,"type":"string"}},"type":"object"},"consent_statement":{"description":"Consent copy to display verbatim; the identical text is frozen onto the grant.","properties":{"data_use_notice":{"type":"string"},"preamble":{"type":"string"},"privacy_link_text":{"type":"string"},"privacy_url":{"type":"string"},"withdrawal_notice":{"type":"string"}},"type":"object"},"consent_version":{"type":"string"},"expires_at":{"type":"string"},"mfa_pending":{"type":"boolean"},"patient":{"nullable":true,"properties":{"email":{"nullable":true,"type":"string"},"first_name":{"nullable":true,"type":"string"},"last_name":{"nullable":true,"type":"string"}},"type":"object"},"redirect_uri_host":{"nullable":true,"type":"string"},"scope_descriptions":{"items":{"$ref":"#/components/schemas/PartnerOAuthScopeDescription"},"type":"array"},"scopes":{"items":{"type":"string"},"type":"array"},"transaction_id":{"description":"Rotated transaction secret, returned by /transaction and /transaction/login. Store it and use it for the next call; the one you presented is dead on return.","type":"string"}},"type":"object"},"PatchClinicianAppointmentRequest":{"properties":{"description":{"type":"string"},"end_time":{"description":"calendar date in format YYYY-MM-DD HH:MM:SS","example":"2020-05-10 09:30:00","format":"date-time","type":"string"},"purpose":{"type":"string"},"start_time":{"description":"calendar date in format YYYY-MM-DD HH:MM:SS","example":"2020-05-02 08:30:00","format":"date-time","type":"string"},"title":{"type":"string"}}},"PatchClinicianRequest":{"properties":{"bio":{"nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"},"first_name":{"nullable":true,"type":"string"},"hospital_id":{"nullable":true,"type":"integer"},"last_name":{"nullable":true,"type":"string"},"locale":{"nullable":true,"type":"string"},"password":{"nullable":true,"type":"string"},"phone_number":{"nullable":true,"type":"string"}}},"PatchMealReminderPreferencesRequest":{"properties":{"mode":{"enum":["automatic","enabled","disabled"],"type":"string"}},"required":["mode"]},"PatchPatientReportCommentRequest":{"properties":{"comments":{"type":"string"},"report_section":{"type":"string"},"sudo_clinician_id":{"type":"integer"}}},"PatchPatientRequest":{"properties":{"birthday":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","nullable":true,"type":"string"},"email":{"nullable":true,"type":"string"},"first_meal_time":{"description":"time in format hh:mm:ss","example":"17:30:00","nullable":true,"type":"string"},"first_name":{"nullable":true,"type":"string"},"flags_raw":{"$ref":"#/components/schemas/PostPatchPatientFlags","nullable":true},"hospital_attributes":{"$ref":"#/components/schemas/PatientHospitalAttributes","nullable":true},"last_name":{"nullable":true,"type":"string"},"locale":{"nullable":true,"type":"string"},"meal_time_breakfast":{"description":"time in format hh:mm:ss","example":"12:30:00","nullable":true,"type":"string"},"meal_time_dinner":{"description":"time in format hh:mm:ss","example":"21:30:00","nullable":true,"type":"string"},"meal_time_lunch":{"description":"time in format hh:mm:ss","example":"08:30:00","nullable":true,"type":"string"},"password":{"nullable":true,"type":"string"},"patient_type":{"enum":["research","collaboration","wellness","obesity","diabetes","metabolic syndrome","weight loss","migraine","gastroesophageal reflux","gi discomfort","vertigo","sleep apnea","rxlife","dexcom","menopause"],"nullable":true,"type":"string"},"phone_number":{"nullable":true,"type":"string"},"sex":{"enum":["female","male","intersex","mtf_female","ftm_male"],"nullable":true,"type":"string"}}},"PatchPatientSubscriptionRequest":{"properties":{"expiration_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"},"report_date":{"description":"calendar date in format YYYY-MM-DD. Must be equal to or greater than the expiration date","example":"2019-01-05","type":"string"},"start_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}}},"PatchPatientSupplementRequest":{"properties":{"comment":{"description":"comments relating to the supplement","example":"under review by clinician","nullable":true,"type":"string"},"frequency":{"enum":["daily","weekly","monthly","hourly","irregular"],"type":"string"},"instructions":{"description":"instructions","nullable":true,"type":"string"},"prescribed_by":{"description":"who has asked the patient to take the supplement","nullable":true,"type":"string"},"qty_per_frequency":{"type":"number"},"qty_unit_of_measure":{"description":"Unit of Measure","enum":["mcg","g","mg","iu","rae","dfe","ne","tablet"],"example":"mcg","type":"string"},"qty_unit_size":{"type":"number"},"reason_for_taking":{"description":"why is the patient taking the supplement?","nullable":true,"type":"string"},"related_usda_id":{"description":"if available in the food DB, include the USDA id for the nutrition link","nullable":true,"type":"integer"}}},"PatientActivityFeedRow":{"discriminator":{"mapping":{"emotion-log":"#/components/schemas/PatientActivityFeedRowEmotionLog","emotional-health-log":"#/components/schemas/PatientActivityFeedRowEmotionalHealthLog","exercise-log":"#/components/schemas/PatientActivityFeedRowExerciseLog","meal-log":"#/components/schemas/PatientActivityFeedRowMealLog","medication-log":"#/components/schemas/PatientActivityFeedRowMedicationLog","mindfulness-log":"#/components/schemas/PatientActivityFeedRowMindfulnessLog","sleep-log":"#/components/schemas/PatientActivityFeedRowSleepLog","steps-log":"#/components/schemas/PatientActivityFeedRowStepsLog","stress-log":"#/components/schemas/PatientActivityFeedRowStressLog"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/PatientActivityFeedRowMealLog"},{"$ref":"#/components/schemas/PatientActivityFeedRowExerciseLog"},{"$ref":"#/components/schemas/PatientActivityFeedRowMedicationLog"},{"$ref":"#/components/schemas/PatientActivityFeedRowEmotionLog"},{"$ref":"#/components/schemas/PatientActivityFeedRowSleepLog"},{"$ref":"#/components/schemas/PatientActivityFeedRowStepsLog"},{"$ref":"#/components/schemas/PatientActivityFeedRowMindfulnessLog"},{"$ref":"#/components/schemas/PatientActivityFeedRowStressLog"},{"$ref":"#/components/schemas/PatientActivityFeedRowEmotionalHealthLog"}]},"PatientActivityFeedRowCGMSummary":{"properties":{"data":{"properties":{"glucose":{"items":{"$ref":"#/components/schemas/PatientGlucoseDataResponse"},"type":"array"}},"required":["glucose"]},"id":{"nullable":false,"type":"string"},"timestamp":{"format":"date-time","nullable":false,"type":"string"},"type":{"enum":["cgm-summary"],"nullable":false,"type":"string"}},"required":["id","type","timestamp","data"]},"PatientActivityFeedRowEmotionLog":{"properties":{"data":{"$ref":"#/components/schemas/PatientEmotionResponse","nullable":false},"id":{"nullable":false,"type":"string"},"timestamp":{"format":"date-time","nullable":false,"type":"string"},"type":{"enum":["emotion-log"],"nullable":false,"type":"string"}},"required":["id","type","timestamp","data"]},"PatientActivityFeedRowEmotionalHealthLog":{"properties":{"data":{"$ref":"#/components/schemas/PatientEmotionalHealthResponse","nullable":false},"id":{"nullable":false,"type":"string"},"timestamp":{"format":"date-time","nullable":false,"type":"string"},"type":{"enum":["emotional-health-log"],"nullable":false,"type":"string"}},"required":["id","type","timestamp","data"]},"PatientActivityFeedRowExerciseLog":{"properties":{"data":{"$ref":"#/components/schemas/PatientExerciseResponse","nullable":false},"id":{"nullable":false,"type":"string"},"timestamp":{"format":"date-time","nullable":false,"type":"string"},"type":{"enum":["exercise-log"],"nullable":false,"type":"string"}},"required":["id","type","timestamp","data"]},"PatientActivityFeedRowMealLog":{"properties":{"data":{"$ref":"#/components/schemas/MealResponse","nullable":false},"id":{"nullable":false,"type":"string"},"timestamp":{"format":"date-time","nullable":false,"type":"string"},"type":{"enum":["meal-log"],"nullable":false,"type":"string"}},"required":["id","type","timestamp","data"]},"PatientActivityFeedRowMedicationLog":{"properties":{"data":{"$ref":"#/components/schemas/PatientMedicationResponse","nullable":false},"id":{"nullable":false,"type":"string"},"timestamp":{"format":"date-time","nullable":false,"type":"string"},"type":{"enum":["medication-log"],"nullable":false,"type":"string"}},"required":["id","type","timestamp","data"]},"PatientActivityFeedRowMindfulnessLog":{"properties":{"data":{"$ref":"#/components/schemas/PatientMindfulnessResponse","nullable":false},"id":{"nullable":false,"type":"string"},"timestamp":{"format":"date-time","nullable":false,"type":"string"},"type":{"enum":["mindfulness-log"],"nullable":false,"type":"string"}},"required":["id","type","timestamp","data"]},"PatientActivityFeedRowSleepLog":{"properties":{"data":{"$ref":"#/components/schemas/PatientSleepDataResponse","nullable":false},"id":{"nullable":false,"type":"string"},"timestamp":{"format":"date-time","nullable":false,"type":"string"},"type":{"enum":["sleep-log"],"nullable":false,"type":"string"}},"required":["id","type","timestamp","data"]},"PatientActivityFeedRowStepsLog":{"properties":{"data":{"$ref":"#/components/schemas/PatientStepsDataResponse","nullable":false},"id":{"nullable":false,"type":"string"},"timestamp":{"format":"date-time","nullable":false,"type":"string"},"type":{"enum":["steps-log"],"nullable":false,"type":"string"}},"required":["id","type","timestamp","data"]},"PatientActivityFeedRowStressLog":{"properties":{"data":{"$ref":"#/components/schemas/PatientStressResponse","nullable":false},"id":{"nullable":false,"type":"string"},"timestamp":{"format":"date-time","nullable":false,"type":"string"},"type":{"enum":["stress-log"],"nullable":false,"type":"string"}},"required":["id","type","timestamp","data"]},"PatientAppointmentResponse":{"properties":{"appointment_id":{"type":"integer"},"clinic_id":{"type":"integer"},"clinician_id":{"type":"integer"},"created_by_user_id":{"type":"integer"},"created_time":{"format":"date-time","type":"string"},"description":{"type":"string"},"end_time":{"description":"calendar date in format YYYY-MM-DD HH:MM:SS","example":"2020-05-10 09:30:00","format":"date-time","type":"string"},"purpose":{"type":"string"},"start_time":{"description":"calendar date in format YYYY-MM-DD HH:MM:SS","example":"2020-05-02 08:30:00","format":"date-time","type":"string"},"title":{"type":"string"},"updated_time":{"format":"date-time","type":"string"}},"required":["appointment_id","clinician_id","clinic_id","created_by_user_id","title","start_time","end_time"]},"PatientAppointmentsResponse":{"properties":{"patient_appoinments":{"items":{"$ref":"#/components/schemas/PatientAppointmentResponse"},"type":"array"},"patient_id":{"type":"integer"}},"required":["patient_id"]},"PatientBookmarkCollectionResponse":{"properties":{"bookmarks":{"default":[],"items":{"$ref":"#/components/schemas/PatientBookmarkResponse"},"nullable":false,"type":"array"},"description":{"example":"Some description of the collection","nullable":true,"type":"string"},"id":{"example":123,"nullable":false,"type":"integer"},"name":{"example":"Bookmarked Meals","nullable":false,"type":"string"},"system_key":{"$ref":"#/components/schemas/PatientBookmarkCollectionSystemKey","nullable":true}},"required":["id","name"],"type":"object"},"PatientBookmarkCollectionSystemKey":{"enum":["default_meals","default_recipes","custom_foods"],"type":"string"},"PatientBookmarkResponse":{"properties":{"collection_id":{"example":123,"nullable":false,"type":"integer"},"id":{"example":123,"nullable":false,"type":"integer"},"name":{"example":"Morning Granola","nullable":false,"type":"string"},"note":{"example":"Some bookmark notes","nullable":true,"type":"string"},"source_id":{"example":123,"nullable":false,"type":"integer"},"source_response":{"$ref":"#/components/schemas/MealResponse"},"source_response_items":{"default":[],"items":{"$ref":"#/components/schemas/MealItemResponse"},"nullable":false,"type":"array"},"source_type":{"example":"meal","nullable":false,"type":"string"},"type":{"example":"meal","nullable":false,"type":"string"}},"required":["id","name","type","source_type","source_id","collection_id"],"type":"object"},"PatientCGMConnectionDeleteResponse":{"properties":{"rows_deleted":{"type":"integer"}},"required":["rows_deleted"]},"PatientCGMConnectionStatusResult":{"properties":{"created_at":{"format":"date-time","type":"string"},"provider":{"example":"dexcom","type":"string"},"status":{"enum":["connected"],"type":"string"}},"required":["provider","status","created_at"]},"PatientCGMDataRefetchResult":{"properties":{"data_latest_timestamps":{"nullable":true,"type":"object"},"provider":{"example":"dexcom","type":"string"},"status":{"enum":["success","error","pending"],"type":"string"},"status_message":{"nullable":true,"type":"string"},"timestamp":{"format":"date-time","type":"string"}},"required":["timestamp","status"]},"PatientCGMDeviceTableDeviceResponse":{"properties":{"bg_target_lower":{"description":"Lower end of target range for BG, in mmol/L","format":"float","nullable":true,"type":"number"},"bg_target_upper":{"description":"Upper end of target range for BG, in mmol/L","format":"float","nullable":true,"type":"number"},"device":{"description":"The CGM device name/type","nullable":true,"type":"string"},"device_id":{"description":"The unique identifier for this device","nullable":true,"type":"string"},"first_reading":{"description":"Timestamp of the first reading from this device","format":"date-time","type":"string"},"glucose_average":{"description":"Average glucose level in mmol/L","format":"float","nullable":true,"type":"number"},"glucose_median":{"description":"Median glucose level in mmol/L","format":"float","nullable":true,"type":"number"},"glucose_std_dev":{"description":"Standard deviation of glucose values","format":"float","nullable":true,"type":"number"},"last_reading":{"description":"Timestamp of the last reading from this device","format":"date-time","type":"string"},"max_glucose":{"description":"Maximum glucose level in mmol/L","format":"float","nullable":true,"type":"number"},"min_glucose":{"description":"Minimum glucose level in mmol/L","format":"float","nullable":true,"type":"number"},"p25":{"description":"25th percentile glucose level in mmol/L","format":"float","nullable":true,"type":"number"},"p5":{"description":"5th percentile glucose level in mmol/L","format":"float","nullable":true,"type":"number"},"p75":{"description":"75th percentile glucose level in mmol/L","format":"float","nullable":true,"type":"number"},"p95":{"description":"95th percentile glucose level in mmol/L","format":"float","nullable":true,"type":"number"},"reading_count":{"description":"Total number of readings from this device","type":"integer"},"unit":{"description":"Unit of glucose measurements","example":"mmol/L","type":"string"}},"required":["device","device_id","first_reading","last_reading","reading_count"],"type":"object"},"PatientCGMDeviceTableResponse":{"properties":{"has_more":{"description":"Whether there are more results available","type":"boolean"},"rows":{"description":"List of CGM devices and their statistics","items":{"$ref":"#/components/schemas/PatientCGMDeviceTableDeviceResponse"},"type":"array"}},"required":["has_more","rows"],"type":"object"},"PatientCareTeamChallengePlantAwardRow":{"properties":{"awarded_at":{"format":"date-time","type":"string"},"challenge_id":{"type":"string"},"challenge_run_id":{"type":"string"},"event_id":{"type":"integer"},"plant_key":{"type":"string"},"plant_source":{"enum":["manual","meal_auto"],"type":"string"},"points_awarded":{"type":"integer"},"points_date":{"format":"date","type":"string"}},"required":["event_id","challenge_id","challenge_run_id","plant_key","plant_source","points_date","points_awarded","awarded_at"],"type":"object"},"PatientCareTeamChallengePlantAwardsResponse":{"properties":{"awards":{"items":{"$ref":"#/components/schemas/PatientCareTeamChallengePlantAwardRow"},"type":"array"},"challenge_run_id":{"type":"string"},"total_awarded_points":{"type":"integer"}},"required":["challenge_run_id","awards","total_awarded_points"],"type":"object"},"PatientCareTeamChallengePointsEventResponse":{"properties":{"accepted":{"type":"boolean"},"delta_points":{"type":"integer"},"outcome":{"enum":["applied","reversed","no_op_duplicate","no_op_cap_reached","no_op_no_reversible_award"],"type":"string"},"total_points":{"type":"integer"}},"required":["accepted","outcome","delta_points","total_points"],"type":"object"},"PatientCareTeamChallengePointsRedeemResponse":{"properties":{"accepted":{"type":"boolean"},"delta_points":{"type":"integer"},"outcome":{"enum":["applied","insufficient_points"],"type":"string"},"redemption_id":{"nullable":true,"type":"integer"},"reward_code":{"nullable":true,"type":"string"},"reward_type":{"description":"Canonical reward type.","enum":["dietitian_session","microbiome_test","vitamins_supplements"],"type":"string"},"total_points":{"type":"integer"}},"required":["accepted","outcome","delta_points","total_points","reward_type"],"type":"object"},"PatientCareTeamChallengePointsRedemptionRow":{"properties":{"created_time":{"format":"date-time","type":"string"},"id":{"type":"integer"},"points_spent":{"type":"integer"},"reward_code":{"nullable":true,"type":"string"},"reward_type":{"description":"Canonical reward type.","enum":["dietitian_session","microbiome_test","vitamins_supplements"],"type":"string"}},"required":["id","points_spent","reward_type","created_time"],"type":"object"},"PatientCareTeamChallengePointsRedemptionsResponse":{"properties":{"redemptions":{"items":{"$ref":"#/components/schemas/PatientCareTeamChallengePointsRedemptionRow"},"type":"array"}},"required":["redemptions"],"type":"object"},"PatientCareTeamChallengePointsSummaryResponse":{"properties":{"points_date":{"format":"date","type":"string"},"today_quiz_awarded":{"type":"boolean"},"today_task_awarded":{"type":"boolean"},"total_points":{"type":"integer"}},"required":["total_points","today_quiz_awarded","today_task_awarded","points_date"],"type":"object"},"PatientCgmDailySummaryFoodResponse":{"properties":{"after_meal_time_out_of_range_mins":{"description":"number of minutes after food < lower BG limit or > upper BG limit","example":"10","type":"number"},"carbohydrate_pct_of_total_kcal":{"description":"carb contribution to total kcal","example":"3.2","type":"number"},"energy_kcal":{"description":"total energy_kcal for the time period","example":"5","type":"number"},"fat_pct_of_total_kcal":{"description":"fat contribution to total kcal","example":"3.2","type":"number"},"fiber_g":{"description":"fiber in grams for the current food item","example":"6.6","type":"number"},"food_alpha_index":{"description":"chr(ord(\"A\") + meal_index)","example":"A1","type":"string"},"food_name":{"description":"applied_food_with_addons_netcarbs","example":"09:33:02","type":"string"},"food_photo_name":{"description":"name for food photo","type":"string"},"food_photo_url":{"description":"path to the food photo eg /api/foods/....","example":".../foods","type":"string"},"glucose_max_time":{"description":"time of max glucose within 4 hrs after food","example":"4","type":"string"},"glucose_max_value":{"description":"value of max glucose within 4 hrs after food","example":"4","type":"number"},"glucose_min_time":{"description":"time of min glucose within 4 hrs after food","example":"4","type":"string"},"glucose_min_value":{"description":"value of min glucose within 4 hrs after food","example":"4","type":"number"},"glucose_rise":{"description":"peak minus base glucose (base glucose is glucose at time of food log; peak is within the next two hrs)","example":"4","type":"number"},"glucose_two_hour_delta":{"description":"change in bg data, in mmoL/l","example":"4","nullable":true,"type":"number"},"glucose_valley":{"description":"minimum is the lowest BG value within 2 hrs of eating","example":"4","type":"number"},"meal_date":{"description":"calendar date in format YYYY-MM-DD","example":"2020-03-02","type":"string"},"meal_photo_id":{"description":"meal photo id","type":"integer"},"meal_time":{"description":"time in HH:MM:SS","example":"09:33:02","type":"string"},"net_serving_size_g":{"description":"net serving size ","example":"40","type":"number"},"netcarb_g":{"description":"net carbs in grams for the current food item","example":"6.6","type":"number"},"protein_pct_of_total_kcal":{"description":"protein contribution to total kcal","example":"4","type":"number"},"thirty_min_prior_peak_bg":{"description":"max value in the 30 minutes prior to the food log","example":"4","type":"number"}},"required":["alphabet","food_name","meal_time","meal_date"]},"PatientCgmDailySummaryResponse":{"properties":{"bg_target_lower":{"description":"lower end of target range ofr BG, in mmoL/l","example":"4","type":"number"},"bg_target_upper":{"description":"upper end of target range for BG, in mmoL/l","example":"10","type":"number"},"exercise":{"items":{"$ref":"#/components/schemas/PatientExerciseResponse"},"type":"array"},"foods":{"items":{"$ref":"#/components/schemas/PatientCgmDailySummaryFoodResponse"},"nullable":true,"type":"array"},"glucose":{"items":{"$ref":"#/components/schemas/PatientGlucoseDataResponse"},"type":"array"},"glucose_peak_per_meal_avg":{"description":"avg increase in glucose after a meal, in mmol/L","example":"4.4","type":"number"},"glucose_peak_per_meal_max":{"description":"max peak increase in glucose after a meal, in mmol/L","example":"5","type":"number"},"glucose_peak_per_meal_min":{"description":"min increase in glucose after a meal, in mmol/L","example":"8","type":"number"},"glucose_value_avg":{"description":"avg glucose value for the day","example":"4","type":"number"},"insulin":{"items":{"$ref":"#/components/schemas/PatientMedicationResponse"},"type":"array"},"max_meals_food_item_glucose_increases":{"description":"food item for the associated maximum glucose incresae","example":"apple","type":"string"},"meal_date":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"},"min_meals_food_item_glucose_increases":{"description":"food item for the minimum glucose increase","example":"water","type":"string"},"out_of_range_min":{"description":"time out of the defined range in minutes","example":"880","type":"number"},"summary_statements":{"items":{"$ref":"#/components/schemas/PatientCgmSummaryStatement"},"type":"array"}},"required":["meal_date","glucose","insulin","exercise","bg_target_upper","bg_target_lower","summary_statements"]},"PatientCgmDataResponse":{"properties":{"exercise":{"items":{"$ref":"#/components/schemas/PatientExerciseResponse"},"type":"array"},"glucose":{"items":{"$ref":"#/components/schemas/PatientGlucoseDataResponse"},"type":"array"},"insulin":{"items":{"$ref":"#/components/schemas/PatientMedicationResponse"},"type":"array"},"time_since_local":{"description":"date+time in ISO format","example":"2020-04-02T00:00:00Z","type":"string"},"time_until_local":{"description":"date+time in ISO format","example":"2020-04-10T00:00:00Z","type":"string"}},"required":["time_since_local","time_until_local"]},"PatientCgmDatesWithDataDateResponse":{"properties":{"data_date":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"}},"required":["date"]},"PatientCgmDatesWithDataResponse":{"properties":{"date_since":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","nullable":true,"type":"string"},"date_until":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-11","nullable":true,"type":"string"},"dates":{"items":{"$ref":"#/components/schemas/PatientCgmDatesWithDataDateResponse"},"type":"array"},"has_more_date_until":{"description":"if there are more data, ","example":"true","nullable":true,"type":"string"}},"required":["date_since","date_until","has_more_date_until","dates"]},"PatientCgmEntryResponse":{"properties":{"created_time":{"format":"date-time","type":"string"},"date_since":{"description":"calendar date in format YYYY-MM-DD","example":"2020-04-02","type":"string"},"date_until":{"description":"calendar date in format YYYY-MM-DD","example":"2020-04-10","type":"string"},"patient_id":{"type":"integer"},"updated_time":{"format":"date-time","type":"string"}},"required":["patient_id","date_since","date_until"]},"PatientCgmReportDataResponse":{"properties":{"daily_summaries":{"items":{"$ref":"#/components/schemas/PatientCgmDailySummaryResponse"},"type":"array"},"date_since":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"},"date_until":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-11","type":"string"},"meals":{"items":{"$ref":"#/components/schemas/PatientCgmReportMealResponse"}},"section_summaries":{"items":{"$ref":"#/components/schemas/PatientCgmSectionSummaryResponse"},"type":"array"},"statistics":{"$ref":"#/components/schemas/PatientCgmReportStatisticsResponse","type":"object"},"whole_summary":{"$ref":"#/components/schemas/PatientCgmWholeSummaryResponse","type":"object"}},"required":["date_since","date_until"]},"PatientCgmReportMealResponse":{"properties":{"glucose":{"items":{"$ref":"#/components/schemas/PatientGlucoseDataResponse"},"type":"array"},"meal":{"$ref":"#/components/schemas/MealResponse"}}},"PatientCgmReportStatisticsResponse":{"properties":{"glucose_two_hour_delta":{"properties":{"avg":{"description":"average/mean","example":"5.2","type":"number"},"max":{"description":"max","example":"8.2","type":"number"},"min":{"description":"min","example":"0.2","type":"number"},"std":{"description":"standard deviation","example":"1.5","type":"number"}},"type":"object"}}},"PatientCgmSectionSummaryResponse":{"properties":{"glucose_delta_foods":{"items":{"$ref":"#/components/schemas/GlucoseDeltaFoodResponse"},"type":"array"},"heading":{"description":"descriptive name to be used as the section heading","example":"Times When Blood Sugar Went Up More Than...","type":"string"}}},"PatientCgmSummaryStatement":{"properties":{"heading":{"description":"heading for the given statement","type":"string"},"statement":{"description":"statement content","type":"string"}},"required":["heading","statement"]},"PatientCgmWholeSummaryResponse":{"properties":{"bg_target_lower":{"description":"lower end of target range for BG, in mmoL/l","example":"4","type":"number"},"bg_target_upper":{"description":"upper end of target range for BG, in mmoL/l","example":"10","type":"number"},"date_since":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-01","type":"string"},"date_until":{"description":"calendar date in format YYYY-MM-DD","example":"2020-06-10","type":"string"},"glucose_average":{"description":"average glucose value for the period","type":"number"},"glucose_period_stats":{"description":"this data is average over 24 hours periods","items":{"properties":{"avg":{"description":"glucose avg","example":"5.2","type":"number"},"count":{"description":"number of glucose measurements","example":"5","type":"integer"},"minutes_after_meal":{"description":"time delta to meal in minutes","example":"30.0","type":"integer"},"p25":{"description":"25th percentile","example":"4.5","type":"number"},"p5":{"description":"5th percentile","example":"4.2","type":"number"},"p75":{"description":"75th percentile","example":"5.8","type":"number"},"p95":{"description":"95th percentile","example":"6.2","type":"number"},"time_of_day":{"description":"HH:MM","example":"00:05","format":"string","type":"string"},"unit":{"description":"unit coinciding with the value","example":"mmol/L","type":"string"}},"type":"object"},"type":"array"},"glucose_rise_foods":{"items":{"properties":{"food_string":{"description":"foods contributing the highest increase in BG after consumption","type":"string"},"increase_in_mmol_l":{"description":"to increase in mmol/L of which the BG spiked after eating the food","type":"number"}},"type":"object"},"type":"array"},"glucose_std_dev":{"description":"standard deviation of glucose values for the period","type":"number"},"glucose_time_in_range":{"$ref":"#/components/schemas/GlucoseTimeInRange","type":"object"},"summary_statements":{"items":{"$ref":"#/components/schemas/PatientCgmSummaryStatement"},"type":"array"}},"required":["date_since","date_until"]},"PatientCioAttributesResponse":{"properties":{"attributes":{"additionalProperties":true,"type":"object"},"id":{"type":"string"}},"required":["id","attributes"]},"PatientCioSubscriptionPreferencesResponse":{"properties":{"id":{"type":"string"},"topics":{"items":{"$ref":"#/components/schemas/PatientCioSubscriptionPreferencesTopicResponse"},"type":"array"},"unsubscribed":{"nullable":true,"type":"boolean"}},"required":["id","topics"]},"PatientCioSubscriptionPreferencesTopicResponse":{"properties":{"description":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"subscribed":{"type":"boolean"}},"required":["id","subscribed","name","description"]},"PatientClinicInvitationInfoResponse":{"properties":{"clinic_name":{"nullable":false,"type":"string"},"status":{"enum":["pending","accepted","rejected","revoked","expired"],"nullable":false,"type":"string"}},"required":["clinic_name","status"]},"PatientClinicInvitationResponseRequest":{"properties":{"status":{"enum":["pending","accepted","rejected","revoked","expired"],"nullable":false,"type":"string"},"token":{"nullable":false,"type":"string"}},"required":["token","status"]},"PatientContextQueueResponse":{"properties":{"age":{"example":"45","type":"integer"},"clinics":{"items":{"$ref":"#/components/schemas/ClinicResponse"},"type":"array"},"country":{"example":"Canada","type":"string"},"diet_restrictions":{"items":{"$ref":"#/components/schemas/PatientDietRestrictionResponse"},"type":"array"},"favorites":{"items":{"$ref":"#/components/schemas/FavoriteItemResponse"},"type":"array"},"image_rec_items":{"items":{"$ref":"#/components/schemas/FoodResponse"},"type":"array"},"meal_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"},"meal_name":{"enum":["breakfast","lunch","dinner","snack"],"type":"string"},"meal_note_items":{"items":{"$ref":"#/components/schemas/FoodResponse"},"type":"array"},"meal_time":{"description":"time in format hh:mm:ss","example":"17:30:00","type":"string"},"motivations":{"items":{"$ref":"#/components/schemas/PatientMotivationResponse"},"type":"array"},"ocr_items":{"items":{"$ref":"#/components/schemas/FoodResponse"},"type":"array"},"patient_flags":{"$ref":"#/components/schemas/RxFeatureFlagsResponse"},"patient_id":{"example":"123","type":"integer"},"patient_type":{"example":"diabetes","type":"string"},"similar_photo_items":{"items":{"$ref":"#/components/schemas/FoodResponse"},"type":"array"}},"required":["age","country","patient_type","clinics","diet_restrictions","motivations"]},"PatientDietRestrictionResponse":{"properties":{"comment":{"nullable":true,"type":"string"},"id":{"nullable":false,"type":"integer"},"name":{"nullable":false,"type":"string"},"name_translations":{"nullable":true,"type":"object"}},"required":["id","name"]},"PatientEmotionResponse":{"properties":{"emotion":{"nullable":false,"type":"string"},"emotion_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"},"emotion_date_time":{"format":"date-time","type":"string"},"emotion_time":{"description":"time in format hh:mm:ss","example":"17:30:00","nullable":true,"type":"string"},"id":{"type":"integer"},"note":{"nullable":true,"type":"string"},"patient_id":{"type":"integer"},"question":{"nullable":true,"type":"string"}},"required":["id","patient_id","emotion_date","emotion_time","emotion_date_time","question","emotion"]},"PatientEmotionalHealthResponse":{"properties":{"association":{"description":"association of emotional health","example":"breathing","nullable":true,"type":"string"},"emotional_health_activity_type":{"description":"selected activity type of emotional health","example":"breathing","nullable":true,"type":"string"},"emotional_health_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","nullable":false,"type":"string"},"emotional_health_time":{"description":"time in format hh:mm:ss","example":"17:30:00","nullable":false,"type":"string"},"id":{"nullable":false,"type":"integer"},"kind":{"description":"kind of emotional health","example":"breathing","nullable":true,"type":"string"},"label":{"description":"label of emotional health","example":"breathing","nullable":true,"type":"string"},"note":{"description":"note that can be added to provide additional description Max 1024 char","nullable":true,"type":"string"},"source":{"description":"source of emotional health data","nullable":true,"type":"string"},"source_id":{"description":"id of emotional health from source","nullable":true,"type":"string"},"valence":{"description":"valence of emotional health","example":"breathing","nullable":true,"type":"string"}},"required":["id","emotional_health_date","emotional_health_time"]},"PatientExerciseResponse":{"properties":{"duration_min":{"description":"time in minutes","example":"15","nullable":false,"type":"integer"},"exercise_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","nullable":false,"type":"string"},"exercise_time":{"description":"time in HH:MM:SS","example":"08:00:00","nullable":false,"type":"string"},"exercise_type":{"$ref":"#/components/schemas/ExerciseTypeInResponseEnum"},"id":{"nullable":false,"type":"integer"},"intensity":{"example":"low","nullable":true,"type":"string"},"note":{"description":"note that can be added to provide additional description Max 1024 char","nullable":true,"type":"string"},"source":{"description":"source of exercise data","example":"healthkit","nullable":true,"type":"string"},"source_id":{"description":"id of exercise from source","example":"35C09300-FAB6-460E-95B5-8EF4EC5663A3","nullable":true,"type":"string"}},"required":["id","name"]},"PatientFoodFrequencyItemsResponse":{"properties":{"both_fat":{"items":{"type":"string"},"nullable":true,"type":"array"},"fibre":{"items":{"type":"string"},"nullable":true,"type":"array"},"fruit":{"items":{"type":"string"},"nullable":true,"type":"array"},"healthy_fat":{"items":{"type":"string"},"nullable":true,"type":"array"},"omega_three":{"items":{"type":"string"},"nullable":true,"type":"array"},"plant_based":{"items":{"type":"string"},"nullable":true,"type":"array"},"protein":{"items":{"type":"string"},"nullable":true,"type":"array"},"refined_grain":{"items":{"type":"string"},"nullable":true,"type":"array"},"sugary_beverage":{"items":{"type":"string"},"nullable":true,"type":"array"},"ultra_processed":{"items":{"type":"string"},"nullable":true,"type":"array"},"unhealthy_fat":{"items":{"type":"string"},"nullable":true,"type":"array"},"vegetable":{"items":{"type":"string"},"nullable":true,"type":"array"},"whole_grain":{"items":{"type":"string"},"nullable":true,"type":"array"}},"required":["whole_grain","ultra_processed","plant_based","fibre","omega_three","protein","healthy_fat","unhealthy_fat","fruit","vegetable","sugary_beverage"]},"PatientGlucoseDataResponse":{"properties":{"timestamp":{"description":"timestamp without timezone","example":"2016-03-22T21:03:41","format":"date-time","type":"string"},"unit":{"description":"unit coinciding with the value","example":"mmol/L","type":"string"},"value":{"description":"glucose value","example":"5.2","type":"number"}},"required":["timestamp","glucose_value","glucose_value_unit"]},"PatientGuidedHealthModuleStateResponse":{"properties":{"module_completed_at":{"description":"YYYY-MM-DD HH:MM:SS in UTC","nullable":true,"type":"string"},"module_id":{"type":"string"},"module_started_at":{"description":"YYYY-MM-DD HH:MM:SS in UTC","nullable":true,"type":"string"},"state":{"additionalProperties":true,"nullable":true,"type":"object"}},"required":["module_id","module_started_at","module_completed_at"]},"PatientHealthDataTableResponse":{"properties":{"aggregation_fn":{"items":{"type":"string"},"nullable":true,"type":"array"},"category":{"type":"string"},"data_cols":{"$ref":"#/components/schemas/PatientHealthDataTableResponseDataCols"},"field":{"oneOf":[{"$ref":"#/components/schemas/PatientHealthDataTableResponseString"},{"$ref":"#/components/schemas/PatientHealthDataTableResponseStringArray"}]},"grouper":{"oneOf":[{"$ref":"#/components/schemas/PatientHealthDataTableResponseString"},{"$ref":"#/components/schemas/PatientHealthDataTableResponseStringArray"}]},"has_more_rows":{"nullable":true,"type":"boolean"},"rows":{"items":{"type":"object"},"nullable":true,"type":"array"}},"required":["category"]},"PatientHealthDataTableResponseDataCols":{"additionalProperties":true,"properties":{"group":{"items":{"type":"string"},"type":"array"}},"type":"object"},"PatientHealthDataTableResponseString":{"type":"string"},"PatientHealthDataTableResponseStringArray":{"items":{"type":"string"},"type":"array"},"PatientHealthTargetArchiveReasonEnum":{"enum":["changed","deleted"],"nullable":true,"type":"string"},"PatientHealthTargetCreatedByUserTypeEnum":{"enum":["clinician","patient","system"],"nullable":false,"type":"string"},"PatientHealthTargetDetailsResponse":{"properties":{"data":{"$ref":"#/components/schemas/PatientHealthDataTableResponse"},"target":{"$ref":"#/components/schemas/PatientHealthTargetResponse"}},"type":"object"},"PatientHealthTargetRangeTypeEnum":{"enum":["above","below","within"],"type":"string"},"PatientHealthTargetRequest":{"properties":{"archive_reason":{"nullable":true,"type":"string"},"category":{"type":"string"},"id":{"nullable":true,"type":"integer"},"is_pinned":{"nullable":true,"type":"boolean"},"meal_slots":{"description":"When target_period is meal; default breakfast, lunch, dinner","items":{"enum":["breakfast","lunch","dinner","snack"],"type":"string"},"nullable":true,"type":"array"},"patient_id":{"nullable":false,"type":"integer"},"target_aggregator":{"enum":["avg","min","max","sum","count"],"type":"string"},"target_name":{"type":"string"},"target_period":{"description":"Allowed values depend on the target category. Nutrient and water targets use week, day, breakfast, lunch, dinner, snack, and meal (same target per configured meal slot). Other categories use their category-specific supported periods.","type":"string"},"target_range_high":{"nullable":true,"type":"number"},"target_range_low":{"nullable":true,"type":"number"},"target_range_type":{"$ref":"#/components/schemas/PatientHealthTargetRangeTypeEnum"}},"type":"object"},"PatientHealthTargetResponse":{"properties":{"archive_reason":{"$ref":"#/components/schemas/PatientHealthTargetArchiveReasonEnum"},"archived_time":{"format":"date-time","nullable":true,"type":"string"},"category":{"type":"string"},"created_by_user_id":{"nullable":false,"type":"number"},"created_by_user_type":{"$ref":"#/components/schemas/PatientHealthTargetCreatedByUserTypeEnum"},"created_time":{"format":"date-time","nullable":false,"type":"string"},"id":{"nullable":true,"type":"integer"},"is_pinned":{"nullable":true,"type":"boolean"},"meal_slots":{"items":{"enum":["breakfast","lunch","dinner","snack"],"type":"string"},"nullable":true,"type":"array"},"patient_id":{"nullable":false,"type":"integer"},"target_aggregator":{"enum":["avg","min","max","sum","count"],"type":"string"},"target_name":{"type":"string"},"target_period":{"description":"Allowed values depend on the target category. Nutrient and water targets use week, day, breakfast, lunch, dinner, snack, and meal. Other categories use their category-specific supported periods.","type":"string"},"target_range_high":{"description":"upper end of the range; patient wants to stay below this value","nullable":true,"type":"number"},"target_range_low":{"description":"lower end of the range; patient wants to stay above this value","nullable":true,"type":"number"},"target_range_type":{"$ref":"#/components/schemas/PatientHealthTargetRangeTypeEnum"},"updated_time":{"format":"date-time","nullable":false,"type":"string"}},"required":["patient_id","category","target_name","target_type"],"type":"object"},"PatientHistoryQueueResponse":{"properties":{"meal_history":{"$ref":"#/components/schemas/MealHistoryResponse"},"meal_photo_queue_id":{"type":"integer"}},"required":["meal_photo_queue_id","meal_history"]},"PatientHospitalAttributes":{"properties":{"hospital_id":{"type":"integer"},"patient_custom_fields":{"type":"object"},"patient_external_id":{"type":"string"}},"required":["hospital_id","patient_external_id","patient_custom_fields"]},"PatientInsightsDailySummaryResponse":{"properties":{"has_biometric_insight":{"description":"indicates if the patient has biometric data to generate biometric insights, and the insights should be displayed","type":"boolean"},"has_meaningful_insight":{"description":"indicates if the patient has meaningful insights, and the insights should be displayed","type":"boolean"},"id":{"description":"id of the insight","example":"1","type":"integer"},"insight_body_markdown":{"description":"body of the patient insights, formatted with Markdown, in English","example":"Great job eating vegetables. Try some more fruits.","type":"string"},"insight_body_markdown_translations":{"additionalProperties":{"type":"string"},"nullable":true,"type":"object"},"insight_date":{"description":"date of the insights","example":"2021-01-01","type":"string"},"insight_summary":{"description":"one-line summary of the patient insights, in English","example":"Great job eating vegetables","type":"string"},"insight_summary_translations":{"additionalProperties":{"type":"string"},"description":"translations of the summary, keyed by locale","example":{"fr":"Bon travail en mangeant des l\u00e9gumes"},"nullable":true,"type":"object"},"insight_title":{"description":"a short title for the insight","example":"Great job eating vegetables","type":"string"},"insight_title_translations":{"additionalProperties":{"type":"string"},"description":"translations of the title, keyed by locale","example":{"fr":"Bon travail en mangeant des l\u00e9gumes"},"nullable":true,"type":"object"},"internal_reasoning":{"description":"internal reasoning for the insight, in English","type":"string"},"version":{"description":"version of the insight response","example":"1","type":"string"}},"required":["insight_date","insight_title","insight_summary","insight_body_markdown","version"]},"PatientInsightsWeeklyCoverMealInsightResponse":{"properties":{"insight":{"description":"patient-facing meal insight","type":"string"},"meal_id":{"description":"selected meal id","example":123,"type":"integer"}},"required":["meal_id","insight"],"type":"object"},"PatientInsightsWeeklyCoverPinnedNutrientInsightResponse":{"properties":{"insight":{"description":"patient-facing insight for this pinned nutrient","type":"string"},"nutrient_key":{"description":"machine-readable nutrient key","example":"fiber_g","type":"string"}},"required":["nutrient_key","insight"],"type":"object"},"PatientInsightsWeeklyCoverRecommendedChallengeResponse":{"properties":{"challenge_id":{"description":"recommended challenge id","example":"choose-better-fats","type":"string"},"challenge_name":{"description":"display name of the challenge","example":"Choose Better Fats","type":"string"},"rationale":{"description":"short rationale for the challenge recommendation","type":"string"}},"required":["challenge_id","challenge_name","rationale"],"type":"object"},"PatientInsightsWeeklyCoverSummaryResponse":{"properties":{"behavior_patterns":{"items":{"type":"string"},"type":"array"},"date_since":{"description":"window start date","example":"2025-01-01","format":"date","type":"string"},"date_until":{"description":"window end date","example":"2025-01-07","format":"date","type":"string"},"diet_quality_overview":{"description":"brief diet-quality interpretation for the week","type":"string"},"executive_summary":{"description":"3-4 sentence executive summary for the week","type":"string"},"id":{"description":"id of the weekly cover summary","example":1,"type":"integer"},"internal_reasoning":{"description":"internal reasoning for the weekly summary, in English","nullable":true,"type":"string"},"meal_insights":{"items":{"$ref":"#/components/schemas/PatientInsightsWeeklyCoverMealInsightResponse"},"type":"array"},"pinned_nutrient_insights":{"items":{"$ref":"#/components/schemas/PatientInsightsWeeklyCoverPinnedNutrientInsightResponse"},"type":"array"},"recommended_challenge":{"allOf":[{"$ref":"#/components/schemas/PatientInsightsWeeklyCoverRecommendedChallengeResponse"}],"nullable":true},"suggested_questions":{"items":{"type":"string"},"type":"array"},"version":{"description":"version of the weekly cover summary response","example":"v0.1","type":"string"}},"required":["version","date_since","date_until","executive_summary","diet_quality_overview"],"type":"object"},"PatientJoinClinicByInvitationCodeResponse":{"properties":{"clinic_name":{"nullable":true,"type":"string"},"is_already_joined":{"nullable":true,"type":"boolean"}},"required":["clinic_name"]},"PatientLongevityDataResponse":{"properties":{"avg":{"description":"average/mean","example":"5.2","type":"number"},"classification":{"description":"classification","example":"whole_grains","type":"string"},"max":{"description":"max","example":"5.2","type":"number"},"min":{"description":"min","example":"5.2","type":"number"},"std":{"description":"standard deviation","example":"1.5","type":"number"}},"required":["classification","std","avg","min","max"]},"PatientLongevityResponse":{"properties":{"date_since":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"},"date_until":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-10","type":"string"},"dates_exclude":{"description":"array of calendar dates in format YYYY-MM-DD","items":{"type":"string"},"nullable":true,"type":"array"},"scores":{"items":{"$ref":"#/components/schemas/PatientLongevityDataResponse"},"type":"array"}},"required":["date_since","date_until"]},"PatientMealEditReprocessRequest":{"properties":{"patient_meal_edit_request":{"type":"string"}},"required":["patient_meal_edit_request"]},"PatientMedicationResponse":{"properties":{"id":{"nullable":false,"type":"integer"},"medication_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","nullable":false,"type":"string"},"medication_time":{"description":"time in HH:MM:SS","example":"08:00:00","nullable":false,"type":"string"},"name":{"description":"indicate the name of the medication","type":"string"},"note":{"description":"note that can be added to provide additional description Max 1024 char","nullable":true,"type":"string"},"quantity":{"description":"typical qty of medication taken","example":"15.4","nullable":false,"type":"number"},"side_effects":{"description":"side effects of the medication Max 1024 char","nullable":true,"type":"string"},"unit":{"nullable":false,"type":"string"}},"required":["id","name"]},"PatientMetricsResponse":{"properties":{"avg_calculated_servings_breakfast":{"description":"patient_metrics data","type":"number"},"avg_calculated_servings_dinner":{"description":"patient_metrics data","type":"number"},"avg_calculated_servings_lunch":{"description":"patient_metrics data","type":"number"},"avg_calculated_servings_snack":{"description":"patient_metrics data","type":"number"},"avg_carbohydrate_g":{"description":"patient_metrics data","type":"number"},"avg_fat_g":{"description":"patient_metrics data","type":"number"},"avg_fiber_g":{"description":"patient_metrics data","type":"number"},"avg_netcarb_g":{"description":"patient_metrics data","type":"number"},"avg_serving_size_g_breakfast":{"description":"patient_metrics data","type":"number"},"avg_serving_size_g_dinner":{"description":"patient_metrics data","type":"number"},"avg_serving_size_g_lunch":{"description":"patient_metrics data","type":"number"},"avg_serving_size_g_snack":{"description":"patient_metrics data","type":"number"},"avg_sodium_mg":{"description":"patient_metrics data","type":"number"},"dash_avg_score":{"description":"patient_metrics data","type":"number"},"dash_max_score":{"description":"patient_metrics data","type":"number"},"dash_min_score":{"description":"patient_metrics data","type":"number"},"hei_avg_score":{"description":"patient_metrics data","type":"number"},"hei_max_score":{"description":"patient_metrics data","type":"number"},"hei_min_score":{"description":"patient_metrics data","type":"number"},"meal_items_logged_breakfast":{"description":"patient_metrics data","type":"number"},"meal_items_logged_dinner":{"description":"patient_metrics data","type":"number"},"meal_items_logged_lunch":{"description":"patient_metrics data","type":"number"},"meal_items_logged_snack":{"description":"patient_metrics data","type":"number"},"meals_logged_breakfast":{"description":"patient_metrics data","type":"number"},"meals_logged_dinner":{"description":"patient_metrics data","type":"number"},"meals_logged_lunch":{"description":"patient_metrics data","type":"number"},"meals_logged_snack":{"description":"patient_metrics data","type":"number"},"number_of_days_logged":{"description":"patient_metrics data","type":"number"}}},"PatientMindfulnessResponse":{"properties":{"id":{"nullable":false,"type":"integer"},"mindfulness_activity_type":{"description":"selected activity type of mindfulness","example":"breathing","nullable":true,"type":"string"},"mindfulness_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","nullable":false,"type":"string"},"mindfulness_end_time":{"description":"time in format hh:mm:ss","example":"17:30:00","nullable":false,"type":"string"},"mindfulness_start_time":{"description":"time in format hh:mm:ss","example":"17:30:00","nullable":false,"type":"string"},"note":{"description":"note that can be added to provide additional description Max 1024 char","nullable":true,"type":"string"},"source":{"description":"source of mindfulness data","nullable":true,"type":"string"},"source_id":{"description":"id of mindfulness from source","nullable":true,"type":"string"}},"required":["id","mindfulness_date","mindfulness_start_time","mindfulness_end_time"]},"PatientMotivationResponse":{"properties":{"comment":{"nullable":true,"type":"string"},"id":{"nullable":false,"type":"integer"},"name":{"nullable":false,"type":"string"},"name_translations":{"nullable":true,"type":"object"}},"required":["id","name"]},"PatientNoteQueueResponse":{"properties":{"created_time":{"format":"date-time","type":"string"},"id":{"description":"id","example":"1","type":"integer"},"note":{"description":"note logged on the patient profile","example":"really likes walnut","type":"string"},"updated_time":{"format":"date-time","type":"string"}},"required":["id","note"]},"PatientNoteResponse":{"properties":{"created_by_user_id":{"nullable":false,"type":"string"},"created_time":{"format":"date-time","type":"string"},"id":{"description":"id","example":"1","type":"integer"},"note":{"description":"note logged on the patient profile","example":"really likes walnut","type":"string"},"patient_id":{"type":"integer"},"updated_time":{"format":"date-time","type":"string"}},"required":["patient_id","note"]},"PatientNutrientDataResponse":{"properties":{"data":{"$ref":"#/components/schemas/PatientNutrientDataRowResponse","type":"object"},"name":{"enum":["overall","breakfast","lunch","dinner","snack","morning","lunchtime","afternoon","dinnertime","evening"],"nullable":false,"type":"string"}},"required":["name","data"]},"PatientNutrientDataRowResponse":{"properties":{"avg":{"nullable":true,"type":"number"},"count":{"nullable":true,"type":"number"},"pct_of_overall":{"nullable":true,"type":"number"},"stddev":{"nullable":true,"type":"number"},"sum":{"nullable":true,"type":"number"}},"required":["avg","stddev","sum","count","pct_of_overall"]},"PatientNutrientResponse":{"properties":{"date_since":{"format":"date-time","type":"string"},"date_until":{"format":"date-time","type":"string"},"frequency_high":{"items":{"type":"string"},"nullable":true,"type":"array"},"frequency_low":{"items":{"type":"string"},"nullable":true,"type":"array"},"meal_data":{"items":{"$ref":"#/components/schemas/PatientNutrientDataResponse"},"type":"array"},"n_days_with_data":{"type":"number"},"nutrient":{"type":"string"},"overall_data":{"items":{"$ref":"#/components/schemas/PatientNutrientDataResponse"},"type":"array"},"period_data":{"items":{"$ref":"#/components/schemas/PatientNutrientDataResponse"},"type":"array"},"potassium_frequency_low_w_threshold":{"items":{"type":"string"},"nullable":true,"type":"array"},"statement":{"type":"string"},"unit":{"type":"string"}},"required":["date_since","date_until","statement","nutrient","unit","n_days_with_data","frequency_high","frequency_low","meal_data","period_data","overall_data"]},"PatientNutrientsReportResponse":{"properties":{"patient_id":{"type":"integer"},"rows":{"items":{"$ref":"#/components/schemas/PatientNutrientsReportRowResponse"},"type":"array"}},"required":["patient_id","rows"]},"PatientNutrientsReportRowResponse":{"properties":{"avg_calcium_mg":{"type":"number"},"avg_calories_kcal":{"type":"number"},"avg_carbs_g":{"type":"number"},"avg_fat_g":{"type":"number"},"avg_fiber_g":{"type":"number"},"avg_iron_mg":{"type":"number"},"avg_protein_g":{"type":"number"},"avg_sodium_mg":{"type":"number"},"avg_vitamin_b12_ug":{"type":"number"},"avg_vitamin_d_iu":{"type":"number"},"avg_water_cups":{"nullable":true,"type":"number"},"frequency_fish":{"type":"number"},"frequency_fried":{"type":"number"},"frequency_grains":{"type":"number"},"frequency_processed":{"type":"number"},"frequency_protein":{"type":"number"},"frequency_redmeat":{"type":"number"},"frequency_ultraprocessed":{"type":"number"},"frequency_whole":{"type":"number"},"num_meals":{"type":"integer"},"row_name":{"type":"string"}},"required":["row_name","num_meals","avg_calories_kcal","avg_carbs_g","avg_fat_g","avg_protein_g","avg_sodium_mg","avg_fiber_g","avg_calcium_mg","avg_iron_mg","avg_vitamin_b12_ug","avg_vitamin_d_iu","frequency_whole","frequency_fish","frequency_redmeat","frequency_fried","frequency_protein","frequency_grains","frequency_processed","frequency_ultraprocessed"]},"PatientNutritionDetailsTableRow":{"properties":{"added_sugars_g":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"added_sugars_g_sum":{"type":"number"},"alcohol_g":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"alcohol_g_sum":{"type":"number"},"caffeine_mg":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"caffeine_mg_sum":{"type":"number"},"calcium_mg":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"calcium_mg_sum":{"type":"number"},"carbohydrate_g":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"carbohydrate_g_sum":{"type":"number"},"cc_additives":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"cc_additives_sum":{"type":"number"},"cc_beverage":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"cc_beverage_sum":{"type":"number"},"cc_calcium":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"cc_calcium_sum":{"type":"number"},"cc_complexcarbs":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"cc_complexcarbs_sum":{"type":"number"},"cc_cooked":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"cc_cooked_sum":{"type":"number"},"cc_fish":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"cc_fish_sum":{"type":"number"},"cc_fried":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"cc_fried_sum":{"type":"number"},"cc_fruit":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"cc_fruit_sum":{"type":"number"},"cc_gluten_free":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"cc_gluten_free_sum":{"type":"number"},"cc_grains":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"cc_grains_sum":{"type":"number"},"cc_healthy_fat":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"cc_healthy_fat_sum":{"type":"number"},"cc_high_fiber":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"cc_high_fiber_sum":{"type":"number"},"cc_legume":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"cc_legume_sum":{"type":"number"},"cc_meat":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"cc_meat_sum":{"type":"number"},"cc_non_meat_animal_protein":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"cc_non_meat_animal_protein_sum":{"type":"number"},"cc_nuts_seeds":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"cc_nuts_seeds_sum":{"type":"number"},"cc_omega_three":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"cc_omega_three_sum":{"type":"number"},"cc_plant_based":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"cc_plant_based_sum":{"type":"number"},"cc_plant_based_whole":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"cc_plant_based_whole_sum":{"type":"number"},"cc_plant_protein":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"cc_plant_protein_sum":{"type":"number"},"cc_pork":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"cc_pork_sum":{"type":"number"},"cc_poultry":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"cc_poultry_sum":{"type":"number"},"cc_processed":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"cc_processed_sum":{"type":"number"},"cc_protein":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"cc_protein_sum":{"type":"number"},"cc_raw":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"cc_raw_sum":{"type":"number"},"cc_redmeat":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"cc_redmeat_sum":{"type":"number"},"cc_shellfish":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"cc_shellfish_sum":{"type":"number"},"cc_simplecarbs":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"cc_simplecarbs_sum":{"type":"number"},"cc_sugary_beverage":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"cc_sugary_beverage_sum":{"type":"number"},"cc_supplement":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"cc_supplement_sum":{"type":"number"},"cc_ultraprocessed":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"cc_ultraprocessed_sum":{"type":"number"},"cc_unhealthy_fat":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"cc_unhealthy_fat_sum":{"type":"number"},"cc_vegetable":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"cc_vegetable_sum":{"type":"number"},"cc_whole":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"cc_whole_foods":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"cc_whole_foods_sum":{"type":"number"},"cc_whole_sum":{"type":"number"},"cholesterol_mg":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"cholesterol_mg_sum":{"type":"number"},"choline_mg":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"choline_mg_sum":{"type":"number"},"energy_kcal":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"energy_kcal_sum":{"type":"number"},"fat_g":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"fat_g_sum":{"type":"number"},"fattyacids_totalmonounsaturated_g":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"fattyacids_totalmonounsaturated_g_sum":{"type":"number"},"fattyacids_totalpolyunsaturated_g":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"fattyacids_totalpolyunsaturated_g_sum":{"type":"number"},"fattyacids_totalsaturated_g":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"fattyacids_totalsaturated_g_sum":{"type":"number"},"fattyacids_totaltrans_g":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"fattyacids_totaltrans_g_sum":{"type":"number"},"fiber_g":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"fiber_g_sum":{"type":"number"},"folate_dfe_ug":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"folate_dfe_ug_sum":{"type":"number"},"insoluble_dietary_fiber_g":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"insoluble_dietary_fiber_g_sum":{"type":"number"},"iron_mg":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"iron_mg_sum":{"type":"number"},"magnesium_mg":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"magnesium_mg_sum":{"type":"number"},"meal_count":{"description":"meal count","nullable":false,"type":"integer"},"meal_date":{"description":"meal date","nullable":true,"type":"string"},"meal_date_count":{"description":"meal date count","nullable":false,"type":"integer"},"meal_id":{"description":"meal id","nullable":true,"type":"integer"},"meal_item_count":{"description":"meal item count","nullable":false,"type":"number"},"meal_name":{"description":"meal name","nullable":true,"type":"string"},"netcarb_g":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"netcarb_g_sum":{"type":"number"},"niacin_mg":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"niacin_mg_sum":{"type":"number"},"omega_three_fatty_acids_g":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"omega_three_fatty_acids_g_sum":{"type":"number"},"pantothenic_acid_mg":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"pantothenic_acid_mg_sum":{"type":"number"},"phosphorus_mg":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"phosphorus_mg_sum":{"type":"number"},"polyols_g":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"polyols_g_sum":{"type":"number"},"potassium_mg":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"potassium_mg_sum":{"type":"number"},"protein_g":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"protein_g_sum":{"type":"number"},"riboflavin_mg":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"riboflavin_mg_sum":{"type":"number"},"selenium_mcg":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"selenium_mcg_sum":{"type":"number"},"sodium_mg":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"sodium_mg_sum":{"type":"number"},"soluble_dietary_fiber_g":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"soluble_dietary_fiber_g_sum":{"type":"number"},"sugars_g":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"sugars_g_sum":{"type":"number"},"thiamin_mg":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"thiamin_mg_sum":{"type":"number"},"vitamin_a_iu":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"vitamin_a_iu_sum":{"type":"number"},"vitamin_a_rae_ug":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"vitamin_a_rae_ug_sum":{"type":"number"},"vitamin_b12_ug":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"vitamin_b12_ug_sum":{"type":"number"},"vitamin_b6_mg":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"vitamin_b6_mg_sum":{"type":"number"},"vitamin_c_mg":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"vitamin_c_mg_sum":{"type":"number"},"vitamin_d2d3_ug":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"vitamin_d2d3_ug_sum":{"type":"number"},"vitamin_d_iu":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"vitamin_d_iu_sum":{"type":"number"},"vitamin_e_mg":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"vitamin_e_mg_sum":{"type":"number"},"vitamin_k_ug":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"vitamin_k_ug_sum":{"type":"number"},"water_g":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"water_g_sum":{"type":"number"},"zinc_mg":{"$ref":"#/components/schemas/PatientNutritionalDetailsTableAggVal","type":"object"},"zinc_mg_sum":{"type":"number"}},"required":["meal_count","meal_item_count"]},"PatientNutritionalDetailsTableAggVal":{"properties":{"sum":{"type":"number"}},"required":["sum"]},"PatientOnboardingRequest":{"properties":{"age":{"description":"age as an integer representing years","example":"54","nullable":true,"type":"number"},"birthday":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","nullable":true,"type":"string"},"diagnosis_feeling":{"nullable":true,"type":"string"},"diet_restrictions":{"items":{"$ref":"#/components/schemas/CreatePatientDietRestrictionRequest"},"nullable":true,"type":"array"},"email":{"type":"string"},"first_meal_time":{"description":"time in format hh:mm:ss","example":"17:30:00","nullable":true,"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"motivations":{"items":{"$ref":"#/components/schemas/CreatePatientMotivationRequest"},"nullable":true,"type":"array"},"password":{"type":"string"},"phone_number":{"nullable":true,"type":"string"},"sex":{"enum":["female","male","intersex","mtf_female","ftm_male"],"nullable":true,"type":"string"}},"required":["first_name","last_name","email","password"],"type":"object"},"PatientRdiImageResponse":{"properties":{"image_name":{"description":"name of the image to be used in the templates","type":"string"},"location":{"description":"online storage location of the image","nullable":true,"type":"string"},"nutrient":{"description":"nutrient","type":"string"},"scoring_bucket":{"enum":["good","warning","danger"],"type":"string"}},"required":["nutrient"]},"PatientRdiNutrientResponse":{"properties":{"avg_daily_intake":{"description":"average daily intake over the period","nullable":true,"type":"number"},"max_daily_intake":{"description":"min daily intake over the period","nullable":true,"type":"number"},"median_daily_intake":{"description":"average daily intake over the period","nullable":true,"type":"number"},"min_daily_intake":{"description":"max daily intake over the period","nullable":true,"type":"number"},"nutrient":{"description":"current nutrient","nullable":false,"type":"string"},"per_thousand_kcal":{"description":"percent per thousand kcals","nullable":true,"type":"number"},"sources":{"description":"sources of the nutrient","items":{"$ref":"#/components/schemas/PatientRdiNutrientSource"},"nullable":true,"type":"array"},"target_value_high":{"description":"low end threshold of the data set","nullable":true,"type":"number"},"target_value_low":{"description":"low end threshold of the data set","nullable":true,"type":"number"},"unit":{"description":"unit of measure for this nutrient","example":"mcg","nullable":false,"type":"string"},"value_percent_of_target":{"description":"percent of target. Null if no target (eg. polyols).","nullable":true,"type":"number"},"value_percent_threshold_high":{"description":"'value_percent_of_target' values over the high threshold should be flagged as 'high'","nullable":true,"type":"number"},"value_percent_threshold_low":{"description":"'value_percent_of_target' values below the low threshold should be flagged as 'low'","nullable":true,"type":"number"}},"required":["nutrient","unit"]},"PatientRdiNutrientSource":{"properties":{"avg":{"description":"average per day","nullable":true,"type":"number"},"count":{"description":"frequency","nullable":true,"type":"number"},"food_name":{"description":"name of the food source","nullable":false,"type":"string"},"sum":{"description":"total consumed","nullable":true,"type":"number"},"unit":{"description":"unit of measure for this nutrient","example":"mcg","nullable":false,"type":"string"}},"required":["food_name","unit","avg","sum","count"]},"PatientRdiResponse":{"properties":{"date_since":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"},"date_until":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"},"n_days_with_data":{"description":"number of dates with at least one meal logged","nullable":true,"type":"number"},"n_days_with_valid_data":{"description":"number of dates with at least one meal logged","nullable":true,"type":"number"},"nutrients":{"items":{"$ref":"#/components/schemas/PatientRdiNutrientResponse"},"type":"array"},"patient_id":{"type":"integer"},"threshold_explainer_message":{"description":"explanation of the thresholds used when flagging RDIs as high or low","nullable":true,"type":"string"}},"required":["patient_id","date_since","date_until","nutrients","n_days_with_data"]},"PatientRecipeListItemResponse":{"properties":{"additional_notes":{"example":"Some notes","nullable":true,"type":"string"},"id":{"example":"123","nullable":false,"type":"number"},"recipe":{"$ref":"#/components/schemas/RecipeResponse"}},"required":["id","recipe"],"type":"object"},"PatientRecipeListResponse":{"properties":{"id":{"example":"123","nullable":false,"type":"string"},"label":{"example":"Favorites","nullable":false,"type":"string"},"recipe_items":{"default":[],"items":{"$ref":"#/components/schemas/PatientRecipeListItemResponse"},"nullable":false,"type":"array"},"type":{"$ref":"#/components/schemas/PatientRecipeListType","example":"patient_favourites","nullable":true}},"required":["id","label","recipes"],"type":"object"},"PatientRecipeListType":{"enum":["patient_favourites","patient_to_try","patient_generated_suggestions","patient_bookmarks"]},"PatientReportAutomationPaths":{"properties":{"clinic_report_full_automation":{"nullable":true,"type":"boolean"},"deterministic_no_triggered_flags":{"type":"boolean"},"has_triggered_canonical_nutrition_quality":{"type":"boolean"},"has_triggered_custom_items":{"type":"boolean"},"judge_auto_clear_block_reason":{"nullable":true,"type":"string"},"judge_auto_clear_blocked_by_canonical_nutrition_quality":{"type":"boolean"},"judge_auto_clear_blocked_by_clinic_automation":{"type":"boolean"},"judge_auto_clear_blocked_by_custom_items":{"type":"boolean"},"judge_auto_clear_rule_id":{"type":"string"},"judge_confidence":{"format":"float","nullable":true,"type":"number"},"judge_confidence_above_threshold":{"type":"boolean"},"judge_confidence_threshold_min":{"format":"float","type":"number"}}},"PatientReportDataResponse":{"properties":{"afternoon_cals":{"description":"afternoon calories as percentage of all meals","example":"25%","type":"string"},"afternoon_cals_sum":{"description":"afternoon calories(kcal) sum","example":"100","type":"string"},"afternoon_carbs":{"description":"morning carbohydrate(g) as percentage of all meals","example":"25%","type":"string"},"afternoon_carbs_sum":{"description":"morning carbohydrate(g) sum","example":"10","type":"string"},"available_carb_report_response":{"$ref":"#/components/schemas/CarbohydrateReportResponse","nullable":true,"type":"object"},"average_breakfast_plate_image":{"description":"average breakfast plate image image location_deprecated","nullable":true,"type":"string"},"average_breakfast_plate_serv_image":{"description":"average breakfast plate image image location_deprecated","nullable":true,"type":"string"},"average_cups_beverages_per_day":{"default":0,"description":"avg number of cups of beverages per day during the period. Added 2022-08-30.","nullable":true,"type":"number"},"average_cups_water_per_day":{"description":"avg number of cups of water per day during the period","type":"number"},"average_dash":{"description":"String of Diet DASH Score","example":"4","nullable":true,"type":"string"},"average_dinner_plate_image":{"description":"average dinner plate image image location_deprecated","nullable":true,"type":"string"},"average_dinner_plate_serv_image":{"description":"average dinner plate image image location_deprecated","nullable":true,"type":"string"},"average_fats_frequency_comments":{"description":" image comments","nullable":true,"type":"string"},"average_grains_frequency_comments":{"description":" image comments","nullable":true,"type":"string"},"average_lunch_plate_image":{"description":"average lunch plate image image location_deprecated","nullable":true,"type":"string"},"average_lunch_plate_serv_image":{"description":"average lunch plate image image location_deprecated","nullable":true,"type":"string"},"average_overall_plate_image":{"description":"average dinner plate image image location_deprecated","nullable":true,"type":"string"},"average_plant_protein_frequency_comments":{"description":" image comments","nullable":true,"type":"string"},"average_plate_comments":{"description":" image comments","nullable":true,"type":"string"},"average_plate_data_response":{"$ref":"#/components/schemas/AveragePlateDataResponse","nullable":true,"type":"object"},"average_plate_image":{"description":"average plate image location_deprecated","nullable":true,"type":"string"},"average_proteins_frequency_comments":{"description":"image comments","nullable":true,"type":"string"},"average_water_frequency_comments":{"description":" image comments","nullable":true,"type":"string"},"avg_fasting_window":{"description":"string of average fasting window","type":"string"},"beverage_frequency_image":{"description":"beverage frequency image location_deprecated","nullable":true,"type":"string"},"beverage_frequency_response":{"$ref":"#/components/schemas/BeverageFrequencyResponse","nullable":true,"type":"object"},"calcium_dash_image":{"description":"calcium dash image location_deprecated","nullable":true,"type":"string"},"calcium_dash_statements":{"description":"calcium statements_deprecated","nullable":true,"type":"string"},"calorie_report_response":{"description":"added 2022-07-29, modified 2024-06-23","nullable":true,"oneOf":[{"$ref":"#/components/schemas/CarbohydrateReportResponse"},{"$ref":"#/components/schemas/DailyNutrientReportResponse"}],"type":"object"},"calories_by_period_comments":{"nullable":true,"type":"string"},"calories_by_period_statements":{"description":" recommended statement","nullable":true,"type":"string"},"calories_dir":{"description":"calories template images location","type":"string"},"carb_daily_intake_comments":{"description":" image comments","nullable":true,"type":"string"},"carb_daily_intake_image":{"description":"carb daily intake image image location_deprecated","nullable":true,"type":"string"},"carbohydrate_frequency_response":{"$ref":"#/components/schemas/CarbohydrateFrequencyResponse","nullable":true,"type":"object"},"carbohydrate_report_response":{"$ref":"#/components/schemas/CarbohydrateReportResponse","nullable":true,"type":"object"},"carbs_by_period_comments":{"nullable":true,"type":"string"},"carbs_by_period_statements":{"description":" recommended statement","nullable":true,"type":"string"},"cholesterol_dash_image":{"description":"cholesterol dash image location_deprecated","nullable":true,"type":"string"},"cholesterol_dash_statements":{"description":"cholesterol statements_deprecated","nullable":true,"type":"string"},"clinic_id":{"description":"clinic id","type":"integer"},"clinical_summary_statement":{"$ref":"#/components/schemas/SummaryStatementResponse","nullable":true,"type":"object"},"comparison_report_id":{"description":"id of report being compared","nullable":true,"type":"integer"},"comparison_star_plot_response":{"$ref":"#/components/schemas/PatientStarPlotResponse","nullable":true,"type":"object"},"date_since":{"description":"calendar date in format %B %d, %Y","example":"November 18, 2020","type":"string"},"date_until":{"description":"calendar date in format %B %d, %Y","example":"November 18, 2020","type":"string"},"dates1":{"description":"emotion record date in format YYYY-MM-DD","nullable":true,"type":"string"},"dates2":{"description":"emotion record date in format YYYY-MM-DD","nullable":true,"type":"string"},"dates3":{"description":"emotion record date in format YYYY-MM-DD","nullable":true,"type":"string"},"dates4":{"description":"emotion record date in format YYYY-MM-DD","nullable":true,"type":"string"},"dates5":{"description":"emotion record date in format YYYY-MM-DD","nullable":true,"type":"string"},"dates_exclude":{"description":"array of calendar dates in format %B %d, %Y","items":{"type":"string"},"nullable":true,"type":"array"},"decrease_dash_nutrients":{"description":"comma separated list of dash nutrients to decrease_deprecated","nullable":true,"type":"string"},"decrease_dash_statements":{"description":"dash recommendations_deprecated","nullable":true,"type":"string"},"diet_quality_score_response":{"$ref":"#/components/schemas/DietQualityScoreResponse","description":"added 2022-10-04","nullable":true,"type":"object"},"diet_restriction_responses":{"items":{"$ref":"#/components/schemas/PatientDietRestrictionResponse"},"nullable":true,"type":"array"},"diet_restrictions_statement":{"description":"summary of diet restrictions","nullable":true,"type":"string"},"diet_score_comments":{"description":" image comments","nullable":true,"type":"string"},"diet_score_image":{"description":"diet score image location_deprecated","nullable":true,"type":"string"},"dinnertime_cals":{"description":"dinner calories as percentage of all meals","example":"25%","type":"string"},"dinnertime_cals_sum":{"description":"dinner calories(kcal) sum","example":"100","type":"string"},"dinnertime_carbs":{"description":"morning carbohydrate(g) as percentage of all meals","example":"25%","type":"string"},"dinnertime_carbs_sum":{"description":"morning carbohydrate(g) sum","example":"10","type":"string"},"error_flags":{"default":[],"description":"error flags for the report","items":{"$ref":"#/components/schemas/PatientReportErrorFlag"},"nullable":true,"type":"array"},"evening_cals":{"description":"evening calories as percentage of all meals","example":"15%","type":"string"},"evening_cals_sum":{"description":"evening calories(kcal) sum","example":"100","type":"string"},"evening_carbs":{"description":"morning carbohydrate(g) as percentage of all meals","example":"15%","type":"string"},"evening_carbs_sum":{"description":"morning carbohydrate(g) sum","example":"10","type":"string"},"fat_frequency_image":{"description":"fat frequency image location_deprecated","nullable":true,"type":"string"},"fat_frequency_statements":{"description":" recommended statement","nullable":true,"type":"string"},"fat_frequency_value":{"additionalProperties":{"type":"string"},"description":"dictionary of values for fat frequency","nullable":true,"type":"object"},"fat_report_response":{"$ref":"#/components/schemas/CarbohydrateReportResponse","nullable":true,"type":"object"},"feelingsStatement":{"description":"patient emotion feelings statement","example":"happy","type":"string"},"fiber_by_period_response":{"$ref":"#/components/schemas/NutrientByPeriodResponse","nullable":true,"type":"object"},"fiber_dash_image":{"description":"fiber dash image location_deprecated","nullable":true,"type":"string"},"fiber_dash_statements":{"description":"fiber statements_deprecated","nullable":true,"type":"string"},"fiber_report_response":{"$ref":"#/components/schemas/CarbohydrateReportResponse","nullable":true,"type":"object"},"fibre_statements":{"description":" recommended statement","nullable":true,"type":"string"},"fibre_value":{"description":"average grams of fibre per day","type":"string"},"file_location":{"description":"file location in s3","type":"string"},"first_name":{"description":"first name","example":"Jane","type":"string"},"food_dump_response":{"$ref":"#/components/schemas/FoodDumpResponse","nullable":true,"type":"object"},"fruit_frequency_statements":{"description":" recommended statement","nullable":true,"type":"string"},"fruit_servings_per_day":{"description":" servings of fruit per day","nullable":true,"type":"string"},"fruit_vegetable_serv_statements":{"description":" recommended statement","nullable":true,"type":"string"},"fruit_vegetable_statements":{"description":" recommended statement","nullable":true,"type":"string"},"fruit_vegetable_value":{"description":"the percentage of fruit and vegetables on their plate","nullable":true,"type":"string"},"ghg_equivalent_kg_image":{"description":"ghg equivalent image location_deprecated","nullable":true,"type":"string"},"ghg_equivalent_kg_statements":{"description":"image comments","nullable":true,"type":"string"},"ghg_equivalent_kg_value":{"description":"ghg_equivalent_value","nullable":true,"type":"number"},"gi_frequency_statements":{"description":" recommended statement","nullable":true,"type":"string"},"gi_number_valid":{"description":"number of meal items with valid GI index","nullable":true,"type":"string"},"glycemic_index_food_comments":{"nullable":true,"type":"string"},"glycemic_index_frequency_comments":{"description":" image comments","nullable":true,"type":"string"},"glycemic_index_frequency_image":{"description":"glycemic index frequency image image location_deprecated","nullable":true,"type":"string"},"glycemic_index_frequency_response":{"$ref":"#/components/schemas/GlycemicIndexFrequencyResponse","nullable":true,"type":"object"},"glycemic_index_value":{"additionalProperties":{"type":"string"},"description":"dictionary of values for glycemic index data","nullable":true,"type":"object"},"goal_statement":{"description":"summary of goal progress during the report period","type":"string"},"goals":{"items":{"$ref":"#/components/schemas/GoalExtendedWeeklyReportResponse"},"type":"array"},"good_dash_nutrients":{"description":"comma separated list of good dash scores_deprecated","nullable":true,"type":"string"},"good_dash_statements":{"description":"dash recommendations_deprecated","nullable":true,"type":"string"},"grain_frequency_image":{"description":"grain frequency image location_deprecated","nullable":true,"type":"string"},"grain_frequency_statement_list":{"description":"list of grain statements","items":{"type":"string"},"nullable":true,"type":"array"},"grain_frequency_statements":{"description":" recommended statement","nullable":true,"type":"string"},"grain_frequency_value":{"additionalProperties":{"type":"string"},"description":"dictionary of values for grain frequency","nullable":true,"type":"object"},"high_gi1":{"description":"meal item name with high GI index","nullable":true,"type":"string"},"high_gi2":{"description":"meal item name with high GI index","nullable":true,"type":"string"},"high_gi3":{"description":"meal item name with high GI index","nullable":true,"type":"string"},"high_gi4":{"description":"meal item name with high GI index","nullable":true,"type":"string"},"high_gi5":{"description":"meal item name with high GI index","nullable":true,"type":"string"},"increase_dash_nutrients":{"description":"comma separated list of dash nutrients to increase_deprecated","nullable":true,"type":"string"},"increase_dash_statements":{"description":"dash recommendations_deprecated","nullable":true,"type":"string"},"lang":{"description":"language","example":"en","type":"string"},"last_name":{"description":"last name","example":"Doe","type":"string"},"local_dir":{"description":"local images location","type":"string"},"logo1":{"description":"logo location url","type":"string"},"logo2":{"description":"logo location url","type":"string"},"logo3":{"description":"logo location url","type":"string"},"logos_dir":{"description":"logos template images location","type":"string"},"longest_fasting_window":{"description":"string of longest fasting window","type":"string"},"low_gi1":{"description":"meal item name with low GI index","nullable":true,"type":"string"},"low_gi2":{"description":"meal item name with low GI index","nullable":true,"type":"string"},"low_gi3":{"description":"meal item name with low GI index","nullable":true,"type":"string"},"low_gi4":{"description":"meal item name with low GI index","nullable":true,"type":"string"},"low_gi5":{"description":"meal item name with low GI index","nullable":true,"type":"string"},"lunchtime_cals":{"description":"lunchtime calories as percentage of all meals","example":"25%","type":"string"},"lunchtime_cals_sum":{"description":"lunchtime calories(kcal) sum","example":"100","type":"string"},"lunchtime_carbs":{"description":"morning carbohydrate(g) as percentage of all meals","example":"25%","type":"string"},"lunchtime_carbs_sum":{"description":"morning carbohydrate(g) sum","example":"10","type":"string"},"macro_cal_breakdown":{"$ref":"#/components/schemas/MacroCalBreakdownResponse","description":"calorie breakdown by macro. Added 2022-12-27","nullable":true,"type":"object"},"macro_statements":{"description":" recommended statement","nullable":true,"type":"string"},"macro_value":{"additionalProperties":true,"description":"dictionary of values for each macro","nullable":true,"type":"object"},"macronutrient_distribution_comments":{"description":" image comments","nullable":true,"type":"string"},"macronutrient_distribution_image":{"description":"macronutrient distribution image image location, deprecated","nullable":true,"type":"string"},"magnesium_dash_image":{"description":"magnesium dash image location_deprecated","nullable":true,"type":"string"},"magnesium_dash_statements":{"description":"magnesium statements_deprecated","nullable":true,"type":"string"},"meal_dates_included":{"default":[],"items":{"type":"string"},"nullable":true,"type":"array"},"meal_frequency_response":{"$ref":"#/components/schemas/MealFrequencyResponse","nullable":true,"type":"object"},"median_fasting_window":{"description":"string of median fasting window","type":"string"},"mediterranean_score_response":{"$ref":"#/components/schemas/MediterraneanScoreResponse","description":"added 2024-01-10","nullable":true,"type":"object"},"micronutrient_bubble_summary_statement":{"description":"summary statement for the section","nullable":true,"type":"string"},"micronutrient_trends_comments":{"description":" image comments","nullable":true,"type":"string"},"micronutrient_trends_image":{"description":"micronutrient trends image image location_deprecated","nullable":true,"type":"string"},"mind_score_response":{"$ref":"#/components/schemas/MindScoreResponse","description":"added 2022-11-15","nullable":true,"type":"object"},"morning_cals":{"description":"morning calories as percentage of all meals","example":"10%","type":"string"},"morning_cals_sum":{"description":"morning calories(kcal) sum","example":"100","type":"string"},"morning_carbs":{"description":"morning carbohydrate(g) as percentage of all meals","example":"10%","type":"string"},"morning_carbs_sum":{"description":"morning carbohydrate(g) sum","example":"10","type":"string"},"motivation_responses":{"items":{"$ref":"#/components/schemas/PatientMotivationResponse"},"nullable":true,"type":"array"},"motivations_statement":{"description":"summary of motivations","nullable":true,"type":"string"},"n_days_with_data":{"description":"number of days with at least one meal logged","type":"string"},"n_days_with_valid_data":{"description":"number of days with at least one meal logged","type":"string"},"n_meal_items":{"description":"number of meal items included in the report","nullable":true,"type":"integer"},"n_meals":{"description":"number of meals included in the report","nullable":true,"type":"integer"},"name1":{"description":"logo name","type":"string"},"name2":{"description":"logo name","type":"string"},"name3":{"description":"logo name","type":"string"},"netcarb_report_response":{"$ref":"#/components/schemas/CarbohydrateReportResponse","nullable":true,"type":"object"},"notes1":{"description":"emotion notes","nullable":true,"type":"string"},"notes2":{"description":"emotion notes","nullable":true,"type":"string"},"notes3":{"description":"emotion notes","nullable":true,"type":"string"},"notes4":{"description":"emotion notes","nullable":true,"type":"string"},"notes5":{"description":"emotion notes","nullable":true,"type":"string"},"notesStatement":{"description":"patient emotion notes","example":"note1","type":"string"},"nutrient_multipliers":{"description":"applied nutrient multipliers. Added 2022-10-27","nullable":true,"type":"object"},"nutrients_summary_comments":{"nullable":true,"type":"string"},"omega_3_statement":{"description":"list of omega-3 containing foods","nullable":true,"type":"string"},"patient_cgm_whole_summary_response":{"$ref":"#/components/schemas/PatientCgmWholeSummaryResponse","description":"added 2025-04-14","nullable":true,"type":"object"},"patient_longevity_response":{"$ref":"#/components/schemas/PatientLongevityResponse","description":"added 2022-09-28","nullable":true,"type":"object"},"patient_rdi_images":{"items":{"$ref":"#/components/schemas/PatientRdiImageResponse"},"nullable":true,"type":"array"},"patient_rdi_response":{"$ref":"#/components/schemas/PatientRdiResponse","nullable":true,"type":"object"},"patient_report_id":{"description":"report id","nullable":true,"type":"integer"},"patient_servings_metrics_response":{"$ref":"#/components/schemas/PatientServingsMetricsResponse","nullable":true,"type":"object"},"patient_star_plot_response":{"$ref":"#/components/schemas/PatientStarPlotResponse","nullable":true,"type":"object"},"patient_supplement_responses":{"items":{"$ref":"#/components/schemas/PatientSupplementResponse"},"nullable":true,"type":"array"},"plant_based_frequency_image":{"description":"plant-based frequency image location_deprecated","nullable":true,"type":"string"},"plant_based_frequency_statements":{"description":" recommended statement","nullable":true,"type":"string"},"plant_based_frequency_value":{"additionalProperties":{"type":"string"},"description":"dictionary of values for plant-based frequency","nullable":true,"type":"object"},"potassium_dash_image":{"description":"potassium dash image location_deprecated","nullable":true,"type":"string"},"potassium_dash_statements":{"description":"potassium statements_deprecated","nullable":true,"type":"string"},"potassium_heatmap_image":{"description":"filename of the potassium image","nullable":true,"type":"string"},"potassium_heatmap_statement":{"description":"support statement to the heatmap","nullable":true,"type":"string"},"potassium_response":{"$ref":"#/components/schemas/PatientNutrientResponse","nullable":true,"type":"object"},"protein_dash_image":{"description":"protein dash image location_deprecated","nullable":true,"type":"string"},"protein_dash_statements":{"description":"protein statements_deprecated","nullable":true,"type":"string"},"protein_frequency_image":{"description":"protein frequency image location_deprecated","nullable":true,"type":"string"},"protein_frequency_statements":{"description":" recommended statement","nullable":true,"type":"string"},"protein_frequency_value":{"additionalProperties":{"type":"string"},"description":"dictionary of values for protein frequency","nullable":true,"type":"object"},"protein_report_response":{"$ref":"#/components/schemas/CarbohydrateReportResponse","nullable":true,"type":"object"},"saturated_fat_dash_image":{"description":"saturated fat dash image location_deprecated","nullable":true,"type":"string"},"saturated_fat_dash_statements":{"description":"saturated fat statements_deprecated","nullable":true,"type":"string"},"shortest_fasting_window":{"description":"string of shortest fasting window","type":"string"},"sodium_dash_image":{"description":"sodium dash image location_deprecated","nullable":true,"type":"string"},"sodium_dash_statements":{"description":"sodium statements_deprecated","nullable":true,"type":"string"},"star_plot_image":{"description":"star plot image location_deprecated","nullable":true,"type":"string"},"summary_statement":{"$ref":"#/components/schemas/SummaryStatementResponse","nullable":true,"type":"object"},"supplements":{"description":"all supplements as a string with commas separating each property and semi-colons separating each supplement. Properties: name, unit amount, unit label, frequency, notes","example":"calcium,155,mg,4 capsules a day,;magnesium,400,mg,1 capsule a day,notes","type":"string"},"total_fat_dash_image":{"description":"total fat dash image location_deprecated","nullable":true,"type":"string"},"total_fat_dash_statements":{"description":"total fat statements_deprecated","nullable":true,"type":"string"},"total_fats_value":{"description":"macronutrients total fat value","nullable":true,"type":"string"},"ultra_processed_frequency_image":{"description":"ultra-processed frequency image location_deprecated","nullable":true,"type":"string"},"ultra_processed_frequency_statements":{"description":" recommended statement","nullable":true,"type":"string"},"ultra_processed_frequency_value":{"additionalProperties":{"type":"string"},"description":"dictionary of values for ultra_processed frequency","nullable":true,"type":"object"},"user_created_time":{"description":"created time on user table","format":"date-time","type":"string"},"vegetable_frequency_statements":{"description":" recommended statement","nullable":true,"type":"string"},"vegetable_servings_per_day":{"description":" servings of vegetables per day","nullable":true,"type":"string"},"water_frequency_image":{"description":"water frequency image location_deprecated","nullable":true,"type":"string"}},"required":["date_since","date_until","file_location"]},"PatientReportErrorField":{"properties":{"field":{"description":"field name","type":"string"},"object_class":{"description":"class name.","type":"string"},"value":{"description":"value of field","type":"string"}}},"PatientReportErrorFlag":{"properties":{"fields":{"description":"fields related to the error","items":{"$ref":"#/components/schemas/PatientReportErrorField"},"type":"array"},"level":{"description":"severity of error","example":"0/10/20/30/40/50","type":"integer"},"message":{"description":"error message","type":"string"},"type":{"description":"type of error","example":"nutrient","type":"string"}}},"PatientReportImageResponse":{"properties":{"location":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"patient_report_id":{"type":"integer"},"report_image_id":{"type":"integer"},"report_section":{"example":"nutrients_summary","type":"string"}},"required":["report_image_id"]},"PatientReportJudgeFinding":{"properties":{"detail":{"description":"optional extra detail","type":"string"},"meal_item_ids_by_meal_id":{"additionalProperties":{"items":{"type":"integer"},"type":"array"},"description":"meal_id string -> meal_item ids in that meal","type":"object"},"message":{"description":"short finding message","type":"string"},"severity":{"description":"low|medium|high severity estimate","type":"string"},"theme":{"description":"finding theme, e.g. sizing or history_consistency","type":"string"}}},"PatientReportJudgeQuality":{"properties":{"confidence":{"description":"0..1 confidence for overall_pass","format":"float","type":"number"},"dimension_passes":{"additionalProperties":{"type":"boolean"},"description":"pass/fail per rubric dimension id","type":"object"},"overall_pass":{"description":"aggregate pass across rubric dimensions","type":"boolean"}}},"PatientReportJudgeResponse":{"properties":{"confidence":{"description":"mirror of quality.confidence","format":"float","type":"number"},"findings":{"items":{"$ref":"#/components/schemas/PatientReportJudgeFinding"},"type":"array"},"quality":{"$ref":"#/components/schemas/PatientReportJudgeQuality"},"report_quality_pass":{"description":"mirror of quality.overall_pass","type":"boolean"},"summary":{"description":"clinician-facing judge narrative","type":"string"}}},"PatientReportLogResponse":{"properties":{"comparison_report_id":{"description":"id of report being compared","nullable":true,"type":"integer"},"created_time":{"format":"date-time","nullable":true,"type":"string"},"date_since":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","nullable":true,"type":"string"},"date_until":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","nullable":true,"type":"string"},"id":{"type":"integer"},"is_processed":{"description":"true if the report generation attempt has been made","type":"boolean"},"is_sent":{"description":"true if the report has been sent","type":"boolean"},"patient_id":{"type":"integer"},"patient_report_id":{"type":"integer"},"patient_subscription_id":{"description":"text to be provided by the clinician","nullable":true,"type":"string"},"processed_time":{"format":"date-time","nullable":true,"type":"string"},"report_template":{"default":[],"description":"list of report sections","items":{"type":"string"},"type":"array"},"sent_time":{"format":"date-time","nullable":true,"type":"string"},"to_process_time":{"format":"date-time","type":"string"},"to_send_time":{"format":"date-time","type":"string"},"updated_time":{"format":"date-time","nullable":true,"type":"string"}},"required":["patient_id","patient_subscription_id","date_since","date_until","to_send_time","is_sent","to_process_time","is_processed","report_template"]},"PatientReportResponse":{"properties":{"clinic_id":{"type":"integer"},"clinic_name":{"type":"string"},"comp_date_since":{"description":"comparison calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"},"comp_date_until":{"description":"comparison calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"},"created_by_user_id":{"nullable":true,"type":"integer"},"created_time":{"format":"date-time","type":"string"},"date_since":{"description":"reference calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"},"date_until":{"description":"reference calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"},"dates_exclude":{"description":"calendar dates in format YYYY-MM-DD","example":["2019-01-02"],"items":{"type":"string"},"type":"array"},"diet_restrictions":{"description":"diet restrictions for the report","items":{"$ref":"#/components/schemas/PatientDietRestrictionResponse"},"type":"array"},"error_flags":{"default":[],"description":"error flags for the report","items":{"$ref":"#/components/schemas/PatientReportErrorFlag"},"nullable":true,"type":"array"},"hospital_id":{"type":"integer"},"ignore_error_flags":{"example":false,"nullable":false,"type":"boolean"},"is_archived":{"example":false,"type":"boolean"},"is_deleted":{"example":false,"type":"boolean"},"is_read_only":{"description":"true after sent","example":false,"type":"boolean"},"patient_cgm_entry_id":{"type":"integer"},"patient_country_of_residence":{"type":"string"},"patient_id":{"type":"integer"},"patient_is_priority":{"type":"boolean"},"patient_report_id":{"type":"integer"},"patient_report_summary_blocks":{"default":[],"description":"comments and tips for the report","items":{"$ref":"#/components/schemas/PatientReportSummaryBlockResponse"},"type":"array"},"report_automation_paths":{"$ref":"#/components/schemas/PatientReportAutomationPaths","description":"automation eligibility snapshot when available","nullable":true},"report_date":{"format":"date","type":"string"},"report_judge":{"$ref":"#/components/schemas/PatientReportJudgeResponse","description":"LLM judge output when available","nullable":true},"report_sent_time":{"format":"date-time","type":"string"},"report_type":{"default":"default","description":"base template file type","type":"string"},"sections":{"default":["summary","calories_by_period","carbs_by_period","average_plate","macronutrient_distribution","micronutrient_trends","diet_score","nutrients_summary","carb_daily_intake","GI_food_list","glycemic_index_frequency","average_fats_frequency","average_water_frequency","average_grains_frequency","average_proteins_frequency"],"items":{"type":"string"},"nullable":true,"type":"array"},"status":{"description":"status of report","type":"string"},"updated_time":{"format":"date-time","type":"string"}},"required":["patient_report_id","patient_id"]},"PatientReportSecureLinkResponse":{"properties":{"date_since":{"description":"reference calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"},"date_until":{"description":"reference calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"},"patient_id":{"type":"integer"},"patient_report_id":{"type":"integer"},"patient_subscription_id":{"description":"patient subscription id","type":"integer"},"report_sent_time":{"description":"time report was sent","format":"date-time","type":"string"},"url":{"description":"secure link to report","type":"string"}},"required":["patient_id","patient_report_id","url","date_since","date_until"]},"PatientReportSummaryBlockResponse":{"properties":{"evidence":{"default":[],"description":"reference url for supporting evidence","items":{"type":"string"},"type":"array"},"patient_report_id":{"type":"integer"},"report_section":{"example":"summary","type":"string"},"summary_block_id":{"type":"integer"},"summary_text":{"description":"text to be provided by the clinician","type":"string"}},"required":["summary_block_id"]},"PatientReportTableRow":{"properties":{"clinic_id":{"example":123,"nullable":false,"type":"number"},"clinic_name":{"nullable":false,"type":"string"},"created_time":{"example":"2020-01-01T00:00:00Z","format":"date-time","nullable":false,"type":"string"},"custom_item_count":{"example":0,"nullable":false,"type":"number"},"date_since":{"format":"date","type":"string"},"date_until":{"format":"date","type":"string"},"error_flags":{"items":{"$ref":"#/components/schemas/PatientReportErrorFlag"},"nullable":false,"type":"array"},"ignore_error_flags":{"example":false,"nullable":false,"type":"boolean"},"is_archived":{"example":false,"nullable":false,"type":"boolean"},"is_auto_generated":{"example":false,"nullable":true,"type":"boolean"},"is_deleted":{"example":false,"nullable":false,"type":"boolean"},"is_read_only":{"example":false,"nullable":false,"type":"boolean"},"meal_count":{"example":0,"nullable":false,"type":"number"},"meal_item_count":{"example":0,"nullable":false,"type":"number"},"patient_country_of_residence":{"nullable":true,"type":"string"},"patient_id":{"example":123,"nullable":false,"type":"number"},"patient_is_priority":{"example":true,"nullable":false,"type":"boolean"},"patient_locale":{"nullable":true,"type":"string"},"patient_report_id":{"example":123,"nullable":false,"type":"number"},"report_automation_paths":{"$ref":"#/components/schemas/PatientReportAutomationPaths","description":"automation eligibility snapshot when available","nullable":true},"report_date":{"example":"2020-01-01T00:00:00Z","format":"date-time","nullable":true,"type":"string"},"report_judge":{"$ref":"#/components/schemas/PatientReportJudgeResponse","description":"LLM judge output when available","nullable":true},"status":{"example":"draft","nullable":false,"type":"string"},"updated_time":{"example":"2020-01-01T00:00:00Z","format":"date-time","nullable":false,"type":"string"}},"required":["id","patient_report_id","patient_id","patient_is_priority","patient_country_of_residence","clinic_id","clinic_name","report_date","error_flags","ignore_error_flags","status","date_since","date_until","meal_count","meal_item_count","custom_item_count","is_read_only","is_archived","is_deleted","created_time","updated_time"]},"PatientResponse":{"properties":{"birthday":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"},"country_of_residence":{"nullable":true,"type":"string"},"created_time":{"format":"date-time","type":"string"},"diagnosis_feeling":{"nullable":true,"type":"string"},"diet_restrictions":{"items":{"$ref":"#/components/schemas/PatientDietRestrictionResponse"},"type":"array"},"email":{"type":"string"},"email_verified":{"type":"boolean"},"first_meal_time":{"format":"time","nullable":true,"type":"string"},"first_name":{"type":"string"},"flags":{"$ref":"#/components/schemas/RxFeatureFlagsResponse","type":"object"},"flags_raw":{"additionalProperties":true,"type":"object"},"id":{"type":"integer"},"is_active":{"type":"boolean"},"is_gender_enabled":{"default":true,"nullable":true,"type":"boolean"},"is_priority":{"type":"boolean"},"is_registered":{"type":"boolean"},"is_shown_carbs":{"default":false,"deprecated":true,"nullable":false,"type":"boolean"},"last_name":{"type":"string"},"locale":{"nullable":true,"type":"string"},"meal_time_breakfast":{"format":"time","nullable":true,"type":"string"},"meal_time_dinner":{"format":"time","nullable":true,"type":"string"},"meal_time_lunch":{"format":"time","nullable":true,"type":"string"},"motivations":{"items":{"$ref":"#/components/schemas/PatientMotivationResponse"},"type":"array"},"patient_type":{"enum":["research","collaboration","wellness","obesity","diabetes","metabolic syndrome","weight loss","migraine","gastroesophageal reflux","gi discomfort","vertigo","sleep apnea","dexcom","rxlife","menopause"],"nullable":true,"type":"string"},"phone_number":{"nullable":true,"type":"string"},"recent_meal_context":{"items":{"type":"string"},"type":"array"},"sex":{"enum":["female","male","intersex","mtf_female","ftm_male"],"nullable":true,"type":"string"},"state":{"nullable":true,"type":"string"},"subscriptions":{"items":{"$ref":"#/components/schemas/PatientSubscriptionResponse"},"type":"array"},"tracking_start_date":{"type":"string"},"updated_time":{"format":"date-time","type":"string"},"usage_summary":{"$ref":"#/components/schemas/PatientUsageSummary","type":"object"},"use_data_screen":{"default":true,"nullable":true,"type":"boolean"},"use_exercise":{"default":false,"nullable":true,"type":"boolean"},"use_fast_entry_audio":{"type":"boolean"},"use_fast_entry_photo":{"type":"boolean"},"use_fast_entry_text":{"type":"boolean"},"use_local_photo":{"type":"boolean"},"use_medication":{"default":false,"nullable":true,"type":"boolean"},"use_question":{"default":true,"nullable":true,"type":"boolean"},"use_search_by_photo":{"type":"boolean"},"use_search_by_text":{"type":"boolean"},"use_sleep":{"default":true,"nullable":true,"type":"boolean"},"zipcode":{"nullable":true,"type":"string"}},"required":["id","first_name","last_name","email","email_verified","is_active","is_registered","tracking_start_date","created_time","updated_time","flags"]},"PatientServingsMetricsResponse":{"properties":{"data":{"properties":{"fruit":{"nullable":false,"type":"number"},"high_fiber":{"nullable":false,"type":"number"},"legume":{"nullable":false,"type":"number"},"omega_three":{"nullable":false,"type":"number"},"plant_based":{"nullable":false,"type":"number"},"ultra_processed":{"nullable":false,"type":"number"},"vegetable":{"nullable":false,"type":"number"},"whole":{"description":"whole grains","nullable":false,"type":"number"}},"required":["whole","ultra_processed","plant_based","high_fiber","fruit","vegetable","legume","omega_three"],"type":"object"},"meal_dates_included":{"default":[],"items":{"type":"string"},"nullable":true,"type":"array"}},"required":["data","meal_dates_included"]},"PatientShoppingItemCollectionResponse":{"properties":{"archived_time":{"format":"date-time","nullable":true,"type":"string"},"created_time":{"format":"date-time","nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"display_name":{"nullable":false,"type":"string"},"id":{"nullable":false,"type":"integer"},"kind":{"$ref":"#/components/schemas/ShoppingItemCollectionKind"},"metadata":{"nullable":true,"type":"object"},"name":{"nullable":false,"type":"string"},"patient_id":{"nullable":false,"type":"integer"},"updated_time":{"format":"date-time","nullable":true,"type":"string"}},"required":["id","patient_id","kind","name","display_name"],"type":"object"},"PatientShoppingItemResponse":{"properties":{"added_by_user_id":{"nullable":true,"type":"integer"},"archived_time":{"format":"date-time","nullable":true,"type":"string"},"calculated_servings":{"nullable":true,"type":"number"},"category_label":{"nullable":true,"type":"string"},"collection_id":{"nullable":false,"type":"integer"},"created_time":{"format":"date-time","nullable":true,"type":"string"},"custom_item":{"nullable":true,"type":"boolean"},"food_name":{"nullable":false,"type":"string"},"food_name_alias":{"nullable":true,"type":"string"},"food_name_alias_translations":{"nullable":true,"type":"object"},"food_name_translations":{"nullable":true,"type":"object"},"food_photo_url":{"nullable":true,"type":"string"},"global_order":{"nullable":true,"type":"integer"},"id":{"nullable":false,"type":"integer"},"net_serving_size_g":{"nullable":true,"type":"number"},"notes":{"nullable":true,"type":"string"},"nutrient_snapshot":{"$ref":"#/components/schemas/NutrientEstimatesRequest","nullable":true},"origin_id":{"nullable":true,"type":"string"},"origin_type":{"$ref":"#/components/schemas/ShoppingItemOriginType","nullable":true},"package_size_amount":{"nullable":true,"type":"number"},"package_size_unit_label":{"nullable":true,"type":"string"},"position":{"nullable":true,"type":"integer"},"preparation_method":{"$ref":"#/components/schemas/PreparationMethodEnum","nullable":true},"quantity":{"nullable":false,"type":"integer"},"serving_unit_amount":{"nullable":true,"type":"number"},"serving_unit_label":{"nullable":true,"type":"string"},"serving_unit_label_translations":{"nullable":true,"type":"object"},"servings":{"nullable":true,"type":"number"},"status":{"$ref":"#/components/schemas/ShoppingItemStatus"},"tags":{"items":{"type":"string"},"nullable":true,"type":"array"},"updated_time":{"format":"date-time","nullable":true,"type":"string"}},"required":["id","collection_id","food_name"],"type":"object"},"PatientShoppingItemSuggestionResponse":{"properties":{"base_item_id":{"nullable":true,"type":"integer"},"calculated_servings":{"nullable":true,"type":"number"},"category_label":{"nullable":true,"type":"string"},"cost_per_unit":{"nullable":true,"type":"number"},"created_time":{"format":"date-time","nullable":true,"type":"string"},"custom_item":{"nullable":true,"type":"boolean"},"food_name":{"nullable":false,"type":"string"},"food_name_alias":{"nullable":true,"type":"string"},"food_name_alias_translations":{"nullable":true,"type":"object"},"food_name_translations":{"nullable":true,"type":"object"},"food_photo_url":{"nullable":true,"type":"string"},"id":{"nullable":false,"type":"integer"},"kind":{"$ref":"#/components/schemas/ShoppingItemSuggestionKind"},"net_serving_size_g":{"nullable":true,"type":"number"},"note":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"origin_type":{"$ref":"#/components/schemas/ShoppingItemOriginType","nullable":true},"patient_id":{"nullable":true,"type":"integer"},"preparation_method":{"$ref":"#/components/schemas/PreparationMethodEnum","nullable":true},"reason_code":{"nullable":true,"type":"string"},"reason_text":{"nullable":true,"type":"string"},"serving_unit_amount":{"nullable":true,"type":"number"},"serving_unit_label":{"nullable":true,"type":"string"},"serving_unit_label_translations":{"nullable":true,"type":"object"},"servings":{"nullable":true,"type":"number"},"status":{"$ref":"#/components/schemas/ShoppingItemSuggestionStatus"},"tags":{"items":{"type":"string"},"nullable":true,"type":"array"},"target_collection_id":{"nullable":true,"type":"integer"},"target_collection_kind":{"$ref":"#/components/schemas/ShoppingItemCollectionKind","nullable":true},"updated_time":{"format":"date-time","nullable":true,"type":"string"}},"required":["id","patient_id","kind","food_name"],"type":"object"},"PatientSignupWebhookResponse":{"properties":{"patient_id":{"description":"The created or attached patient","type":"integer"}},"required":["patient_id"],"type":"object"},"PatientSleepDataResponse":{"properties":{"sleep_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","nullable":false,"type":"string"},"sleep_duration_min":{"description":"time in minutes","example":"15","nullable":false,"type":"integer"},"sleep_end_date_time":{"description":"datetime in format YYYY-MM-DD HH:MM:SS","nullable":false,"type":"string"},"sleep_entries_in_date":{"default":[],"description":"list of sleep entries in the date","items":{"$ref":"#/components/schemas/PatientSleepResponse"},"type":"array"},"sleep_start_date_time":{"description":"datetime in format YYYY-MM-DD HH:MM:SS","nullable":false,"type":"string"}},"required":["sleep_date","sleep_start_date_time","sleep_end_date_time","sleep_duration_min","sleep_entries_in_date"]},"PatientSleepResponse":{"properties":{"id":{"nullable":false,"type":"integer"},"note":{"description":"note that can be added to provide additional description Max 1024 char","nullable":true,"type":"string"},"sleep_end_date_time":{"description":"datetime in format YYYY-MM-DD HH:MM:SS","nullable":false,"type":"string"},"sleep_group_start_date_time":{"description":"datetime in format YYYY-MM-DD HH:MM:SS","nullable":false,"type":"string"},"sleep_start_date_time":{"description":"datetime in format YYYY-MM-DD HH:MM:SS","nullable":false,"type":"string"},"sleep_type":{"$ref":"#/components/schemas/SleepTypeInRequestEnum"},"source":{"description":"source of sleep data","nullable":true,"type":"string"},"source_id":{"description":"id of sleep from source","nullable":true,"type":"string"}},"required":["id","sleep_start_date_time","sleep_end_date_time","sleep_type"]},"PatientStarPlotResponse":{"properties":{"calorie_ratio":{"type":"number"},"doing_right_statement":{"items":{"type":"string"},"nullable":true,"type":"array"},"fat_ratio_pct_of_target":{"type":"number"},"fiber_pct_of_target":{"type":"number"},"food_frequency_items":{"$ref":"#/components/schemas/PatientFoodFrequencyItemsResponse","nullable":true,"type":"object"},"fruit_pct_of_target":{"type":"number"},"header_statement":{"nullable":true,"type":"string"},"healthy_bev_pct_of_total":{"type":"number"},"healthy_fat_kcal_pct_of_total":{"description":"added 2022-08-31","type":"number"},"non_red_meat_pct_of_protein":{"type":"number"},"patient_id":{"type":"integer"},"plant_based_pct":{"type":"number"},"poultry_frequency_weekly":{"type":"number"},"redmeat_frequency_weekly":{"type":"number"},"ultra_processed_pct_of_total":{"type":"number"},"ultraprocessed_pct_of_total":{"type":"number"},"unhealthy_fat_kcal_pct_of_total":{"type":"number"},"vegetable_pct_of_target":{"type":"number"},"whole_foods_and_low_processed_foods":{"type":"number"},"whole_grain_pct":{"type":"number"}},"required":["patient_id","calorie_ratio","whole_grain_pct","fat_ratio_pct_of_target","fiber_pct_of_target","vegetable_pct_of_target","fruit_pct_of_target","non_red_meat_pct_of_protein","plant_based_pct","whole_foods_and_low_processed_foods","healthy_bev_pct_of_total","unhealthy_fat_kcal_pct_of_total","redmeat_frequency_weekly","poultry_frequency_weekly","ultraprocessed_pct_of_total"]},"PatientStatsResponse":{"properties":{"patient_id":{"type":"integer"},"total_days_logged":{"type":"integer"},"total_meals_logged":{"type":"integer"}},"required":["patient_id","total_meals_logged","total_days_logged"]},"PatientStepsDataResponse":{"properties":{"step_count":{"description":"number of steps taken","example":"15","nullable":false,"type":"integer"},"steps_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","nullable":false,"type":"string"}},"required":["steps_date","step_count"]},"PatientStepsResponse":{"properties":{"id":{"nullable":false,"type":"integer"},"note":{"description":"note that can be added to provide additional description Max 1024 char","nullable":true,"type":"string"},"source":{"description":"source of steps data","nullable":true,"type":"string"},"source_id":{"description":"id of steps from source","nullable":true,"type":"string"},"step_count":{"description":"number of steps taken","example":"15","nullable":false,"type":"integer"},"steps_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","nullable":false,"type":"string"},"steps_end_time":{"description":"time in format hh:mm:ss","example":"17:30:00","nullable":false,"type":"string"},"steps_start_time":{"description":"time in format hh:mm:ss","example":"17:30:00","nullable":false,"type":"string"}},"required":["id","steps_date","steps_start_time","steps_end_time","step_count"]},"PatientStreakResponse":{"properties":{"current_count":{"type":"integer"},"current_end_date":{"format":"date-time","type":"string"},"current_start_date":{"format":"date-time","type":"string"},"longest_count":{"type":"integer"},"longest_end_date":{"format":"date-time","type":"string"},"longest_start_date":{"format":"date-time","type":"string"},"patient_id":{"type":"integer"},"type":{"enum":["any_activity"],"type":"string"},"type_id":{"nullable":true,"type":"integer"}},"required":["patient_id","type","count","start_date","end_date"]},"PatientStressResponse":{"properties":{"id":{"nullable":false,"type":"integer"},"note":{"description":"note that can be added to provide additional description Max 1024 char","nullable":true,"type":"string"},"source":{"description":"source of stress data","nullable":true,"type":"string"},"source_id":{"description":"id of stress from source","nullable":true,"type":"string"},"stress_activity_type":{"description":"selected activity type of stress","example":"breathing","nullable":true,"type":"string"},"stress_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","nullable":false,"type":"string"},"stress_end_time":{"description":"time in format hh:mm:ss","example":"17:30:00","nullable":false,"type":"string"},"stress_start_time":{"description":"time in format hh:mm:ss","example":"17:30:00","nullable":false,"type":"string"}},"required":["id","stress_date","stress_start_time","stress_end_time"]},"PatientSubscriptionResponse":{"properties":{"clinic_id":{"type":"integer"},"completion_time":{"format":"date-time","type":"string"},"created_by_user_id":{"nullable":true,"type":"integer"},"created_time":{"format":"date-time","type":"string"},"expiration_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"},"hospital_id":{"type":"integer"},"id":{"type":"integer"},"is_complete":{"nullable":false,"type":"boolean"},"is_logging_complete":{"nullable":false,"type":"boolean"},"logging_completion_time":{"format":"date-time","type":"string"},"name":{"description":"name of the subscription","enum":["three-day","five-day","seven-day","ten-day","one-month","cgm14","14-day","21-day","28-day","custom"],"example":"three-day","type":"string"},"notified_of_logging_completion":{"nullable":false,"type":"boolean"},"notified_of_logging_completion_time":{"format":"date-time","type":"string"},"patient_id":{"type":"integer"},"report_date":{"description":"calendar date in format YYYY-MM-DD.","example":"2019-01-05","type":"string"},"start_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"},"subscription_length":{"nullable":true,"type":"integer"},"type":{"enum":["single","weekly","monthly","bi-weekly","4-weeks","custom"],"nullable":false,"type":"string"},"updated_time":{"format":"date-time","type":"string"}},"required":["patient_id","id","name","type","start_date","expiration_date","created_time","updated_time"]},"PatientSummaryResponse":{"properties":{"avg_calcium_mg":{"type":"number"},"avg_calories_kcal":{"type":"number"},"avg_carbs_g":{"type":"number"},"avg_fat_g":{"type":"number"},"avg_fiber_g":{"type":"number"},"avg_iron_mg":{"type":"number"},"avg_protein_g":{"type":"number"},"avg_sodium_mg":{"type":"number"},"avg_sugars_g":{"type":"number"},"avg_vitamin_b12_ug":{"type":"number"},"avg_vitamin_d_iu":{"type":"number"},"calorie_ratio":{"type":"number"},"email":{"type":"string"},"fat_ratio_pct_of_target":{"type":"number"},"fiber_pct_of_target":{"type":"number"},"first_name":{"type":"string"},"frequency_fish":{"type":"number"},"frequency_fried":{"type":"number"},"frequency_high_fiber":{"type":"number"},"frequency_high_processed":{"type":"number"},"frequency_low_fiber":{"type":"number"},"frequency_min_processed":{"type":"number"},"frequency_not_fried":{"type":"number"},"frequency_plant":{"type":"number"},"frequency_poultry":{"type":"number"},"frequency_redmeat":{"type":"number"},"fruit_pct_of_target":{"type":"number"},"healthy_bev_pct_of_total":{"type":"number"},"healthy_fat_kcal_pct_of_total":{"type":"number"},"last_name":{"type":"string"},"non_red_meat_pct_of_protein":{"type":"number"},"patient_id":{"type":"integer"},"phone_number":{"nullable":true,"type":"string"},"plant_based_pct":{"type":"number"},"poultry_frequency_weekly":{"type":"number"},"redmeat_frequency_weekly":{"type":"number"},"sex":{"nullable":true,"type":"string"},"ultra_processed_pct_of_total":{"type":"number"},"ultraprocessed_pct_of_total":{"type":"number"},"unhealthy_fat_kcal_pct_of_total":{"type":"number"},"vegetable_pct_of_target":{"type":"number"},"whole_foods_and_low_processed_foods":{"type":"number"},"whole_grain_pct":{"type":"number"}},"required":["patient_id","first_name","last_name","email","frequency_high_processed","frequency_min_processed","frequency_redmeat","frequency_poultry","frequency_fish","frequency_plant","frequency_high_fiber","frequency_low_fiber","frequency_fried","frequency_not_fried","avg_calories_kcal","avg_carbs_g","avg_fat_g","avg_protein_g","avg_sodium_mg","avg_fiber_g","avg_calcium_mg","avg_iron_mg","avg_vitamin_b12_ug","avg_vitamin_d_iu","avg_sugars_g"]},"PatientSupplementResponse":{"properties":{"comment":{"description":"comments relating to the supplement","example":"under review by clinician","nullable":true,"type":"string"},"created_time":{"format":"date-time","type":"string"},"frequency":{"description":"daily, weekly, monthly, hourly, irregular","nullable":false,"type":"string"},"id":{"type":"integer"},"instructions":{"description":"instructions","nullable":true,"type":"string"},"name":{"description":"name of the supplement","example":"calcium","type":"string"},"patient_id":{"type":"integer"},"prescribed_by":{"description":"who has asked the patient to take the supplement","nullable":true,"type":"string"},"qty_per_frequency":{"type":"number"},"qty_unit_of_measure":{"description":"Unit of Measure","example":"mcg","type":"string"},"qty_unit_size":{"type":"number"},"reason_for_taking":{"description":"why is the patient taking the supplement?","nullable":true,"type":"string"},"related_usda_id":{"description":"if available in the food DB, include the USDA id for the nutrition link","nullable":true,"type":"integer"},"updated_time":{"format":"date-time","type":"string"}},"required":["id","patient_id","name","frequency","qty_per_frequency","qty_unit_size","qty_unit_of_measure"]},"PatientUsageSummary":{"properties":{"summary_statistics":{"$ref":"#/components/schemas/PatientUsageSummaryStatistics","type":"object"}},"required":["summary_statistics"]},"PatientUsageSummaryStatistics":{"properties":{"date_since":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"},"date_until":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-12","type":"string"},"number_of_days_prior_to_reference":{"description":"number of days not included because they were in the time range but before the reference date","type":"integer"},"number_of_inactive_days":{"description":"number of inactive days in the time period","type":"integer"},"number_of_meal_items_logged":{"description":"number of meal_items logged in the time period","type":"integer"},"number_of_meals_logged":{"description":"number of meals logged in the time period","type":"integer"},"number_of_tracked_days":{"description":"number of days tracked in the time period","type":"integer"},"tracking_reference_date":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-12","type":"string"}},"required":["date_since","date_until"]},"PatientWeightListResponse":{"properties":{"has_more":{"description":"True when additional weight rows exist beyond the first 100 results.","nullable":false,"type":"boolean"},"weights":{"items":{"$ref":"#/components/schemas/PatientWeightResponse"},"type":"array"}},"required":["weights","has_more"]},"PatientWeightResponse":{"properties":{"id":{"nullable":false,"type":"integer"},"note":{"description":"note that can be added to provide additional description Max 1024 char","nullable":true,"type":"string"},"source":{"description":"source of weight data","enum":["healthkit","healthconnect"],"example":"healthconnect","nullable":true,"type":"string"},"source_id":{"description":"id of weight from source","example":"12345678-90ab-cdef-1234-567890abcdef","nullable":true,"type":"string"},"weight_date":{"description":"calendar date in format YYYY-MM-DD","example":"2025-12-18","nullable":true,"type":"string"},"weight_kg":{"description":"weight in kilograms","example":68.4,"format":"float","nullable":false,"type":"number"},"weight_time":{"description":"time in HH:MM:SS","example":"07:32:10","nullable":true,"type":"string"}},"required":["id","weight_date","weight_time","weight_kg"]},"PatientsForTestingRequest":{"properties":{"diet_restrictions":{"items":{"$ref":"#/components/schemas/CreatePatientDietRestrictionRequest"},"nullable":true,"type":"array"},"email":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"motivations":{"items":{"$ref":"#/components/schemas/CreatePatientMotivationRequest"},"nullable":true,"type":"array"},"patient_type":{"enum":["research","collaboration","wellness","obesity","diabetes","metabolic syndrome","weight loss","migraine","gastroesophageal reflux","gi discomfort","vertigo","sleep apnea","rxlife","dexcom","menopause"],"nullable":true,"type":"string"},"phone_number":{"nullable":true,"type":"string"},"tracking_start_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},"required":["first_name","last_name","email","tracking_start_date"]},"PhotoUploadResponse":{"properties":{"photo_id":{"type":"string"},"photo_timings_encoded":{"type":"string"}},"required":["photo_id"]},"PostPatchClinicFlags":{"additionalProperties":true,"nullable":true,"type":"object"},"PostPatchPatientFlags":{"additionalProperties":true,"nullable":true,"properties":{"patient_app_extended_logging_types":{"nullable":true,"type":"string"},"patient_glucose_units_mmol_l":{"nullable":true,"type":"boolean"},"patient_show_cals":{"nullable":true,"type":"boolean"},"patient_show_carbs":{"nullable":true,"type":"boolean"}},"type":"object"},"PreparationMethodEnum":{"enum":["","homemade","restaurant","cpg","store_bought","other"],"type":"string"},"PutClinicianAppointmentRequest":{"properties":{"description":{"type":"string"},"end_time":{"description":"calendar date in format YYYY-MM-DD HH:MM:SS","example":"2020-05-10 09:30:00","format":"date-time","type":"string"},"purpose":{"type":"string"},"start_time":{"description":"calendar date in format YYYY-MM-DD HH:MM:SS","example":"2020-05-02 08:30:00","format":"date-time","type":"string"},"title":{"type":"string"}},"required":["start_time","end_time","title","description","purpose"]},"PutPatientBloodPressureRequest":{"properties":{"blood_pressure_date":{"description":"calendar date in format YYYY-MM-DD","example":"2025-12-18","nullable":true,"type":"string"},"blood_pressure_time":{"description":"time in HH:MM:SS","example":"07:40:00","nullable":true,"type":"string"},"body_position":{"description":"body position (Health Connect numeric enum)","example":2,"nullable":true,"type":"integer"},"diastolic_mm_hg":{"description":"diastolic blood pressure in mmHg","example":76,"nullable":false,"type":"integer"},"measurement_location":{"description":"measurement location (Health Connect numeric enum)","example":3,"nullable":true,"type":"integer"},"note":{"description":"note that can be added to provide additional description Max 1024 char","nullable":true,"type":"string"},"source":{"description":"source of blood pressure data","enum":["healthkit","healthconnect"],"example":"healthconnect","nullable":true,"type":"string"},"source_id":{"description":"id of blood pressure from source","example":"bp-uuid-123","nullable":true,"type":"string"},"systolic_mm_hg":{"description":"systolic blood pressure in mmHg","example":118,"nullable":false,"type":"integer"}},"required":["systolic_mm_hg","diastolic_mm_hg"]},"PutPatientBulkHealthDataRequest":{"items":{"discriminator":{"mapping":{"blood_pressure":"#/components/schemas/PutPatientBulkHealthDataRequestBloodPressure","emotional_health":"#/components/schemas/PutPatientBulkHealthDataRequestEmotionalHealth","mindfulness":"#/components/schemas/PutPatientBulkHealthDataRequestMindfulness","sleep":"#/components/schemas/PutPatientBulkHealthDataRequestSleep","steps":"#/components/schemas/PutPatientBulkHealthDataRequestSteps","weight":"#/components/schemas/PutPatientBulkHealthDataRequestWeight"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/PutPatientBulkHealthDataRequestSleep"},{"$ref":"#/components/schemas/PutPatientBulkHealthDataRequestSteps"},{"$ref":"#/components/schemas/PutPatientBulkHealthDataRequestWeight"},{"$ref":"#/components/schemas/PutPatientBulkHealthDataRequestBloodPressure"},{"$ref":"#/components/schemas/PutPatientBulkHealthDataRequestMindfulness"},{"$ref":"#/components/schemas/PutPatientBulkHealthDataRequestEmotionalHealth"}]},"type":"array"},"PutPatientBulkHealthDataRequestBloodPressure":{"properties":{"deleted":{"items":{"$ref":"#/components/schemas/DeletePatientBloodPressureRequest"},"type":"array"},"type":{"enum":["blood_pressure"],"nullable":false,"type":"string"},"updates":{"items":{"$ref":"#/components/schemas/PutPatientBloodPressureRequest"},"type":"array"}},"required":["type","updates","deleted"],"type":"object"},"PutPatientBulkHealthDataRequestEmotionalHealth":{"properties":{"deleted":{"items":{"$ref":"#/components/schemas/DeletePatientEmotionalHealthRequest"},"type":"array"},"type":{"enum":["emotional_health"],"nullable":false,"type":"string"},"updates":{"items":{"$ref":"#/components/schemas/PutPatientEmotionalHealthRequest"},"type":"array"}},"required":["type","updates","deleted"],"type":"object"},"PutPatientBulkHealthDataRequestMindfulness":{"properties":{"deleted":{"items":{"$ref":"#/components/schemas/DeletePatientMindfulnessRequest"},"type":"array"},"type":{"enum":["mindfulness"],"nullable":false,"type":"string"},"updates":{"items":{"$ref":"#/components/schemas/PutPatientMindfulnessRequest"},"type":"array"}},"required":["type","updates","deleted"],"type":"object"},"PutPatientBulkHealthDataRequestSleep":{"properties":{"deleted":{"items":{"$ref":"#/components/schemas/DeletePatientSleepRequest"},"type":"array"},"type":{"enum":["sleep"],"nullable":false,"type":"string"},"updates":{"items":{"$ref":"#/components/schemas/PutPatientSleepRequest"},"type":"array"}},"required":["type","updates","deleted"],"type":"object"},"PutPatientBulkHealthDataRequestSteps":{"properties":{"deleted":{"items":{"$ref":"#/components/schemas/DeletePatientStepsRequest"},"type":"array"},"type":{"enum":["steps"],"nullable":false,"type":"string"},"updates":{"items":{"$ref":"#/components/schemas/PutPatientStepsRequest"},"type":"array"}},"required":["type","updates","deleted"],"type":"object"},"PutPatientBulkHealthDataRequestWeight":{"properties":{"deleted":{"items":{"$ref":"#/components/schemas/DeletePatientWeightRequest"},"type":"array"},"type":{"enum":["weight"],"nullable":false,"type":"string"},"updates":{"items":{"$ref":"#/components/schemas/PutPatientWeightRequest"},"type":"array"}},"required":["type","updates","deleted"],"type":"object"},"PutPatientDietRestrictionRequest":{"properties":{"comment":{"nullable":true,"type":"string"}}},"PutPatientEmotionalHealthRequest":{"properties":{"association":{"description":"association of emotional health","example":"breathing","nullable":true,"type":"string"},"emotional_health_activity_type":{"description":"selected activity type of emotional health","example":"breathing","nullable":true,"type":"string"},"emotional_health_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","nullable":false,"type":"string"},"emotional_health_time":{"description":"time in format hh:mm:ss","example":"17:30:00","nullable":false,"type":"string"},"kind":{"description":"kind of emotional health","example":"breathing","nullable":true,"type":"string"},"label":{"description":"label of emotional health","example":"breathing","nullable":true,"type":"string"},"note":{"description":"note that can be added to provide additional description Max 1024 char","nullable":true,"type":"string"},"source":{"description":"source of emotional health data","nullable":true,"type":"string"},"source_id":{"description":"id of emotional health from source","nullable":true,"type":"string"},"valence":{"description":"valence of emotional health","example":"breathing","nullable":true,"type":"string"}},"required":["emotional_health_date","emotional_health_time"]},"PutPatientExerciseRequest":{"properties":{"duration_min":{"description":"time in minutes","example":"15","nullable":false,"type":"integer"},"exercise_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","nullable":false,"type":"string"},"exercise_time":{"description":"time in HH:MM:SS","example":"08:00:00","nullable":false,"type":"string"},"exercise_type":{"$ref":"#/components/schemas/ExerciseTypeInRequestEnum"},"intensity":{"example":"low","nullable":true,"type":"string"},"note":{"description":"note that can be added to provide additional description Max 1024 char","nullable":true,"type":"string"},"source":{"description":"source of exercise data","example":"healthkit","nullable":true,"type":"string"},"source_id":{"description":"id of exercise from source","example":"35C09300-FAB6-460E-95B5-8EF4EC5663A3","nullable":true,"type":"string"}},"required":["exercise_date","exercise_time","exercise_type","duration_min","intensity"]},"PutPatientExercisesBulkRequest":{"properties":{"deleted_exercises":{"default":[],"description":"list of exercises to be deleted","items":{"$ref":"#/components/schemas/DeletePatientExerciseRequest"},"type":"array"},"exercises":{"default":[],"description":"list of exercises to be updated","items":{"$ref":"#/components/schemas/PutPatientExerciseRequest"},"type":"array"}}},"PutPatientMedicationRequest":{"properties":{"medication_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","nullable":false,"type":"string"},"medication_time":{"description":"time in HH:MM:SS","example":"08:00:00","nullable":false,"type":"string"},"name":{"description":"indicate the name of the medication","type":"string"},"note":{"description":"note that can be added to provide additional description Max 1024 char","nullable":true,"type":"string"},"quantity":{"description":"typical qty of medication taken","example":"15.4","nullable":false,"type":"number"},"side_effects":{"description":"side effects of the medication Max 1024 char","nullable":true,"type":"string"},"unit":{"nullable":false,"type":"string"}},"required":["medication_date","medication_time","name","quantity","unit"]},"PutPatientMindfulnessRequest":{"properties":{"mindfulness_activity_type":{"description":"selected activity type of mindfulness","example":"breathing","nullable":true,"type":"string"},"mindfulness_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","nullable":false,"type":"string"},"mindfulness_end_time":{"description":"time in format hh:mm:ss","example":"17:30:00","nullable":false,"type":"string"},"mindfulness_start_time":{"description":"time in format hh:mm:ss","example":"17:30:00","nullable":false,"type":"string"},"note":{"description":"note that can be added to provide additional description Max 1024 char","nullable":true,"type":"string"},"source":{"description":"source of mindfulness data","nullable":true,"type":"string"},"source_id":{"description":"id of mindfulness from source","nullable":true,"type":"string"}},"required":["mindfulness_date","mindfulness_start_time","mindfulness_end_time"]},"PutPatientMotivationRequest":{"properties":{"comment":{"nullable":true,"type":"string"}},"required":["comment"]},"PutPatientRecipeListItemRequest":{"properties":{"additional_notes":{"example":"Some notes","nullable":false,"type":"string"}},"required":["additional_notes"],"type":"object"},"PutPatientSleepRequest":{"properties":{"note":{"description":"note that can be added to provide additional description Max 1024 char","nullable":true,"type":"string"},"sleep_end_date_time":{"description":"datetime in format YYYY-MM-DD HH:MM:SS","example":"2019-01-02 08:00:00","nullable":false,"type":"string"},"sleep_start_date_time":{"description":"datetime in format YYYY-MM-DD HH:MM:SS","example":"2019-01-02 08:00:00","nullable":false,"type":"string"},"sleep_type":{"$ref":"#/components/schemas/SleepTypeInRequestEnum"},"source":{"description":"source of sleep data","example":"healthkit","nullable":true,"type":"string"},"source_id":{"description":"id of sleep from source","example":"35C09300-FAB6-460E-95B5-8EF4EC5663A3","nullable":true,"type":"string"}},"required":["sleep_start_date_time","sleep_end_date_time","sleep_type"]},"PutPatientStepsRequest":{"properties":{"note":{"description":"note that can be added to provide additional description Max 1024 char","nullable":true,"type":"string"},"source":{"description":"source of steps data","nullable":true,"type":"string"},"source_id":{"description":"id of steps from source","nullable":true,"type":"string"},"step_count":{"description":"number of steps taken","example":"15","nullable":false,"type":"integer"},"steps_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","nullable":false,"type":"string"},"steps_end_time":{"description":"time in format hh:mm:ss","example":"17:30:00","nullable":false,"type":"string"},"steps_start_time":{"description":"time in format hh:mm:ss","example":"17:30:00","nullable":false,"type":"string"}},"required":["steps_date","steps_start_time","steps_end_time","step_count"]},"PutPatientStressRequest":{"properties":{"note":{"description":"note that can be added to provide additional description Max 1024 char","nullable":true,"type":"string"},"source":{"description":"source of stress data","nullable":true,"type":"string"},"source_id":{"description":"id of stress from source","nullable":true,"type":"string"},"stress_activity_type":{"description":"selected activity type of stress","example":"breathing","nullable":true,"type":"string"},"stress_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","nullable":false,"type":"string"},"stress_end_time":{"description":"time in format hh:mm:ss","example":"17:30:00","nullable":false,"type":"string"},"stress_start_time":{"description":"time in format hh:mm:ss","example":"17:30:00","nullable":false,"type":"string"}},"required":["stress_date","stress_start_time","stress_end_time"]},"PutPatientWeightRequest":{"properties":{"note":{"description":"note that can be added to provide additional description Max 1024 char","nullable":true,"type":"string"},"source":{"description":"source of weight data","enum":["healthkit","healthconnect"],"example":"healthconnect","nullable":true,"type":"string"},"source_id":{"description":"id of weight from source","example":"12345678-90ab-cdef-1234-567890abcdef","nullable":true,"type":"string"},"weight_date":{"description":"calendar date in format YYYY-MM-DD","example":"2025-12-18","nullable":true,"type":"string"},"weight_kg":{"description":"weight in kilograms","example":68.4,"format":"float","maximum":1000,"minimum":0.01,"nullable":false,"type":"number"},"weight_time":{"description":"time in HH:MM:SS","example":"07:32:10","nullable":true,"type":"string"}},"required":["weight_kg"]},"QA2AddonChangeReason":{"properties":{"change_reason":{"$ref":"#/components/schemas/QA2ChangeReason","nullable":true,"type":"object"},"food_name":{"nullable":true,"type":"string"},"id":{"type":"number"}}},"QA2ChangeContext":{"properties":{"addons_change_reason":{"items":{"$ref":"#/components/schemas/QA2AddonChangeReason","type":"object"},"nullable":true,"type":"array"},"change_reason":{"$ref":"#/components/schemas/QA2ChangeReason","nullable":true,"type":"object"},"review_id":{"type":"string"},"review_time":{"description":"timestamp without timezone","example":"2016-03-22T21:03:41","format":"date-time","nullable":true,"type":"string"}},"required":["review_id"]},"QA2ChangeReason":{"properties":{"category":{"type":"string"},"notes":{"nullable":true,"type":"string"},"other_free_text":{"nullable":true,"type":"string"},"subcategory":{"nullable":true,"type":"string"}},"required":["category"]},"QualityAssuranceAiParserItemFailureResult":{"properties":{"addon_food_name_alias":{"nullable":true,"type":"string"},"addon_name":{"nullable":true,"type":"string"},"decision":{"nullable":false,"type":"string"},"food_name":{"nullable":false,"type":"string"},"food_name_alias":{"nullable":true,"type":"string"},"item_type":{"nullable":false,"type":"string"},"metadata":{"additionalProperties":true,"nullable":true,"type":"object"},"qa_type":{"description":"identification / sizing / specificity","nullable":false,"type":"string"},"reasoning":{"nullable":false,"type":"string"}},"required":["qa_type","decision","reasoning","item_type","food_name"]},"QualityAssuranceAiParserResult":{"properties":{"item_failures":{"items":{"$ref":"#/components/schemas/QualityAssuranceAiParserItemFailureResult"},"nullable":true,"type":"array"},"metadata":{"additionalProperties":true,"nullable":true,"type":"object"},"qa_confidence_identification":{"nullable":false,"type":"number"},"qa_confidence_sizing":{"nullable":false,"type":"number"},"qa_is_approved":{"nullable":false,"type":"boolean"},"qa_is_escalated":{"nullable":false,"type":"boolean"},"qa_is_reviewed":{"nullable":false,"type":"boolean"},"qa_level_of_difficulty":{"nullable":false,"type":"number"},"qa_note":{"nullable":false,"type":"string"},"qa_questionnaire":{"additionalProperties":true,"description":"JSON representing question with a binary response","nullable":true,"type":"object"},"qa_review_type":{"nullable":false,"type":"string"},"version":{"nullable":false,"type":"string"}},"required":["version"]},"QualityAssuranceFlag":{"properties":{"description":{"description":"description of the issue","type":"string"},"meal_id":{"description":"nutrient","type":"string"},"meal_item_id":{"description":"meal item id being flagged","type":"integer"}}},"QualityAssuranceFlags":{"properties":{"miscellaneous_flags":{"items":{"$ref":"#/components/schemas/QualityAssuranceFlag"},"nullable":false,"type":"array"},"nutrient_flags":{"items":{"$ref":"#/components/schemas/QualityAssuranceMealItemNutrientFlag"},"nullable":false,"type":"array"}},"required":["nutrient_flags"]},"QualityAssuranceLogResponse":{"properties":{"acknowledged_time":{"description":"time in UTC","format":"date-time","nullable":true,"type":"string"},"approved_time":{"description":"time in UTC","format":"date-time","nullable":true,"type":"string"},"confidence_identification":{"nullable":true,"type":"integer"},"confidence_sizing":{"nullable":true,"type":"integer"},"created_time":{"description":"time in UTC","format":"date-time","nullable":false,"type":"string"},"id":{"nullable":false,"type":"integer"},"is_approved":{"description":"approval to be provided by senior only","nullable":false,"type":"boolean"},"is_escalated":{"nullable":false,"type":"boolean"},"is_reviewed":{"nullable":false,"type":"boolean"},"level_of_difficulty":{"nullable":true,"type":"integer"},"meal_photo_queue_id":{"nullable":false,"type":"integer"},"meal_photo_queue_item":{"$ref":"#/components/schemas/MealPhotoQueueResponse","nullable":true,"type":"object"},"note":{"nullable":true,"type":"string"},"qa_metadata":{"description":"JSON representing metadata for the QA log","nullable":true,"type":"object"},"questionnaire":{"description":"JSON representing question with a binary response","nullable":true,"type":"object"},"review_type":{"$ref":"#/components/schemas/QualityAssuranceLogReviewTypeEnum","default":"review","nullable":false,"type":"string"},"reviewed_time":{"description":"time in UTC","format":"date-time","nullable":true,"type":"string"},"updated_time":{"description":"time in UTC","format":"date-time","nullable":false,"type":"string"},"user_id":{"description":"user who carried out the review","nullable":false,"type":"integer"}},"required":["id","user_id","meal_photo_queue_id","is_reviewed","is_escalated","is_approved","review_type","note","viewed_time","created_time","updated_time"]},"QualityAssuranceLogReviewTypeEnum":{"enum":["review","fast_approve","skip","pre_submit"],"type":"string"},"QualityAssuranceMealItemNutrientFlag":{"properties":{"meal_id":{"description":"meal id being flagged","type":"integer"},"meal_item_id":{"description":"meal item id being flagged","type":"integer"},"nutrient":{"description":"nutrient","type":"string"},"value":{"description":"value of the nutrient in question","type":"number"}}},"QualityAssuranceSamplingMethodEnum":{"description":"Method used to determine how queues are selected during this QA session.\n- `qa2_default` (default): Sample from queues which have not received a\n   passing QA2 review yet, prioritized by the queue priority (see\n  `app.models:MealPhotoQueuePriority`). This is the default behavior for a\n  standard QA2 session.\n- `qa3`: Used for QA3 - Review the Reviewer - sessions. Samples from queues\n  which have recieved a passing QA2 review, and have not been edited since\n  that review, prioritized by the queue priority (see\n  `app.models:MealPhotoQueuePriority`). See also:\n  `QualityAssuranceSessionParams.qa3_sample_from_reviewer_ids`.\n\nNOTE: when values are added here, a handler must be added to `app.api.queue.qa_session_service:_qa_queues_result_query`.\n","enum":["qa2_default","qa3"],"type":"string"},"QualityAssuranceSessionParams":{"properties":{"qa3_sample_from_reviewer_ids":{"description":"Only select queues where the most recent passing QA2 review was done by one of the reviewers listed in this array.\nFor example, setting `qa3_sample_from_reviewer_ids = [1]` will only select queues which recieved a passing QA2 review from the JLM.\nOnly applies when `sampling_method = 'qa3'`.\n","items":{"type":"integer"},"nullable":true,"type":"array"},"sampling_method":{"$ref":"#/components/schemas/QualityAssuranceSamplingMethodEnum"}}},"QualityAssuranceSessionResponse":{"properties":{"average_review_duration_seconds":{"type":"integer"},"completed_queue_count":{"type":"integer"},"current_queue":{"$ref":"#/components/schemas/MealPhotoQueueResponse","nullable":false,"type":"object"},"data_reviewer_id":{"type":"integer"},"id":{"type":"integer"},"review_id":{"nullable":true,"type":"integer"},"status":{"enum":["active","paused","no_available_queues","timed_out","completed"],"type":"string"},"target_queue_count":{"type":"integer"}},"required":["id","data_reviewer_id","target_queue_count","status"]},"RdiNutrientResponse":{"properties":{"classification":{"description":"description of the value","enum":["daily_rda","daily_ul","n/a"],"nullable":false,"type":"string"},"nutrient":{"description":"current nutrient","nullable":false,"type":"string"},"unit":{"description":"unit of measure for this nutrient","example":"mcg","nullable":false,"type":"string"},"value_high":{"description":"high end threshold of an rdi or the maximum target","nullable":true,"type":"number"},"value_low":{"description":"low end threshold of an rdi or the minimum target","nullable":true,"type":"number"}},"required":["nutrient","unit","classification"]},"RdiResponse":{"properties":{"age":{"type":"integer"},"country":{"enum":["Canada","USA"],"type":"string"},"nutrients":{"items":{"$ref":"#/components/schemas/RdiNutrientResponse"},"type":"array"},"sex":{"description":"sex of the patient as indicated in their profile","type":"string"}},"required":["age","country","sex","nutrients"]},"RdiTestRequest":{"properties":{"age":{"type":"integer"},"country":{"type":"string"},"diet_restriction":{"type":"string"},"sex":{"type":"string"}}},"RecentAddonResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/MealItemCustomAddonResponse"},"type":"array"}},"required":["results"]},"RecentFoodResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/FoodResponse"},"type":"array"}},"required":["results"]},"RecentMeal":{"properties":{"meal_id":{"type":"integer"},"patient_id":{"type":"integer"},"patient_is_priority":{"type":"boolean"},"queue_id":{"type":"integer"}},"required":["meal_id","queue_id","patient_id","patient_is_priority"]},"RecentMealItemResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/MealItemResponse"},"type":"array"}},"required":["results"]},"RecipeDetails":{"properties":{"cook_time":{"$ref":"#/components/schemas/RecipeDuration","nullable":true},"extras":{"nullable":true,"type":"object"},"prep_time":{"$ref":"#/components/schemas/RecipeDuration","nullable":true}},"type":"object"},"RecipeDuration":{"properties":{"display_text":{"nullable":true,"type":"string"},"minutes":{"nullable":true,"type":"integer"}},"type":"object"},"RecipeGenerateCustomSuggestionsRequest":{"properties":{"dietary_restrictions":{"items":{"description":"Dietary restrictions to include when generating the recipe.\nIf no dietary restrictions are provided, the patient's dietary restrictions will be used.\n","type":"string"},"type":"array"},"enjoyed_foods":{"items":{"description":"The names of foods the patient enjoys, to be used as a reference for the types of things the patient typically eats.","type":"string"},"type":"array"},"ingredients_exclude_all":{"items":{"description":"Exclude all of the listed ingredients from the recipe","type":"string"},"type":"array"},"ingredients_include_all":{"items":{"description":"Include all of the listed ingredients in the recipe","type":"string"},"type":"array"},"ingredients_include_any":{"items":{"description":"Include at least one of the listed ingredients in the recipe","type":"string"},"type":"array"},"language":{"description":"The language to generate the recipe in.\nIf no target language is provided, the default is English.\n","type":"string"},"max_ingredients":{"description":"The maximum number of ingredients in the recipe.\nIf no maximum number of ingredients is provided, the default is 5.\n","type":"number"},"meal_name":{"description":"The meal type of the recipe being generated.","enum":["breakfast","lunch","dinner","snack"],"type":"string"},"motivations":{"items":{"description":"Motivations to include when generating the recipe.\nIf no motivations are provided, the patient's motivations will be used.\n","type":"string"},"type":"array"},"n_recipes":{"description":"The number of recipes to generate.\nIf no number of recipes is provided, the default is 1.\n","maximum":4,"minimum":1,"type":"number"},"other_comments":{"items":{"description":"Other comments to include in the prompt.","type":"string"},"type":"array"},"patient_id":{"description":"The ID of the patient to generate the recipe for.\nIf no patient ID is provided, the default is the current user.\n","type":"number"},"recently_eaten_foods":{"items":{"description":"The names of recent foods the patient has eaten, to be used as a reference for the types of things the patient typically eats.\nIf no recent foods are provided, the last 30 foods the patient has eaten will be used.\n","type":"string"},"type":"array"},"recently_suggested_recipes":{"items":{"description":"The names of recently suggested recipes, used to encourage variety in the recipes generated.\nIf no recently suggested recipes are provided, the last 10 recipes suggested to the patient will be used.\n","type":"string"},"type":"array"},"specific_focus_area":{"description":"The specific focus area of the recipe being generated.\nFor example, \"increasing protein intake\" or \"reducing sugar intake\".\n","type":"string"}},"type":"object"},"RecipeImageUploadResponse":{"properties":{"recipe":{"$ref":"#/components/schemas/RecipeResponse"},"upload":{"nullable":false,"type":"object"}},"required":["upload","recipe"],"type":"object"},"RecipeIngredient":{"properties":{"calculated_servings":{"nullable":true,"type":"number"},"child_recipe_id":{"nullable":true,"type":"integer"},"custom_item":{"example":false,"nullable":true,"type":"boolean"},"description":{"example":"1 cup of milk","type":"string"},"food_name":{"example":"milk","type":"string"},"food_name_alias":{"example":"milk","type":"string"},"food_name_alias_translations":{"nullable":true,"type":"object"},"food_name_translations":{"nullable":true,"type":"object"},"net_serving_size_g":{"nullable":true,"type":"number"},"note":{"nullable":true,"type":"string"},"nutrient_overrides":{"$ref":"#/components/schemas/NutrientOverrideCollection","nullable":true,"type":"object"},"percent_eaten":{"nullable":true,"type":"number"},"preparation_method":{"$ref":"#/components/schemas/PreparationMethodEnum","default":null,"nullable":true},"rxfood_id":{"nullable":true,"type":"string"},"serving_unit_amount":{"example":"1","type":"string"},"serving_unit_label":{"example":"cup","type":"string"},"serving_unit_label_translations":{"nullable":true,"type":"object"},"servings":{"example":"10","type":"string"},"sort_order":{"default":0,"nullable":false,"type":"integer"}}},"RecipeIngredientGroup":{"properties":{"ingredients":{"default":[],"items":{"$ref":"#/components/schemas/RecipeIngredient"},"nullable":false,"type":"array"},"name":{"example":"Icing","nullable":false,"type":"string"},"sort_order":{"default":0,"nullable":false,"type":"integer"}},"required":["name","ingredients"],"type":"object"},"RecipeIngredientGroupResponse":{"properties":{"id":{"nullable":false,"type":"integer"},"ingredients":{"default":[],"items":{"$ref":"#/components/schemas/RecipeIngredientResponse"},"nullable":false,"type":"array"},"name":{"nullable":false,"type":"string"},"recipe_id":{"nullable":false,"type":"integer"},"sort_order":{"nullable":false,"type":"integer"}},"required":["id","recipe_id","name","sort_order","ingredients"],"type":"object"},"RecipeIngredientResponse":{"properties":{"calculated_servings":{"nullable":true,"type":"number"},"child_recipe_id":{"nullable":true,"type":"integer"},"created_time":{"format":"date-time","nullable":true,"type":"string"},"custom_item":{"example":false,"nullable":true,"type":"boolean"},"description":{"example":"1 cup of milk","nullable":false,"type":"string"},"food_name":{"example":"milk","nullable":false,"type":"string"},"food_name_alias":{"example":"milk","nullable":true,"type":"string"},"food_name_alias_translations":{"nullable":true,"type":"object"},"food_name_translations":{"nullable":true,"type":"object"},"group_id":{"nullable":true,"type":"integer"},"id":{"nullable":true,"type":"integer"},"net_serving_size_g":{"nullable":true,"type":"number"},"note":{"nullable":true,"type":"string"},"nutrient_overrides":{"$ref":"#/components/schemas/NutrientOverrideCollection","nullable":true},"percent_eaten":{"nullable":true,"type":"number"},"preparation_method":{"$ref":"#/components/schemas/PreparationMethodEnum","default":null,"nullable":true},"recipe_id":{"nullable":true,"type":"integer"},"rxfood_id":{"nullable":true,"type":"string"},"serving_unit_amount":{"nullable":true,"type":"number"},"serving_unit_label":{"example":"cup","nullable":true,"type":"string"},"serving_unit_label_translations":{"nullable":true,"type":"object"},"servings":{"nullable":false,"type":"number"},"sort_order":{"default":0,"nullable":false,"type":"integer"},"updated_time":{"format":"date-time","nullable":true,"type":"string"}},"required":["description","food_name","servings"],"type":"object"},"RecipeInstructionResponse":{"properties":{"instructions":{"example":"Some instructions","nullable":false,"type":"string"},"recipe_id":{"example":"123","nullable":false,"type":"number"}},"required":["recipe_id","instructions"],"type":"object"},"RecipeNutrition":{"properties":{"added_sugars_g":{"nullable":true,"type":"number"},"alcohol_g":{"nullable":true,"type":"number"},"caffeine_mg":{"nullable":true,"type":"number"},"calcium_mg":{"nullable":true,"type":"number"},"carbohydrate_g":{"nullable":true,"type":"number"},"cholesterol_mg":{"nullable":true,"type":"number"},"choline_mg":{"nullable":true,"type":"number"},"energy_kcal":{"nullable":true,"type":"number"},"fat_g":{"nullable":true,"type":"number"},"fattyacids_totalmonounsaturated_g":{"nullable":true,"type":"number"},"fattyacids_totalpolyunsaturated_g":{"nullable":true,"type":"number"},"fattyacids_totalsaturated_g":{"nullable":true,"type":"number"},"fattyacids_totaltrans_g":{"nullable":true,"type":"number"},"fiber_g":{"nullable":true,"type":"number"},"folate_dfe_ug":{"nullable":true,"type":"number"},"grams_per_cubic_inch":{"nullable":true,"type":"number"},"insoluble_dietary_fiber_g":{"nullable":true,"type":"number"},"iron_mg":{"nullable":true,"type":"number"},"magnesium_mg":{"nullable":true,"type":"number"},"netcarb_g":{"nullable":true,"type":"number"},"niacin_mg":{"nullable":true,"type":"number"},"omega_three_fatty_acids_g":{"nullable":true,"type":"number"},"pantothenic_acid_mg":{"nullable":true,"type":"number"},"phosphorus_mg":{"nullable":true,"type":"number"},"polyols_g":{"nullable":true,"type":"number"},"potassium_mg":{"nullable":true,"type":"number"},"protein_g":{"nullable":true,"type":"number"},"riboflavin_mg":{"nullable":true,"type":"number"},"selenium_mcg":{"nullable":true,"type":"number"},"servings":{"nullable":true,"type":"number"},"sodium_mg":{"nullable":true,"type":"number"},"soluble_dietary_fiber_g":{"nullable":true,"type":"number"},"sugars_g":{"nullable":true,"type":"number"},"thiamin_mg":{"nullable":true,"type":"number"},"vitamin_a_iu":{"nullable":true,"type":"number"},"vitamin_a_rae_ug":{"nullable":true,"type":"number"},"vitamin_b12_ug":{"nullable":true,"type":"number"},"vitamin_b6_mg":{"nullable":true,"type":"number"},"vitamin_c_mg":{"nullable":true,"type":"number"},"vitamin_d2d3_ug":{"nullable":true,"type":"number"},"vitamin_d_iu":{"nullable":true,"type":"number"},"vitamin_e_mg":{"nullable":true,"type":"number"},"vitamin_k_ug":{"nullable":true,"type":"number"},"water_g":{"nullable":true,"type":"number"},"zinc_mg":{"nullable":true,"type":"number"}}},"RecipeRawData":{"properties":{"src_data":{"description":"JSON representing edamam recipe","nullable":true,"type":"object"},"src_id":{"example":"Chicken Stir-fry","nullable":false,"type":"string"},"src_name":{"example":"Edamam","nullable":false,"type":"string"},"src_url":{"example":"https://example.com","nullable":true,"type":"string"}}},"RecipeResponse":{"properties":{"calculated_servings":{"nullable":true,"type":"number"},"cc_columns":{"$ref":"#/components/schemas/CcColumnsRequest","nullable":true},"chef_id":{"nullable":true,"type":"integer"},"curation_status":{"enum":["draft","published","archived"],"nullable":false,"type":"string"},"custom_item":{"example":false,"nullable":true,"type":"boolean"},"filter_tags":{"items":{"type":"string"},"nullable":true,"type":"array"},"food_name":{"nullable":true,"type":"string"},"food_name_alias":{"nullable":true,"type":"string"},"food_name_alias_translations":{"nullable":true,"type":"object"},"food_name_translations":{"nullable":true,"type":"object"},"forked_from_recipe_id":{"nullable":true,"type":"integer"},"id":{"example":"123","nullable":false,"type":"number"},"image_url":{"example":"https://example.com","nullable":true,"type":"string"},"ingredient_groups":{"default":[],"items":{"$ref":"#/components/schemas/RecipeIngredientGroupResponse"},"nullable":false,"type":"array"},"ingredient_responses":{"default":[],"items":{"$ref":"#/components/schemas/RecipeIngredientResponse"},"nullable":false,"type":"array"},"ingredients":{"default":[],"items":{"example":"1 cup milk","type":"string"},"nullable":false,"type":"array"},"instructions_str":{"example":"Some instructions","nullable":true,"type":"string"},"internal_notes":{"nullable":true,"type":"string"},"label":{"example":"Quinoa Salad","nullable":false,"type":"string"},"label_translations":{"nullable":true,"type":"object"},"net_serving_size_g":{"nullable":true,"type":"number"},"note":{"nullable":true,"type":"string"},"nutrient_overrides":{"$ref":"#/components/schemas/NutrientOverrideCollection","nullable":true},"nutrients":{"$ref":"#/components/schemas/RecipeNutrition"},"nutrition_response":{"$ref":"#/components/schemas/UsdaNutritionResponse","nullable":true},"patient_id":{"nullable":true,"type":"integer"},"percent_eaten":{"nullable":true,"type":"number"},"preparation_method":{"$ref":"#/components/schemas/PreparationMethodEnum","default":null,"nullable":true},"recipe_details":{"$ref":"#/components/schemas/RecipeDetails","nullable":true},"serving_unit_amount":{"nullable":true,"type":"number"},"serving_unit_label":{"nullable":true,"type":"string"},"serving_unit_label_translations":{"nullable":true,"type":"object"},"servings":{"nullable":true,"type":"number"},"source":{"enum":["user","chef","imported","edamam"],"nullable":true,"type":"string"},"url":{"example":"https://example.com","nullable":true,"type":"string"},"visibility":{"enum":["private","public","shared"],"nullable":false,"type":"string"},"yield_amount":{"nullable":true,"type":"number"},"yield_unit_label":{"nullable":true,"type":"string"}},"required":["id","label","label_translations","url","ingredients"],"type":"object"},"RecipeScanPage":{"properties":{"image_url":{"type":"string"},"text":{"type":"string"}},"required":["text"],"type":"object"},"RecipeSuggestionReason":{"properties":{"placeholder_description":{"example":"Some description","nullable":false,"type":"string"}},"required":["placeholder_description"],"type":"object"},"RecipeSuggestionResponse":{"properties":{"id":{"example":"123","nullable":false,"type":"number"},"recipe":{"$ref":"#/components/schemas/RecipeResponse"},"suggestion_reason":{"$ref":"#/components/schemas/RecipeSuggestionReason"}},"required":["id","recipe"],"type":"object"},"RecommendedMeal":{"properties":{"names":{"items":{"type":"string"},"type":"array"}}},"RegisterDataReviewerToGroupRequest":{"properties":{"data_reviewer_group_id":{"type":"integer"},"data_reviewer_id":{"type":"integer"}},"required":["data_reviewer_group_id","data_reviewer_id"]},"ReportGeneratorResponse":{"properties":{"created_time":{"format":"date-time","nullable":true,"type":"string"}},"required":["created_time"]},"RxFeatureFlagsResponse":{"properties":{"auditor_reviewer_is_external":{"example":false,"nullable":false,"type":"boolean"},"clinic_admin_api_access":{"example":false,"nullable":false,"type":"boolean"},"clinic_allow_cross_hospital_report_access":{"example":false,"nullable":false,"type":"boolean"},"clinic_auto_log_photos_enabled":{"example":false,"nullable":false,"type":"boolean"},"clinic_default_days_until_report_date":{"example":"30","nullable":false,"type":"string"},"clinic_default_mark_patients_as_priority":{"example":false,"nullable":false,"type":"boolean"},"clinic_default_patient_age":{"example":"30","nullable":false,"type":"string"},"clinic_default_patient_sex":{"example":"female","nullable":false,"type":"string"},"clinic_default_report_include_supplements_in_food_dump":{"example":true,"nullable":false,"type":"boolean"},"clinic_default_report_include_supplements_in_rdi":{"example":true,"nullable":false,"type":"boolean"},"clinic_default_sms_enabled":{"example":false,"nullable":false,"type":"boolean"},"clinic_default_subscription_name":{"example":"three-day","nullable":false,"type":"string"},"clinic_default_user_locale":{"example":"en","nullable":false,"type":"string"},"clinic_enable_clinician_advisor_chat":{"example":false,"nullable":false,"type":"boolean"},"clinic_invitation_email_cadence":{"example":"1,2,7,14","nullable":false,"type":"string"},"clinic_maximum_meal_capture_period_in_days_before_subscription":{"example":"0","nullable":false,"type":"string"},"clinic_report_autogenerate":{"example":false,"nullable":false,"type":"boolean"},"clinic_report_full_automation":{"example":false,"nullable":false,"type":"boolean"},"clinic_report_identity_mode":{"enum":["normal","anonymous","identifier_patient_id","identifier_external_id","identifier_both_ids"],"example":"anonymous","nullable":false,"type":"string"},"clinic_report_judge_confidence_min":{"example":"0.7","nullable":true,"type":"string"},"clinic_send_repeat_subscription_invitation_email":{"example":false,"nullable":false,"type":"boolean"},"clinic_send_subscription_invitation_email":{"example":false,"nullable":false,"type":"boolean"},"clinic_show_patient_report_secure_link":{"example":false,"nullable":false,"type":"boolean"},"clinic_subscription_reminder_email_cadence":{"example":"1,7,-30","nullable":false,"type":"string"},"clinic_subscription_types":{"example":"single","nullable":false,"type":"string"},"clinician_allow_meal_edit":{"example":false,"nullable":false,"type":"boolean"},"clinician_autopilot_enabled":{"example":false,"nullable":false,"type":"boolean"},"clinician_available_trial_lengths":{"example":false,"nullable":false,"type":"string"},"clinician_can_delete_meals":{"example":false,"nullable":false,"type":"boolean"},"clinician_can_generate_reports":{"example":false,"nullable":false,"type":"boolean"},"clinician_can_view_clinic_invite_code":{"example":false,"nullable":false,"type":"boolean"},"clinician_meal_planner_enabled":{"example":false,"nullable":false,"type":"boolean"},"clinician_oversight_of_patient":{"enum":["clinician","non-clinician"],"example":"clinician","nullable":false,"type":"string"},"clinician_patient_allow_cal_carb_toggle":{"example":false,"nullable":false,"type":"boolean"},"clinician_patient_allow_macro_card_toggle":{"example":false,"nullable":false,"type":"boolean"},"clinician_patient_allow_mindful_eating_survey_toggle":{"example":false,"nullable":false,"type":"boolean"},"clinician_patient_allow_patient_app_coaching_tab_toggle":{"example":false,"nullable":false,"type":"boolean"},"clinician_prevent_new_patients_after_date":{"example":"2020-01-01","nullable":true,"type":"string"},"clinician_report_24h_turnaround":{"example":false,"nullable":false,"type":"boolean"},"clinician_report_disable_early_generation":{"example":false,"nullable":false,"type":"boolean"},"clinician_require_mfa":{"example":false,"nullable":false,"type":"boolean"},"clinician_show_timeline":{"example":false,"nullable":false,"type":"boolean"},"email_template_id_clinic_logging_completion":{"example":"en:xxx","nullable":false,"type":"string"},"email_template_id_clinic_logging_starts_tomorrow":{"example":"en:xxx","nullable":false,"type":"string"},"email_template_id_clinic_onboarding":{"example":"en:xxx","nullable":false,"type":"string"},"email_template_id_clinic_registered_but_no_meals":{"example":"en:xxx","nullable":false,"type":"string"},"email_template_id_clinic_reminder_to_continue_logging":{"example":"en:xxx","nullable":false,"type":"string"},"email_template_id_clinic_report_available":{"example":"en:xxx","nullable":false,"type":"string"},"email_template_id_clinic_thirty_day_subscription_inactive_logging_reminder":{"example":"en:xxx","nullable":false,"type":"string"},"email_template_id_clinic_upcoming_subscription":{"example":"en:xxx","nullable":false,"type":"string"},"email_template_id_returning_invitation":{"example":"en:xxx","nullable":false,"type":"string"},"hospital_patient_custom_fields_json":{"example":"","nullable":false,"type":"string"},"hospital_patient_has_external_id":{"example":false,"nullable":false,"type":"boolean"},"lifecycle_messaging_variant_patient_invited":{"example":"clinician","nullable":false,"type":"string"},"lifecycle_messaging_variant_patient_logging_completed":{"example":"clinician","nullable":false,"type":"string"},"lifecycle_messaging_variant_patient_report_available":{"example":"clinician","nullable":false,"type":"string"},"lifecycle_messaging_variant_patient_subscription_notification":{"example":"clinician","nullable":false,"type":"string"},"lifecycle_messaging_variant_patient_subscription_reminder":{"example":"clinician","nullable":false,"type":"string"},"patient_app_care_team_experience":{"example":false,"nullable":false,"type":"boolean"},"patient_app_coaching_tab":{"example":false,"nullable":false,"type":"boolean"},"patient_app_extended_logging_types":{"example":"exercise, insulin","nullable":true,"type":"string"},"patient_app_guided_health_program":{"example":false,"nullable":false,"type":"boolean"},"patient_app_hide_meal_after_n_hours":{"example":"5","nullable":true,"type":"string"},"patient_app_hide_nutrition_starplot":{"example":false,"nullable":true,"type":"boolean"},"patient_app_key_nutrients":{"example":"protein_g, fat_g, default_carbs_g, energy_kcal","nullable":true,"type":"string"},"patient_app_mindful_eating_survey":{"example":false,"nullable":false,"type":"boolean"},"patient_app_nutritional_insights":{"example":true,"nullable":false,"type":"boolean"},"patient_app_nutritional_insights_sections_to_hide":{"example":"ultraprocessed foods","nullable":true,"type":"string"},"patient_app_partner_branding":{"example":"dexcom","nullable":true,"type":"string"},"patient_app_partner_movano":{"example":false,"nullable":false,"type":"boolean"},"patient_app_partner_oauth_provider":{"example":"dexcom","nullable":true,"type":"string"},"patient_app_pii_minimal_masking":{"example":false,"nullable":true,"type":"boolean"},"patient_app_primary_macronutrient":{"example":"default_carbs_g","nullable":true,"type":"string"},"patient_app_primary_macronutrient_can_edit":{"example":true,"nullable":false,"type":"boolean"},"patient_app_show_dev_settings":{"example":true,"nullable":false,"type":"boolean"},"patient_app_show_diet_score":{"example":true,"nullable":false,"type":"boolean"},"patient_app_show_macro_nutrition_card":{"example":true,"nullable":false,"type":"boolean"},"patient_app_show_nutrition_data_and_insights":{"example":true,"nullable":false,"type":"boolean"},"patient_app_show_schedule_call_with_doctor":{"example":false,"nullable":false,"type":"boolean"},"patient_app_use_care_team_version":{"example":false,"nullable":false,"type":"boolean"},"patient_app_use_timeline":{"example":true,"nullable":false,"type":"boolean"},"patient_app_use_v3_ui":{"example":true,"nullable":false,"type":"boolean"},"patient_app_v2_care_team_ui":{"example":false,"nullable":false,"type":"boolean"},"patient_can_view_pdf_reports":{"example":true,"nullable":false,"type":"boolean"},"patient_default_measure_system":{"example":"metric, imperial, auto, or none","nullable":false,"type":"string"},"patient_enforce_subscription":{"example":false,"nullable":false,"type":"boolean"},"patient_glucose_units_mmol_l":{"nullable":false,"type":"boolean"},"patient_goals_can_edit":{"example":true,"nullable":false,"type":"boolean"},"patient_preferred_nutrition_source":{"example":"usda","nullable":false,"type":"string"},"patient_report_quality_judge":{"example":false,"nullable":false,"type":"boolean"},"patient_send_meal_reminders":{"description":"this is still configurable by the patient, unless it is False - then all the alerts are blocked.","example":false,"nullable":false,"type":"boolean"},"patient_show_cals":{"example":true,"nullable":false,"type":"boolean"},"patient_show_carbs":{"example":true,"nullable":false,"type":"boolean"},"patient_show_dexcom_oauth":{"example":false,"nullable":false,"type":"boolean"},"patient_show_gender":{"example":true,"nullable":false,"type":"boolean"},"patient_show_total_carbs":{"example":true,"nullable":false,"type":"boolean"},"patient_use_exercise":{"example":true,"nullable":false,"type":"boolean"},"patient_use_medication":{"example":true,"nullable":false,"type":"boolean"},"patient_use_question":{"example":true,"nullable":false,"type":"boolean"},"patient_use_sleep":{"example":true,"nullable":false,"type":"boolean"},"user_require_password_strength":{"example":false,"type":"boolean"}}},"SendgridEmailEvent":{"properties":{"bounce_classification":{"nullable":true,"type":"string"},"category":{"type":"string"},"email":{"format":"email","type":"string"},"event":{"type":"string"},"reason":{"type":"string"},"sg_event_id":{"type":"string"},"sg_message_id":{"type":"string"},"smtp-id":{"type":"string"},"status":{"type":"string"},"timestamp":{"format":"int64","type":"integer"},"type":{"enum":["blocked","bounce"],"nullable":true,"type":"string"}}},"ShoppingItemCollectionKind":{"enum":["cart","saved"]},"ShoppingItemOriginType":{"enum":["food","meal_item","meal_item_custom_addon","recipe_ingredient","llm_generated"]},"ShoppingItemStatus":{"enum":["active","purchased","dismissed","expired"]},"ShoppingItemSuggestionKind":{"enum":["standalone","swap"]},"ShoppingItemSuggestionStatus":{"enum":["suggested","accepted","dismissed","expired"]},"ShoppingListInsightResponse":{"properties":{"grocery_insight_markdown":{"nullable":true,"type":"string"},"has_meaningful_insight":{"nullable":true,"type":"boolean"},"suggestion_date":{"format":"date","nullable":true,"type":"string"}},"type":"object"},"ShoppingListTipsResponse":{"properties":{"shopping_tips":{"items":{"$ref":"#/components/schemas/ShoppingTip"},"nullable":true,"type":"array"},"tips_date":{"format":"date","nullable":true,"type":"string"}},"type":"object"},"ShoppingTip":{"properties":{"additional_tips":{"description":"2\u20133 short bullet-style tips (4\u20138 words each) giving concrete actions the user can take now.","items":{"type":"string"},"nullable":true,"type":"array"},"category":{"nullable":true,"type":"string"},"cooking_method":{"description":"If category=culinary_medicine, the primary cooking method for this tip (e.g., roast, steam, stir-fry).","nullable":true,"type":"string"},"tip":{"nullable":true,"type":"string"}},"type":"object"},"SimplifiedClarifaiResponse":{"properties":{"food":{"type":"string"},"score":{"type":"number"}},"required":["food","score"]},"SleepTypeInRequestEnum":{"enum":["inBed","asleepUnspecified","awake","asleepCore","asleepDeep","asleepREM"],"type":"string"},"SlotInstructionsResponse":{"properties":{"instructions":{"items":{"type":"string"},"type":"array"},"source_url":{"nullable":true,"type":"string"}},"required":["instructions"]},"SubscriptionReportResponse":{"properties":{"expiration_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"},"insufficient_data":{"items":{"$ref":"#/components/schemas/PatientSubscriptionResponse"},"type":"array"},"sufficient_data":{"items":{"$ref":"#/components/schemas/PatientSubscriptionResponse"},"type":"array"}},"required":["expiration_date","sufficient_data","insufficient_data"]},"SubscriptionResponse":{"properties":{"default":{"description":"indicate which is the default","nullable":false,"type":"boolean"},"description":{"description":"description of the subscription","nullable":false,"type":"string"},"name":{"description":"name of the subscription","enum":["three-day","five-day","seven-day","ten-day","one-month","cgm14","14-day","21-day","28-day","custom"],"example":"three-day","type":"string"},"type":{"enum":["single","weekly","monthly","bi-weekly","4-weeks","custom"],"nullable":false,"type":"string"}},"required":["name","type","default","description"]},"SummaryStatementResponse":{"properties":{"date_since":{"format":"date-time","type":"string"},"date_until":{"format":"date-time","type":"string"},"dates_exclude":{"items":{"format":"date-time","type":"string"},"nullable":true,"type":"array"},"results":{"items":{"$ref":"#/components/schemas/SummaryStatementRowResponse"},"type":"array"}},"required":["date_since","date_until","results"]},"SummaryStatementRowResponse":{"properties":{"category":{"type":"string"},"id":{"description":"id for the given statement","type":"integer"},"sub_category":{"type":"string"},"text":{"type":"string"},"type":{"enum":["positive","negative","na"],"type":"string"}},"required":["id","category","sub_category","type","text"]},"SupportHelpDocumentResponse":{"properties":{"concise_answer":{"type":"string"},"content_hash":{"type":"string"},"links":{"items":{"$ref":"#/components/schemas/SupportHelpLinkResponse"},"type":"array"},"matched_phrases":{"items":{"type":"string"},"type":"array"},"revision":{"nullable":true,"type":"string"},"sanity_document_id":{"nullable":true,"type":"string"},"steps":{"items":{"type":"string"},"type":"array"},"title":{"type":"string"},"topic_id":{"type":"string"}},"required":["topic_id","title","concise_answer","steps","links","content_hash"],"type":"object"},"SupportHelpLinkResponse":{"properties":{"platform":{"enum":["ios","android","web","all"],"type":"string"},"title":{"type":"string"},"url":{"type":"string"}},"required":["title","url","platform"],"type":"object"},"SupportHelpSearchResponse":{"properties":{"content_hash":{"nullable":true,"type":"string"},"documents":{"items":{"$ref":"#/components/schemas/SupportHelpDocumentResponse"},"type":"array"},"fallback_reason":{"nullable":true,"type":"string"},"package_version":{"nullable":true,"type":"string"},"source":{"enum":["seed","sanity","rollback"],"nullable":true,"type":"string"},"used_fallback":{"type":"boolean"}},"required":["documents","used_fallback"],"type":"object"},"SupportMealTraceDiagnosis":{"properties":{"auditor_url":{"description":"Deep-link into the existing Food Auditor queue-item view","type":"string"},"confidence":{"description":"Model confidence in the verdict, 0.0 to 1.0","format":"float","type":"number"},"explanation":{"description":"Short walkthrough of the signals that led to the verdict","type":"string"},"langfuse_session_url":{"description":"Deep-link to the Langfuse session for this MPQ","type":"string"},"probable_failure_reason":{"description":"One-sentence description of the likely failure (empty when verdict=ok)","type":"string"},"probable_failure_stage":{"description":"Pipeline stage most likely responsible when verdict=failed","nullable":true,"type":"string"},"suggested_next_steps":{"description":"Actionable follow-up steps for the support engineer","items":{"type":"string"},"type":"array"},"verdict":{"description":"Top-level LLM verdict on the pipeline run","enum":["ok","failed","ambiguous"],"type":"string"}},"required":["verdict","probable_failure_reason","explanation","suggested_next_steps","confidence","langfuse_session_url","auditor_url"]},"SwapConfirmRequest":{"properties":{"expected_recipe_label":{"nullable":true,"type":"string"},"slot_id":{"type":"integer"},"suggestion_index":{"minimum":0,"type":"integer"}},"required":["slot_id","suggestion_index"]},"SwapIngredientRequest":{"properties":{"ingredient_index":{"type":"integer"},"keyword":{"type":"string"},"slot_id":{"type":"integer"}},"required":["slot_id","ingredient_index","keyword"]},"SwapIngredientResponse":{"properties":{"suggestions":{"items":{"properties":{"food_name":{"type":"string"},"ingredient_line":{"type":"string"}},"type":"object"},"type":"array"}},"required":["suggestions"]},"SwapRecipeRequest":{"properties":{"keywords":{"type":"string"},"slot_id":{"type":"integer"}},"required":["slot_id","keywords"]},"SwapRecipeResponse":{"properties":{"daily_summary":{"nullable":true,"type":"object"},"slot":{"$ref":"#/components/schemas/MealPlanSlotResponse"}},"required":["slot"]},"SwapSuggestionsRequest":{"properties":{"keywords":{"type":"string"},"slot_id":{"type":"integer"}},"required":["slot_id","keywords"]},"SwapSuggestionsResponse":{"properties":{"suggestions":{"items":{"type":"object"},"type":"array"}},"required":["suggestions"]},"TaskResultResponse":{"properties":{"link":{"nullable":false,"type":"string"},"result_http_body_json":{"nullable":true,"type":"object"},"result_http_status":{"nullable":true,"type":"number"},"task_error_name":{"nullable":true,"type":"string"},"task_id":{"example":"1234","nullable":false,"type":"string"},"task_is_error":{"example":false,"nullable":false,"type":"boolean"},"task_is_pending":{"example":false,"nullable":false,"type":"boolean"},"task_is_success":{"example":false,"nullable":false,"type":"boolean"},"task_status":{"enum":["pending","success","error"],"nullable":false,"type":"string"}}},"TdeeCalculateRequest":{"properties":{"activity_level":{"enum":["sedentary","lightly_active","moderately_active","very_active","extra_active"],"type":"string"},"age_years":{"type":"integer"},"height_cm":{"type":"number"},"sex":{"enum":["male","female"],"type":"string"},"weight_kg":{"type":"number"}},"required":["age_years","weight_kg","height_cm","sex","activity_level"]},"TdeeCalculateResponse":{"properties":{"bmr_calories":{"type":"integer"},"macros_suggestion":{"nullable":true,"properties":{"carbs_g":{"type":"number"},"fat_g":{"type":"number"},"protein_g":{"type":"number"}},"type":"object"},"tdee_calories":{"type":"integer"}},"required":["tdee_calories","bmr_calories"]},"TelemetryEventRequest":{"properties":{"properties":{"additionalProperties":true,"nullable":false,"type":"object"},"value":{"example":1,"nullable":false,"type":"number"}},"required":["value","properties"],"type":"object"},"TranslatedStringResponse":{"properties":{"created_time":{"format":"date-time","nullable":true,"type":"string"},"id":{"example":123,"nullable":false,"type":"number"},"key":{"nullable":false,"type":"string"},"lang":{"nullable":false,"type":"string"},"plurality":{"nullable":false,"type":"string"},"scope":{"nullable":false,"type":"string"},"source":{"nullable":false,"type":"string"},"updated_time":{"format":"date-time","nullable":true,"type":"string"},"value":{"nullable":false,"type":"string"}},"required":["id","scope","key","lang","plurality","value","source"]},"TwilioSmsEvent":{"properties":{"AccountSid":{"items":{"type":"string"},"type":"array"},"Body":{"items":{"type":"string"},"type":"array"},"From":{"items":{"type":"string"},"type":"array"},"FromCity":{"items":{"type":"string"},"type":"array"},"FromCountry":{"items":{"type":"string"},"type":"array"},"FromState":{"items":{"type":"string"},"type":"array"},"MessageSid":{"items":{"type":"string"},"type":"array"},"MessagingServiceSid":{"items":{"type":"string"},"type":"array"},"NumMedia":{"items":{"type":"string"},"type":"array"},"NumSegments":{"items":{"type":"string"},"type":"array"},"OptOutType":{"items":{"type":"string"},"type":"array"},"To":{"items":{"type":"string"},"type":"array"}},"required":["From"]},"TwimlResponse":{"type":"string","xml":{"name":"Response"}},"UpdateBrandRequest":{"properties":{"brand_type":{"enum":["standard","store_brand","restaurant"],"type":"string"},"country":{"nullable":true,"type":"string"},"manufacturer_id":{"nullable":true,"type":"integer"},"name":{"type":"string"},"status":{"enum":["active","pending_review","deprecated"],"type":"string"}},"type":"object"},"UpdateClinicRequest":{"properties":{"address":{"description":"Street address (line 1) where the clinic is located","nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"clinic_address":{"nullable":true,"type":"string"},"clinic_email":{"nullable":true,"type":"string"},"clinic_logo_base64":{"description":"Base64-encoded logo image; optional data: URL prefix. Stored in public bucket when provided.","nullable":true,"type":"string"},"clinic_logo_filename":{"description":"Original filename for extension hint (e.g. logo.png)","nullable":true,"type":"string"},"clinic_logo_url":{"description":"Public HTTPS URL for clinic logo (used as-is when set without clinic_logo_base64)","nullable":true,"type":"string"},"clinic_phone_number":{"nullable":true,"type":"string"},"clinic_postal_code":{"nullable":true,"type":"string"},"clinic_state_province":{"nullable":true,"type":"string"},"clinic_type":{"enum":["corporate","research","collaboration","wellness","obesity","diabetes","metabolic syndrome","weight loss","migraine","gastroesophageal reflux","gi discomfort","vertigo","sleep apnea","rxlife","dexcom","menopause"],"type":"string"},"clinic_website":{"nullable":true,"type":"string"},"config_add_default_goals_to_new_patients":{"nullable":true,"type":"boolean"},"config_add_default_tips_to_new_patients":{"nullable":true,"type":"boolean"},"country":{"description":"Clinic mailing country. Valid values are 'Canada' or 'USA'. Aliases 'US' and 'United States' are accepted and normalized to 'USA'.","nullable":true,"type":"string"},"default_report_template":{"example":["clinical_summary_statement","calories_by_period","carbs_by_period","fasting_windows","average_plate_serv","macronutrient_distribution","micronutrient_summary_table","diet_quality_score","carbohydrate_frequency","GI_food_list","glycemic_index_frequency","average_fats_frequency","average_beverage_frequency","average_grains_frequency","average_proteins_frequency","food_dump","supplements"],"items":{"type":"string"},"nullable":true,"type":"array"},"description":{"nullable":true,"type":"string"},"flags_raw":{"$ref":"#/components/schemas/PostPatchClinicFlags","nullable":true},"full_name":{"description":"Full/legal clinic name","nullable":true,"type":"string"},"is_disabled":{"default":false,"type":"boolean"},"name":{"type":"string"},"receive_report_notification":{"nullable":true,"type":"boolean"},"receive_report_pdf_by_email":{"nullable":true,"type":"boolean"},"report_template_sections":{"nullable":true,"type":"object"},"state":{"description":"Region / state / province for structured address","nullable":true,"type":"string"},"zip_code":{"nullable":true,"type":"string"}},"required":["name","clinic_type"]},"UpdateClinikoAppointmentRequest":{"properties":{"additional_comments":{"nullable":true,"type":"string"},"patient_timezone":{"nullable":true,"type":"string"},"slot_id":{"type":"string"}},"required":["slot_id"],"type":"object"},"UpdateDataReviewerGroupRequest":{"properties":{"data_reviewer_group_id":{"type":"integer"},"group_name":{"type":"string"},"is_active":{"type":"boolean"}},"required":["data_reviewer_group_id","group_name","is_active"]},"UpdateDataReviewerRequest":{"properties":{"is_active":{"type":"boolean"},"review_level":{"enum":["analyst","reviewer"],"type":"string"}}},"UpdateDefaultClinicianLinkResponse":{"properties":{"description":{"type":"string"},"link":{"type":"string"},"title":{"type":"string"}},"required":["link"]},"UpdateFavoriteRequest":{"properties":{"addon_names":{"items":{"type":"string"},"nullable":true,"type":"array"},"custom_label":{"description":"user-defined label to be stored with the favorite.","nullable":true,"type":"string"},"favorite_id":{"description":"primary key of the favorite items","type":"number"},"food_name":{"description":"food name","example":"pizza","type":"string"},"note":{"description":"note to be stored with the favorite.","nullable":true,"type":"string"},"replacement_food_name":{"description":"replacement food as generated by the system","example":"thin crust pizza","nullable":true,"type":"string"},"serving_type_label":{"description":"special label indicating custom servings, such pizza size","nullable":true,"type":"string"},"serving_type_multiplier":{"description":"multiplier applied to a serving to account for sizing, such as a large pizza when the reference is a small pizza","nullable":true,"type":"number"},"serving_unit_amount":{"description":"unit amount in grams per serving","nullable":true,"type":"number"},"serving_unit_label":{"description":"unit of measure coinciding with the unit amount","nullable":true,"type":"string"},"servings":{"description":"number of servings to be stored","nullable":true,"type":"number"}}},"UpdateGoalRequest":{"properties":{"change":{"example":"increase, decrease","type":"string"},"goal_type":{"type":"string"},"meal_slots":{"items":{"enum":["breakfast","lunch","dinner","snack"],"type":"string"},"nullable":true,"type":"array"},"period":{"enum":["day","week","breakfast","lunch","dinner","snack","meal"],"type":"string"},"target_name":{"example":"vitamin_c_mg","type":"string"},"target_range_high":{"nullable":true,"type":"number"},"target_range_low":{"nullable":true,"type":"number"},"target_range_type":{"enum":["above","below","within"],"nullable":true,"type":"string"},"target_value":{"type":"number"}},"required":["goal_type","change","target_name","target_value","period"]},"UpdateHospitalRequest":{"properties":{"address":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"country":{"description":"Hospital country. Valid values are 'Canada' or 'USA'. Aliases 'US' and 'United States' are accepted and normalized to 'USA'.","nullable":true,"type":"string"},"description":{"nullable":true,"type":"string"},"full_name":{"nullable":true,"type":"string"},"invitation_email_logo_link":{"nullable":true,"type":"string"},"invitation_email_logo_url":{"nullable":true,"type":"string"},"name":{"type":"string"},"state":{"nullable":true,"type":"string"},"zip_code":{"nullable":true,"type":"string"}},"required":["name"]},"UpdateMealItemRequest":{"properties":{"addons":{"default":[],"example":[],"items":{"type":"string"},"type":"array"},"change_context":{"$ref":"#/components/schemas/QA2ChangeContext","nullable":true,"type":"object"},"custom_addons":{"items":{"$ref":"#/components/schemas/MealItemCustomAddonRequest"},"nullable":true,"type":"array"},"custom_item":{"default":false,"nullable":true,"type":"boolean"},"custom_item_source":{"nullable":true,"type":"string"},"custom_item_source_id":{"nullable":true,"type":"string"},"custom_nutrient_estimates":{"$ref":"#/components/schemas/NutrientEstimatesRequest","nullable":true,"type":"object"},"extra_addons":{"default":[],"example":[],"items":{"type":"string"},"type":"array"},"food_match_details":{"$ref":"#/components/schemas/CreateMealItemFoodMatchDetailsRequest","nullable":true,"type":"object"},"food_name":{"type":"string"},"food_name_alias":{"nullable":true,"type":"string"},"food_name_translations":{"nullable":true,"type":"object"},"food_replacement_name":{"example":null,"nullable":true,"type":"string"},"id":{"nullable":true,"type":"integer"},"meal_photo_id":{"nullable":true,"type":"integer"},"meal_push_question":{"$ref":"#/components/schemas/UpdateMealPushQuestionRequest","nullable":true,"type":"object"},"note":{"example":null,"nullable":true,"type":"string"},"nutrient_overrides":{"$ref":"#/components/schemas/NutrientOverrideCollection","nullable":true,"type":"object"},"percent_eaten":{"default":1,"nullable":true,"type":"number"},"preparation_method":{"$ref":"#/components/schemas/PreparationMethodEnum","default":null,"nullable":true},"rxfood_id":{"nullable":true,"type":"string"},"serving_type_label":{"example":null,"nullable":true,"type":"string"},"serving_type_multiplier":{"example":null,"nullable":true,"type":"number"},"serving_unit_amount":{"type":"number"},"serving_unit_label":{"type":"string"},"serving_unit_label_translations":{"nullable":true,"type":"object"},"servings":{"type":"number"},"source_meal_id":{"description":"meal id the row was copied from when logging from recent items","nullable":true,"type":"integer"},"source_meal_item_custom_addon_id":{"description":"custom addon id the row was copied from when logging from recent items","nullable":true,"type":"integer"},"source_meal_item_id":{"description":"meal item id the row was copied from when logging from recent items","nullable":true,"type":"integer"}},"required":["food_name","serving_unit_label","serving_unit_amount","addons","extra_addons"]},"UpdateMealPushQuestionRequest":{"properties":{"id":{"nullable":true,"type":"integer"},"meal_item_id":{"nullable":true,"type":"integer"},"question_focus_region":{"$ref":"#/components/schemas/MealPushQuestionFocusRegion"},"question_response":{"$ref":"#/components/schemas/UserSurveyResponses"},"question_status":{"$ref":"#/components/schemas/MealPushQuestionStatusEnum"},"question_type":{"$ref":"#/components/schemas/MealPushQuestionTypeEnum"}}},"UpdateMealRequest":{"properties":{"meal_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"},"meal_name":{"enum":["breakfast","lunch","dinner","snack"],"type":"string"},"meal_time":{"description":"time in format hh:mm:ss","example":"17:30:00","type":"string"}},"required":["meal_name","meal_date","meal_time"]},"UpdatePatientBookmarkRequest":{"properties":{"name":{"example":"Morning Granola","nullable":false,"type":"string"},"note":{"example":"Some bookmark notes","nullable":true,"type":"string"}},"required":["name"],"type":"object"},"UpdatePatientEmotionRequest":{"properties":{"emotion":{"nullable":true,"type":"string"},"emotion_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","nullable":true,"type":"string"},"emotion_time":{"description":"time in format hh:mm:ss","example":"17:30:00","nullable":true,"type":"string"},"note":{"nullable":true,"type":"string"},"question":{"nullable":true,"type":"string"}},"required":["emotion_date","emotion_time","question","emotion"]},"UpdatePatientGuidedHealthModuleStateRequest":{"properties":{"module_completed_at":{"description":"YYYY-MM-DD HH:MM:SS in UTC","nullable":true,"type":"string"},"module_started_at":{"description":"YYYY-MM-DD HH:MM:SS in UTC","nullable":true,"type":"string"},"state":{"additionalProperties":true,"nullable":true,"type":"object"}}},"UpdatePatientReportDataRequest":{"properties":{"patient_report_data_response":{"$ref":"#/components/schemas/PatientReportDataResponse","nullable":true,"type":"object"}}},"UpdatePatientReportImageRequest":{"properties":{"location":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"report_section":{"example":"nutrients_summary","type":"string"}},"required":["report_section","location"]},"UpdatePatientReportRequest":{"properties":{"comparison_report_id":{"description":"Report to compare against for a comparison report","nullable":true,"type":"integer"},"is_archived":{"example":false,"type":"boolean"},"is_deleted":{"example":false,"type":"boolean"},"is_read_only":{"example":false,"type":"boolean"},"report_type":{"description":"link to template file","example":"default","type":"string"},"sections":{"example":["summary","calories_by_period","carbs_by_period","fasting_windows","average_plate","macronutrient_distribution","micronutrient_trends","diet_score","nutrients_summary","carb_daily_intake","GI_food_list","glycemic_index_frequency","average_fats_frequency","average_water_frequency","average_grains_frequency","average_proteins_frequency"],"items":{"type":"string"},"type":"array"},"status":{"default":"draft","type":"string"},"sudo_clinician_id":{"description":"For use by admin only when creating on behalf of an existing clinician","nullable":true,"type":"integer"}},"required":["status"]},"UpdatePatientReportSummaryBlockRequest":{"properties":{"evidence":{"description":"reference url for supporting evidence","example":[],"items":{"type":"string"},"type":"array"},"report_section":{"description":"location of summary text","example":"summary","type":"string"},"summary_text":{"description":"text to be provided by the clinician","type":"string"}},"required":["report_section"]},"UpdatePatientShoppingItemRequest":{"properties":{"added_by_user_id":{"nullable":true,"type":"integer"},"calculated_servings":{"nullable":true,"type":"number"},"category_label":{"nullable":true,"type":"string"},"custom_item":{"nullable":true,"type":"boolean"},"food_name":{"nullable":true,"type":"string"},"food_name_alias":{"nullable":true,"type":"string"},"food_name_alias_translations":{"nullable":true,"type":"object"},"food_name_translations":{"nullable":true,"type":"object"},"global_order":{"nullable":true,"type":"integer"},"net_serving_size_g":{"nullable":true,"type":"number"},"notes":{"nullable":true,"type":"string"},"origin_id":{"nullable":true,"type":"string"},"origin_type":{"$ref":"#/components/schemas/ShoppingItemOriginType","nullable":true},"package_size_amount":{"nullable":true,"type":"number"},"package_size_unit_label":{"nullable":true,"type":"string"},"position":{"nullable":true,"type":"integer"},"preparation_method":{"$ref":"#/components/schemas/PreparationMethodEnum","nullable":true},"quantity":{"nullable":true,"type":"integer"},"serving_unit_amount":{"nullable":true,"type":"number"},"serving_unit_label":{"nullable":true,"type":"string"},"serving_unit_label_translations":{"nullable":true,"type":"object"},"servings":{"nullable":true,"type":"number"},"status":{"$ref":"#/components/schemas/ShoppingItemStatus","nullable":true},"tags":{"items":{"type":"string"},"nullable":true,"type":"array"}},"type":"object"},"UpdatePatientSubscriptionRequest":{"properties":{"expiration_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"},"name":{"description":"name of the subscription","enum":["three-day","five-day","seven-day","ten-day","one-month","cgm14","14-day","21-day","28-day","custom"],"example":"three-day","type":"string"},"report_date":{"description":"calendar date in format YYYY-MM-DD. Must be equal to or greater than the expiration date","example":"2019-01-05","nullable":true,"type":"string"},"start_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"},"type":{"enum":["single","weekly","monthly","bi-weekly","4-weeks","custom"],"nullable":false,"type":"string"}},"required":["name","type","start_date","expiration_date"]},"UpdateQualityAssuranceLogRequest":{"properties":{"confidence_identification":{"nullable":true,"type":"integer"},"confidence_sizing":{"nullable":true,"type":"integer"},"is_approved":{"nullable":false,"type":"boolean"},"is_escalated":{"nullable":false,"type":"boolean"},"is_reviewed":{"nullable":false,"type":"boolean"},"level_of_difficulty":{"nullable":true,"type":"integer"},"note":{"nullable":true,"type":"string"},"questionnaire":{"description":"JSON representing question with a binary response","nullable":true,"type":"object"},"review_type":{"nullable":true,"type":"string"}},"required":["is_reviewed","is_escalated","is_approved","note"]},"UsdaApiNutritionResponse":{"properties":{"food_name":{"nullable":false,"type":"string"},"nutrients":{"items":{"$ref":"#/components/schemas/UsdaNutritionResponse"},"type":"object"},"usda_id":{"nullable":false,"type":"integer"}},"required":["usda_id"]},"UsdaApiSearchResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/UsdaApiSearchRowResponse"},"type":"array"},"search_term":{"example":"apples","nullable":false,"type":"string"}},"required":["results"]},"UsdaApiSearchRowResponse":{"properties":{"additional_descriptions":{"nullable":true,"type":"string"},"data_type":{"type":"string"},"description":{"nullable":false,"type":"string"},"fdcid":{"nullable":false,"type":"integer"},"food_category":{"type":"string"},"food_category_id":{"type":"integer"},"food_code":{"type":"string"},"published_date":{"type":"string"}},"required":["fdcId","description"]},"UsdaFoodResponse":{"properties":{"available_date":{"nullable":true,"type":"string"},"brand_name":{"nullable":true,"type":"string"},"brand_owner":{"nullable":true,"type":"string"},"branded_food_category":{"nullable":true,"type":"string"},"data_source":{"nullable":true,"type":"string"},"discontinued_date":{"nullable":true,"type":"string"},"fdcid":{"nullable":true,"type":"number"},"food_class":{"nullable":true,"type":"string"},"food_nutrients":{"items":{"type":"string"},"nullable":true,"type":"array"},"gtin_upc":{"nullable":true,"type":"string"},"ingredients":{"nullable":true,"type":"string"},"market_country":{"nullable":true,"type":"string"},"modified_date":{"nullable":true,"type":"string"},"name":{"nullable":true,"type":"string"},"package_weight":{"nullable":true,"type":"string"},"publication_date":{"nullable":true,"type":"string"},"serving_size":{"nullable":true,"type":"string"},"serving_size_unit":{"nullable":true,"type":"string"},"short_description":{"nullable":true,"type":"string"},"sub_brand_name":{"nullable":true,"type":"string"}}},"UsdaMeasure":{"properties":{"addon":{"nullable":true,"type":"boolean"},"eqv":{"type":"number"},"label":{"type":"string"},"label_translations":{"nullable":true,"type":"object"},"qty":{"type":"number"},"ranking":{"nullable":true,"type":"integer"},"root_label":{"nullable":true,"type":"string"}},"required":["label","eqv","qty"]},"UsdaMeasuresList":{"items":{"$ref":"#/components/schemas/UsdaMeasure"},"nullable":false,"type":"array"},"UsdaNutritionResponse":{"properties":{"acetic_acid_g":{"nullable":true,"type":"number"},"added_sugars_g":{"nullable":true,"type":"number"},"alanine_g":{"nullable":true,"type":"number"},"alcohol_g":{"nullable":true,"type":"number"},"alpha_linolenic_acid_g":{"nullable":true,"type":"number"},"alpha_tocopherol_mg":{"nullable":true,"type":"number"},"arginine_g":{"nullable":true,"type":"number"},"ash_g":{"nullable":true,"type":"number"},"aspartic_acid_g":{"nullable":true,"type":"number"},"beta_sitosterol_mg":{"nullable":true,"type":"number"},"beta_tocopherol_mg":{"nullable":true,"type":"number"},"caffeine_mg":{"nullable":true,"type":"number"},"calcium_mg":{"nullable":true,"type":"number"},"campesterol_mg":{"nullable":true,"type":"number"},"carbohydrate_g":{"nullable":true,"type":"number"},"carotene_alpha_ug":{"nullable":true,"type":"number"},"carotene_beta_ug":{"nullable":true,"type":"number"},"cholesterol_mg":{"nullable":true,"type":"number"},"choline_mg":{"nullable":true,"type":"number"},"chromium_ug":{"nullable":true,"type":"number"},"citric_acid_g":{"nullable":true,"type":"number"},"copper_mg":{"nullable":true,"type":"number"},"cryptoxanthin_beta_ug":{"nullable":true,"type":"number"},"cystine_g":{"nullable":true,"type":"number"},"delta_tocopherol_mg":{"nullable":true,"type":"number"},"energy_kcal":{"nullable":true,"type":"number"},"energy_kj":{"nullable":true,"type":"number"},"erythritol_g":{"nullable":true,"type":"number"},"fat_g":{"nullable":true,"type":"number"},"fattyacid_10_0_g":{"nullable":true,"type":"number"},"fattyacid_12_0_g":{"nullable":true,"type":"number"},"fattyacid_14_0_g":{"nullable":true,"type":"number"},"fattyacid_14_1_g":{"nullable":true,"type":"number"},"fattyacid_15_0_g":{"nullable":true,"type":"number"},"fattyacid_15_1_g":{"nullable":true,"type":"number"},"fattyacid_16_0_g":{"nullable":true,"type":"number"},"fattyacid_16_1_g":{"nullable":true,"type":"number"},"fattyacid_17_0_g":{"nullable":true,"type":"number"},"fattyacid_17_1_g":{"nullable":true,"type":"number"},"fattyacid_18_0_g":{"nullable":true,"type":"number"},"fattyacid_18_1_g":{"nullable":true,"type":"number"},"fattyacid_18_2_g":{"nullable":true,"type":"number"},"fattyacid_18_3_g":{"nullable":true,"type":"number"},"fattyacid_18_4_g":{"nullable":true,"type":"number"},"fattyacid_20_0_g":{"nullable":true,"type":"number"},"fattyacid_20_1_g":{"nullable":true,"type":"number"},"fattyacid_20_4_g":{"nullable":true,"type":"number"},"fattyacid_20_5_n3_g":{"nullable":true,"type":"number"},"fattyacid_22_0_g":{"nullable":true,"type":"number"},"fattyacid_22_1_g":{"nullable":true,"type":"number"},"fattyacid_22_5_n3_g":{"nullable":true,"type":"number"},"fattyacid_22_6_n3_g":{"nullable":true,"type":"number"},"fattyacid_24_0_g":{"nullable":true,"type":"number"},"fattyacid_24_1_g":{"nullable":true,"type":"number"},"fattyacid_4_0_g":{"nullable":true,"type":"number"},"fattyacid_6_0_g":{"nullable":true,"type":"number"},"fattyacid_8_0_g":{"nullable":true,"type":"number"},"fattyacids_totalmonounsaturated_g":{"nullable":true,"type":"number"},"fattyacids_totalpolyunsaturated_g":{"nullable":true,"type":"number"},"fattyacids_totalsaturated_g":{"nullable":true,"type":"number"},"fattyacids_totaltrans_g":{"nullable":true,"type":"number"},"fattyacids_trans_monoenoic_g":{"nullable":true,"type":"number"},"fattyacids_trans_polyenoic_g":{"nullable":true,"type":"number"},"fiber_g":{"nullable":true,"type":"number"},"fluoride_ug":{"nullable":true,"type":"number"},"folate_dfe_ug":{"nullable":true,"type":"number"},"folate_food_ug":{"nullable":true,"type":"number"},"folate_total_ug":{"nullable":true,"type":"number"},"folic_acid_ug":{"nullable":true,"type":"number"},"fructose_g":{"nullable":true,"type":"number"},"galactose_g":{"nullable":true,"type":"number"},"gamma_tocopherol_mg":{"nullable":true,"type":"number"},"glucose_g":{"nullable":true,"type":"number"},"glutamic_acid_g":{"nullable":true,"type":"number"},"glycine_g":{"nullable":true,"type":"number"},"grams_per_cubic_inch":{"nullable":true,"type":"number"},"histidine_g":{"nullable":true,"type":"number"},"hydroxyproline_g":{"nullable":true,"type":"number"},"insoluble_dietary_fiber_g":{"nullable":true,"type":"number"},"iodine_ug":{"nullable":true,"type":"number"},"iron_mg":{"nullable":true,"type":"number"},"isoleucine_g":{"nullable":true,"type":"number"},"isomalt_g":{"nullable":true,"type":"number"},"lactic_acid_g":{"nullable":true,"type":"number"},"lactitol_g":{"nullable":true,"type":"number"},"lactose_g":{"nullable":true,"type":"number"},"leucine_g":{"nullable":true,"type":"number"},"linoleic_acid_g":{"nullable":true,"type":"number"},"lutein_zeaxanthin_ug":{"nullable":true,"type":"number"},"lycopene_ug":{"nullable":true,"type":"number"},"lysine_g":{"nullable":true,"type":"number"},"magnesium_mg":{"nullable":true,"type":"number"},"malic_acid_g":{"nullable":true,"type":"number"},"maltitol_g":{"nullable":true,"type":"number"},"maltose_g":{"nullable":true,"type":"number"},"manganese_mg":{"nullable":true,"type":"number"},"mannitol_g":{"nullable":true,"type":"number"},"methionine_g":{"nullable":true,"type":"number"},"molybdenum_ug":{"nullable":true,"type":"number"},"netcarb_g":{"nullable":true,"type":"number"},"niacin_mg":{"nullable":true,"type":"number"},"nitrogen_g":{"nullable":true,"type":"number"},"omega_six_fatty_acids_g":{"nullable":true,"type":"number"},"omega_three_fatty_acids_g":{"nullable":true,"type":"number"},"pantothenic_acid_mg":{"nullable":true,"type":"number"},"phenylalanine_g":{"nullable":true,"type":"number"},"phosphorus_mg":{"nullable":true,"type":"number"},"phytosterols_mg":{"nullable":true,"type":"number"},"polyols_g":{"nullable":true,"type":"number"},"potassium_mg":{"nullable":true,"type":"number"},"proline_g":{"nullable":true,"type":"number"},"protein_g":{"nullable":true,"type":"number"},"retinol_ug":{"nullable":true,"type":"number"},"riboflavin_mg":{"nullable":true,"type":"number"},"selenium_mcg":{"nullable":true,"type":"number"},"serine_g":{"nullable":true,"type":"number"},"sodium_mg":{"nullable":true,"type":"number"},"soluble_dietary_fiber_g":{"nullable":true,"type":"number"},"sorbitol_g":{"nullable":true,"type":"number"},"starch_g":{"nullable":true,"type":"number"},"stigmasterol_mg":{"nullable":true,"type":"number"},"sucrose_g":{"nullable":true,"type":"number"},"sugars_g":{"nullable":true,"type":"number"},"theobromine_mg":{"nullable":true,"type":"number"},"thiamin_mg":{"nullable":true,"type":"number"},"threonine_g":{"nullable":true,"type":"number"},"total_sterols_mg":{"nullable":true,"type":"number"},"tryptophan_g":{"nullable":true,"type":"number"},"tyrosine_g":{"nullable":true,"type":"number"},"usda_id":{"nullable":true,"type":"integer"},"valine_g":{"nullable":true,"type":"number"},"vitamin_a_iu":{"nullable":true,"type":"number"},"vitamin_a_rae_ug":{"nullable":true,"type":"number"},"vitamin_b12_added_ug":{"nullable":true,"type":"number"},"vitamin_b12_ug":{"nullable":true,"type":"number"},"vitamin_b6_mg":{"nullable":true,"type":"number"},"vitamin_c_mg":{"nullable":true,"type":"number"},"vitamin_d2_ug":{"nullable":true,"type":"number"},"vitamin_d2d3_ug":{"nullable":true,"type":"number"},"vitamin_d3_ug":{"nullable":true,"type":"number"},"vitamin_d_iu":{"nullable":true,"type":"number"},"vitamin_e_added_mg":{"nullable":true,"type":"number"},"vitamin_e_mg":{"nullable":true,"type":"number"},"vitamin_k_dihydrophylloquinone_ug":{"nullable":true,"type":"number"},"vitamin_k_menaquinone_ug":{"nullable":true,"type":"number"},"vitamin_k_ug":{"nullable":true,"type":"number"},"water_g":{"nullable":true,"type":"number"},"xylitol_g":{"nullable":true,"type":"number"},"zinc_mg":{"nullable":true,"type":"number"}}},"UserAppDataItemResponse":{"properties":{"created_time":{"format":"date-time","nullable":false,"type":"string"},"id":{"nullable":false,"type":"integer"},"key":{"nullable":false,"type":"string"},"updated_time":{"format":"date-time","nullable":false,"type":"string"},"user_id":{"nullable":false,"type":"integer"},"value":{"additionalProperties":true,"nullable":true,"type":"object"}},"required":["id","user_id","key","created_time","updated_time","value"]},"UserAuthorizationResponse":{"properties":{"clinician":{"$ref":"#/components/schemas/ClinicianResponse","nullable":true,"type":"object"},"message":{"nullable":true,"type":"string"},"oauth_token":{"$ref":"#/components/schemas/OAuthToken","nullable":true,"type":"object"},"reason":{"enum":["auth_failed","inactive_user","mfa_token_required","secure_token_invalid","token_invalid","sudo_failed"],"nullable":true,"type":"string"},"success":{"type":"boolean"}},"required":["success"],"type":"object"},"UserPrivacyResponse":{"properties":{"country_of_residence":{"nullable":true,"type":"string"},"disclaimer":{"description":"disclaimer in HTML format","type":"string"}},"required":["disclaimer","country_of_residence"]},"UserProvidedNutritionExtractionResult":{"properties":{"debug":{"additionalProperties":true,"nullable":true,"type":"object"},"nutrients":{"additionalProperties":{"type":"number"},"type":"object"},"serving_quantity":{"nullable":true,"type":"number"},"serving_size_g":{"nullable":true,"type":"number"},"serving_unit":{"nullable":true,"type":"string"},"source":{"enum":["text","image","both","company website","other websites","estimated"],"type":"string"},"version":{"nullable":false,"type":"string"}},"required":["version","source","nutrients"]},"UserResetPasswordByTokenRequest":{"properties":{"email":{"type":"string"},"new_password":{"minLength":8,"type":"string"},"token":{"type":"string"}},"required":["email","token","new_password"]},"UserResponse":{"properties":{"active":{"nullable":true,"type":"boolean"},"country_of_residence":{"nullable":true,"type":"string"},"created_time":{"format":"date-time","type":"string"},"email":{"type":"string"},"email_verified":{"type":"boolean"},"first_name":{"type":"string"},"id":{"type":"integer"},"is_internal":{"default":false,"nullable":true,"type":"boolean"},"last_name":{"type":"string"},"locale":{"nullable":true,"type":"string"},"password":{"type":"string"},"phone_number":{"nullable":true,"type":"string"},"registered":{"nullable":true,"type":"boolean"},"state":{"nullable":true,"type":"string"},"updated_time":{"format":"date-time","type":"string"},"use_fast_entry_audio":{"nullable":true,"type":"boolean"},"use_fast_entry_photo":{"nullable":true,"type":"boolean"},"use_fast_entry_text":{"nullable":true,"type":"boolean"},"use_local_photo":{"nullable":true,"type":"boolean"},"use_search_by_photo":{"nullable":true,"type":"boolean"},"use_search_by_text":{"nullable":true,"type":"boolean"},"zipcode":{"nullable":true,"type":"string"}}},"UserSearchHit":{"properties":{"email":{"type":"string"},"hospital_id":{"nullable":true,"type":"integer"},"id":{"type":"integer"},"is_internal":{"type":"boolean"},"name":{"type":"string"},"roles":{"items":{"enum":["clinician","patient","data_reviewer","admin","chef"],"type":"string"},"type":"array"},"type":{"enum":["user"],"type":"string"}},"required":["type","id","name","email","roles","is_internal"],"type":"object"},"UserSecureTokenAuthorization":{"properties":{"client_id":{"type":"string"},"redirect_uri":{"type":"string"},"response_type":{"description":"indicate token here","type":"string"},"secure_token":{"type":"string"}},"required":["secure_token","response_type","client_id","redirect_uri"],"type":"object"},"UserSupportRequest":{"properties":{"message":{"description":"message contents from the user","example":"I need help resetting my password","type":"string"}},"required":["message"]},"UserSupportResponse":{"properties":{"created_time":{"format":"date-time","type":"string"},"id":{"description":"id","example":"1","type":"integer"},"message":{"description":"message provided by the patient","example":"I need help!","type":"string"},"updated_time":{"format":"date-time","type":"string"}},"required":["id","message","created_time","updated_time"]},"UserSurveyForm":{"properties":{"items":{"items":{"$ref":"#/components/schemas/UserSurveyFormItem"},"type":"array"}},"required":["items"]},"UserSurveyFormItem":{"properties":{"id":{"type":"string"},"label":{"type":"string"},"label_short":{"nullable":true,"type":"string"},"label_short_translations":{"nullable":true,"type":"object"},"label_translations":{"nullable":true,"type":"object"},"optional":{"default":false,"nullable":true,"type":"boolean"},"widget":{"$ref":"#/components/schemas/UserSurveyFormWidget"}},"required":["id","label","widget"]},"UserSurveyFormResponse":{"properties":{"created_time":{"format":"date-time","nullable":false,"type":"string"},"id":{"nullable":false,"type":"integer"},"survey_form":{"$ref":"#/components/schemas/UserSurveyForm"},"survey_form_md5":{"nullable":false,"type":"string"},"survey_type":{"$ref":"#/components/schemas/UserSurveyTypeEnum"}},"required":["id","survey_type","survey_form","survey_form_md5","created_time"]},"UserSurveyFormWidget":{"discriminator":{"mapping":{"heading":"#/components/schemas/UserSurveyFormWidgetHeading","input-multicheck":"#/components/schemas/UserSurveyFormWidgetInputMulticheck","input-radio":"#/components/schemas/UserSurveyFormWidgetInputRadio","input-scale":"#/components/schemas/UserSurveyFormWidgetInputScale","input-text":"#/components/schemas/UserSurveyFormWidgetInputText"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/UserSurveyFormWidgetHeading"},{"$ref":"#/components/schemas/UserSurveyFormWidgetInputRadio"},{"$ref":"#/components/schemas/UserSurveyFormWidgetInputMulticheck"},{"$ref":"#/components/schemas/UserSurveyFormWidgetInputScale"},{"$ref":"#/components/schemas/UserSurveyFormWidgetInputText"}]},"UserSurveyFormWidgetHeading":{"properties":{"type":{"enum":["heading"],"nullable":false,"type":"string"}},"required":["type"],"type":"object"},"UserSurveyFormWidgetInputMulticheck":{"properties":{"options":{"items":{"$ref":"#/components/schemas/UserSurveyFormWidgetInputOption"},"type":"array"},"selection-type":{"default":"button","nullable":true,"type":"string"},"type":{"enum":["input-multicheck"],"nullable":false,"type":"string"}},"required":["type","options"],"type":"object"},"UserSurveyFormWidgetInputOption":{"properties":{"label":{"type":"string"},"label_translations":{"nullable":true,"type":"object"},"value":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"required":["label","value"],"type":"object"},"UserSurveyFormWidgetInputRadio":{"properties":{"options":{"items":{"$ref":"#/components/schemas/UserSurveyFormWidgetInputOption"},"type":"array"},"selection-type":{"default":"button","nullable":true,"type":"string"},"type":{"enum":["input-radio"],"nullable":false,"type":"string"}},"required":["type","options"],"type":"object"},"UserSurveyFormWidgetInputScale":{"properties":{"default_value":{"nullable":true,"oneOf":[{"type":"string"},{"type":"integer"}]},"label_max":{"type":"string"},"label_max_short":{"nullable":true,"type":"string"},"label_max_short_translations":{"nullable":true,"type":"object"},"label_max_translations":{"nullable":true,"type":"object"},"label_min":{"type":"string"},"label_min_short":{"nullable":true,"type":"string"},"label_min_short_translations":{"nullable":true,"type":"object"},"label_min_translations":{"nullable":true,"type":"object"},"options":{"items":{"$ref":"#/components/schemas/UserSurveyFormWidgetInputOption"},"nullable":true,"type":"array"},"range":{"items":{"type":"integer"},"maxItems":2,"minItems":2,"type":"array"},"range_interval":{"default":1,"nullable":true,"type":"integer"},"type":{"enum":["input-scale"],"nullable":false,"type":"string"}},"required":["type","range"],"type":"object"},"UserSurveyFormWidgetInputText":{"properties":{"multiline":{"nullable":true,"type":"boolean"},"placeholder":{"type":"string"},"placeholder_translations":{"nullable":true,"type":"object"},"type":{"enum":["input-text"],"nullable":false,"type":"string"}},"required":["type"],"type":"object"},"UserSurveyRelatedActivityTypeEnum":{"enum":["meal-log","recipe","meal-substitution"]},"UserSurveyResponseItem":{"properties":{"form_item_id":{"nullable":false,"type":"string"},"value":{"oneOf":[{"type":"string"},{"type":"integer"},{"items":{"oneOf":[{"type":"string"},{"type":"integer"}]},"type":"array"}]}},"required":["form_item_id","value"]},"UserSurveyResponseResponse":{"properties":{"created_time":{"format":"date-time","nullable":false,"type":"string"},"id":{"nullable":false,"type":"integer"},"related_activity_id":{"nullable":false,"type":"integer"},"related_activity_type":{"nullable":false,"type":"string"},"survey_form_md5":{"nullable":false,"type":"string"},"survey_responses":{"$ref":"#/components/schemas/UserSurveyResponses"},"survey_type":{"$ref":"#/components/schemas/UserSurveyTypeEnum"},"updated_time":{"format":"date-time","nullable":false,"type":"string"},"user_id":{"nullable":false,"type":"integer"}},"required":["id","user_id","related_activity_type","related_activity_id","survey_type","survey_form","survey_form_md5","created_time","updated_time"]},"UserSurveyResponses":{"properties":{"items":{"items":{"$ref":"#/components/schemas/UserSurveyResponseItem"},"type":"array"}}},"UserSurveyTypeEnum":{"enum":["mindful-eating","recipe-suggestion_like","recipe-suggestion_dislike","meal-substitution-suggestion_like","meal-substitution-suggestion_dislike"]},"UserTestPushRequest":{"properties":{"body":{"type":"string"}},"required":["body"]},"UserUpdateFcmRegistrationTokenRequest":{"properties":{"platform":{"enum":["ios","android"],"type":"string"},"timezone":{"example":"America/New_York","type":"string"},"token":{"type":"string"}},"required":["token","timezone"]},"UserUpdateRequest":{"properties":{"country_of_residence":{"type":"string"},"email":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"locale":{"type":"string"},"phone_number":{"type":"string"},"state":{"type":"string"},"timezone":{"type":"string"},"zipcode":{"type":"string"}}},"WaterResponse":{"properties":{"cups":{"type":"number"},"id":{"nullable":true,"type":"integer"},"patient_id":{"type":"integer"},"water_date":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},"required":["water_date","patient_id","cups"]},"WeeklyPatientEngagementResponse":{"properties":{"patient_id":{"type":"integer"},"sex":{"nullable":true,"type":"string"},"tracking_start_date":{"type":"string"},"weeks":{"items":{"$ref":"#/components/schemas/WeeklyPatientEngagementRowResponse"},"type":"array"}},"required":["weeks","patient_id"]},"WeeklyPatientEngagementResponses":{"properties":{"error_log":{"type":"string"},"logs":{"items":{"$ref":"#/components/schemas/WeeklyPatientEngagementResponse"},"type":"array"}},"required":["logs"]},"WeeklyPatientEngagementRowResponse":{"properties":{"avg_calcium_mg":{"type":"number"},"avg_calories_kcal":{"type":"number"},"avg_carbs_g":{"type":"number"},"avg_dash_score":{"nullable":true,"type":"number"},"avg_fat_g":{"type":"number"},"avg_fiber_g":{"type":"number"},"avg_iron_mg":{"type":"number"},"avg_protein_g":{"type":"number"},"avg_sodium_mg":{"type":"number"},"avg_sugars_g":{"type":"number"},"avg_vitamin_b12_ug":{"type":"number"},"avg_vitamin_d_iu":{"type":"number"},"date_since":{"format":"date-time","type":"string"},"date_until":{"format":"date-time","type":"string"},"frequency_fish":{"type":"number"},"frequency_fried":{"type":"number"},"frequency_high_fiber":{"type":"number"},"frequency_high_processed":{"type":"number"},"frequency_low_fiber":{"type":"number"},"frequency_min_processed":{"type":"number"},"frequency_not_fried":{"type":"number"},"frequency_plant":{"type":"number"},"frequency_poultry":{"type":"number"},"frequency_redmeat":{"type":"number"},"hei_score":{"nullable":true,"type":"number"},"n_audio_queue_searches":{"type":"number"},"n_breakfast_items":{"type":"number"},"n_breakfast_logs":{"type":"number"},"n_days":{"type":"number"},"n_dinner_items":{"type":"number"},"n_dinner_logs":{"type":"number"},"n_lunch_items":{"type":"number"},"n_lunch_logs":{"type":"number"},"n_nlp_queue_searches":{"type":"number"},"n_nlp_searches":{"type":"number"},"n_photo_ffe_queue_searches":{"type":"number"},"n_photo_ffe_searches":{"type":"number"},"n_photo_searches":{"type":"number"},"n_snack_items":{"type":"number"},"n_snack_logs":{"type":"number"},"n_text_searches":{"type":"number"}},"required":["date_since","date_until","n_days","n_breakfast_logs","n_breakfast_items","n_lunch_logs","n_lunch_items","n_dinner_logs","n_dinner_items","n_snack_items","n_snack_logs","n_nlp_searches","n_text_searches","n_photo_searches","n_photo_ffe_searches","avg_dash_score","hei_score","frequency_high_processed","frequency_min_processed","frequency_redmeat","frequency_poultry","frequency_fish","frequency_plant","frequency_high_fiber","frequency_low_fiber","frequency_fried","frequency_not_fried","avg_calories_kcal","avg_carbs_g","avg_fat_g","avg_protein_g","avg_sodium_mg","avg_fiber_g","avg_calcium_mg","avg_iron_mg","avg_vitamin_b12_ug","avg_vitamin_d_iu","avg_sugars_g"]},"WeeklyReportBlueprint":{"properties":{"active_metric_ids":{"items":{"type":"string"},"type":"array"},"effective_date":{"format":"date","type":"string"},"metrics":{"items":{"$ref":"#/components/schemas/WeeklyReportBlueprintMetric"},"type":"array"},"resolved_targets":{"items":{"$ref":"#/components/schemas/WeeklyReportBlueprintTarget"},"type":"array"},"revision_number":{"type":"integer"},"selection_mode":{"type":"string"}},"required":["revision_number","effective_date","selection_mode","active_metric_ids","resolved_targets","metrics"],"type":"object"},"WeeklyReportBlueprintMetric":{"properties":{"id":{"type":"string"},"statistics":{"$ref":"#/components/schemas/WeeklyReportStatistic"},"target":{"$ref":"#/components/schemas/WeeklyReportBlueprintTarget","nullable":true},"values":{"items":{"$ref":"#/components/schemas/WeeklyReportDatedValue"},"type":"array"}},"required":["id","values","statistics"],"type":"object"},"WeeklyReportBlueprintTarget":{"properties":{"metric_id":{"type":"string"},"range_high":{"nullable":true,"type":"number"},"range_low":{"nullable":true,"type":"number"},"range_type":{"nullable":true,"type":"string"}},"required":["metric_id","range_type","range_low","range_high"],"type":"object"},"WeeklyReportBodyClock":{"properties":{"bands":{"items":{"$ref":"#/components/schemas/WeeklyReportBodyClockBand"},"type":"array"},"period_end":{"format":"date","type":"string"},"period_start":{"format":"date","type":"string"},"time_basis":{"enum":["patient_local_meal_date_time"],"type":"string"},"timezone":{"type":"string"},"version":{"type":"integer"},"windows":{"items":{"$ref":"#/components/schemas/WeeklyReportBodyClockWindowDefinition"},"type":"array"}},"required":["version","period_start","period_end","timezone","time_basis","windows","bands"],"type":"object"},"WeeklyReportBodyClockAssessment":{"properties":{"kind":{"enum":["calories_before_4pm","daytime_window_share"],"type":"string"},"maximum_share":{"type":"number"},"minimum_share":{"type":"number"},"result":{"nullable":true,"type":"string"},"share":{"nullable":true,"type":"number"}},"required":["kind","minimum_share"],"type":"object"},"WeeklyReportBodyClockBand":{"properties":{"assessment":{"$ref":"#/components/schemas/WeeklyReportBodyClockAssessment"},"coverage":{"$ref":"#/components/schemas/WeeklyReportBodyClockCoverage"},"nutrient":{"enum":["calories","protein","fibre"],"type":"string"},"nutrient_label":{"type":"string"},"sparse_data":{"type":"boolean"},"total":{"nullable":true,"type":"number"},"unit_label":{"type":"string"},"windows":{"items":{"$ref":"#/components/schemas/WeeklyReportBodyClockWindow"},"type":"array"},"zero_total":{"type":"boolean"}},"required":["nutrient","nutrient_label","unit_label","total","coverage","sparse_data","zero_total","windows","assessment"],"type":"object"},"WeeklyReportBodyClockCoverage":{"properties":{"period_date_count":{"type":"integer"},"required_timed_date_count":{"type":"integer"},"timed_date_count":{"type":"integer"}},"required":["timed_date_count","period_date_count","required_timed_date_count"],"type":"object"},"WeeklyReportBodyClockWindow":{"allOf":[{"$ref":"#/components/schemas/WeeklyReportBodyClockWindowDefinition"},{"properties":{"context":{"nullable":true,"type":"string"},"result":{"nullable":true,"type":"string"},"share":{"nullable":true,"type":"number"},"value":{"nullable":true,"type":"number"}},"required":["value","share","result","context"],"type":"object"}]},"WeeklyReportBodyClockWindowDefinition":{"properties":{"key":{"enum":["morning","midday","afternoon_evening","night"],"type":"string"},"label":{"type":"string"},"time_range_label":{"type":"string"}},"required":["key","label","time_range_label"],"type":"object"},"WeeklyReportData":{"description":"Frozen weekly nutrition report display payload. Properties remain optional for v1 compatibility.","properties":{"blueprint":{"$ref":"#/components/schemas/WeeklyReportBlueprint"},"body_clock":{"$ref":"#/components/schemas/WeeklyReportBodyClock"},"detailed_report_reference":{"$ref":"#/components/schemas/WeeklyReportDetailedReportReference","nullable":true},"diet_quality":{"$ref":"#/components/schemas/WeeklyReportDietQuality"},"narrative":{"$ref":"#/components/schemas/WeeklyReportNarrative"},"pinned_nutrients":{"items":{"$ref":"#/components/schemas/WeeklyReportPinnedNutrient"},"type":"array"},"report":{"$ref":"#/components/schemas/WeeklyReportPeriod"},"source_meals":{"items":{"$ref":"#/components/schemas/WeeklyReportSourceMeal"},"type":"array"},"spotlights":{"items":{"$ref":"#/components/schemas/WeeklyReportMealSpotlight"},"type":"array"},"version":{"type":"integer"}},"type":"object"},"WeeklyReportDatedValue":{"properties":{"date":{"format":"date","type":"string"},"value":{"nullable":true,"type":"number"}},"required":["date","value"],"type":"object"},"WeeklyReportDetailResponse":{"discriminator":{"mapping":{"v1":"#/components/schemas/WeeklyReportDetailResponseV1","v2":"#/components/schemas/WeeklyReportDetailResponseV2"},"propertyName":"schema_version"},"oneOf":[{"$ref":"#/components/schemas/WeeklyReportDetailResponseV1"},{"$ref":"#/components/schemas/WeeklyReportDetailResponseV2"}]},"WeeklyReportDetailResponseV1":{"properties":{"data":{"additionalProperties":true,"type":"object"},"id":{"format":"uuid","type":"string"},"kind":{"type":"string"},"schema_version":{"enum":["v1"],"type":"string"},"snapshot_version":{"type":"integer"}},"required":["id","kind","schema_version","snapshot_version","data"],"type":"object"},"WeeklyReportDetailResponseV2":{"properties":{"data":{"$ref":"#/components/schemas/WeeklyReportData"},"id":{"format":"uuid","type":"string"},"kind":{"type":"string"},"schema_version":{"enum":["v2"],"type":"string"},"snapshot_version":{"type":"integer"}},"required":["id","kind","schema_version","snapshot_version","data"],"type":"object"},"WeeklyReportDetailedReportReference":{"properties":{"id":{"type":"integer"},"period_end":{"format":"date","type":"string"},"period_start":{"format":"date","type":"string"}},"required":["id","period_start","period_end"],"type":"object"},"WeeklyReportDietQuality":{"properties":{"date_since":{"format":"date","type":"string"},"date_until":{"format":"date","type":"string"},"series":{"items":{"$ref":"#/components/schemas/WeeklyReportDietQualityPoint"},"type":"array"},"version":{"type":"string"},"window_days":{"type":"integer"}},"required":["date_since","date_until","window_days","version","series"],"type":"object"},"WeeklyReportDietQualityPoint":{"properties":{"has_data":{"type":"boolean"},"log_date":{"format":"date","type":"string"},"max_score":{"type":"number"},"total_score":{"nullable":true,"type":"number"},"window_end_date":{"format":"date","type":"string"},"window_start_date":{"format":"date","type":"string"}},"required":["log_date","window_start_date","window_end_date","max_score","has_data"],"type":"object"},"WeeklyReportHistoryResponse":{"properties":{"next_cursor":{"format":"uuid","nullable":true,"type":"string"},"reports":{"items":{"$ref":"#/components/schemas/WeeklyReportSummary"},"type":"array"}},"required":["reports"],"type":"object"},"WeeklyReportMealSpotlight":{"properties":{"commentary":{"nullable":true,"type":"string"},"impact_direction":{"nullable":true,"type":"string"},"meal_id":{"nullable":true,"type":"integer"},"metric_amount":{"nullable":true,"type":"number"},"metric_id":{"type":"string"},"navigation_available":{"type":"boolean"},"reason":{"enum":["commentary_unavailable","meal_spotlight_unavailable","no_qualified_candidate","metric_not_meal_based"],"nullable":true,"type":"string"},"source_window":{"$ref":"#/components/schemas/WeeklyReportSourceWindow"},"status":{"description":"Terminal availability of this component in the immutable report. Partial retains the selected meal but omits unavailable generated commentary.","enum":["ready","partial","unavailable"],"type":"string"},"suggested_question":{"nullable":true,"type":"string"}},"required":["status","metric_id"],"type":"object"},"WeeklyReportNarrative":{"properties":{"body":{"type":"string"},"generation_attempts":{"type":"integer"},"headline":{"type":"string"},"input_version":{"type":"string"},"output_version":{"type":"string"},"pinned_nutrient_commentary":{"items":{"$ref":"#/components/schemas/WeeklyReportNarrativeCommentary"},"type":"array"},"report_schema_version":{"type":"string"},"state":{"enum":["generated","fallback"],"type":"string"}},"required":["state","report_schema_version","input_version","output_version","generation_attempts","headline","body","pinned_nutrient_commentary"],"type":"object"},"WeeklyReportNarrativeCommentary":{"properties":{"commentary":{"type":"string"},"metric_id":{"type":"string"}},"required":["metric_id","commentary"],"type":"object"},"WeeklyReportPeriod":{"properties":{"period_end":{"format":"date","type":"string"},"period_start":{"format":"date","type":"string"},"timezone":{"type":"string"}},"required":["period_start","period_end","timezone"],"type":"object"},"WeeklyReportPinnedNutrient":{"properties":{"display_name":{"type":"string"},"nutrient_key":{"type":"string"},"target":{"$ref":"#/components/schemas/WeeklyReportPinnedNutrientTarget"},"unit":{"nullable":true,"type":"string"},"weeks":{"items":{"$ref":"#/components/schemas/WeeklyReportPinnedWeek"},"type":"array"}},"required":["nutrient_key","display_name","target","weeks"],"type":"object"},"WeeklyReportPinnedNutrientTarget":{"properties":{"aggregator":{"type":"string"},"period":{"type":"string"},"range_high":{"nullable":true,"type":"number"},"range_low":{"nullable":true,"type":"number"},"range_type":{"nullable":true,"type":"string"},"value_basis":{"type":"string"}},"required":["range_type","range_low","range_high","period","aggregator","value_basis"],"type":"object"},"WeeklyReportPinnedWeek":{"properties":{"period_end":{"format":"date","type":"string"},"period_start":{"format":"date","type":"string"},"statistics":{"$ref":"#/components/schemas/WeeklyReportStatistic"}},"required":["period_start","period_end","statistics"],"type":"object"},"WeeklyReportRetryResponse":{"properties":{"attempt_count":{"type":"integer"},"run_id":{"format":"uuid","type":"string"},"started":{"type":"boolean"},"state":{"enum":["processing","ready","retry_available","unavailable"],"type":"string"}},"required":["run_id","state","attempt_count","started"],"type":"object"},"WeeklyReportSourceMeal":{"properties":{"id":{"type":"integer"},"navigation_available":{"type":"boolean"}},"required":["id","navigation_available"],"type":"object"},"WeeklyReportSourceWindow":{"properties":{"date_since":{"format":"date","type":"string"},"date_until":{"format":"date","type":"string"}},"required":["date_since","date_until"],"type":"object"},"WeeklyReportStatistic":{"properties":{"average":{"nullable":true,"type":"number"},"high":{"nullable":true,"type":"number"},"low":{"nullable":true,"type":"number"},"tracked_day_count":{"type":"integer"}},"required":["average","high","low","tracked_day_count"],"type":"object"},"WeeklyReportStatusResponse":{"properties":{"attempt_count":{"type":"integer"},"current_run_id":{"format":"uuid","nullable":true,"type":"string"},"latest_ready_report":{"$ref":"#/components/schemas/WeeklyReportSummary","nullable":true},"next_expected_date":{"format":"date","nullable":true,"type":"string"},"retryable":{"type":"boolean"},"state":{"enum":["not_started","processing","ready","retry_available","unavailable"],"type":"string"},"support_available":{"type":"boolean"}},"required":["state","retryable","attempt_count","support_available"],"type":"object"},"WeeklyReportSummary":{"properties":{"id":{"format":"uuid","type":"string"},"kind":{"type":"string"},"period_end":{"format":"date","type":"string"},"period_start":{"format":"date","type":"string"},"schema_version":{"type":"string"},"timezone":{"type":"string"}},"required":["id","period_start","period_end","timezone","kind","schema_version"],"type":"object"}},"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http","x-bearerInfoFunc":"app.api.oauth.verify_token"},"partnerApiKeyAuth":{"in":"header","name":"X-Api-Key","type":"apiKey","x-apikeyInfoFunc":"app.api.partner_api.auth.verify_partner_api_key"},"partnerOAuthAuth":{"scheme":"bearer","type":"http","x-bearerInfoFunc":"app.api.partner_oauth.resource_auth.verify_partner_oauth_token"}}},"info":{"description":"InnerAnalytics MNT server API specification.","title":"InnerAnalytics MNT Server","version":"1.0.0"},"openapi":"3.0.0","paths":{"/.well-known/oauth-authorization-server":{"get":{"description":"Discovery document so partners resolve endpoint URLs at runtime instead of hard-coding them. Public and non-sensitive.\n","operationId":"app.api.partner_oauth.metadata.get_authorization_server_metadata","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"authorization_endpoint":{"type":"string"},"code_challenge_methods_supported":{"items":{"type":"string"},"type":"array"},"grant_types_supported":{"items":{"type":"string"},"type":"array"},"issuer":{"type":"string"},"response_types_supported":{"items":{"type":"string"},"type":"array"},"revocation_endpoint":{"type":"string"},"revocation_endpoint_auth_methods_supported":{"items":{"type":"string"},"type":"array"},"scopes_supported":{"items":{"type":"string"},"type":"array"},"service_documentation":{"type":"string"},"token_endpoint":{"type":"string"},"token_endpoint_auth_methods_supported":{"items":{"type":"string"},"type":"array"}},"type":"object"}}},"description":"Authorization server metadata"}},"security":[],"summary":"OAuth 2.0 authorization server metadata (RFC 8414)","tags":["partner-oauth"]}},"/admin/archive-user":{"post":{"description":"Permanently closes the user's account without deleting records. The account can no longer authenticate or receive communications.\n","operationId":"app.api.user.post_admin_archive_user","parameters":[{"in":"query","name":"user_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminArchiveUserResponse"}}},"description":"Account closed successfully"},"400":{"description":"Cannot archive an admin account"},"404":{"description":"User not found"}},"summary":"Close and archive a user's account","tags":["admin"]}},"/admin/chefs":{"get":{"operationId":"app.api.chef.list_chefs","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ChefResponse"},"type":"array"}}},"description":"List of chefs","x-body-name":"response"},"403":{"description":"Not authorized"}},"summary":"List all chefs","tags":["chef-admin"]},"post":{"operationId":"app.api.chef.create_chef","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateChefRequest"}}},"required":true,"x-body-name":"body"},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChefResponse"}}},"description":"Chef granted","x-body-name":"response"},"400":{"description":"Invalid contributor_kind, or chef already active"},"403":{"description":"Not authorized"},"404":{"description":"User not found"}},"summary":"Grant chef status to an existing user","tags":["chef-admin"]}},"/admin/chefs/{chef_id}":{"delete":{"operationId":"app.api.chef.revoke_chef","parameters":[{"in":"path","name":"chef_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChefResponse"}}},"description":"Chef revoked","x-body-name":"response"},"403":{"description":"Not authorized"},"404":{"description":"Chef not found"}},"summary":"Revoke chef status (sets is_active to false; does not delete the row)","tags":["chef-admin"]}},"/admin/data/dummy":{"post":{"operationId":"app.util.populate_local_database.post_dummy_data","parameters":[{"in":"query","name":"patient_id","required":true,"schema":{"type":"number"}},{"in":"query","name":"reference_date","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation"}},"summary":"set up and populate local database","tags":["database"]}},"/admin/deactivate-user":{"post":{"operationId":"app.api.user.post_admin_deactivate_user","parameters":[{"in":"query","name":"user_id","required":true,"schema":{"type":"number"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Deactivate a user's account","tags":["admin"]}},"/admin/email_registered_non_logging_patients":{"post":{"operationId":"app.api.patient.post_email_registered_non_logging_patients","parameters":[{"in":"query","name":"reference_date","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"}},{"in":"query","name":"days_since_registration","required":true,"schema":{"type":"integer"}},{"in":"query","name":"with_valid_phone_number","required":false,"schema":{"description":"determines if a patient with a valid phone number would receive the email","type":"boolean"}},{"in":"query","name":"test_mode","required":false,"schema":{"description":"determines if the email would be sent or whether this is just a test","type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Send a reminder email to patients who are registered but not active","tags":["admin"]}},"/admin/initial_db_setup":{"post":{"operationId":"app.util.populate_local_database.create_local_database","responses":{"200":{"description":"successful operation"}},"summary":"set up and populate local database","tags":["database"]}},"/admin/operations_reports/appointments":{"get":{"operationId":"app.api.reports.operations_reports.get_appointments","responses":{"200":{"content":{"text/csv":{"schema":{"type":"string"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Retrieve food log report","tags":["admin"]}},"/admin/operations_reports/daily_sheets":{"get":{"operationId":"app.api.reports.operations_reports.get_daily_sheets","parameters":[{"in":"query","name":"clinic_ids","required":false,"schema":{"items":{"type":"integer"},"type":"array"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Retrieve daily sheets report","tags":["admin"]}},"/admin/operations_reports/email_histories":{"get":{"operationId":"app.api.reports.operations_reports.get_email_histories","responses":{"200":{"content":{"text/csv":{"schema":{"type":"string"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Retrieve food log report","tags":["admin"]}},"/admin/operations_reports/food_logs":{"get":{"operationId":"app.api.reports.operations_reports.get_food_logs","parameters":[{"in":"query","name":"min_created_date","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"}},{"in":"query","name":"min_meal_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"text/csv":{"schema":{"type":"string"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Retrieve food log report","tags":["admin"]}},"/admin/operations_reports/subscription_details":{"get":{"operationId":"app.api.reports.operations_reports.get_subscription_details","parameters":[{"in":"query","name":"min_meal_date","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"}}],"responses":{"200":{"content":{"text/csv":{"schema":{"type":"string"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Retrieve detailed subscription data with additional metrics","tags":["admin"]}},"/admin/operations_reports/subscriptions":{"get":{"operationId":"app.api.reports.operations_reports.get_subscriptions","parameters":[{"in":"query","name":"min_expiration_date","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"}}],"responses":{"200":{"content":{"text/csv":{"schema":{"type":"string"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Retrieve subscription data","tags":["admin"]}},"/admin/partners":{"get":{"operationId":"app.api.partner_api.admin.list_partners","responses":{"200":{"content":{"application/json":{"schema":{"items":{"type":"object"},"type":"array"}}},"description":"List of partners"},"403":{"description":"Not authorized"}},"summary":"List all partners","tags":["partner-admin"]},"post":{"operationId":"app.api.partner_api.admin.create_partner","requestBody":{"content":{"application/json":{"schema":{"properties":{"contact_email":{"type":"string"},"hospital_id":{"type":"integer"},"metadata":{"nullable":true,"type":"object"},"name":{"type":"string"},"rate_limit_rpm":{"default":60,"type":"integer"}},"required":["name","contact_email","hospital_id"],"type":"object"}}},"required":true,"x-body-name":"body"},"responses":{"201":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Partner created"},"403":{"description":"Not authorized"}},"summary":"Create a new partner","tags":["partner-admin"]}},"/admin/partners/{partner_id}":{"put":{"operationId":"app.api.partner_api.admin.update_partner","parameters":[{"in":"path","name":"partner_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"contact_email":{"type":"string"},"hospital_id":{"type":"integer"},"is_active":{"type":"boolean"},"metadata":{"nullable":true,"type":"object"},"name":{"type":"string"},"rate_limit_rpm":{"type":"integer"}},"type":"object"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Partner updated"},"403":{"description":"Not authorized"},"404":{"description":"Partner not found"}},"summary":"Update a partner","tags":["partner-admin"]}},"/admin/partners/{partner_id}/api-keys":{"post":{"operationId":"app.api.partner_api.admin.generate_api_key","parameters":[{"in":"path","name":"partner_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"expires_at":{"format":"date-time","nullable":true,"type":"string"},"label":{"nullable":true,"type":"string"}},"type":"object"}}},"required":false,"x-body-name":"body"},"responses":{"201":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"API key created (plaintext returned once)"},"403":{"description":"Not authorized"},"404":{"description":"Partner not found"}},"summary":"Generate a new API key for a partner","tags":["partner-admin"]}},"/admin/partners/{partner_id}/api-keys/{key_id}":{"delete":{"operationId":"app.api.partner_api.admin.revoke_api_key","parameters":[{"in":"path","name":"partner_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"key_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"API key revoked"},"403":{"description":"Not authorized"},"404":{"description":"API key not found"}},"summary":"Revoke an API key","tags":["partner-admin"]}},"/admin/partners/{partner_id}/oauth-clients":{"get":{"description":"Never returns stored secrets.","operationId":"app.api.partner_oauth.admin.list_oauth_clients","parameters":[{"in":"path","name":"partner_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PartnerOAuthClientResponse"},"type":"array"}}},"description":"Clients"},"404":{"description":"Partner not found"}},"security":[{"bearerAuth":[]}],"summary":"List a partner's OAuth clients","tags":["partner-admin"]},"post":{"description":"The generated client_secret is returned exactly once.","operationId":"app.api.partner_oauth.admin.create_oauth_client","parameters":[{"in":"path","name":"partner_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthClientRequest"}}},"required":true,"x-body-name":"body"},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthClientResponse"}}},"description":"Client created"},"400":{"description":"Validation error"},"404":{"description":"Partner not found"}},"security":[{"bearerAuth":[]}],"summary":"Register an OAuth client for a partner","tags":["partner-admin"]}},"/admin/partners/{partner_id}/oauth-clients/{client_pk}":{"delete":{"operationId":"app.api.partner_oauth.admin.disable_oauth_client","parameters":[{"in":"path","name":"partner_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"client_pk","required":true,"schema":{"type":"integer"}},{"in":"query","name":"revoke_grants","required":false,"schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"grants_revoked":{"type":"integer"},"message":{"type":"string"}},"type":"object"}}},"description":"Client disabled"},"404":{"description":"OAuth client not found"}},"security":[{"bearerAuth":[]}],"summary":"Disable an OAuth client","tags":["partner-admin"]},"put":{"operationId":"app.api.partner_oauth.admin.update_oauth_client","parameters":[{"in":"path","name":"partner_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"client_pk","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthClientRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthClientResponse"}}},"description":"Client updated"},"400":{"description":"Validation error"},"404":{"description":"OAuth client not found"}},"security":[{"bearerAuth":[]}],"summary":"Update an OAuth client","tags":["partner-admin"]}},"/admin/partners/{partner_id}/oauth-clients/{client_pk}/logo":{"post":{"description":"The logo is hosted by RxFood. A partner-hosted URL is deliberately not accepted: an <img> on the consent page pointing at the partner would leak the patient's IP, user agent and viewing time before consent.\n","operationId":"app.api.partner_oauth.admin.upload_oauth_client_logo","parameters":[{"in":"path","name":"partner_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"client_pk","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"format":"binary","type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthClientResponse"}}},"description":"Logo stored"},"400":{"description":"Unsupported image type or file too large"},"404":{"description":"OAuth client not found"}},"security":[{"bearerAuth":[]}],"summary":"Upload the partner's logo shown on the consent screen","tags":["partner-admin"]}},"/admin/partners/{partner_id}/oauth-clients/{client_pk}/previous-secret":{"delete":{"operationId":"app.api.partner_oauth.admin.revoke_previous_oauth_client_secret","parameters":[{"in":"path","name":"partner_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"client_pk","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthClientResponse"}}},"description":"Superseded secret revoked"},"404":{"description":"OAuth client not found"}},"security":[{"bearerAuth":[]}],"summary":"End a secret-rotation overlap immediately","tags":["partner-admin"]}},"/admin/partners/{partner_id}/oauth-clients/{client_pk}/rotate-secret":{"post":{"description":"The new client_secret is returned exactly once. `overlap_hours` keeps the superseded secret working for that long so the partner can deploy without an outage; it defaults to 0 (immediate cutover), which is the correct behaviour when rotating because of a suspected leak.\n","operationId":"app.api.partner_oauth.admin.rotate_oauth_client_secret","parameters":[{"in":"path","name":"partner_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"client_pk","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"nullable":true,"properties":{"overlap_hours":{"default":0,"maximum":168,"minimum":0,"type":"number"}},"type":"object"}}},"required":false,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthClientResponse"}}},"description":"Secret rotated"},"400":{"description":"Public clients have no secret"},"404":{"description":"OAuth client not found"}},"security":[{"bearerAuth":[]}],"summary":"Rotate a confidential client's secret","tags":["partner-admin"]}},"/admin/quality_assurance_logs/feedback_report":{"get":{"operationId":"app.api.queue.feedback.get_data_reviewer_feedback","parameters":[{"in":"query","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":false,"schema":{"type":"string"}},{"in":"query","name":"date_until","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/QualityAssuranceLogResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get feedback report on QA work by data reviewer.","tags":["auditor feedback"]}},"/admin/search":{"get":{"operationId":"app.api.admin_search.admin_search","parameters":[{"description":"Case-insensitive person name/email or organization name/full-name/description substring; exact numeric entity ID (optionally prefixed with","in":"query","name":"q","required":true,"schema":{"maxLength":255,"type":"string"}},{"description":"Comma-separated buckets to search; defaults to all buckets","in":"query","name":"types","required":false,"schema":{"default":"people,clinics,hospitals","type":"string"}},{"description":"Restrict people results to this role","in":"query","name":"role","required":false,"schema":{"enum":["clinician","patient","data_reviewer","admin","chef"],"type":"string"}},{"description":"Maximum results returned per requested bucket","in":"query","name":"limit","required":false,"schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}},{"description":"Number of matching results skipped per requested bucket","in":"query","name":"offset","required":false,"schema":{"default":0,"minimum":0,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminSearchResponse"}}},"description":"Search results grouped by entity type","x-body-name":"response"}},"summary":"Search people, clinics, and hospitals","tags":["admin"]}},"/cgm/clinicians/{clinician_id}/patients":{"get":{"operationId":"app.api.cgm.api.get_clinicians_patients","parameters":[{"in":"path","name":"clinician_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientCgmEntryResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the list of patients' CGM entries available for the specified clinician.","tags":["cgm"]}},"/cgm/patients/{patient_id}/cgm_data":{"get":{"operationId":"app.api.cgm.v2.api_v2.get_cgm_data","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"time_since_local","required":true,"schema":{"type":"string"}},{"in":"query","name":"time_until_local","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientCgmDataResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a patient's raw CGM-related data (note: a maximum of 5,000 datapoints will be returned; limit queries to 24h)","tags":["cgm"]}},"/cgm/patients/{patient_id}/daily_summary":{"get":{"operationId":"app.api.cgm.v2.api_v2.get_cgm_daily_summary","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientCgmDailySummaryResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the list of patients' CGM entries available for the specified clinician.","tags":["cgm"]}},"/cgm/patients/{patient_id}/dates-with-data":{"get":{"operationId":"app.api.cgm.v2.api_v2.get_patient_cgm_dates_with_data","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_until","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientCgmDatesWithDataResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Gets a list of dates with CGM data for a patient","tags":["cgm"]}},"/cgm/patients/{patient_id}/devices":{"get":{"operationId":"app.api.cgm.api.get_patient_cgm_devices_table","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientCGMDeviceTableResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get CGM device data for a patient","tags":["cgm"]}},"/cgm/patients/{patient_id}/report":{"get":{"operationId":"app.api.cgm.api.get_patient_cgm_report","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientReportResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Generate, upload, and log CGM report PDF for the given patient and date range","tags":["cgm"]}},"/cgm/patients/{patient_id}/report/preview":{"get":{"operationId":"app.api.cgm.api.get_patient_cgm_report_preview","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/pdf":{"schema":{"format":"binary","type":"string"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Generate, and return draft CGM report PDF for the given patient and date range","tags":["cgm"]}},"/cgm/patients/{patient_id}/report_data":{"get":{"operationId":"app.api.cgm.v2.api_v2.get_patient_cgm_report_data","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientCgmReportDataResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the list of patients' CGM entries available for the specified clinician.","tags":["cgm"]}},"/cgm/patients/{patient_id}/section_summaries":{"get":{"operationId":"app.api.cgm.v2.api_v2.get_cgm_section_summaries","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientCgmSectionSummaryResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the list of patients' CGM entries available for the specified clinician.","tags":["cgm"]}},"/cgm/patients/{patient_id}/upload":{"post":{"operationId":"app.api.cgm.api.post_cgm_data","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"description":"csv format - utf-8-sig","format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"x-body-name":"body"},"responses":{"200":{"description":"successful operation"}},"summary":"Upload patient's raw CGM data, compatible for both Abbott and Dexcom","tags":["cgm"]}},"/cgm/patients/{patient_id}/upload_to_db":{"post":{"operationId":"app.api.cgm.api.upload_to_db","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"description":"csv format - utf-8-sig","format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"x-body-name":"body"},"responses":{"200":{"description":"successful operation"}},"summary":"Upload patient's raw CGM data, compatible for both Abbott and Dexcom","tags":["cgm"]}},"/cgm/patients/{patient_id}/whole_summary":{"get":{"operationId":"app.api.cgm.v2.api_v2.get_cgm_whole_summary","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"type":"string"}},{"in":"query","name":"meal_name","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientCgmWholeSummaryResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the list of patients' CGM entries available for the specified clinician.","tags":["cgm"]}},"/cgm/reports/{cgm_entry_id}/pdf":{"get":{"operationId":"app.api.cgm.api.retrieve_patient_cgm_report","parameters":[{"in":"path","name":"cgm_entry_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/pdf":{"schema":{"format":"binary","type":"string"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the CGM report PDF for a given CGM entry ID","tags":["cgm"]}},"/cgm/{patient_id}/connections":{"get":{"operationId":"app.api.cgm.api.get_patient_cgm_connections","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientCGMConnectionStatusResult"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Gets the status of all CGM connections for a given patient","tags":["cgm"]}},"/cgm/{patient_id}/connections/{provider}":{"delete":{"operationId":"app.api.cgm.api.delete_patient_cgm_connection","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"provider","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientCGMConnectionDeleteResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Deletes a CGM connection for a given patient and provider","tags":["cgm"]}},"/cgm/{patient_id}/convert":{"post":{"operationId":"app.api.cgm.cgm.convert_cgm_data","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"description":"csv format - utf-8-sig","format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"x-body-name":"body"},"responses":{"200":{"content":{"text/csv":{"schema":{"type":"string"}}},"description":"successful operation","x-body-name":"response"}},"summary":"[DEPRECATED] load CGM data","tags":["cgm"]}},"/cgm/{patient_id}/convert/zip":{"post":{"operationId":"app.api.cgm.cgm.convert_cgm_data_to_zip","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"description":"csv format - utf-8-sig","format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"x-body-name":"body"},"responses":{"200":{"content":{"application/zip":{"schema":{"format":"binary","type":"string"}}},"description":"successful operation","x-body-name":"response"}},"summary":"[DEPRECATED] load CGM data and return a summarized zip file of the data","tags":["cgm"]}},"/cgm/{patient_id}/data/refetch":{"post":{"operationId":"app.api.cgm.api.post_cgm_data_refetch","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientCGMDataRefetchResult"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Refetches CGM data for a given patient","tags":["cgm"]}},"/chefs/recipes":{"get":{"operationId":"app.api.recipe.get_chef_recipes","parameters":[{"in":"query","name":"q","required":false,"schema":{"nullable":true,"type":"string"}},{"in":"query","name":"curation_status","required":false,"schema":{"enum":["draft","published","archived"],"nullable":true,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RecipeResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"List recipes owned by the current chef","tags":["recipes"]},"post":{"operationId":"app.api.recipe.post_chef_recipe","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRecipeRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipeResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Create a chef-owned draft recipe","tags":["recipes"]}},"/chefs/recipes/{recipe_id}":{"delete":{"operationId":"app.api.recipe.delete_chef_recipe","parameters":[{"in":"path","name":"recipe_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Delete a chef-owned recipe","tags":["recipes"]},"get":{"operationId":"app.api.recipe.get_chef_recipe","parameters":[{"in":"path","name":"recipe_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipeResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a chef-owned recipe","tags":["recipes"]},"put":{"operationId":"app.api.recipe.put_chef_recipe","parameters":[{"in":"path","name":"recipe_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRecipeRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipeResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Update a chef-owned recipe","tags":["recipes"]}},"/chefs/recipes/{recipe_id}/archive":{"post":{"operationId":"app.api.recipe.archive_chef_recipe","parameters":[{"in":"path","name":"recipe_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipeResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Archive a chef-owned recipe","tags":["recipes"]}},"/chefs/recipes/{recipe_id}/image-upload":{"post":{"operationId":"app.api.recipe.create_chef_recipe_image_upload","parameters":[{"in":"path","name":"recipe_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"ext","required":true,"schema":{"enum":["jpg","jpeg","png","webp"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipeImageUploadResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Create a signed image upload for a chef-owned recipe","tags":["recipes"]}},"/chefs/recipes/{recipe_id}/publish":{"post":{"operationId":"app.api.recipe.publish_chef_recipe","parameters":[{"in":"path","name":"recipe_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipeResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Publish a chef-owned recipe to the public library","tags":["recipes"]}},"/clinic-invitation/{invitation_id}":{"put":{"operationId":"app.api.patient.put_patient_clinic_invitation","parameters":[{"in":"path","name":"invitation_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"status","required":true,"schema":{"enum":["accepted","rejected","pending","expired","revoked"],"type":"string"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Update the patient's clinic invitation","tags":["clinic_invitation"]}},"/clinic_links/{clinic_type}/default_link":{"get":{"operationId":"app.api.clinician_link.get_default_clinic_links","parameters":[{"in":"path","name":"clinic_type","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DefaultClinicLinkResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Request for getting all default links for a clinic type.","tags":["clinic link"]}},"/clinician/{clinician_id}/appointments":{"get":{"operationId":"app.api.appointment.get_clinician_appointments","parameters":[{"in":"path","name":"clinician_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinicianAppointmentsResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get appointments scheduled in the clinic for a clinician for all of their patients between two dates","tags":["clinic"]}},"/clinician/{clinician_id}/patient_subscriptions":{"get":{"operationId":"app.api.subscription.api.get_clinician_patient_subscriptions","parameters":[{"in":"path","name":"clinician_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SubscriptionResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get list of subscriptions available to the clinician","tags":["subscription"]}},"/clinician_links/batch":{"post":{"operationId":"app.api.clinician_link.post_batch_clinician_link","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateClinicianLinkBatchRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"description":"successful operation"}},"summary":"Batch request for creating clinician links for patients.","tags":["clinician link"]}},"/clinician_links/for_testing":{"post":{"operationId":"app.api.clinician_link.clinician_link_for_testing","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateClinicianLinkForTestingRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"description":"successful operation"}},"security":[],"summary":"Add clinician tip for patient for testing","tags":["clinician link"]}},"/clinician_links/{clinician_id}/default_link":{"get":{"operationId":"app.api.clinician_link.get_default_clinician_links","parameters":[{"in":"path","name":"clinician_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DefaultClinicianLinkResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Request for getting all default links for a clinician.","tags":["clinician link"]},"post":{"operationId":"app.api.clinician_link.post_create_default_clinician_link","parameters":[{"in":"path","name":"clinician_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDefaultClinicianLinkRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"description":"successful operation"}},"summary":"Create another default link for a clinician.","tags":["clinician link"]}},"/clinician_links/{clinician_id}/default_link/{id}":{"put":{"operationId":"app.api.clinician_link.update_default_clinician_link","parameters":[{"in":"path","name":"clinician_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDefaultClinicianLinkResponse"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultClinicianLinkResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Update a default link for a clinician.","tags":["clinician link"]}},"/clinician_tips/batch":{"post":{"operationId":"app.api.clinician_tip.post_batch_clinician_tip","parameters":[{"description":"whether the tip should be delivered by SMS to SMS enabled users","in":"query","name":"include_sms","required":false,"schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateClinicianTipBatchRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"description":"successful operation"}},"summary":"Batch request for creating clinician links for patients.","tags":["clinician tip"]}},"/clinician_tips/for_testing":{"post":{"operationId":"app.api.clinician_tip.clinician_tip_for_testing","parameters":[{"description":"whether the tip should be delivered by SMS to SMS enabled users","in":"query","name":"include_sms","required":false,"schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateClinicianTipForTestingRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"description":"successful operation"}},"security":[],"summary":"Add clinician tip for patient for testing","tags":["clinician tip"]}},"/clinicians/current":{"get":{"operationId":"app.api.clinician.get_current_clinician","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinicianResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get currently logged in clinician info","tags":["clinician"]}},"/clinics/{clinic_id}/meal-plan-settings":{"get":{"operationId":"app.api.meal_plan.get_clinic_meal_plan_settings","parameters":[{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinicMealPlanSettingsResponse"}}},"description":"successful operation"},"404":{"description":"clinic not found"}},"summary":"Get meal plan settings for a clinic","tags":["meal-plan"]},"put":{"operationId":"app.api.meal_plan.put_clinic_meal_plan_settings","parameters":[{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinicMealPlanSettingsRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinicMealPlanSettingsResponse"}}},"description":"successful operation"}},"summary":"Update meal plan settings for a clinic","tags":["meal-plan"]}},"/compatible_client_versions":{"get":{"operationId":"app.api.system.get_compatible_client_versions","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompatibleClientVersions"}}},"description":"successful operation","x-body-name":"response"}},"security":[],"summary":"Get auth token","tags":["system"]}},"/data_management/field_validation":{"post":{"operationId":"app.api.data_management.field_validation","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"description":"excel spreadsheet with xlsx (Excel 2010+) format","format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"validation food database fields","tags":["data_management"]}},"/data_management/food/incremental_import":{"post":{"operationId":"app.api.data_management.incremental_import_food","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"description":"xlsx","format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"sheet_url":{"type":"string"}},"type":"object"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Incrementally import food data","tags":["data_management"]}},"/data_management/foods/options":{"post":{"operationId":"app.api.data_management.post_food_options","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"description":"csv format - utf-8-sig","format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"x-body-name":"body"},"responses":{"200":{"description":"successful operation"}},"summary":"retrieve json formatted food options","tags":["data_management"]}},"/data_management/foods/rename":{"put":{"operationId":"app.api.data_management.put_rename_food","parameters":[{"in":"query","name":"old_food_name","required":true,"schema":{"type":"string"}},{"in":"query","name":"new_food_name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation"}},"summary":"rename food","tags":["data_management"]}},"/data_management/load_custom_addons":{"post":{"operationId":"app.api.data_management.load_custom_addons","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"description":"csv format - utf-8-sig","format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"x-body-name":"body"},"responses":{"200":{"description":"successful operation"}},"summary":"load custom addons based in input CSV. All categories included in the CSV will be wiped and re-created if they don't exist","tags":["data_management"]}},"/data_management/load_daily_upload_files":{"post":{"operationId":"app.api.data_management.load_daily_upload_files","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file_01":{"description":"01 excel spreadsheet with xlsx (Excel 2010+) format","format":"binary","type":"string"},"file_03":{"description":"03 excel spreadsheet with xlsx (Excel 2010+) format","format":"binary","type":"string"},"file_04":{"description":"04 excel spreadsheet with xlsx (Excel 2010+) format","format":"binary","type":"string"}},"required":["file_01","file_03","file_04"],"type":"object"}}},"x-body-name":"body"},"responses":{"200":{"description":"successful operation"}},"summary":"load daily upload files","tags":["data_management"]}},"/data_management/load_food_and_ontologies":{"post":{"operationId":"app.api.data_management.load_food_and_ontologies","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"description":"excel spreadsheet with xlsx (Excel 2010+) format","format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"x-body-name":"body"},"responses":{"200":{"description":"successful operation"}},"summary":"load food ontology and foods","tags":["data_management"]}},"/data_management/load_food_photo":{"post":{"operationId":"app.api.data_management.load_food_photo","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"description":"image file in JPG or PNG format","format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"x-body-name":"body"},"responses":{"200":{"description":"successful operation"}},"summary":"load food photos","tags":["data_management"]}},"/data_management/load_food_photos":{"post":{"operationId":"app.api.data_management.load_food_photos","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"description":"zip file containing food images","format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"x-body-name":"body"},"responses":{"200":{"description":"successful operation"}},"summary":"load food photos","tags":["data_management"]}},"/data_management/load_rankings":{"post":{"operationId":"app.api.data_management.load_food_rankings","parameters":[{"in":"query","name":"test_mode","required":true,"schema":{"type":"boolean"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"description":"excel spreadsheet with xlsx (Excel 2010+) format","format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"x-body-name":"body"},"responses":{"200":{"description":"successful operation"}},"summary":"load usda measures info","tags":["data_management"]}},"/data_management/load_rdi":{"post":{"operationId":"app.api.data_management.load_rdi","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"description":"excel spreadsheet with xlsx (Excel 2010+) format","format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"x-body-name":"body"},"responses":{"200":{"description":"successful operation"}},"summary":"load reference daily intake (rdi) values","tags":["data_management"]}},"/data_management/load_substitutions_and_tips":{"post":{"operationId":"app.api.data_management.load_substitutions_and_tips","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"description":"excel spreadsheet with xlsx (Excel 2010+) format","format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"x-body-name":"body"},"responses":{"200":{"description":"successful operation"}},"summary":"load food substitution suggestions and resources","tags":["data_management"]}},"/data_management/load_usage_based_custom_addons":{"post":{"operationId":"app.api.data_management.load_usage_based_custom_addons","responses":{"200":{"description":"successful operation"}},"summary":"load default custom addons based on usage. Includes popularity score.","tags":["data_management"]}},"/data_management/load_usda_food":{"post":{"operationId":"app.api.data_management.load_usda_food","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"description":"csv format - utf-8-sig","format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"x-body-name":"body"},"responses":{"200":{"description":"successful operation"}},"summary":"load food entire usda food list","tags":["data_management"]}},"/data_management/load_usda_measures":{"post":{"operationId":"app.api.data_management.load_usda_measures","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"description":"excel spreadsheet with xlsx (Excel 2010+) format","format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"x-body-name":"body"},"responses":{"200":{"description":"successful operation"}},"summary":"load usda measures info","tags":["data_management"]}},"/data_management/load_usda_nutritions":{"post":{"operationId":"app.api.data_management.load_usda_nutritions","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"description":"csv format - utf-8-sig","format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"x-body-name":"body"},"responses":{"200":{"description":"successful operation"}},"summary":"load usda nutrients info","tags":["data_management"]}},"/data_management/load_usda_nutritions_xlsx":{"post":{"operationId":"app.api.data_management.load_usda_nutritions_xlsx","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"description":"excel spreadsheet with xlsx (Excel 2010+) format","format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"x-body-name":"body"},"responses":{"200":{"description":"successful operation"}},"summary":"load usda nutrients info","tags":["data_management"]}},"/data_management/rdi_test":{"get":{"operationId":"app.api.reference_daily_intake.get_custom_rdi","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RdiTestRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RdiResponse"}}},"description":"successful operation","x-body-name":"response"}},"security":[],"summary":"test rdi values","tags":["data_management"]}},"/data_management/refresh_cognitive_search_index":{"get":{"operationId":"app.util.azure_search.api.refresh_cognitive_search_index","responses":{"200":{"description":"successful operation"}},"summary":"rebuild the cognitive search index","tags":["data_management"]}},"/data_management/refresh_cognitive_search_index_by_name":{"get":{"operationId":"app.util.azure_search.api.get_refresh_cognitive_search_index_by_name","responses":{"200":{"description":"successful operation"}},"summary":"rebuild the cognitive search index using the rotation","tags":["data_management"]}},"/data_management/streaming_test":{"get":{"operationId":"app.api.data_management.streaming_test","responses":{"200":{"description":"successful operation"}},"security":[],"summary":"streaming test","tags":["data_management"]}},"/data_management/update_dbtable_index_stats":{"get":{"operationId":"app.util.azure_search.api.update_dbtable_index_stats","responses":{"200":{"description":"successful operation"}},"summary":"update the cognitive search index stats document count and storage size","tags":["data_management"]}},"/data_management/verify_replacement_item_sizing":{"get":{"operationId":"app.api.replacement_item.verify_replacement_item_sizing","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object"}}},"description":"successful operation","x-body-name":"response"}},"summary":"verify all replacement items have a matching size","tags":["data_management"]}},"/data_reviewer":{"get":{"operationId":"app.api.data_reviewer.get_data_reviewers","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DataReviewerResponse"},"type":"array"}}},"description":"OK","x-body-name":"response"}},"summary":"Get a list of all data reviewers","tags":["data review"]},"post":{"operationId":"app.api.data_reviewer.post_data_reviewer","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDataReviewerRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataReviewerResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Create a new data reviewer","tags":["data review"]}},"/data_reviewer/access":{"get":{"operationId":"app.api.data_reviewer.get_data_reviewer_access","responses":{"204":{"description":"successful operation"}},"security":[],"summary":"Get access status for the current requester.","tags":["data review"]}},"/data_reviewer/current":{"get":{"operationId":"app.api.data_reviewer.get_current_data_reviewer","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataReviewerResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get currently logged in data reviewer. This is for restricted use case, use for only DR information.","tags":["data review"]}},"/data_reviewer/{data_reviewer_id}":{"delete":{"operationId":"app.api.data_reviewer.delete_data_reviewer","parameters":[{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"successful operation"}},"summary":"Delete the data reviewer","tags":["data review"]},"get":{"operationId":"app.api.data_reviewer.get_data_reviewer","parameters":[{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataReviewerResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get details of data reviewer","tags":["data review"]},"patch":{"operationId":"app.api.data_reviewer.patch_data_reviewer","parameters":[{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDataReviewerRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataReviewerResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Update the data reviewer details","tags":["data review"]}},"/data_reviewer/{data_reviewer_id}/logs/{item_id}/acknowledge":{"put":{"operationId":"app.api.queue.feedback.acknowledge","parameters":[{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"item_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/QualityAssuranceLogResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Acknowledge","tags":["auditor feedback"]}},"/data_reviewer/{data_reviewer_id}/meal_photo_queue/claim/{meal_photo_queue_id}":{"post":{"operationId":"app.api.data_reviewer.post_data_reviewer_claim_queue","parameters":[{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_photo_queue_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataReviewerClaimQueueResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a list of all meals queued for a data reviewer","tags":["data review"]}},"/data_reviewer/{data_reviewer_id}/meal_photo_queue/empty_meal":{"post":{"operationId":"app.api.data_reviewer.post_meal_photo_queue_empty_meal","parameters":[{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMealRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealPhotoQueueResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Create a test queue meal","tags":["data review"]}},"/data_reviewer/{data_reviewer_id}/meal_photo_queue/next_queue":{"get":{"operationId":"app.api.data_reviewer.get_data_reviewer_next_queue","parameters":[{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealPhotoQueueResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a list of all meals queued for a data reviewer","tags":["data review"]}},"/data_reviewer/{data_reviewer_id}/meal_photo_queue/to_be_processed":{"get":{"operationId":"app.api.data_reviewer.get_data_reviewer_meal_photo_queues_to_be_processed","parameters":[{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MealPhotoQueueResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a list of all meals queued for a data reviewer","tags":["data review"]}},"/data_reviewer/{data_reviewer_id}/meal_photo_queue/to_be_reviewed":{"get":{"operationId":"app.api.queue.review.get_meal_photo_queue_to_be_reviewed","parameters":[{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"type":"string"}},{"in":"query","name":"clinic_id","required":false,"schema":{"type":"integer"}},{"in":"query","name":"patient_id","required":false,"schema":{"type":"integer"}},{"in":"query","name":"meal_ids","required":false,"schema":{"items":{"type":"integer"},"type":"array"}},{"in":"query","name":"meal_item_ids","required":false,"schema":{"items":{"type":"integer"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MealPhotoQueueResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a list of all meals queued for a data reviewer","tags":["data review"]}},"/data_reviewer/{data_reviewer_id}/meal_photo_queue/to_be_reviewed_from_queue_ids":{"get":{"operationId":"app.api.queue.review.get_meal_photo_queue_to_be_reviewed_from_queue_ids","parameters":[{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"queue_ids","required":true,"schema":{"items":{"type":"integer"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MealPhotoQueueResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a list of all meals queued for a data reviewer given a list of queue ids","tags":["data review"]}},"/data_reviewer/{data_reviewer_id}/meal_photo_queue/{meal_photo_queue_id}/expert_context_restart":{"put":{"description":"Allows a data reviewer to provide expert context (a free-text note describing\nfoods in the photo, or structured meal item hints) and restart the pre-labeling\nprocess. When expert context is provided, the routing logic trusts the expert\nand bypasses normal escalation checks, allowing the queue to auto-complete.\n\nThe endpoint accepts submissions when the queue is in PROC_ESC (waiting for human)\nor PROC_PRE (currently processing) states:\n- PROC_ESC: Immediately restarts pre-labeling with the expert context.\n- PROC_PRE: Queues the expert context for later processing. When current processing\n  completes and escalates, the system will automatically retry with pending entries.\n\nMultiple reviewers can submit expert context concurrently - all submissions are\nqueued and tried in order. A maximum of 10 expert context attempts are allowed\nto prevent infinite loops.\n","operationId":"app.api.data_reviewer.put_expert_context_and_restart_prelabeling","parameters":[{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_photo_queue_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExpertContextRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealPhotoQueueResponse"}}},"description":"successful operation"},"400":{"description":"Bad request - queue not in PROC_ESC or PROC_PRE state"},"404":{"description":"Queue not found"}},"summary":"Update expert context and restart pre-labeling with trusted routing","tags":["data review"]}},"/data_reviewer/{data_reviewer_id}/meal_photo_queue/{meal_photo_queue_id}/meal_items":{"post":{"operationId":"app.api.meal.post_meal_items_from_data_reviewer_queue","parameters":[{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_photo_queue_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"note","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CreateMealItemFromQueueRequest"},"type":"array"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MealItemResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Post correct meal items to a patient meal via the meal_photo_queue","tags":["data review"]}},"/data_reviewer/{data_reviewer_id}/meal_photo_queue/{meal_photo_queue_id}/meal_items_from_string":{"post":{"operationId":"app.api.meal.post_meal_items_from_data_reviewer_queue_string","parameters":[{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_photo_queue_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"food_names","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealPhotoQueueResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Post correct meal items to a patient meal via the meal_photo_queue","tags":["data review"]}},"/data_reviewer/{data_reviewer_id}/meal_photo_queue/{meal_photo_queue_id}/original_photo":{"get":{"operationId":"app.api.data_reviewer.get_data_reviewer_meal_photo_queue_original_photo","parameters":[{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_photo_queue_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Get a copy of the original photo submitted for an MPQ","tags":["data review"]}},"/data_reviewer/{data_reviewer_id}/meal_photo_queue/{meal_photo_queue_id}/photo":{"get":{"operationId":"app.api.data_reviewer.get_data_reviewer_meal_photo_queue_photo","parameters":[{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_photo_queue_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Get a copy of the resized photo submitted for an MPQ","tags":["data review"]}},"/data_reviewer/{data_reviewer_id}/meal_photo_queue/{meal_photo_queue_id}/quality_assurance_log":{"get":{"operationId":"app.api.queue.review.get_quality_assurance_logs","parameters":[{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_photo_queue_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/QualityAssuranceLogResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get all QA logs available to the user","tags":["data review"]},"post":{"operationId":"app.api.queue.review.post_quality_assurance_log","parameters":[{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_photo_queue_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateQualityAssuranceLogRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QualityAssuranceLogResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Post a QA comment","tags":["data review"]}},"/data_reviewer/{data_reviewer_id}/meal_photo_queue/{meal_photo_queue_id}/quality_assurance_log/{qa_log_id}":{"put":{"operationId":"app.api.queue.review.put_quality_assurance_log","parameters":[{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_photo_queue_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"qa_log_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateQualityAssuranceLogRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QualityAssuranceLogResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Update a meal log comment","tags":["data review"]}},"/data_reviewer/{data_reviewer_id}/meal_photo_queue/{meal_photo_queue_id}/recent_items":{"get":{"operationId":"app.api.data_reviewer.get_meal_photo_queue_recent_items_data_reviewer","parameters":[{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_photo_queue_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecentMealItemResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a copy of the original photo submitted for an MPQ","tags":["data review"]}},"/data_reviewer/{data_reviewer_id}/meal_photo_queue/{meal_photo_queue_id}/recommended_meals":{"get":{"operationId":"app.api.data_reviewer.get_meal_recommended_meals","parameters":[{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_photo_queue_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RecommendedMeal"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a smart list of suggestions to use for labeling a meal","tags":["data review"]}},"/data_reviewer/{data_reviewer_id}/meal_photo_queue/{meal_photo_queue_id}/similar_meals":{"get":{"operationId":"app.api.data_reviewer.get_meal_similar_meals","parameters":[{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_photo_queue_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientHistoryQueueResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a list of similar meals previously logged by the patient","tags":["data review"]}},"/data_reviewer/{data_reviewer_id}/quality_assurance":{"get":{"operationId":"app.api.queue.review.get_queues_for_qa","parameters":[{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"n_days","required":false,"schema":{"type":"integer"}},{"in":"query","name":"date_oldest","required":false,"schema":{"type":"string"}},{"in":"query","name":"date_newest","required":false,"schema":{"type":"string"}},{"in":"query","name":"is_reviewed","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"is_approved","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"is_escalated","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"is_auto_logged","required":false,"schema":{"type":"boolean"}},{"deprecated":true,"in":"query","name":"is_initial","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"is_archived","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"is_priority","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"has_custom_items","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"patient_id","required":false,"schema":{"type":"integer"}},{"in":"query","name":"limit","required":false,"schema":{"type":"integer"}},{"in":"query","name":"is_from_recent","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MealPhotoQueueQualityAssuranceResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get MPQs for QA","tags":["data review"]}},"/data_reviewer/{data_reviewer_id}/quality_assurance/available_count":{"post":{"operationId":"app.api.queue.review.get_available_count","parameters":[{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"integer"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Returns the number of queues available for QA2 for the specified data reviewer.","tags":["data review"]}},"/data_reviewer/{data_reviewer_id}/quality_assurance/session/current":{"get":{"operationId":"app.api.queue.review.get_qa_session_current","parameters":[{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QualityAssuranceSessionResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Gets the current review session info for the data reviewer","tags":["data review"]}},"/data_reviewer/{data_reviewer_id}/quality_assurance/session/start":{"post":{"operationId":"app.api.queue.review.post_qa_session_start","parameters":[{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"target_queue_count","required":false,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QualityAssuranceSessionParams"}}},"required":false,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QualityAssuranceSessionResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Starts a review session for the specified data reviewer.\nIf a session exists with the same params, it will be returned.\n","tags":["data review"]}},"/data_reviewer/{data_reviewer_id}/quality_assurance/session/{qa_session_id}":{"get":{"operationId":"app.api.queue.review.get_qa_session","parameters":[{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"qa_session_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QualityAssuranceSessionResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Gets the specified review session info for the data reviewer","tags":["data review"]}},"/data_reviewer/{data_reviewer_id}/quality_assurance/session/{qa_session_id}/next_queue":{"post":{"operationId":"app.api.queue.review.post_qa_session_next_queue","parameters":[{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"qa_session_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QualityAssuranceSessionResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Gets the next queue to be worked on in the specified session","tags":["data review"]}},"/data_reviewer/{data_reviewer_id}/quality_assurance/session/{qa_session_id}/pause":{"post":{"operationId":"app.api.queue.review.post_qa_session_pause","parameters":[{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"qa_session_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QualityAssuranceSessionResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Pauses the current review session.","tags":["data review"]}},"/data_reviewer/{data_reviewer_id}/quality_assurance/session/{qa_session_id}/resume":{"post":{"operationId":"app.api.queue.review.post_qa_session_resume","parameters":[{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"qa_session_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QualityAssuranceSessionResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Resumes the current review session.","tags":["data review"]}},"/data_reviewer/{data_reviewer_id}/unacknowledged_logs":{"get":{"operationId":"app.api.queue.feedback.get_unacknowledged","parameters":[{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"per_page","required":false,"schema":{"type":"integer"}},{"in":"query","name":"cursor","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/QualityAssuranceLogResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get unacknowledged QA logs","tags":["auditor feedback"]}},"/data_reviewer_group/{data_reviewer_group_id}":{"delete":{"operationId":"app.api.data_reviewer.delete_data_reviewer_group","parameters":[{"in":"path","name":"data_reviewer_group_id","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"successful operation"}},"summary":"Delete the data reviewer group","tags":["data review"]},"get":{"operationId":"app.api.data_reviewer.get_data_reviewer_group","parameters":[{"in":"path","name":"data_reviewer_group_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataReviewerGroupResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a list of all data reviewer group members","tags":["data review"]},"put":{"operationId":"app.api.data_reviewer.put_data_reviewer_group","parameters":[{"in":"path","name":"data_reviewer_group_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDataReviewerGroupRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DataReviewerGroupResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Update the data reviewer group","tags":["data review"]}},"/data_reviewer_group/{data_reviewer_group_id}/data_reviewer/{data_reviewer_id}/meal_photo_queue/processed":{"get":{"operationId":"app.api.data_reviewer.get_data_reviewer_meal_photo_queues_processed","parameters":[{"in":"path","name":"data_reviewer_group_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MealPhotoQueueResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a list of all meals queued for review for a specific data_reviewer","tags":["data review"]}},"/data_reviewer_group/{data_reviewer_group_id}/data_reviewer/{data_reviewer_id}/meal_photo_queue/{meal_photo_queue_id}/confidence":{"post":{"operationId":"app.api.data_reviewer.post_data_reviewer_confidence","parameters":[{"in":"path","name":"data_reviewer_group_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_photo_queue_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"confidence_sizing","required":false,"schema":{"type":"integer"}},{"in":"query","name":"confidence_identification","required":false,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateQueueFeedbackRequest"}}},"required":false,"x-body-name":"body"},"responses":{"200":{"description":"successful operation"}},"summary":"Post confidence score of labeled items","tags":["data review"]}},"/data_reviewer_group/{data_reviewer_group_id}/data_reviewer/{data_reviewer_id}/meal_photo_queue/{meal_photo_queue_id}/help":{"post":{"operationId":"app.api.queue.patient_context.post_mpq_help","parameters":[{"in":"path","name":"data_reviewer_group_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_photo_queue_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataReviewerHelpRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"description":"successful operation"}},"summary":"Get a list of all meals processed by a data reviewer","tags":["data review"]}},"/data_reviewer_group/{data_reviewer_group_id}/data_reviewer/{data_reviewer_id}/meal_photo_queue/{meal_photo_queue_id}/meal_item_history":{"get":{"operationId":"app.api.data_reviewer.get_meal_items_history","parameters":[{"in":"path","name":"data_reviewer_group_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_photo_queue_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"num_days","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientHistoryQueueResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Retrieve previous meal item details for the patient for the current MPQ id","tags":["data review"]}},"/data_reviewer_group/{data_reviewer_group_id}/data_reviewer/{data_reviewer_id}/meal_photo_queue/{meal_photo_queue_id}/meal_items":{"delete":{"operationId":"app.api.data_reviewer.delete_meal_items_from_queue","parameters":[{"in":"path","name":"data_reviewer_group_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_photo_queue_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"reason","required":true,"schema":{"enum":["inappropriate","no_food_in_photo","duplicate","testing"],"type":"string"}}],"responses":{"204":{"description":"successful operation"}},"summary":"Delete meal items association to MPQ deemed to have no viable meal items. Meal is deleted if no other meal items exists.","tags":["data review"]},"post":{"operationId":"app.api.meal.post_meal_items_from_data_reviewer_group_queue","parameters":[{"in":"path","name":"data_reviewer_group_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_photo_queue_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CreateMealItemFromQueueRequest"},"type":"array"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealPhotoQueueResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Post correct meal items to a patient meal via the meal_photo_queue","tags":["data review"]}},"/data_reviewer_group/{data_reviewer_group_id}/data_reviewer/{data_reviewer_id}/meal_photo_queue/{meal_photo_queue_id}/meal_items_from_string":{"post":{"operationId":"app.api.meal.post_meal_items_from_data_reviewer_group_queue_string","parameters":[{"in":"path","name":"data_reviewer_group_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_photo_queue_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"food_names","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MealItemResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Post correct meal items to a patient meal via the meal_photo_queue","tags":["data review"]}},"/data_reviewer_group/{data_reviewer_group_id}/data_reviewer/{data_reviewer_id}/meal_photo_queue/{meal_photo_queue_id}/patient_context":{"get":{"operationId":"app.api.queue.patient_context.get_patient_context","parameters":[{"in":"path","name":"data_reviewer_group_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_photo_queue_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientContextQueueResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get patient context.","tags":["data review"]}},"/data_reviewer_group/{data_reviewer_group_id}/data_reviewer/{data_reviewer_id}/meal_photo_queue/{meal_photo_queue_id}/patient_note":{"get":{"operationId":"app.api.patient_note.get_patient_note_queue","parameters":[{"in":"path","name":"data_reviewer_group_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_photo_queue_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientNoteQueueResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get most recent patient note","tags":["patient"]},"post":{"operationId":"app.api.patient_note.post_patient_note_queue","parameters":[{"in":"path","name":"data_reviewer_group_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_photo_queue_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePatientNoteRequest"}}},"description":"Updated version of the patient note history.","required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientNoteQueueResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Post updated patient note","tags":["patient"]}},"/data_reviewer_group/{data_reviewer_group_id}/data_reviewer/{data_reviewer_id}/meal_photo_queue/{meal_photo_queue_id}/processed":{"get":{"operationId":"app.api.data_reviewer.get_data_reviewer_meal_photo_queue_processed","parameters":[{"in":"path","name":"data_reviewer_group_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_photo_queue_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealPhotoQueueResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a list of all meals processed by a data reviewer","tags":["data review"]}},"/data_reviewer_group/{data_reviewer_group_id}/data_reviewer/{data_reviewer_id}/meal_photo_queue/{meal_photo_queue_id}/recent_items":{"get":{"operationId":"app.api.data_reviewer.get_meal_photo_queue_recent_items_data_reviewer_group","parameters":[{"in":"path","name":"data_reviewer_group_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_photo_queue_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecentMealItemResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a copy of the original photo submitted for an MPQ","tags":["data review"]}},"/data_reviewer_group/{data_reviewer_group_id}/data_reviewer/{data_reviewer_id}/settings":{"get":{"operationId":"app.api.data_reviewer.get_data_reviewer_settings","parameters":[{"in":"path","name":"data_reviewer_group_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataReviewerGroupSettingsResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get data reviewer settings for the given group","tags":["data review"]},"patch":{"operationId":"app.api.data_reviewer.patch_data_reviewer_settings","parameters":[{"in":"path","name":"data_reviewer_group_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"is_active","required":true,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataReviewerGroupSettingsResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Update the data reviewer settings for the given group","tags":["data review"]}},"/data_reviewer_group/{data_reviewer_group_id}/deregister_data_reviewer":{"delete":{"operationId":"app.api.data_reviewer.deregister_data_reviewer_from_group","parameters":[{"in":"path","name":"data_reviewer_group_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"successful operation"}},"summary":"Delete the data reviewer from a group group","tags":["data review"]}},"/data_reviewer_group/{data_reviewer_group_id}/meal_photo_queue/processed":{"get":{"operationId":"app.api.data_reviewer.get_data_reviewer_group_meal_photo_queues_processed","parameters":[{"in":"path","name":"data_reviewer_group_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MealPhotoQueueResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a list of all meals queued for review for a specific data_reviewer_group","tags":["data review"]}},"/data_reviewer_group/{data_reviewer_group_id}/meal_photo_queue/to_be_processed":{"get":{"operationId":"app.api.data_reviewer.get_meal_photo_queue_to_be_processed","parameters":[{"in":"path","name":"data_reviewer_group_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MealPhotoQueueResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a list of all meals queued for review for a specific data_reviewer_group","tags":["data review"]}},"/data_reviewer_group/{data_reviewer_group_id}/meal_photo_queue/{meal_photo_queue_id}/original_audio":{"get":{"operationId":"app.api.data_reviewer.get_meal_photo_queue_original_audio","parameters":[{"in":"path","name":"data_reviewer_group_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_photo_queue_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Get a copy of the audio submitted for an MPQ","tags":["data review"]}},"/data_reviewer_group/{data_reviewer_group_id}/meal_photo_queue/{meal_photo_queue_id}/original_photo":{"get":{"operationId":"app.api.data_reviewer.get_meal_photo_queue_original_photo","parameters":[{"in":"path","name":"data_reviewer_group_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_photo_queue_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Get a copy of the photo submitted for an MPQ","tags":["data review"]}},"/data_reviewer_group/{data_reviewer_group_id}/meal_photo_queue/{meal_photo_queue_id}/photo":{"get":{"operationId":"app.api.data_reviewer.get_meal_photo_queue_photo","parameters":[{"in":"path","name":"data_reviewer_group_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_photo_queue_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Get a copy of the resized photo submitted for an MPQ","tags":["data review"]}},"/data_reviewer_group/{data_reviewer_group_id}/register_data_reviewer":{"put":{"operationId":"app.api.data_reviewer.register_data_reviewer_to_group","parameters":[{"in":"path","name":"data_reviewer_group_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"data_reviewer_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterDataReviewerToGroupRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataReviewerGroupResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Update the data reviewer group","tags":["data review"]}},"/data_reviewer_groups":{"get":{"operationId":"app.api.data_reviewer.get_data_reviewer_groups","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DataReviewerGroupResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a list of all data reviewer groups","tags":["data review"]},"post":{"operationId":"app.api.data_reviewer.post_data_reviewer_group","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDataReviewerGroupRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DataReviewerGroupResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Create a new data reviewer group","tags":["data review"]}},"/diet_restrictions":{"get":{"operationId":"app.api.diet_restriction.get_diet_restrictions","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DietRestrictionResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"security":[],"summary":"Get list of available diet restrictions","tags":["diet restrictions"]}},"/eval/experiments":{"post":{"operationId":"app.api.eval.endpoints.create_eval_experiment","requestBody":{"content":{"application/json":{"schema":{"properties":{"dataset":{"default":"all","enum":["all","ground_truth","feedback","rd_meals"],"type":"string"},"experiment_name":{"description":"Unique name for this experiment run","type":"string"},"experiment_tag":{"description":"Optional tag added to Langfuse traces for filtering (e.g. 'v3.0'). Does not select a prompt variant.","type":"string"},"prompt_label":{"description":"Optional prompt variant label","type":"string"},"sample_size":{"description":"Number of meals to sample (omit for all, max 500)","maximum":500,"minimum":1,"type":"integer"}},"required":["experiment_name"],"type":"object"}}},"required":true},"responses":{"202":{"content":{"application/json":{"schema":{"properties":{"experiment_name":{"type":"string"},"message_id":{"type":"string"},"queued_at":{"format":"date-time","type":"string"}},"type":"object"}}},"description":"Experiment queued"},"400":{"description":"Invalid request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden \u2014 admin access required"}},"security":[{"bearerAuth":[]}],"summary":"Queue an on-demand food processor eval experiment","tags":["eval"]}},"/exercises":{"get":{"operationId":"app.api.exercise.get_exercises","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ExerciseResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the exercise options","tags":["exercise"]}},"/food":{"get":{"operationId":"app.api.food.food_search.get_food_query","parameters":[{"in":"query","name":"food_name","required":true,"schema":{"type":"string"}},{"in":"query","name":"user_id","required":false,"schema":{"type":"number"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the food information from the server","tags":["food"]}},"/food/apply_warnings":{"put":{"operationId":"app.api.food.food_details.apply_warnings_query","parameters":[{"in":"query","name":"food_name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodDetailsUpdateRequest"}}},"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodDetailsResponse"}}},"description":"successful operation","x-body-name":"body"}},"summary":"Validates Nutrients and returns warnings","tags":["food"]}},"/food/assign_task":{"patch":{"operationId":"app.api.food.food_details.patch_food_assign_task_query","parameters":[{"in":"query","name":"food_name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodAssignmentRequest"}}},"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodAssignmentResponse"}}},"description":"successful operation","x-body-name":"body"}},"summary":"Update a food's associated user ids based on assignment","tags":["food"]}},"/food/change-logs":{"get":{"operationId":"app.api.food.food_details.get_food_details_change_logs_query","parameters":[{"in":"query","name":"food_name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodChangeLogResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Gets change logs for a food","tags":["food"]}},"/food/database-entries/table":{"get":{"operationId":"app.api.food.food_search.get_food_database_table","parameters":[{"in":"query","name":"filter","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"type":"number"}},{"in":"query","name":"offset","schema":{"type":"string"}},{"in":"query","name":"order","schema":{"type":"string"}},{"in":"query","name":"created_after","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"has_next":{"type":"boolean"},"next":{"type":"string"},"rows":{"items":{"$ref":"#/components/schemas/FoodDatabaseTableResponseRow"},"type":"array"}}}}},"description":"successful operation","x-body-name":"response"}},"summary":"Return a data table of all foods and custom items.","tags":["food"]}},"/food/details":{"get":{"operationId":"app.api.food.food_details.get_food_details_query","parameters":[{"in":"query","name":"food_name","required":false,"schema":{"type":"string"}},{"in":"query","name":"nutrition_source","required":false,"schema":{"type":"string"}},{"in":"query","name":"rxfood_id","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodDetailsResponse"}}},"description":"successful operation","x-body-name":"body"}},"summary":"Gets complete food details","tags":["food"]},"put":{"operationId":"app.api.food.food_details.put_food_details_query","parameters":[{"in":"query","name":"food_name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodDetailsUpdateRequest"}}},"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodDetailsResponse"}}},"description":"successful operation","x-body-name":"body"}},"summary":"Updates food details","tags":["food"]}},"/food/details-estimates":{"get":{"operationId":"app.api.food.food_details.get_food_details_estimates_query","parameters":[{"in":"query","name":"food_name","required":true,"schema":{"type":"string"}},{"in":"query","name":"nutrition_source","required":false,"schema":{"type":"string"}},{"in":"query","name":"rxfood_id","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"error":{"nullable":true,"type":"string"},"fields":{"items":{"type":"object"},"nullable":true,"type":"array"}},"type":"object"}}},"description":"successful operation","x-body-name":"body"}},"summary":"Gets food details estimates","tags":["food"]}},"/food/details/calculate":{"put":{"operationId":"app.api.food.food_details.calculate_food_composite_details","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalculateCompositeFoodDetailsRequest"}}},"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CalculateCompositeFoodDetailsResponse"}}},"description":"successful operation","x-body-name":"body"}},"summary":"Gets calculated food details for a list of food components","tags":["food"]}},"/food/ontologies/all":{"get":{"operationId":"app.api.food.ontology.get_all_ontologies","parameters":[{"in":"query","name":"include_archived","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FoodOntologyVTO"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the ontologies for the food editor","tags":["food"]}},"/food/photo":{"get":{"operationId":"app.api.food.food_lookup.get_food_photo_query","parameters":[{"in":"query","name":"food_name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation"}},"security":[],"summary":"Get pre-uploaded food image by food name","tags":["food"]}},"/food/relevant_queues":{"get":{"operationId":"app.api.food.food_whiteboard.get_relevant_queues_query","parameters":[{"in":"query","name":"food_name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MealPhotoQueueResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the whiteboard notes for a food in the food editor","tags":["food"]}},"/food/updated_food_report":{"get":{"operationId":"app.api.reports.food.get_updated_food_report","parameters":[{"in":"query","name":"date_since","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-12","type":"string"}},{"in":"query","name":"send_results_as_attachment","required":true,"schema":{"description":"true if results should be attached as a csv","example":"true","type":"boolean"}},{"in":"query","name":"send_to_me_only","required":false,"schema":{"description":"true if results should be sent to the current user","example":"true","type":"boolean"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Get food items updated between two dates","tags":["admin"]}},"/food/whiteboard-item/{id}":{"delete":{"operationId":"app.api.food.food_whiteboard.delete_whiteboard_item_query","parameters":[{"in":"query","name":"food_name","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"204":{"description":"successful operation"}},"summary":"Delete a whiteboard note for a food from the food editor","tags":["food"]},"put":{"operationId":"app.api.food.food_whiteboard.put_whiteboard_item_query","parameters":[{"in":"query","name":"food_name","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodWhiteboardCreateUpdateRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodWhiteboardItemResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Update an existing whiteboard note for a food in the food editor","tags":["food"]}},"/food/whiteboard-items":{"get":{"operationId":"app.api.food.food_whiteboard.get_whiteboard_items_query","parameters":[{"in":"query","name":"food_name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FoodWhiteboardItemResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the whiteboard notes for a food in the food editor","tags":["food"]},"post":{"operationId":"app.api.food.food_whiteboard.post_whiteboard_item_query","parameters":[{"in":"query","name":"food_name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodWhiteboardCreateUpdateRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodWhiteboardItemResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Create a new whiteboard note for a food in the food editor","tags":["food"]}},"/food/{food_name}/relevant_queues":{"get":{"deprecated":true,"operationId":"app.api.food.food_whiteboard.get_relevant_queues","parameters":[{"in":"path","name":"food_name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MealPhotoQueueResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"[DEPRECATED] Get the whiteboard notes for a food in the food editor","tags":["food"]}},"/food/{food_name}/whiteboard-item/{id}":{"delete":{"deprecated":true,"operationId":"app.api.food.food_whiteboard.delete_whiteboard_item","parameters":[{"in":"path","name":"food_name","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"responses":{"204":{"description":"successful operation"}},"summary":"[DEPRECATED] Delete a whiteboard note for a food from the food editor","tags":["food"]},"put":{"deprecated":true,"operationId":"app.api.food.food_whiteboard.put_whiteboard_item","parameters":[{"in":"path","name":"food_name","required":true,"schema":{"type":"string"}},{"in":"path","name":"id","required":true,"schema":{"type":"number"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodWhiteboardCreateUpdateRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodWhiteboardItemResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"[DEPRECATED] Update an existing whiteboard note for a food in the food editor","tags":["food"]}},"/food/{food_name}/whiteboard-items":{"get":{"deprecated":true,"operationId":"app.api.food.food_whiteboard.get_whiteboard_items","parameters":[{"in":"path","name":"food_name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FoodWhiteboardItemResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"[DEPRECATED] Get the whiteboard notes for a food in the food editor","tags":["food"]},"post":{"deprecated":true,"operationId":"app.api.food.food_whiteboard.post_whiteboard_item","parameters":[{"in":"path","name":"food_name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodWhiteboardCreateUpdateRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodWhiteboardItemResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"[DEPRECATED] Create a new whiteboard note for a food in the food editor","tags":["food"]}},"/foods/addons/export":{"get":{"operationId":"app.api.food.food_addons.get_food_response_addons","responses":{"200":{"content":{"text/csv":{"schema":{"type":"string"}}},"description":"successful operation","x-body-name":"response"},"404":{"description":"not found"}},"summary":"Export all addons assigned for all foods","tags":["food"]}},"/foods/autocomplete":{"get":{"operationId":"app.api.food.food_search.azure_autocomplete","parameters":[{"in":"query","name":"partial_term","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CognitiveSearchAutocompleteResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Return complete food terms by autocomplete","tags":["food"]}},"/foods/brands":{"get":{"operationId":"app.api.food.food_brand.get_brands","parameters":[{"in":"query","name":"brand_type","required":false,"schema":{"enum":["standard","store_brand","restaurant"],"type":"string"}},{"in":"query","name":"status","required":false,"schema":{"enum":["active","pending_review","deprecated"],"type":"string"}},{"in":"query","name":"country","required":false,"schema":{"type":"string"}},{"in":"query","name":"q","required":false,"schema":{"type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"default":50,"type":"integer"}},{"in":"query","name":"offset","required":false,"schema":{"default":0,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/BrandResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"List brands with optional filters","tags":["food"]},"post":{"operationId":"app.api.food.food_brand.post_brand","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBrandRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandDetailResponse"}}},"description":"created","x-body-name":"response"},"409":{"description":"brand with same normalized name already exists"}},"summary":"Create a new brand","tags":["food"]}},"/foods/brands/resolve":{"get":{"operationId":"app.api.food.food_brand.resolve_brand","parameters":[{"in":"query","name":"name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandResolveResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Resolve a brand name to a canonical brand","tags":["food"]}},"/foods/brands/{brand_id}":{"delete":{"operationId":"app.api.food.food_brand.delete_brand","parameters":[{"in":"path","name":"brand_id","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"deleted"},"404":{"description":"brand not found"}},"summary":"Delete a brand","tags":["food"]},"get":{"operationId":"app.api.food.food_brand.get_brand","parameters":[{"in":"path","name":"brand_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandDetailResponse"}}},"description":"successful operation","x-body-name":"response"},"404":{"description":"brand not found"}},"summary":"Get a brand by ID","tags":["food"]},"put":{"operationId":"app.api.food.food_brand.put_brand","parameters":[{"in":"path","name":"brand_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBrandRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandDetailResponse"}}},"description":"successful operation","x-body-name":"response"},"404":{"description":"brand not found"},"409":{"description":"brand with same normalized name already exists"}},"summary":"Update a brand","tags":["food"]}},"/foods/brands/{brand_id}/aliases":{"post":{"operationId":"app.api.food.food_brand.post_brand_alias","parameters":[{"in":"path","name":"brand_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBrandAliasRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrandAliasResponse"}}},"description":"created","x-body-name":"response"},"404":{"description":"brand not found"},"409":{"description":"alias already exists for this brand"}},"summary":"Add an alias to a brand","tags":["food"]}},"/foods/brands/{brand_id}/aliases/{alias_id}":{"delete":{"operationId":"app.api.food.food_brand.delete_brand_alias","parameters":[{"in":"path","name":"brand_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"alias_id","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"deleted"},"404":{"description":"alias not found"}},"summary":"Delete a brand alias","tags":["food"]}},"/foods/build_food_response_cache":{"get":{"operationId":"app.api.food_response_cache.build_food_response_cache","parameters":[{"description":"include USDA list in refresh","example":"true","in":"query","name":"build_usda_table","required":false,"schema":{"type":"boolean"}},{"description":"multi-threaded approach","example":"true","in":"query","name":"threaded","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Rebuild the FoodResponse Cache. Runs as a background process.","tags":["admin"]}},"/foods/client-search-index":{"get":{"operationId":"app.api.food.food_search.get_client_search_index","parameters":[{"description":"combination of \"{updated_time}:{id}\"","in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"description":"maximum number of items to return (default: 1000)","in":"query","name":"limit","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"has_more":{"type":"boolean"},"items":{"items":{"properties":{"id":{"type":"number"},"name":{"type":"string"},"updated_time":{"type":"string"}},"required":["id","name","updated_time"],"type":"object"},"type":"array"}},"type":"object"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Returns a list of food items used for client-side search indexing","tags":["food"]}},"/foods/error_flags":{"get":{"operationId":"app.api.nutrition.get_error_flags","responses":{"200":{"content":{"text/csv":{"schema":{"type":"string"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Gets food error flags","tags":["food"]}},"/foods/food_scraping":{"post":{"operationId":"app.api.food.food_scraping.post_food","parameters":[{"in":"query","name":"user_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFoodScrapingRequest"}}},"description":"Food Scraping Request Object.","required":true,"x-body-name":"body"},"responses":{"200":{"description":"successful operation"}},"summary":"Request a new food item for the database","tags":["food"]}},"/foods/formatted_food_string":{"get":{"operationId":"app.api.data_reviewer.get_formatted_food_string_with_units","parameters":[{"description":"list of food names","example":"pasta; tomato sauce","in":"query","name":"food_names","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"text/plain":{"schema":{"example":"sandwich as whole-wheat bread[1:Sandwich]","type":"string"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the food data, for a string of foods, from the server in the MPQ format","tags":["data review"]}},"/foods/formatted_mpq":{"get":{"operationId":"app.api.data_reviewer.get_formatted_mpq_foods","parameters":[{"description":"list of food names","example":"pasta; tomato sauce","in":"query","name":"food_names","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CreateMealItemFromQueueRequest"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the food data, for a string of foods, from the server in the MPQ format","tags":["data review"]}},"/foods/get_meal_photo_upload_url":{"get":{"operationId":"app.api.food.food_search.get_meal_photo_upload_url","parameters":[{"description":"image file extension","in":"query","name":"ext","required":true,"schema":{"type":"string"}},{"description":"image batch key","in":"query","name":"key","required":true,"schema":{"type":"string"}},{"description":"image index in batch","in":"query","name":"idx","required":true,"schema":{"type":"number"}},{"description":"optional suffix for the file (ex, `\"depth-map\"`)","in":"query","name":"suffix","required":false,"schema":{"type":"string"}},{"description":"optional JSON-encoded metadata to include in the x-goog-meta-rx-meta header","in":"query","name":"metadata","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"fields":{"type":"object"},"headers":{"type":"object"},"url":{"type":"string"}},"required":["url","fields"]}}},"description":"successful operation","x-body-name":"response"}},"summary":"Gets a URL for uploading a meal photo (likely signed S3 URL)","tags":["food"]}},"/foods/ndbno/{ndbno}":{"get":{"operationId":"app.api.food.food_ndbno.get_food_ndbno","parameters":[{"in":"path","name":"ndbno","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the food information from the server by ndbno","tags":["food"]}},"/foods/recent":{"get":{"operationId":"app.api.food.food_details.get_recent_foods","parameters":[{"in":"query","name":"limit","required":true,"schema":{"type":"number"}},{"in":"query","name":"status","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FoodDetailsResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"body"}},"summary":"Gets complete food details","tags":["food"]}},"/foods/search/nlp_phrase":{"get":{"operationId":"app.api.food.food_search.search_by_nlp_phrase","parameters":[{"in":"query","name":"search_text","required":true,"schema":{"type":"string"}},{"in":"query","name":"queue_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"use_cache","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodSearchByNlpPhraseResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Search for foods by NLP phrase.","tags":["food"]}},"/foods/search/v2/interactive":{"get":{"operationId":"app.api.food.food_search.get_food_search_v2_interactive","parameters":[{"in":"query","name":"q","required":true,"schema":{"type":"string"}},{"in":"query","name":"context_lang","required":false,"schema":{"type":"string"}},{"in":"query","name":"context_user_id","required":false,"schema":{"type":"number"}},{"in":"query","name":"context_meal_name","required":false,"schema":{"type":"string"}},{"in":"query","name":"context_food_names","required":false,"schema":{"type":"string"}},{"in":"query","name":"context_addon_of","required":false,"schema":{"type":"string"}},{"in":"query","name":"context_index","required":false,"schema":{"type":"string"}},{"deprecated":true,"in":"query","name":"context_semantic","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"context_match_strategy","required":false,"schema":{"enum":["standard","semantic","hybrid"],"type":"string"}},{"in":"query","name":"context_preferred_nutrition_source","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodSearchV2Response"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Search foods by text. Return maximum of 20 items","tags":["food"]}},"/foods/search_by_audio":{"post":{"operationId":"app.api.food.food_search_audio.search_by_audio","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"audio":{"format":"binary","type":"string"}},"required":["audio"],"type":"object"}}},"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodSearchByAudioResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Search foods by audio file","tags":["food"]}},"/foods/search_by_audio_queue":{"post":{"operationId":"app.api.food.food_search_audio.search_by_audio_queue","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"audio":{"format":"binary","type":"string"},"meal_name":{"enum":["breakfast","lunch","dinner","snack"],"type":"string"},"meal_nlp_phrase":{"type":"string"},"note":{"type":"string"}},"required":["audio"],"type":"object"}}},"x-body-name":"body"},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Search foods by audio file with results analyzed and queued for review (if required)","tags":["food"]}},"/foods/search_by_brand":{"get":{"operationId":"app.api.food.food_search.azure_search_brand","parameters":[{"in":"query","name":"search_text","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CognitiveSearchResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Search foods by brand names. Return maximum of 20 items","tags":["food"]}},"/foods/search_by_cognitive":{"get":{"operationId":"app.api.food.food_search.search_by_cognitive","parameters":[{"in":"query","name":"search_text","required":true,"schema":{"type":"string"}},{"in":"query","name":"context_user_id","required":false,"schema":{"type":"string"}},{"in":"query","name":"extended_query","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodSearchByTextResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Search foods by text. Return maximum of 20 items","tags":["food"]}},"/foods/search_by_manufacturer":{"get":{"operationId":"app.api.food.food_search.azure_search_manufacturer","parameters":[{"in":"query","name":"search_text","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CognitiveSearchResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Search foods by manufacturer names. Return maximum of 20 items","tags":["food"]}},"/foods/search_by_photo":{"post":{"operationId":"app.api.food.food_search.search_by_photo","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"photo":{"format":"binary","type":"string"},"photo2":{"format":"binary","type":"string"}},"required":["photo"],"type":"object"}}},"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodSearchByPhotoResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Search foods by photo","tags":["food"]}},"/foods/search_by_photo_ffe":{"post":{"operationId":"app.api.food.food_search.search_by_photo_ffe","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"meal_name":{"enum":["breakfast","lunch","dinner","snack"],"type":"string"},"note":{"type":"string"},"num_items":{"type":"integer"},"photo":{"format":"binary","type":"string"},"photo2":{"format":"binary","type":"string"},"sizing_input":{"enum":["small","medium","large","x-large"],"nullable":true,"type":"string"}},"required":["photo"],"type":"object"}}},"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodSearchByPhotoResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Search foods by photo with fast food entry sorting algorithm applied","tags":["food"]}},"/foods/search_by_photo_ffe_queue":{"post":{"operationId":"app.api.food.food_search.search_by_photo_ffe_queue","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"cpg_metadata":{"description":"JSON string representation of CreateMealItemRequest","nullable":true,"type":"string"},"meal_date":{"description":"calendar date in format YYYY-MM-DD","example":"2021-04-02","type":"string"},"meal_name":{"enum":["breakfast","lunch","dinner","snack"],"type":"string"},"meal_time":{"description":"time in format hh:mm:ss","example":"17:30:00","type":"string"},"note":{"type":"string"},"num_items":{"nullable":true,"type":"integer"},"photo":{"format":"binary","type":"string"},"photo2":{"format":"binary","type":"string"},"photo_id":{"type":"string"},"photo_timings_encoded":{"type":"string"},"photo_urls":{"items":{"format":"uri","type":"string"},"type":"array"},"preparation_method":{"$ref":"#/components/schemas/PreparationMethodEnum","default":null,"nullable":true},"queue_metadata":{"nullable":true,"type":"string"},"sizing_input":{"enum":["small","medium","large","x-large"],"nullable":true,"type":"string"}},"type":"object"}}},"x-body-name":"body"},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Search foods by photo with FFE algorithm applied and results put in a queue for backend review","tags":["food"]}},"/foods/search_by_photo_ocr":{"post":{"operationId":"app.api.food.food_search.search_by_photo_ocr","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"photo":{"format":"binary","type":"string"}},"required":["photo"],"type":"object"}}},"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodSearchByPhotoResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"OCR a photo to return a list of words found","tags":["food"]}},"/foods/search_by_text":{"get":{"operationId":"app.api.food.food_search.search_by_text","parameters":[{"in":"query","name":"search_text","required":true,"schema":{"type":"string"}},{"in":"query","name":"context_user_id","required":false,"schema":{"type":"string"}},{"in":"query","name":"extended_query","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"food_name_only","required":false,"schema":{"type":"boolean"}},{"description":"When set, only return foods whose primary_data_origin_code matches (e.g. cnf for recipe ingredient pickers).","in":"query","name":"primary_data_origin_code","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodSearchByTextResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Search foods by text. Return maximum of 20 items","tags":["food"]}},"/foods/search_by_text_nlp":{"get":{"operationId":"app.api.food.food_search_nlp.search_by_text_nlp","parameters":[{"in":"query","name":"search_text","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodSearchByTextResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Search foods by sentence and analyze using an NLP algorithm. Return maximum of 20 items","tags":["food"]}},"/foods/search_by_text_nlp_queue":{"get":{"operationId":"app.api.food.food_search_nlp.search_by_text_nlp_queue","parameters":[{"in":"query","name":"search_text","required":true,"schema":{"description":"words describing the meal","example":"two pieces of bacon, a glass of milk, and a piece of cheese","type":"string"}},{"in":"query","name":"meal_date","required":false,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2021-04-02","type":"string"}},{"in":"query","name":"meal_time","required":false,"schema":{"description":"time in 24h format hh:mm:ss","example":"17:30:00","type":"string"}},{"in":"query","name":"meal_name","required":false,"schema":{"description":"breakfast, lunch, dinner, or snack","enum":["breakfast","lunch","dinner","snack"],"example":"breakfast","type":"string"}}],"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Log a meal with descriptive words with results analyzed and queued for review (if required)","tags":["food"]},"post":{"operationId":"app.api.food.food_search_nlp.post_search_by_text_nlp_queue","parameters":[{"in":"query","name":"search_text","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSearchByTextNlpQueueRequest"}}},"required":true,"x-body-name":"body"},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Log a meal with descriptive words with results analyzed and queued for review (if required)","tags":["food"]}},"/foods/search_by_text_nlp_queue/custom_addons_single_item":{"get":{"operationId":"app.api.custom_addons.get_custom_addon_endpoint","parameters":[{"in":"query","name":"user_id","required":false,"schema":{"type":"string"}},{"in":"query","name":"phrase","required":true,"schema":{"items":{"type":"string"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CreateMealItemRequest"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Testing endpoint","tags":["nlp"]}},"/foods/search_by_text_nlp_queue/nlp_failed_strings":{"get":{"operationId":"app.nlp.api.nlp_failed_strings","parameters":[{"in":"query","name":"user_id","required":false,"schema":{"type":"string"}},{"in":"query","name":"reference_date","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Get auto-logger failed strings","tags":["nlp"]}},"/foods/search_by_text_nlp_queue/result_spellcheck":{"get":{"operationId":"app.api.meal_queue.get_nlp_auto_log_results_spellcheck","parameters":[{"in":"query","name":"user_id","required":false,"schema":{"type":"string"}},{"in":"query","name":"search_text","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CreateMealItemRequest"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Testing endpoint","tags":["nlp"]}},"/foods/search_by_text_nlp_queue/results":{"get":{"operationId":"app.api.meal_queue.get_nlp_auto_log_results","parameters":[{"in":"query","name":"user_id","required":false,"schema":{"type":"string"}},{"in":"query","name":"search_text","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CreateMealItemRequest"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Testing endpoint","tags":["food"]}},"/foods/search_by_text_nlp_queue/results_spacy":{"get":{"operationId":"app.api.meal_queue.get_nlp_auto_log_results_spacy","parameters":[{"in":"query","name":"user_id","required":false,"schema":{"type":"string"}},{"in":"query","name":"search_text","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CreateMealItemRequest"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Testing endpoint","tags":["food"]}},"/foods/search_by_text_nlp_queue/serving_label_list":{"get":{"operationId":"app.api.meal_queue.get_serving_label_list","parameters":[{"in":"query","name":"search_text","required":true,"schema":{"type":"string"}},{"in":"query","name":"user_id","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FoodServingUnit"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Testing endpoint","tags":["nlp"]}},"/foods/search_by_text_nlp_queue/spacy_tests":{"get":{"operationId":"app.api.food.food_search_nlp.spacy_tests","parameters":[{"in":"query","name":"user_id","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Testing endpoint for spacy","tags":["nlp"]}},"/foods/search_diet_restrictions":{"get":{"operationId":"app.api.food.food_search.search_diet_restrictions","parameters":[{"in":"query","name":"search_text","required":true,"schema":{"type":"string"}},{"in":"query","name":"diet_restriction","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMealItemRequest"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Search foods with diet restriction","tags":["food"]}},"/foods/spell_check":{"post":{"operationId":"app.api.food.food_search.post_spell_check","parameters":[{"in":"query","name":"food_name","required":true,"schema":{"description":"word to be spell checked","example":"brocoli","type":"string"}}],"responses":{"200":{"content":{"text/plain":{"schema":{"example":"broccoli","type":"string"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Spell check a food item","tags":["admin"]}},"/foods/suggest":{"get":{"operationId":"app.api.food.food_search.azure_suggest","parameters":[{"in":"query","name":"partial_term","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CognitiveSearchSuggestResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Return complete food terms by suggest","tags":["food"]}},"/foods/update_document":{"get":{"operationId":"app.api.food.food_search.azure_update_document","parameters":[{"in":"query","name":"food_name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","x-body-name":"response"}},"summary":"update document on Azure by food name","tags":["food"]}},"/foods/upload_photo":{"post":{"operationId":"app.api.food.food_search.upload_photo","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"photo":{"format":"binary","type":"string"}},"required":["photo"],"type":"object"}}},"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhotoUploadResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Upload a meal photo","tags":["food"]}},"/foods/usda_database_api/food/{fdcid}":{"get":{"operationId":"app.api.food.food_usda.get_usda_food","parameters":[{"in":"path","name":"fdcid","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsdaApiNutritionResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get USDA food by fdcId","tags":["food"]}},"/foods/usda_database_api/food/{fdcid}/data":{"get":{"operationId":"app.api.food.food_usda.get_usda_food_data","parameters":[{"in":"path","name":"fdcid","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"text/csv":{"schema":{"type":"string"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get USDA food by fdcId","tags":["food"]}},"/foods/usda_database_api/food/{fdcid}/send_data":{"get":{"operationId":"app.api.food.food_usda.send_data","parameters":[{"in":"path","name":"fdcid","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation"}},"summary":"email csv from usda food data by fdcId","tags":["food"]}},"/foods/usda_database_api/search":{"get":{"operationId":"app.api.food.food_usda.search_usda_database_api","parameters":[{"in":"query","name":"search_term","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsdaApiSearchResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Search foods by text. Return maximum of 20 items","tags":["food"]}},"/foods/{food_name}":{"get":{"deprecated":true,"operationId":"app.api.food.food_search.get_food","parameters":[{"in":"path","name":"food_name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodResponse"}}},"description":"successful operation","x-body-name":"body"}},"summary":"[DEPRECATED] Get the food information from the server","tags":["food"]}},"/foods/{food_name}/apply_warnings":{"put":{"deprecated":true,"operationId":"app.api.food.food_details.apply_warnings","parameters":[{"in":"path","name":"food_name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodDetailsUpdateRequest"}}},"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodDetailsResponse"}}},"description":"successful operation","x-body-name":"body"}},"summary":"[DEPRECATED] Validates Nutrients and returns warnings","tags":["food"]}},"/foods/{food_name}/assign_task":{"patch":{"deprecated":true,"operationId":"app.api.food.food_details.patch_food_assign_task","parameters":[{"in":"path","name":"food_name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodAssignmentRequest"}}},"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodAssignmentResponse"}}},"description":"successful operation","x-body-name":"body"}},"summary":"[DEPRECATED] Update a food's associated user ids based on assignment","tags":["food"]}},"/foods/{food_name}/change-logs":{"get":{"deprecated":true,"operationId":"app.api.food.food_details.get_food_details_change_logs","parameters":[{"in":"path","name":"food_name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodChangeLogResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"[DEPRECATED] Gets change logs for a food","tags":["food"]}},"/foods/{food_name}/details":{"get":{"deprecated":true,"operationId":"app.api.food.food_details.get_food_details","parameters":[{"in":"path","name":"food_name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodDetailsResponse"}}},"description":"successful operation","x-body-name":"body"}},"summary":"[DEPRECATED] Gets complete food details","tags":["food"]},"put":{"deprecated":true,"operationId":"app.api.food.food_details.put_food_details","parameters":[{"in":"path","name":"food_name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodDetailsUpdateRequest"}}},"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodDetailsResponse"}}},"description":"successful operation","x-body-name":"body"}},"summary":"[DEPRECATED] Updates food details","tags":["food"]}},"/foods/{food_name}/details-estimates":{"get":{"deprecated":true,"operationId":"app.api.food.food_details.get_food_details_estimates","parameters":[{"in":"path","name":"food_name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"error":{"nullable":true,"type":"string"},"fields":{"items":{"type":"object"},"nullable":true,"type":"array"}},"type":"object"}}},"description":"successful operation","x-body-name":"body"}},"summary":"[DEPRECATED] Gets food details estimates","tags":["food"]}},"/foods/{food_name}/photo":{"get":{"deprecated":true,"operationId":"app.api.food.food_lookup.get_food_photo","parameters":[{"in":"path","name":"food_name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation"}},"security":[],"summary":"[DEPRECATED] Get pre-uploaded food image by food name","tags":["food"]}},"/foods/{rxfood_id}/canonical-details":{"put":{"operationId":"app.api.food.food_details.put_food_canonical_details","parameters":[{"in":"path","name":"rxfood_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodCanonicalDetailsRequest"}}},"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodDetailsResponse"}}},"description":"successful operation","x-body-name":"body"}},"summary":"Updates food canonical details","tags":["food"]}},"/goal_targets":{"get":{"operationId":"app.api.goal.get_goal_targets","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/GoalTargetResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Return the possible goal targets for nutrients or food types (the cc columns) supported in the system. Use this as a catalogue for goal targets when creating a new goal.","tags":["goal"]}},"/hospital/{hospital_id}/clinic/{clinic_id}/patient/{patient_id}/food_report":{"post":{"operationId":"app.api.patient_reports.api.post_food_report","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-12","type":"string"}},{"in":"query","name":"dates_exclude","required":false,"schema":{"items":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"},"type":"array"}},{"in":"query","name":"status","required":true,"schema":{"description":"draft or sent. 'sent' to deliver the report immediately","enum":["draft","sent"],"type":"string"}},{"in":"query","name":"is_comparison_report","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"comparison_report_id","required":false,"schema":{"type":"integer"}},{"in":"query","name":"patient_subscription_id","required":false,"schema":{"type":"integer"}},{"in":"query","name":"sections","required":false,"schema":{"items":{"description":"list of report sections","example":"summary,carbs_by_period,calories_by_period,meal_frequency,average_plate_serv,carb_variability_table,diabetes_food_dump,GI_food_list,glycemic_index_frequency,macronutrient_distribution,micronutrient_summary_table,average_grains_frequency,average_fats_frequency,average_proteins_frequency,average_ultra_processed_frequency,average_beverage_frequency,average_water_frequency,supplements,for_additional_food_text,follow_up,carb_variability_table","type":"string"},"type":"array"}},{"in":"query","name":"as_background_task","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientReportResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskResultResponse"}}},"description":"successful operation (background)","x-body-name":"response"}},"summary":"Generate and persist PDF report.","tags":["reporting"]}},"/hospital/{hospital_id}/clinic/{clinic_id}/patient/{patient_id}/food_report/data":{"get":{"operationId":"app.api.patient_reports.api.get_food_report_data_preview","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-12","type":"string"}},{"in":"query","name":"comparison_report_id","required":false,"schema":{"type":"integer"}},{"in":"query","name":"use_multipliers","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"override_cache","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"sections","required":false,"schema":{"items":{"description":"list of report sections","example":"summary,carbs_by_period,calories_by_period,meal_frequency,average_plate_serv,carb_variability_table,diabetes_food_dump,GI_food_list,glycemic_index_frequency,macronutrient_distribution,micronutrient_summary_table,average_grains_frequency,average_fats_frequency,average_proteins_frequency,average_ultra_processed_frequency,average_beverage_frequency,average_water_frequency,supplements,for_additional_food_text,follow_up,carb_variability_table","type":"string"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientReportDataResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Query the patients detailed usage between the specified dates","tags":["reporting"]}},"/hospital/{hospital_id}/clinic/{clinic_id}/patient/{patient_id}/food_report/draft_pdf":{"get":{"operationId":"app.api.patient_reports.api.get_patient_report_draft_pdf","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-12","type":"string"}},{"in":"query","name":"dates_exclude","required":false,"schema":{"description":"array of calendar dates in format YYYY-MM-DD","items":{"type":"string"},"type":"array"}},{"in":"query","name":"is_comparison_report","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"comparison_report_id","required":false,"schema":{"type":"integer"}},{"in":"query","name":"sections","required":false,"schema":{"items":{"description":"list of report sections","example":"summary,carbs_by_period,calories_by_period,meal_frequency,average_plate_serv,carb_variability_table,diabetes_food_dump,GI_food_list,glycemic_index_frequency,macronutrient_distribution,micronutrient_summary_table,average_grains_frequency,average_fats_frequency,average_proteins_frequency,average_ultra_processed_frequency,average_beverage_frequency,average_water_frequency,supplements,for_additional_food_text,follow_up,carb_variability_table","type":"string"},"type":"array"}},{"in":"query","name":"use_multipliers","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"anonymize","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"override_cache","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/pdf":{"schema":{"format":"binary","type":"string"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Query the patients detailed usage between the specified dates","tags":["reporting"]}},"/hospital/{hospital_id}/clinic/{clinic_id}/patient/{patient_id}/food_report/payload":{"get":{"operationId":"app.api.patient_reports.api.get_food_report_payload","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-12","type":"string"}},{"in":"query","name":"comparison_report_id","required":false,"schema":{"type":"integer"}},{"in":"query","name":"use_multipliers","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"sections","required":false,"schema":{"items":{"description":"list of report sections","example":"summary,carbs_by_period,calories_by_period,meal_frequency,average_plate_serv,carb_variability_table,diabetes_food_dump,GI_food_list,glycemic_index_frequency,macronutrient_distribution,micronutrient_summary_table,average_grains_frequency,average_fats_frequency,average_proteins_frequency,average_ultra_processed_frequency,average_beverage_frequency,average_water_frequency,supplements,for_additional_food_text,follow_up,carb_variability_table","type":"string"},"type":"array"}},{"in":"query","name":"anonymize","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Obtain payload for a report given parameters provided.","tags":["reporting"]}},"/hospital/{hospital_id}/clinic/{clinic_id}/patient/{patient_id}/food_report/{patient_report_id}":{"delete":{"operationId":"app.api.patient_reports.api.delete_food_report","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_report_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientReportResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Delete a patient report.","tags":["reporting"]},"get":{"operationId":"app.api.patient_reports.api.get_food_report","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_report_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientReportResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the patient report details","tags":["reporting"]},"put":{"operationId":"app.api.patient_reports.api.put_food_report","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_report_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"status","required":true,"schema":{"description":"draft or sent. 'sent' to deliver the report immediately","enum":["draft","sent"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientReportResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Update the patient report.","tags":["reporting"]}},"/hospital/{hospital_id}/clinic/{clinic_id}/patient/{patient_id}/food_report/{patient_report_id}/approve":{"post":{"operationId":"app.api.patient_reports.api.post_approve_food_report","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_report_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientReportResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Approve a patient report (permits the error flags to be ignored)","tags":["reporting"]}},"/hospital/{hospital_id}/clinic/{clinic_id}/patient/{patient_id}/food_report/{patient_report_id}/data":{"get":{"operationId":"app.api.patient_reports.api.get_patient_report_data","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_report_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientReportDataResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get stored patient report data for specified report.","tags":["reporting"]},"put":{"operationId":"app.api.patient_reports.api.put_patient_report_data","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_report_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"restrict_sections_when_insufficient_meals","required":false,"schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePatientReportDataRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientReportDataResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Modify patient report data for specified report.","tags":["reporting"]}},"/hospital/{hospital_id}/clinic/{clinic_id}/patient/{patient_id}/food_report/{patient_report_id}/send_by_email":{"post":{"operationId":"app.api.patient_reports.api.post_food_report_send_by_email","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_report_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"to_patient","required":true,"schema":{"type":"boolean"}},{"in":"query","name":"to_clinician","required":true,"schema":{"type":"boolean"}},{"in":"query","name":"bcc_admin","required":true,"schema":{"type":"boolean"}},{"in":"query","name":"attach_report_pdf","required":true,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Deliver a copy of the patient report by email","tags":["reporting"]}},"/hospital/{hospital_id}/clinic/{clinic_id}/patients/{patient_id}/subscription/{patient_subscription_id}/register_report":{"post":{"operationId":"app.api.patient_reports.api.post_register_report","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_subscription_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePatientReportLogRequest"}}},"required":true,"x-body-name":"body"},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientReportLogResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Post a subscription to a patient","tags":["subscription"]}},"/hospital/{hospital_id}/clinics/{clinic_id}/appointments":{"get":{"operationId":"app.api.appointment.get_clinic_appointments","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinicAppointmentsResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get appointments scheduled in the clinic","tags":["clinic"]}},"/hospital/{hospital_id}/clinics/{clinic_id}/clinician/{clinician_id}/appointments":{"get":{"operationId":"app.api.appointment.get_clinician_clinic_appointments","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinician_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinicianAppointmentsResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get appointments scheduled in the clinic for a clinician","tags":["clinic"]}},"/hospital/{hospital_id}/clinics/{clinic_id}/clinician/{clinician_id}/patient/{patient_id}/appointment":{"post":{"operationId":"app.api.appointment.create_clinician_appointment","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinician_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateClinicianAppointmentRequest"}}},"required":true,"x-body-name":"body"},"responses":{"204":{"description":"successful operation"}},"summary":"Create an appointment for a patient in the clinic","tags":["clinic"]}},"/hospital/{hospital_id}/clinics/{clinic_id}/clinician/{clinician_id}/patient/{patient_id}/appointment/{appointment_id}":{"delete":{"operationId":"app.api.appointment.delete_clinician_appointment","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinician_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"appointment_id","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"successful operation"}},"summary":"Delete an appointment","tags":["clinic"]},"get":{"operationId":"app.api.appointment.get_clinician_clinic_appointment","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinician_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"appointment_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinicianAppointmentResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get appointment scheduled in the clinic for a clinician and patient","tags":["clinic"]},"patch":{"operationId":"app.api.appointment.patch_clinician_appointment","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinician_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"appointment_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchClinicianAppointmentRequest"}}},"description":"Appointment information to patch. Only fields included in the request body will be updated.","required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinicianAppointmentResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"patch appointment","tags":["clinic"]},"put":{"operationId":"app.api.appointment.put_clinician_appointment","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinician_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"appointment_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutClinicianAppointmentRequest"}}},"description":"Appointment information to put. If a field was provided with null value, then it will be overwritten to null.","required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinicianAppointmentResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Put appointment.","tags":["clinic"]}},"/hospital/{hospital_id}/clinics/{clinic_id}/clinician/{clinician_id}/patient/{patient_id}/appointments":{"get":{"operationId":"app.api.appointment.get_clinician_patient_appointments","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinician_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinicianAppointmentsResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get appointments scheduled in the clinic for a clinician for a patient between two dates","tags":["clinic"]}},"/hospital/{hospital_id}/patients/{patient_id}/subscription":{"post":{"operationId":"app.api.subscription.api.post_patient_subscription","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePatientSubscriptionRequest"}}},"required":true,"x-body-name":"body"},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientSubscriptionResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Post a subscription to a patient","tags":["subscription"]}},"/hospital/{hospital_id}/patients/{patient_id}/subscription/{patient_subscription_id}":{"delete":{"operationId":"app.api.subscription.api.delete_patient_subscription","parameters":[{"in":"path","name":"patient_subscription_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Delete the subscription for the patient","tags":["subscription"]},"get":{"operationId":"app.api.subscription.api.get_patient_subscription","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_subscription_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientSubscriptionResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get list of subscriptions for the patient","tags":["subscription"]},"patch":{"operationId":"app.api.subscription.api.patch_patient_subscription","parameters":[{"in":"path","name":"patient_subscription_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchPatientSubscriptionRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientSubscriptionResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Modify the subscription for the patient","tags":["subscription"]},"put":{"operationId":"app.api.subscription.api.put_patient_subscription","parameters":[{"in":"path","name":"patient_subscription_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePatientSubscriptionRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientSubscriptionResponse"},"x-body-name":"PatientSubscriptionResponse"}},"description":"successful operation","x-body-name":"response"}},"summary":"Modify the subscription for the patient","tags":["subscription"]}},"/hospital/{hospital_id}/patients/{patient_id}/subscription/{patient_subscription_id}/end_of_subscription_email":{"post":{"operationId":"app.api.subscription.email.post_end_of_subscription_email","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_subscription_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"send_to_patient","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"send_to_clinicians","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Send end of subscription email to patient and/or clinician","tags":["subscription"]}},"/hospital/{hospital_id}/patients/{patient_id}/subscription/{patient_subscription_id}/logging_complete_email":{"post":{"operationId":"app.api.subscription.email.post_send_patient_logging_complete_email","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_subscription_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":false,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"date_until","required":false,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"send_to_admin_only","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Send email to the patient to indicate that they are done logging","tags":["subscription"]}},"/hospital/{hospital_id}/patients/{patient_id}/subscription/{patient_subscription_id}/reminder":{"post":{"deprecated":true,"operationId":"app.api.subscription.api.post_patient_subscription_reminder","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_subscription_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Send a reminder for upcoming subscriptions","tags":["subscription"]}},"/hospital/{hospital_id}/patients/{patient_id}/subscription/{patient_subscription_id}/reminder_email":{"post":{"deprecated":true,"operationId":"app.api.subscription.email.post_patient_subscription_reminder","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_subscription_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Send end of subscription email to patient","tags":["subscription"]}},"/hospital/{hospital_id}/subscriptions":{"get":{"operationId":"app.api.subscription.api.get_hospital_subscriptions","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SubscriptionResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get list of subscriptions available to the hospital","tags":["subscription"]}},"/hospitals":{"get":{"operationId":"app.api.hospital.get_hospitals","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/HospitalResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get list of all hospitals","tags":["hospital"]},"post":{"operationId":"app.api.hospital.post_hospitals","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"address":{"description":"The address of the university.","type":"string"},"city":{"description":"The city where the university is located.","type":"string"},"country":{"description":"The country where the university is located.","type":"string"},"description":{"description":"A brief description of the university.","type":"string"},"full_name":{"description":"The full name of the university.","type":"string"},"invitation_email_logo_link":{"description":"The link to the invitation email logo.","format":"uri","type":"string"},"invitation_email_logo_url":{"description":"The link to the invitation email logo.","format":"uri","type":"string"},"name":{"description":"The name of the university.","type":"string"},"photo":{"description":"A photo of the university.","format":"binary","type":"string"},"state":{"description":"The state or province where the university is located.","type":"string"},"zip_code":{"description":"The postal code for the university.","type":"string"}},"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HospitalResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Create a new hospital","tags":["hospital"]}},"/hospitals/{hospital_id}":{"delete":{"operationId":"app.api.hospital.delete_hospital","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"successful operation"}},"summary":"(NO IMPL) Delete a hospital","tags":["hospital"]},"get":{"operationId":"app.api.hospital.get_hospital","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HospitalResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get hospital information","tags":["hospital"]},"put":{"operationId":"app.api.hospital.put_hospital","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateHospitalRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HospitalResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Update hospital information","tags":["hospital"]}},"/hospitals/{hospital_id}/clinicians":{"get":{"operationId":"app.api.hospital.get_clinicians","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ClinicianResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get all clinicians in the hospital","tags":["hospital"]},"post":{"operationId":"app.api.hospital.post_clinicians","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateClinicianRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinicianResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Create a new clinician in the hospital","tags":["hospital"]}},"/hospitals/{hospital_id}/clinicians/{clinician_id}":{"delete":{"operationId":"app.api.hospital.delete_clinician","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinician_id","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"successful operation"}},"summary":"(NO IMPL) Delete a clinician","tags":["hospital"]},"get":{"operationId":"app.api.hospital.get_clinician","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinician_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinicianResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a clinician info","tags":["hospital"]},"patch":{"operationId":"app.api.hospital.patch_clinician","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinician_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchClinicianRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinicianResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Edit information of the clinician. This endpoint edits the provided field in the body. That is, if the first_name is null in the request body, the first_name in the system remains the same (as opposed to write to null).","tags":["hospital"]}},"/hospitals/{hospital_id}/clinicians/{clinician_id}/clinics":{"get":{"operationId":"app.api.hospital.clinician_get_clinics","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinician_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ClinicResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get clinics this clinician is registered","tags":["hospital"]}},"/hospitals/{hospital_id}/clinicians/{clinician_id}/patients/clinic-invitation-table":{"get":{"operationId":"app.api.clinic_report.patient_clinic_invitation_table","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinician_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date","required":false,"schema":{"description":"reference date (today's date) in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"filter","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"type":"number"}},{"in":"query","name":"offset","schema":{"type":"string"}},{"in":"query","name":"order","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"has_more":{"type":"boolean"},"next":{"type":"string"},"rows":{"items":{"$ref":"#/components/schemas/ClinicianPatientsTableResponseRow"},"type":"array"},"total_rows":{"type":"number"}}}}},"description":"successful operation","x-body-name":"response"}},"summary":"Return a data table of all patients invited to the clinic.","tags":["patient_report"]}},"/hospitals/{hospital_id}/clinicians/{clinician_id}/patients/table":{"get":{"operationId":"app.api.clinic_report.clinician_patients_table","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinician_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date","required":false,"schema":{"description":"reference date (today's date) in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"filter","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"type":"number"}},{"in":"query","name":"offset","schema":{"type":"string"}},{"in":"query","name":"order","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"has_more":{"type":"boolean"},"next":{"type":"string"},"rows":{"items":{"$ref":"#/components/schemas/ClinicianPatientsTableResponseRow"},"type":"array"},"total_rows":{"type":"number"}}}}},"description":"successful operation","x-body-name":"response"}},"summary":"Return a data table of all patients in the clinic.","tags":["patient_report"]}},"/hospitals/{hospital_id}/clinicians/{clinician_id}/patients_report":{"get":{"description":"Since this query assembles all nutrients and goal information of the patients in the clinic, this query takes quite a load on the backend. If just listing the patients in the clinic, please use GET /hospitals/{hospital_id}/clinics/{clinic_id}/patients.","operationId":"app.api.clinic_report.clinician_patients_report","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinician_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date","required":true,"schema":{"description":"reference date (today's date) in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"active_patients_only","required":false,"schema":{"description":"include only active users (logged within 30 days, a future subscription, or has a draft report)","type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinicPatientsReportResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the basic report of patients registered to all clinics this clinician belongs to.","tags":["patient_report"]}},"/hospitals/{hospital_id}/clinicians/{clinician_id}/photo":{"get":{"operationId":"app.api.hospital.get_clinician_photo","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinician_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation"}},"security":[],"summary":"[MOCK] Get the photo of the clinician","tags":["hospital"]},"post":{"operationId":"app.api.hospital.post_clinician_photo","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinician_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"photo":{"description":"photo","format":"binary","type":"string"}},"type":"object"}}},"x-body-name":"body"},"responses":{"200":{"description":"successful operation"}},"summary":"[NO IMPL] Upload a photo of the clinician","tags":["hospital"]}},"/hospitals/{hospital_id}/clinicians/{clinician_id}/{patient_id}/meals":{"get":{"operationId":"app.api.clinic_report.clinician_meal_logs_table","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinician_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date","required":false,"schema":{"description":"reference date (today's date) in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"filter","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"type":"number"}},{"in":"query","name":"offset","schema":{"type":"string"}},{"in":"query","name":"order","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"has_more":{"type":"boolean"},"next":{"type":"string"},"rows":{"items":{"$ref":"#/components/schemas/ClinicianMealLogsTableResponseRow"},"type":"array"}}}}},"description":"successful operation","x-body-name":"response"}},"summary":"Return a data table of all meals of a specific patient in the clinic.","tags":["patient_report"]}},"/hospitals/{hospital_id}/clinics":{"get":{"operationId":"app.api.hospital.get_clinics","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ClinicResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get all clinics in the hospital","tags":["hospital"]},"post":{"operationId":"app.api.hospital.post_clinics","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateClinicRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinicResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Create a new clinic in the hospital","tags":["hospital"]}},"/hospitals/{hospital_id}/clinics/{clinic_id}":{"delete":{"operationId":"app.api.hospital.delete_clinic","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"successful operation"}},"summary":"(NO IMPL) Delete the clinic","tags":["hospital"]},"get":{"operationId":"app.api.hospital.get_clinic","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinicResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the clinic's info","tags":["hospital"]},"put":{"operationId":"app.api.hospital.put_clinic","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateClinicRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinicResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Update the clinic info","tags":["hospital"]}},"/hospitals/{hospital_id}/clinics/{clinic_id}/clinicians":{"get":{"operationId":"app.api.hospital.clinic_get_clinicians","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ClinicianResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get clinicians registered in the clinic","tags":["hospital"]}},"/hospitals/{hospital_id}/clinics/{clinic_id}/deregister_clinician":{"delete":{"operationId":"app.api.hospital.deregister_clinician","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"clinician_id","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"successful operation"}},"summary":"Deregister the clinician to the clinic","tags":["hospital"]}},"/hospitals/{hospital_id}/clinics/{clinic_id}/deregister_patient":{"delete":{"operationId":"app.api.hospital.deregister_patient","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"successful operation"}},"summary":"Deregister the patient to the clinic","tags":["hospital"]}},"/hospitals/{hospital_id}/clinics/{clinic_id}/deregister_patients":{"post":{"operationId":"app.api.hospital.deregister_patients","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeregisterPatientsBatchRequest"}}},"required":true,"x-body-name":"body"},"responses":{"204":{"description":"successful operation"}},"summary":"[NO IMPL] Deregister the patients from the clinic","tags":["hospital"]}},"/hospitals/{hospital_id}/clinics/{clinic_id}/deregister_users":{"post":{"operationId":"app.api.hospital.post_deregister_users","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"successful operation"}},"summary":"Deactivate all users in the clinic (clinicians and patients)","tags":["hospital"]}},"/hospitals/{hospital_id}/clinics/{clinic_id}/invitation-codes/default":{"get":{"operationId":"app.api.hospital.get_clinic_invitation_codes_default","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinicInvitationCodeResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the clinic's default invitation code","tags":["hospital"]}},"/hospitals/{hospital_id}/clinics/{clinic_id}/patient_invitation_report":{"post":{"description":"Summary of recent invites","operationId":"app.api.patient.post_clinic_patient_invitation_report","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"reference date (today's date) in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"reference date (today's date) in format YYYY-MM-DD","example":"2019-01-02","type":"string"}}],"responses":{"204":{"description":"successful operation"}},"summary":"Send invitation report of patients registered in the clinic .","tags":["clinic"]}},"/hospitals/{hospital_id}/clinics/{clinic_id}/patients":{"get":{"operationId":"app.api.hospital.clinic_get_patients","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get patients registered in the clinic","tags":["hospital"]}},"/hospitals/{hospital_id}/clinics/{clinic_id}/patients_report":{"get":{"description":"Since this query assembles all nutrients and goal information of the patients in the clinic, this query takes quite a load on the backend. If just listing the patients in the clinic, please use GET /hospitals/{hospital_id}/clinics/{clinic_id}/patients.","operationId":"app.api.clinic_report.clinic_patients_report","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date","required":true,"schema":{"description":"reference date (today's date) in format YYYY-MM-DD","example":"2019-01-02","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinicPatientsReportResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the basic report of patients registered in the clinic.","tags":["patient_report"]}},"/hospitals/{hospital_id}/clinics/{clinic_id}/register_clinician":{"put":{"operationId":"app.api.hospital.register_clinician","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"clinician_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"preferred_contact","required":false,"schema":{"nullable":true,"type":"boolean"}},{"in":"query","name":"is_notified_of_report","required":false,"schema":{"nullable":true,"type":"boolean"}},{"in":"query","name":"is_clinic_admin","required":false,"schema":{"nullable":true,"type":"boolean"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Register the clinician to the clinic","tags":["hospital"]}},"/hospitals/{hospital_id}/clinics/{clinic_id}/register_patient":{"put":{"operationId":"app.api.hospital.register_patient","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Register the patient to the clinic","tags":["hospital"]}},"/hospitals/{hospital_id}/clinics/{clinic_id}/send_hospital_invitation_email":{"post":{"operationId":"app.api.hospital.send_hospital_clinic_invitation_email","parameters":[{"in":"query","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Send hospital invitation email to the patient's email address","tags":["hospital"]}},"/hospitals/{hospital_id}/patients/{patient_id}/move_clinic":{"post":{"operationId":"app.api.hospital.move_patient_clinic","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MovePatientClinicRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"description":"successful operation"},"400":{"description":"Invalid request (same clinic, cross-hospital, patient not in source, unknown move values, or retry without prior source archive)\n"},"403":{"description":"Clinician is not a member of both clinics"},"404":{"description":"Patient or clinic not found"}},"summary":"Move a patient from one clinic to another within the same hospital","tags":["hospital"]}},"/hospitals/{hospital_id}/photo":{"put":{"operationId":"app.api.hospital.put_hospital_photo","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"photo":{"description":"image file for the hospital logo. jpg or png","format":"binary","type":"string"}},"required":["photo"],"type":"object"}}},"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HospitalResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Update hospital information","tags":["hospital"]}},"/hospitals/{hospital_id}/send_hospital_invitation_email":{"post":{"operationId":"app.api.hospital.send_hospital_invitation_email","parameters":[{"in":"query","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"invitation_id","required":false,"schema":{"nullable":true,"type":"integer"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Send hospital invitation email to the patient's email address","tags":["hospital"]}},"/images/detection/{detect_type}/{image_source}/{image_id}":{"get":{"operationId":"app.api.image_detection.get_image_detection_result","parameters":[{"in":"path","name":"detect_type","required":true,"schema":{"$ref":"#/components/schemas/ImageDetectionTypeEnum"}},{"in":"path","name":"image_source","required":true,"schema":{"type":"string"}},{"in":"path","name":"image_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"cache","required":false,"schema":{"default":"check","enum":["check","ignore","require"],"type":"string"}},{"in":"query","name":"input","required":false,"schema":{"description":"JSON encoded input parameters","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageDetectionResultResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the result of processing an image","tags":["image-detection"]}},"/internal/coupon/walmart/{patient_id}":{"get":{"operationId":"app.api.coupon.get_walmart_coupon_code","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"successful operation","x-body-name":"response"},"400":{"description":"invalid request"},"403":{"description":"not authorized to query coupon code"},"404":{"description":"patient not found"},"500":{"description":"error getting Walmart coupon code"}},"summary":"Get or allocate a Walmart coupon code for a patient","tags":["internal"]}},"/internal/food_classifier/classify":{"post":{"description":"Phase 1 admin-only testing endpoint for the LLM food classifier. Runs the 8-step pipeline on the food identified by rxfood_id and returns the predictions, per-step LLM metadata, deterministic overrides, disagreements with the current DB values, and total cost. Writes predictions to the DB (food / food_cc / food_ranking + food_data_source provenance) only when commit=true. Do NOT invoke from production paths.\n","operationId":"app.api.food_classifier.api.post_classify","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodClassifierClassifyRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodClassifierClassifyResponse"}}},"description":"successful classification","x-body-name":"response"},"400":{"description":"invalid request"},"403":{"description":"not authorized"},"404":{"description":"food not found"}},"summary":"Classify an existing food by rxfood_id (internal testing)","tags":["internal","food_classifier"]}},"/internal/food_classifier/classify_ad_hoc":{"post":{"description":"Phase 1 admin-only testing endpoint. Runs the classifier against free-form inputs with no DB lookup and never writes to the DB \u2014 useful for prompt iteration. Do NOT invoke from production paths.\n","operationId":"app.api.food_classifier.api.post_classify_ad_hoc","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodClassifierClassifyAdHocRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodClassifierClassifyResponse"}}},"description":"successful classification","x-body-name":"response"},"400":{"description":"invalid request"},"403":{"description":"not authorized"}},"summary":"Classify ad-hoc free-form food inputs (internal testing, never writes)","tags":["internal","food_classifier"]}},"/internal/food_classifier/classify_ontology":{"post":{"description":"Phase 1 admin-only testing endpoint for the LLM ontology classifier. Predicts the {level1..level4} ontology path for the food identified by rxfood_id and returns it alongside the food's current ontology for comparison. Read-only \u2014 does not change food.ontology. Do NOT invoke from production paths.\n","operationId":"app.api.food_classifier.ontology_api.post_classify_ontology","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodClassifierClassifyOntologyRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodClassifierClassifyOntologyResponse"}}},"description":"successful classification","x-body-name":"response"},"400":{"description":"invalid request"},"403":{"description":"not authorized"},"404":{"description":"food not found"}},"summary":"Predict a food's ontology path by rxfood_id (internal testing)","tags":["internal","food_classifier"]}},"/internal/food_classifier/classify_ontology_ad_hoc":{"post":{"description":"Phase 1 admin-only testing endpoint. Predicts the {level1..level4} ontology path for free-form inputs with no DB lookup. Do NOT invoke from production paths.\n","operationId":"app.api.food_classifier.ontology_api.post_classify_ontology_ad_hoc","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodClassifierClassifyOntologyAdHocRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodClassifierClassifyOntologyResponse"}}},"description":"successful classification","x-body-name":"response"},"400":{"description":"invalid request"},"403":{"description":"not authorized"}},"summary":"Predict an ontology path for ad-hoc free-form inputs (internal testing)","tags":["internal","food_classifier"]}},"/internal/grounding/resolve_custom_item":{"post":{"description":"Requires elevated permissions. Exercises search grounding + Food Engine + reconcile LLM, with optional persist and apply_to_meal. Provide either meal_photo_queue_id (full QueueLabelContext) or patient_id. Use imdr_row_index with meal_photo_queue_id to load a real MPQ_IM_LBL_MATCH_V2 row; otherwise send synthetic food/brand/grounding_mode fields.\n","operationId":"app.api.queue.grounding_test.post_resolve_custom_item_test","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroundingTestResolveCustomItemRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroundingTestResolveCustomItemResponse"}}},"description":"successful operation (resolved false if no usable UPN)","x-body-name":"response"},"400":{"description":"invalid request"},"403":{"description":"not authorized"},"404":{"description":"patient, meal photo queue, or IMDR not found"}},"summary":"Run resolve_custom_item_to_food pipeline (internal testing)","tags":["internal"]}},"/internal/grounding/search_grounding":{"post":{"description":"Requires elevated permissions. Triggers the default search-grounding. Provide either meal_photo_queue_id (full QueueLabelContext + trace) or patient_id (synthetic raw, no MPQ linkage).\n","operationId":"app.api.queue.grounding_test.post_search_grounding_test","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroundingTestSearchGroundingRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroundingTestSearchGroundingResponse"}}},"description":"successful operation (grounded false if Gemini returned no parseable result)","x-body-name":"response"},"400":{"description":"invalid request"},"403":{"description":"not authorized"},"404":{"description":"patient or meal photo queue not found"}},"summary":"Run Gemini search-grounding and persist (internal testing)","tags":["internal"]}},"/internal/matcher/match":{"post":{"description":"Requires elevated permissions. Exercise matcher components outside the MPQ flow. Minimal body: { \"patient_id\": 123, \"food\": \"apple\" } (defaults to composite_production). Provide either meal_photo_queue_id (full QueueLabelContext) or patient_id. Send modules to override preset (not both). Packaged matcher presets are testable here even though prod packaged MPQs still route through composite MATCH_V2.\n","operationId":"app.api.queue.matcher_test.post_matcher_test_match","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatcherTestMatchRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatcherTestMatchResponse"}}},"description":"successful operation","x-body-name":"response"},"400":{"description":"invalid request"},"403":{"description":"not authorized"},"404":{"description":"patient or meal photo queue not found"}},"summary":"Run food-processor matcher modules (internal testing)","tags":["internal"]}},"/internal/notification-engine/token-auth":{"get":{"operationId":"app.api.internal.get_notification_engine_token_auth","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationEngineTokenAuthResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get authorization info for the associated auth token","tags":["notification-engine"]}},"/langfuse/food_processor/export_observations":{"get":{"operationId":"app.api.langfuse_api.get_langfuse_food_processor_obs_export","parameters":[{"in":"query","name":"obs_name","required":false,"schema":{"type":"string"}},{"in":"query","name":"obs_type","required":false,"schema":{"default":"GENERATION","type":"string"}},{"in":"query","name":"start_date","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"end_date","required":false,"schema":{"format":"date","type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"default":50,"maximum":1000,"minimum":1,"type":"integer"}},{"in":"query","name":"page","required":false,"schema":{"default":1,"maximum":50,"minimum":1,"type":"integer"}},{"in":"query","name":"user_id","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/octet-stream":{"schema":{"type":"string"}}},"description":"successful operation"}},"summary":"Export Langfuse observations (default 50 latest GENERATION observations)","tags":["data review"]}},"/meal-push-questions/patients/{patient_id}/meals/{meal_id}":{"get":{"operationId":"app.api.meal_push_question.get_meal_push_questions","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MealPushQuestionResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Gets all push questions for a meal, ordered with the most recent first.","tags":["meal_push_questions"]},"post":{"operationId":"app.api.meal_push_question.post_meal_push_question","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMealPushQuestionRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealPushQuestionResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Create a new meal push question for the meal","tags":["meal_push_questions"]}},"/meal-push-questions/patients/{patient_id}/meals/{meal_id}/push-questions/{question_id}":{"get":{"operationId":"app.api.meal_push_question.get_meal_push_question","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"question_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealPushQuestionResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Gets a meal push questions","tags":["meal_push_questions"]},"put":{"operationId":"app.api.meal_push_question.put_meal_push_question","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"question_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMealPushQuestionRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealPushQuestionResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Update a meal's push questions","tags":["meal_push_questions"]}},"/meal-push-questions/patients/{patient_id}/meals/{meal_id}/push-questions/{question_id}/response":{"put":{"operationId":"app.api.meal_push_question.put_meal_push_question_submit_response","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"question_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealPushQuestionSubmitResponseRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealPushQuestionResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Submit a response to a meal push question","tags":["meal_push_questions"]}},"/meal-push-questions/patients/{patient_id}/table":{"get":{"operationId":"app.api.meal_push_question.get_meal_push_question_patient_table","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"filter","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"type":"number"}},{"in":"query","name":"offset","schema":{"type":"string"}},{"in":"query","name":"order","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"has_more":{"type":"boolean"},"next":{"type":"string"},"rows":{"items":{"$ref":"#/components/schemas/MealPushQuestionResponse"},"type":"array"}}}}},"description":"successful operation","x-body-name":"response"}},"summary":"An APITable response of meal push questions","tags":["meal_push_questions"]}},"/meal/{meal_id}/queue_id":{"get":{"operationId":"app.api.data_reviewer.get_meal_photo_queue_id","parameters":[{"in":"path","name":"meal_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"queueId":{"type":"string"}},"type":"object"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Look up a meal photo queue ID from a meal ID","tags":["data review"]}},"/meal_gallery":{"post":{"operationId":"app.api.meal_gallery.browse_meal_gallery","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealGalleryRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealGalleryResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Browse meal gallery with filtering and pagination","tags":["data review"]}},"/meal_items/search":{"get":{"operationId":"app.api.meal.get_meal_items_by_food_name","parameters":[{"in":"query","name":"food_name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MealItemResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the meal items by food name","tags":["meal"]}},"/meal_photo_queue/batch_tag":{"post":{"operationId":"app.api.meal_gallery.post_meal_photo_queue_batch_tag","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealPhotoQueueBatchTagRequest"}}},"required":true,"x-body-name":"body"},"responses":{"201":{"description":"successful operation"},"207":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealPhotoQueueBatchTagResponse"}}},"description":"some items failed to be tagged"}},"summary":"Batch tag a list of meal photo queues","tags":["data review"]}},"/meal_photo_queue/{meal_photo_queue_id}":{"get":{"operationId":"app.api.data_reviewer.get_meal_photo_queue_item","parameters":[{"in":"path","name":"meal_photo_queue_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealPhotoQueueResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get an individual meal photo queue item","tags":["data review"]}},"/meal_photo_queue/{meal_photo_queue_id}/escalate":{"post":{"operationId":"app.api.data_reviewer.escalate_meal_photo_queue_item","parameters":[{"in":"path","name":"meal_photo_queue_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"reason","required":false,"schema":{"type":"string"}}],"responses":{"204":{"description":"successful operation"}},"summary":"Escalate a queue item to a higher review level","tags":["data review"]}},"/meal_photo_queue/{meal_photo_queue_id}/generate_dump":{"post":{"operationId":"app.api.data_reviewer.generate_meal_photo_queue_dump","parameters":[{"in":"path","name":"meal_photo_queue_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"dump_url":{"type":"string"},"error":{"type":"string"}},"type":"object"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Generate a dump of the meal photo queue","tags":["data review"]}},"/meal_photo_queue/{meal_photo_queue_id}/langfuse_session_url":{"get":{"operationId":"app.api.langfuse_api.get_langfuse_session_url","parameters":[{"in":"path","name":"meal_photo_queue_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LangfuseSessionUrlResponse"}}},"description":"successful operation"}},"summary":"Langfuse UI URL for a mpq","tags":["data review"]}},"/meal_photo_queue/{meal_photo_queue_id}/meal_annotation":{"put":{"operationId":"app.api.meal_gallery.put_meal_annotation","parameters":[{"in":"path","name":"meal_photo_queue_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealAnnotationRequest"}}},"required":true,"x-body-name":"body"},"responses":{"204":{"description":"successful operation"}},"summary":"Update meal annotation text for a mpq","tags":["data review"]}},"/meal_photo_queue/{meal_photo_queue_id}/qos-details":{"get":{"operationId":"app.api.data_reviewer.get_meal_photo_queue_item_qos_details","parameters":[{"in":"path","name":"meal_photo_queue_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealPhotoQueueQoSDetailsResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Gets the QOS details for a meal photo queue item, which includes all the queues which \"overlap\" with the meal photo queue item.","tags":["data review"]}},"/meal_photo_queue/{meal_photo_queue_id}/tag":{"delete":{"operationId":"app.api.meal_gallery.delete_meal_photo_queue_tag","parameters":[{"in":"path","name":"meal_photo_queue_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"tag","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"successful operation"}},"summary":"Delete a tag from a meal photo queue","tags":["data review"]},"post":{"operationId":"app.api.meal_gallery.post_meal_photo_queue_tag","parameters":[{"in":"path","name":"meal_photo_queue_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"tag","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"successful operation"}},"summary":"Add a tag to a meal photo queue","tags":["data review"]}},"/meal_photos/{meal_photo_id}/original_photo":{"get":{"operationId":"app.api.meal_photo.get_original_photo","parameters":[{"in":"path","name":"meal_photo_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"image/png":{"schema":{"format":"binary","type":"string"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get original user uploaded meal photo contents by id","tags":["meal"]}},"/meal_photos/{meal_photo_id}/photo":{"get":{"operationId":"app.api.meal_photo.get_photo","parameters":[{"in":"path","name":"meal_photo_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"size","required":false,"schema":{"enum":["small","medium","large","original",""],"type":"string"}},{"in":"query","name":"shape","required":false,"schema":{"enum":["square","original",""],"type":"string"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Get resized user uploaded meal photo contents by id","tags":["meal"]}},"/meal_photos/{meal_photo_id}/photo-url":{"get":{"operationId":"app.api.meal_photo.get_photo_url","parameters":[{"in":"path","name":"meal_photo_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Gets a signed URL which allows direct access to the meal photo.","tags":["meal"]}},"/meal_photos/{meal_photo_id}/photo.jpg":{"get":{"operationId":"app.api.meal_photo.get_photo_jpg","parameters":[{"in":"path","name":"meal_photo_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation"}},"security":[],"summary":"The URL returned by `.../photo-url`, using a `?token=...` query parameter for security.","tags":["meal"]}},"/media/onboarding/{version_num}":{"get":{"operationId":"app.api.meal_photo.get_onboarding_video","parameters":[{"in":"path","name":"version_num","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Get onboarding video","tags":["media"]}},"/media/onboarding/{version_num}/link":{"get":{"operationId":"app.api.meal_photo.get_onboarding_video_link","parameters":[{"in":"path","name":"version_num","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Get onboarding video","tags":["media"]}},"/metrics/diet_quality_score_by_clinic":{"get":{"operationId":"app.api.patient_reports.sections.diet_quality_score.get_diet_quality_score_by_clinic","parameters":[{"in":"query","name":"clinic_ids","required":true,"schema":{"items":{"type":"integer"},"type":"array"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-10","type":"string"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Query the Diet Quality Score for several clinics over a time period","tags":["metrics"]}},"/metrics/patients/{patient_id}/DASH":{"get":{"operationId":"app.api.patient_reports.sections.dash.get_dash","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-10","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Query the patient's DASH over a time period","tags":["metrics"]}},"/metrics/patients/{patient_id}/HEI":{"get":{"operationId":"app.api.metrics_HEI.get_HEI","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeiResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Query the patient's HEI over a time period","tags":["metrics"]}},"/metrics/patients/{patient_id}/HEI/components":{"get":{"operationId":"app.api.metrics_HEI.get_HEI_components","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeiComponentsResponse"}}},"description":"successful operation"}},"summary":"Query the patient's HEI components over a time period","tags":["metrics"]}},"/metrics/patients/{patient_id}/HEI/{meal_id}":{"get":{"operationId":"app.api.metrics_HEI.get_HEI_meal","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeiMealResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Query the patient's HEI for a specific meal","tags":["metrics"]}},"/metrics/patients/{patient_id}/diet_quality_score":{"get":{"operationId":"app.api.patient_reports.sections.diet_quality_score.get_diet_quality_score","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-10","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DietQualityScoreResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Query the patient's Diet Quality Score over a time period","tags":["metrics"]}},"/metrics/patients/{patient_id}/mediterranean":{"get":{"operationId":"app.api.patient_reports.sections.mind.get_mediterranean_score","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-10","type":"string"}},{"in":"query","name":"disaggregated","required":true,"schema":{"description":"use disaggregated or not","example":"true","type":"boolean"}},{"in":"query","name":"use_ranking_filter","required":false,"schema":{"description":"whether rankings should be considered in the calculation. Eg. a non-ranked vegetable would not count towards the vegetable score. Added 2024-01-18","example":"true","type":"boolean"}},{"in":"query","name":"use_insufficient_meal_filter","required":false,"schema":{"description":"whether days with insufficient number of meals should be excluded from the meals. Added 2024-04-01","example":"true","type":"boolean"}},{"in":"query","name":"version","required":false,"schema":{"description":"algorithm version","enum":["1","2"],"example":"1","type":"string"}},{"in":"query","name":"energy_normalization","required":false,"schema":{"enum":["none","density_per_2000_kcal"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediterraneanScoreResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Query the patient's MIND score over a time period","tags":["metrics"]}},"/metrics/patients/{patient_id}/mediterranean/history":{"get":{"operationId":"app.api.patient_reports.sections.mind.get_mediterranean_score_history","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2026-01-01","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2026-03-09","type":"string"}},{"in":"query","name":"window_days","required":false,"schema":{"default":7,"description":"rolling window size in days; allowed range 1..30","type":"integer"}},{"in":"query","name":"version","required":false,"schema":{"description":"algorithm version; if omitted, auto-select based on patient_app_use_v3_ui flag","enum":["1","2"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediterraneanScoreHistoryResponse"}}},"description":"successful operation","x-body-name":"response"},"400":{"description":"invalid request"},"401":{"description":"unauthorized"},"403":{"description":"forbidden"},"404":{"description":"patient not found"},"422":{"description":"unprocessable request"}},"summary":"Query the patient's Mediterranean score history over a time period","tags":["metrics"]}},"/metrics/patients/{patient_id}/mind":{"get":{"operationId":"app.api.patient_reports.sections.mind.get_mind_score","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-10","type":"string"}},{"in":"query","name":"disaggregated","required":true,"schema":{"description":"use disaggregated or not","example":"true","type":"boolean"}},{"in":"query","name":"use_ranking_filter","required":false,"schema":{"description":"whether rankings should be considered in the calculation. Eg. a non-ranked vegetable would not count towards the vegetable score. Added 2024-01-18","example":"true","type":"boolean"}},{"in":"query","name":"use_insufficient_meal_filter","required":false,"schema":{"description":"whether days with insufficient number of meals should be excluded from the meals. Added 2024-04-01","example":"true","type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MindScoreResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Query the patient's MIND score over a time period","tags":["metrics"]}},"/metrics/testing/{patient_id}/{time_period}":{"post":{"operationId":"app.api.patient_reports.report_metrics.post_metrics","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"time_period","required":true,"schema":{"description":"'weekly' for nutrition reports, 'daily' for daily reports","type":"string"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"start date for metrics in format YYYY-MM-DD","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"end date for metrics in format YYYY-MM-DD","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientMetricsResponse"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"description":"successful operation"}},"summary":"Post fake metrics for testing purposes","tags":["metrics"]}},"/metrics/{metric_name}/{time_period}":{"get":{"operationId":"app.api.patient_reports.report_metrics.get_metrics","parameters":[{"in":"path","name":"metric_name","required":true,"schema":{"type":"string"}},{"in":"path","name":"time_period","required":true,"schema":{"description":"'weekly' for nutrition reports, 'daily' for daily reports","enum":["daily","weekly"],"type":"string"}},{"in":"query","name":"end_date","required":true,"schema":{"description":"end date for metric calculations in format YYYY-MM-DD","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"integer"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Calculate the value for a specific metric for a defined period up to certain date","tags":["metrics"]}},"/mobile/proto/gemini":{"post":{"operationId":"app.api.mobile_proto_gemini.post_proto_gemini","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileProtoGeminiRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileProtoGeminiResponse"}}},"description":"successful operation","x-body-name":"response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileProtoGeminiError"}}},"description":"invalid request","x-body-name":"response"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileProtoGeminiError"}}},"description":"internal LLM gateway error","x-body-name":"response"}},"summary":"Mobile Gemini prototype gateway","tags":["mobile-proto"]}},"/motivations":{"get":{"operationId":"app.api.motivation.get_motivations","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MotivationResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"body"}},"security":[],"summary":"Get list of available motivations","tags":["motivations"]}},"/movano/{patient_id}/is_linked":{"get":{"operationId":"app.integrations.movano.movano_endpoints.movano_check_link","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MovanoIsLinkedResponse"}}},"description":"successful operation"}},"summary":"Check if patient is linked with Movano","tags":["movano"]}},"/movano/{patient_id}/link":{"post":{"operationId":"app.integrations.movano.movano_endpoints.movano_link_patient","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MovanoLinkRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MovanoLinkResponse"}}},"description":"Successful link (or link already completed)"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MovanoLinkResponse"}}},"description":"Link initialization successful"}},"summary":"Link patient with Movano","tags":["movano"]}},"/movano/{patient_id}/sync":{"post":{"operationId":"app.integrations.movano.movano_endpoints.movano_sync_data","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MovanoSyncRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"description":"successful operation"}},"summary":"Sync data","tags":["movano"]}},"/oauth/authorize":{"post":{"operationId":"app.api.oauth.authorize","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/OAuthImplicitGrant"}}},"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAuthorizationResponse"}}},"description":"successful operation"}},"security":[],"summary":"Get auth token (with mfa support)","tags":["oauth","mfa"]}},"/oauth/authorize_auditor_token":{"post":{"operationId":"app.api.oauth.authorize_auditor_token","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"properties":{"client_id":{"type":"string"},"redirect_uri":{"type":"string"},"response_type":{"description":"indicate token here","type":"string"},"token":{"type":"string"}},"type":"object"}}},"x-body-name":"body"},"responses":{"200":{"description":"successful operation"}},"security":[],"summary":"Temporary token for clinician <> auditor authentication","tags":["oauth"]}},"/oauth/authorize_magic_link":{"post":{"operationId":"app.api.oauth.authorize_magic_link","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/UserSecureTokenAuthorization"}}},"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAuthorizationResponse"}}},"description":"successful operation"}},"security":[],"summary":"Get auth token using a secure token","tags":["oauth","mfa"]}},"/oauth/authorize_swagger":{"post":{"operationId":"app.api.oauth.authorize_swagger","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/OAuthImplicitGrant"}}},"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"successful operation"}},"security":[],"summary":"Get auth token (to be used from swagger ui)","tags":["oauth"]}},"/oauth/logout":{"post":{"operationId":"app.api.oauth.logout","responses":{"200":{"content":{"application/json":{"schema":{"type":"string"}}},"description":"successful operation"}},"summary":"Logout and invalidate the current oauth token","tags":["oauth"]}},"/oauth/partner/authorize":{"get":{"description":"Validates the client, redirect URI, response type, scopes and PKCE parameters, then redirects the browser to the RxFood-hosted login and consent page. Client/redirect failures are rendered in place and never redirected.\n","operationId":"app.api.partner_oauth.authorize.authorize","parameters":[{"in":"query","name":"client_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"redirect_uri","required":true,"schema":{"type":"string"}},{"description":"Must be 'code'","in":"query","name":"response_type","required":false,"schema":{"type":"string"}},{"description":"Space-delimited scopes","in":"query","name":"scope","required":false,"schema":{"type":"string"}},{"in":"query","name":"state","required":false,"schema":{"type":"string"}},{"in":"query","name":"code_challenge","required":false,"schema":{"type":"string"}},{"description":"Must be 'S256'","in":"query","name":"code_challenge_method","required":false,"schema":{"type":"string"}}],"responses":{"302":{"description":"Redirect to the RxFood consent page, or back to the registered redirect URI with an OAuth error"},"400":{"description":"invalid_request \u2014 redirect URI not registered or malformed request"},"401":{"description":"invalid_client \u2014 unknown or inactive client_id"}},"security":[],"summary":"Partner authorization endpoint (browser redirect)","tags":["partner-oauth"]}},"/oauth/partner/revoke":{"post":{"operationId":"app.api.partner_oauth.token_endpoint.revoke","responses":{"200":{"description":"Token revoked, or unknown (indistinguishable by design)"},"401":{"description":"invalid_client"}},"security":[],"summary":"Partner token revocation endpoint","tags":["partner-oauth"]}},"/oauth/partner/token":{"post":{"description":"Supports grant_type=authorization_code (PKCE S256 required) and grant_type=refresh_token (rotation on every use). Confidential clients authenticate with HTTP Basic or client_secret_post.\n","operationId":"app.api.partner_oauth.token_endpoint.token","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"access_token":{"type":"string"},"expires_in":{"type":"integer"},"refresh_token":{"type":"string"},"scope":{"type":"string"},"token_type":{"type":"string"}},"type":"object"}}},"description":"Access token response"},"400":{"description":"invalid_request / invalid_grant / invalid_scope / unsupported_grant_type"},"401":{"description":"invalid_client"}},"security":[],"summary":"Partner token endpoint","tags":["partner-oauth"]}},"/oauth/partner/transaction":{"post":{"description":"Exchanges the opaque transaction secret for the data needed to render login and consent. Never returns the state parameter, the PKCE challenge, or the full redirect URI.\n","operationId":"app.api.partner_oauth.authorize.get_transaction","requestBody":{"content":{"application/json":{"schema":{"properties":{"locale":{"type":"string"},"transaction_id":{"type":"string"}},"required":["transaction_id"],"type":"object"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthTransactionView"}}},"description":"Transaction view"},"404":{"description":"transaction_invalid \u2014 unknown, expired or already used"}},"security":[],"summary":"Load an authorization transaction for the consent page","tags":["partner-oauth"]}},"/oauth/partner/transaction/consent":{"post":{"description":"Returns the absolute URL the browser must be sent to. The redirect target is always built from the server-side transaction record.\n","operationId":"app.api.partner_oauth.authorize.transaction_consent","requestBody":{"content":{"application/json":{"schema":{"properties":{"approved_scopes":{"description":"Optional. The subset of the requested scopes the patient chose to share. Intersected server-side with what the partner requested and the client is registered for, so it can only narrow. Omit to approve everything requested; selecting none is rejected (deny instead).\n","items":{"type":"string"},"type":"array"},"decision":{"enum":["approve","deny"],"type":"string"},"locale":{"type":"string"},"transaction_id":{"type":"string"}},"required":["transaction_id","decision"],"type":"object"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"decision":{"enum":["approve","deny"],"type":"string"},"redirect_to":{"type":"string"}},"type":"object"}}},"description":"Decision recorded"},"400":{"description":"invalid_decision"},"401":{"description":"authentication_required"},"403":{"description":"client_unavailable / scope_unavailable / patient_unavailable / patient_not_eligible"},"404":{"description":"transaction_invalid"}},"security":[],"summary":"Approve or deny an authorization transaction","tags":["partner-oauth"]}},"/oauth/partner/transaction/login":{"post":{"description":"Credentials are verified by MNT and the patient is bound to the transaction server-side. No first-party RxFood token is issued to the browser. The transaction secret is rotated on success.\n","operationId":"app.api.partner_oauth.authorize.transaction_login","requestBody":{"content":{"application/json":{"schema":{"properties":{"locale":{"type":"string"},"otp_token":{"type":"string"},"password":{"type":"string"},"transaction_id":{"type":"string"},"username":{"type":"string"}},"required":["transaction_id","username","password"],"type":"object"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthTransactionView"}}},"description":"Authenticated; returns a rotated transaction_id plus the transaction view"},"400":{"description":"invalid_credentials"},"401":{"description":"invalid_credentials / mfa_required / mfa_token_invalid"},"403":{"description":"not_a_patient / patient_not_eligible"},"404":{"description":"transaction_invalid"}},"security":[],"summary":"Authenticate the patient within an authorization transaction","tags":["partner-oauth"]}},"/openai/chat-completion":{"post":{"operationId":"app.api.openai.post_chat_completion","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIChatCompletionRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIChatCompletionResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Chat completion","tags":["openai"]}},"/openai/chat-completion/food-substitutions":{"post":{"operationId":"app.api.openai.post_food_substitutions_chat_completion","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIChatCompletionRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIChatCompletionResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Chat completion","tags":["openai"]}},"/openai/chat-completion/meal-plan":{"post":{"operationId":"app.api.openai.post_meal_plan_chat_completion","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIChatCompletionRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIChatCompletionResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Chat completion","tags":["openai"]}},"/options/options_collection/{scope}":{"get":{"operationId":"app.api.food.food_details.get_options_collection","parameters":[{"in":"path","name":"scope","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodOptionCollection"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the options collection for a specific scope","tags":["food"]}},"/partner/me":{"get":{"operationId":"app.api.partner_oauth.resources.get_me","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"email":{"nullable":true,"type":"string"},"first_name":{"nullable":true,"type":"string"},"last_name":{"nullable":true,"type":"string"},"locale":{"nullable":true,"type":"string"},"patient_id":{"type":"integer"},"scopes":{"items":{"type":"string"},"type":"array"}},"type":"object"}}},"description":"Patient profile"},"401":{"description":"Invalid, expired or revoked delegated token"},"403":{"description":"Missing profile:read scope"}},"security":[{"partnerOAuthAuth":[]}],"summary":"Minimal profile of the consenting patient","tags":["partner-oauth"]}},"/partner/me/meals":{"get":{"operationId":"app.api.partner_oauth.resources.get_me_meals","parameters":[{"in":"query","name":"date_since","required":true,"schema":{"format":"date","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PartnerApiMeal"},"type":"array"}}},"description":"List of meals (same restricted projection as the API-key route)"},"400":{"description":"Invalid date format or range"},"401":{"description":"Invalid, expired or revoked delegated token"},"403":{"description":"Missing meals:read scope"}},"security":[{"partnerOAuthAuth":[]}],"summary":"Meals of the consenting patient for a date range","tags":["partner-oauth"]}},"/partner/me/reports":{"get":{"description":"Returns download paths rather than signed capability URLs, so that revoking the grant immediately stops downloads.\n","operationId":"app.api.partner_oauth.resources.get_me_reports","responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"created_time":{"format":"date-time","nullable":true,"type":"string"},"date_since":{"format":"date","nullable":true,"type":"string"},"date_until":{"format":"date","nullable":true,"type":"string"},"download_path":{"type":"string"},"report_id":{"type":"integer"},"report_sent_time":{"format":"date-time","nullable":true,"type":"string"},"status":{"type":"string"}},"type":"object"},"type":"array"}}},"description":"List of reports"},"401":{"description":"Invalid, expired or revoked delegated token"},"403":{"description":"Missing reports:read scope"}},"security":[{"partnerOAuthAuth":[]}],"summary":"Reports available to the consenting patient","tags":["partner-oauth"]}},"/partner/me/reports/{report_id}/download":{"get":{"operationId":"app.api.partner_oauth.resources.download_me_report","parameters":[{"in":"path","name":"report_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/pdf":{"schema":{"format":"binary","type":"string"}}},"description":"PDF"},"401":{"description":"Invalid, expired or revoked delegated token"},"403":{"description":"Missing reports:read scope"},"404":{"description":"Report not found"}},"security":[{"partnerOAuthAuth":[]}],"summary":"Download a report PDF as the consenting patient","tags":["partner-oauth"]}},"/partner/patients/{patient_id}/meals":{"get":{"operationId":"app.api.partner_api.endpoints.get_partner_patient_meals","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"format":"date","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PartnerApiMeal"},"type":"array"}}},"description":"List of meals (restricted partner projection: food display name, sizing, nutrients, meal metadata, timestamps)"},"400":{"description":"Invalid date format or range"},"401":{"description":"Invalid or missing API key"},"403":{"description":"Partner does not have access to this patient"},"404":{"description":"Patient not found"}},"security":[{"partnerApiKeyAuth":[]}],"summary":"Get patient meals for a date range","tags":["partner"]}},"/partner/patients/{patient_id}/mediterranean-diet-scores":{"get":{"description":"Returns `current` -- the one score to display on a dashboard -- plus `scores`, the history behind it.\n\nEvery score covers a trailing 7-day window ending on its `date`. It is a single score computed from that whole week of food, not an average of daily scores.\n\n`current.score` is populated only when `current.status` is `ok`; any other status means there is no reliable number to show and says why, so check it before rendering. `score_percent` is the safest field to display, being already normalized against `max_score`. The scoring version is determined by the patient's clinic configuration and is neither selectable nor exposed, so read `max_score` from the response rather than hard-coding it.\n\n`current` is the patient's most recent usable score regardless of the requested range, falling back through up to 30 days so a short gap in logging does not blank the dashboard. It is brought up to date when you call this endpoint, while historical entries are recomputed nightly.\n","operationId":"app.api.partner_api.endpoints.get_partner_patient_mediterranean_diet_scores","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"description":"Defaults to 30 days before date_until (inclusive).","in":"query","name":"date_since","required":false,"schema":{"format":"date","type":"string"}},{"description":"Defaults to today (UTC), or 30 days after date_since when only date_since is given.","in":"query","name":"date_until","required":false,"schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerApiMediterraneanDietScoreSeries"}}},"description":"Daily Mediterranean diet scores for the requested range"},"400":{"description":"Invalid date format or range"},"401":{"description":"Invalid or missing API key"},"403":{"description":"Partner does not have access to this patient"},"404":{"description":"Patient not found"}},"security":[{"partnerApiKeyAuth":[]}],"summary":"Get a patient's Mediterranean diet score","tags":["partner"]}},"/partner/patients/{patient_id}/reports":{"get":{"operationId":"app.api.partner_api.endpoints.get_partner_patient_report_links","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"properties":{"created_time":{"format":"date-time","nullable":true,"type":"string"},"date_since":{"format":"date","nullable":true,"type":"string"},"date_until":{"format":"date","nullable":true,"type":"string"},"download_url":{"nullable":true,"type":"string"},"report_id":{"type":"integer"},"report_sent_time":{"format":"date-time","nullable":true,"type":"string"},"status":{"type":"string"}},"type":"object"},"type":"array"}}},"description":"List of report links"},"401":{"description":"Invalid or missing API key"},"403":{"description":"Partner does not have access to this patient"},"404":{"description":"Patient not found"}},"security":[{"partnerApiKeyAuth":[]}],"summary":"Get patient report download links","tags":["partner"]}},"/patient/{patient_id}/activity_feed":{"get":{"operationId":"app.api.patient_activity_feed.get_patient_activity_feed","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"filter","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"type":"number"}},{"in":"query","name":"before","schema":{"description":"Maximum timestamp to return (exclusive)","format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"group_by":{"items":{"type":"string"},"type":"array"},"has_more":{"type":"boolean"},"next":{"type":"string"},"rows":{"items":{"$ref":"#/components/schemas/PatientActivityFeedRow"},"type":"array"}}}}},"description":"successful operation"}},"summary":"Gets an ApiTable response of a patient's activity feed","tags":["patient"]}},"/patient/{patient_id}/clinician/{clinician_id}/patient_note":{"get":{"operationId":"app.api.patient_note.get_patient_note_for_clinician","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinician_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientNoteResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get latest patient note for clinician","tags":["patient"]},"put":{"operationId":"app.api.patient_note.put_patient_note_for_clinician","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinician_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePatientNoteRequest"}}},"description":"Updated version of the patient note history.","required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientNoteResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Update patient note for clinician","tags":["patient"]}},"/patient/{patient_id}/patient_note":{"get":{"operationId":"app.api.patient_note.get_patient_note","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientNoteResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get latest patient note","tags":["patient"]},"post":{"operationId":"app.api.patient_note.post_patient_note","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePatientNoteRequest"}}},"description":"Updated version of the patient note history.","required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientNoteResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Post patient note","tags":["patient"]}},"/patient/{patient_id}/patient_note/{patient_note_id}":{"get":{"operationId":"app.api.patient_note.get_patient_note_by_id","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_note_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientNoteResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get patient note by id","tags":["patient"]}},"/patient/{patient_id}/patient_notes":{"get":{"operationId":"app.api.patient_note.get_patient_notes","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientNoteResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get Summary of All Notes","tags":["patient"]}},"/patients/all/usage_summary":{"get":{"operationId":"app.api.patient_reports.patient_usage_summary.get_all_patients_metrics","parameters":[{"description":"filter results such that only those tracking_starts greater than / equal to this date are included","in":"query","name":"tracking_reference_date","required":true,"schema":{"type":"string"}},{"in":"query","name":"date_since","required":true,"schema":{"type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get all logged patients","tags":["patient"]}},"/patients/all/usage_summary_quick":{"get":{"operationId":"app.api.patient_reports.patient_usage_summary.get_all_patients_metrics_quick","parameters":[{"in":"query","name":"days_since_tracking_started","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get all logged patients","tags":["patient"]}},"/patients/check-status":{"post":{"operationId":"app.api.patient.patient_onboarding_check_status","requestBody":{"content":{"application/json":{"schema":{"properties":{"email":{"description":"Patient email","example":"hello@example.com","type":"string"}},"type":"object"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"flags":{"$ref":"#/components/schemas/RxFeatureFlagsResponse","type":"object"},"locale":{"description":"Patient locale","example":"en","type":"string"},"needs_login":{"description":"Whether the patient has an account","example":true,"type":"boolean"},"needs_onboarding":{"description":"Whether the patient needs to be onboarded","example":true,"type":"boolean"}},"type":"object"}}},"description":"successful operation","x-body-name":"response"}},"security":[],"summary":"Checks whether a patient needs to be onboarded.","tags":["patients onboarding"]}},"/patients/current":{"get":{"operationId":"app.api.patient.get_current_patient","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get currently logged in patient info","tags":["patient"]}},"/patients/current/mixpanel-tags":{"get":{"description":"Legacy path retained for mobile clients. Returns user properties to attach to the client-side analytics SDK (Countly).","operationId":"app.api.patient.get_current_patient_mixpanel_tags","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get product analytics user tags for the current patient.","tags":["patient"]}},"/patients/from_clinician":{"post":{"operationId":"app.api.patient.post_from_clinician","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePatientFromClinicianRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Create a new patient, supposed to be used from a clinician","tags":["patient"]}},"/patients/onboarding":{"post":{"operationId":"app.api.patient.patient_onboarding","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientOnboardingRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientResponse"}}},"description":"successful operation","x-body-name":"response"}},"security":[],"summary":"Creates a new patient after onboarding.","tags":["patients onboarding"]}},"/patients/onboarding/{patient_email}":{"get":{"deprecated":true,"operationId":"app.api.patient.get_patient_by_email","parameters":[{"in":"path","name":"patient_email","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientResponse"}}},"description":"successful operation","x-body-name":"response"}},"security":[],"summary":"Endpoint to get patient's information to be used during onboarding process.","tags":["patients onboarding"]}},"/patients/patient_engagement_summary":{"get":{"operationId":"app.api.patient_summary.patient_engagement_summary","parameters":[{"in":"query","name":"patient_ids_to_include","required":false,"schema":{"type":"string"}},{"in":"query","name":"patient_ids_to_exclude","required":false,"schema":{"type":"string"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"reference date (today's date) in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"reference date (today's date) in format YYYY-MM-DD","example":"2019-01-02","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeeklyPatientEngagementResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the patient's summary for the clinician view","tags":["patient_report"]}},"/patients/refresh_meals":{"post":{"operationId":"app.api.meal.post_refresh_meals","parameters":[{"in":"query","name":"meal_ids","required":true,"schema":{"items":{"type":"integer"},"type":"array"}},{"in":"query","name":"auto_escalate","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealItemResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"refresh (recalculate) the nutrients for a set of meals","tags":["meal"]}},"/patients/{patient_email}":{"get":{"deprecated":true,"operationId":"app.api.patient.old_get_patient_by_email","parameters":[{"in":"path","name":"patient_email","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientResponse"}}},"description":"successful operation","x-body-name":"response"}},"security":[],"summary":"TEMPORARY Endpoint to get patient's information to be used during onboarding process.","tags":["patients onboarding"]}},"/patients/{patient_id}":{"get":{"operationId":"app.api.patient.get_patient","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"include_recent_meal_context","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get patient info","tags":["patient"]},"patch":{"operationId":"app.api.patient.patch_patient","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchPatientRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Edit information of the patient. This endpoint edits the provided field in the body. That is, if the first_name is null in the request body, the first_name in the system remains the same (as opposed to write to null).","tags":["patient"]}},"/patients/{patient_id}/advisor-chat/question-suggestions":{"get":{"operationId":"app.api.advisor_chat.api.get_advisor_question_suggestions","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"question_date","required":false,"schema":{"type":"string"}},{"in":"query","name":"force_rebuild","required":false,"schema":{"description":"force the rebuild of the question suggestions","type":"boolean"}},{"in":"query","name":"subject_type","required":false,"schema":{"type":"string"}},{"in":"query","name":"subject_id","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AdvisorQuestionSuggestionResponse"},"type":"array"},"x-body-name":"response"}},"description":"successful operation","x-body-name":"response"}},"summary":"Get question suggestions in the advisor chat for the patient","tags":["advisor-chat"]}},"/patients/{patient_id}/advisor-chat/sessions":{"get":{"operationId":"app.api.advisor_chat.api.get_patient_advisor_chat_sessions","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"subject_type","required":false,"schema":{"$ref":"#/components/schemas/AdvisorChatSubjectTypeEnum"}},{"in":"query","name":"limit","required":false,"schema":{"type":"integer"}},{"in":"query","name":"next_timestamp","required":false,"schema":{"type":"string"}},{"in":"query","name":"session_type","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvisorChatSessionsResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get list of advisor chat sessions for the patient","tags":["advisor-chat"]},"post":{"operationId":"app.api.advisor_chat.api.create_patient_advisor_chat_session","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"session_type","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvisorChatMessageRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvisorChatMessageResponse"}}},"description":"successful operation, session created","x-body-name":"response"}},"summary":"Create a new advisor chat session for the patient with an initial message","tags":["advisor-chat"]}},"/patients/{patient_id}/advisor-chat/sessions/subject/{subject_type}/{subject_id}":{"get":{"operationId":"app.api.advisor_chat.api.get_patient_advisor_chat_session_by_subject","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"subject_type","required":true,"schema":{"type":"string"}},{"in":"path","name":"subject_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"message_limit","required":false,"schema":{"type":"integer"}},{"in":"query","name":"message_next_timestamp","required":false,"schema":{"type":"string"}},{"in":"query","name":"session_type","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvisorChatSessionResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get advisor chat session for the patient","tags":["advisor-chat"]}},"/patients/{patient_id}/advisor-chat/sessions/{advisor_chat_session_id}":{"get":{"operationId":"app.api.advisor_chat.api.get_patient_advisor_chat_session","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"advisor_chat_session_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"message_limit","required":false,"schema":{"type":"integer"}},{"in":"query","name":"message_next_timestamp","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvisorChatSessionResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get advisor chat session for the patient","tags":["advisor-chat"]},"post":{"operationId":"app.api.advisor_chat.api.post_patient_advisor_chat_message","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"advisor_chat_session_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvisorChatMessageRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvisorChatMessageResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Send a message to the advisor chat session and get a response","tags":["advisor-chat"]}},"/patients/{patient_id}/advisor-chat/sessions/{advisor_chat_session_id}/messages/{advisor_chat_message_id}":{"get":{"operationId":"app.api.advisor_chat.api.get_patient_advisor_chat_session_message","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"advisor_chat_session_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"advisor_chat_message_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvisorChatMessageResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a message from the advisor chat session for the patient","tags":["advisor-chat"]}},"/patients/{patient_id}/app-data/query":{"delete":{"operationId":"app.api.user_app_data.delete_patient_app_data_by_prefix","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"example":"mobile","in":"query","name":"platform","required":true,"schema":{"type":"string"}},{"example":"onboarding","in":"query","name":"scope","required":true,"schema":{"type":"string"}},{"example":"nutrient:","in":"query","name":"key_prefix","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"deleted_count":{"type":"integer"}},"type":"object"}}},"description":"successful operation"}},"summary":"Delete app data by query","tags":["patientAppData"]},"get":{"operationId":"app.api.user_app_data.query_patient_app_data","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"example":"mobile","in":"query","name":"platform","required":true,"schema":{"type":"string"}},{"example":"patient-experiment-trials","in":"query","name":"scope","required":true,"schema":{"type":"string"}},{"example":"nutrient:","in":"query","name":"key_prefix","required":false,"schema":{"type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"type":"number"}},{"in":"query","name":"offset","required":false,"schema":{"type":"string"}},{"in":"query","name":"order","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/UserAppDataItemResponse"},"type":"array"}}},"description":"successful operation"}},"summary":"Get app data by query","tags":["patientAppData"]}},"/patients/{patient_id}/app-data/{platform}/{scope}/{name}":{"delete":{"operationId":"app.api.user_app_data.delete_patient_app_data","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"example":"mobile","in":"path","name":"platform","required":true,"schema":{"type":"string"}},{"example":"onboarding","in":"path","name":"scope","required":true,"schema":{"type":"string"}},{"example":"some-form-response","in":"path","name":"name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Delete a specific value saved by the app","tags":["patientAppData"]},"get":{"operationId":"app.api.user_app_data.get_patient_app_data","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"example":"mobile","in":"path","name":"platform","required":true,"schema":{"type":"string"}},{"example":"onboarding","in":"path","name":"scope","required":true,"schema":{"type":"string"}},{"example":"some-form-response","in":"path","name":"name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAppDataItemResponse"}}},"description":"successful operation"}},"summary":"Get a specific value saved by the app","tags":["patientAppData"]},"put":{"operationId":"app.api.user_app_data.put_patient_app_data","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"example":"mobile","in":"path","name":"platform","required":true,"schema":{"type":"string"}},{"example":"onboarding","in":"path","name":"scope","required":true,"schema":{"type":"string"}},{"example":"some-form-response","in":"path","name":"name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"nullable":true,"type":"object"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserAppDataItemResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Update a specific value saved by the app","tags":["patientAppData"]}},"/patients/{patient_id}/average_plate":{"get":{"operationId":"app.api.patient_reports.sections.average_plate.get_average_plate","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"starting date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"ending date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AveragePlateDataResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the patient's average plate data","tags":["patient_report"]}},"/patients/{patient_id}/average_plate/recent":{"get":{"operationId":"app.api.patient_reports.sections.average_plate.get_average_plate_recent","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AveragePlateDataResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the patient's average plate data","tags":["patient_report"]}},"/patients/{patient_id}/average_plate/{meal_name}/graph":{"get":{"operationId":"app.api.patient_reports.sections.average_plate.get_average_plate_graph","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"starting date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"ending date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"path","name":"meal_name","required":true,"schema":{"description":"breakfast/lunch/dinner/snack/overall","enum":["breakfast","lunch","dinner","snack","overall"],"example":"snack","type":"string"}}],"responses":{"200":{"content":{"image/png":{"schema":{"format":"binary","type":"string"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the patient's average plate in an image format","tags":["patient_report"]}},"/patients/{patient_id}/bookmarks":{"get":{"operationId":"app.api.bookmark.get_patient_bookmarks","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientBookmarkResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get list of bookmarks for a patient","tags":["bookmarks"]}},"/patients/{patient_id}/bookmarks/collections":{"get":{"operationId":"app.api.bookmark.get_patient_bookmark_collections","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientBookmarkCollectionResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get all bookmark collections for a patient","tags":["bookmarks"]},"post":{"operationId":"app.api.bookmark.post_patient_bookmark_collections","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePatientBookmarkCollectionRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientBookmarkCollectionResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Create a new bookmark collection","tags":["bookmarks"]}},"/patients/{patient_id}/bookmarks/collections/{collection_id}":{"delete":{"operationId":"app.api.bookmark.delete_patient_bookmark_collection","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"collection_id","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"successful operation"},"403":{"description":"system bookmark collection cannot be deleted"}},"summary":"Delete a bookmark collection for a patient","tags":["bookmarks"]},"get":{"operationId":"app.api.bookmark.get_patient_bookmark_collection","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"collection_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientBookmarkCollectionResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a bookmark collection for a patient","tags":["bookmarks"]},"post":{"operationId":"app.api.bookmark.post_patient_bookmark_to_bookmark_collection","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"collection_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePatientBookmarkRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientBookmarkResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Add a bookmark to a collection","tags":["bookmarks"]}},"/patients/{patient_id}/bookmarks/default_meals/sources/{source_id}":{"delete":{"operationId":"app.api.bookmark.delete_patient_default_meal_source_bookmarks","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"source_id","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"matching bookmarks deleted, or no matching bookmarks existed"},"404":{"description":"patient not found"}},"summary":"Delete all bookmarks for a meal source in the default-meals family","tags":["bookmarks"]}},"/patients/{patient_id}/bookmarks/{bookmark_id}":{"delete":{"operationId":"app.api.bookmark.delete_patient_bookmark","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"bookmark_id","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"successful operation"}},"summary":"Delete a bookmark for a patient","tags":["bookmarks"]},"get":{"operationId":"app.api.bookmark.get_patient_bookmark","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"bookmark_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientBookmarkResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a bookmark for a patient","tags":["bookmarks"]},"put":{"operationId":"app.api.bookmark.put_patient_bookmark","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"bookmark_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePatientBookmarkRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientBookmarkResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Update a bookmark for a patient","tags":["bookmarks"]}},"/patients/{patient_id}/care-team-challenges/points/events":{"post":{"operationId":"app.api.careteam.api.post_patient_care_team_challenge_points_events","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePatientCareTeamChallengePointsEventRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientCareTeamChallengePointsEventResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Submit a care team challenge points event","tags":["careteam"]}},"/patients/{patient_id}/care-team-challenges/points/plant-awards":{"get":{"operationId":"app.api.careteam.api.get_patient_care_team_challenge_points_plant_awards","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"challenge_run_id","required":true,"schema":{"maxLength":255,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientCareTeamChallengePlantAwardsResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get active 30 Plant Challenge point awards","tags":["careteam"]}},"/patients/{patient_id}/care-team-challenges/points/redeem":{"post":{"operationId":"app.api.careteam.api.post_patient_care_team_challenge_points_redeem","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePatientCareTeamChallengePointsRedeemRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientCareTeamChallengePointsRedeemResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Redeem care team challenge points","tags":["careteam"]}},"/patients/{patient_id}/care-team-challenges/points/redemptions":{"get":{"operationId":"app.api.careteam.api.get_patient_care_team_challenge_points_redemptions","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientCareTeamChallengePointsRedemptionsResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get care team challenge points redemptions history","tags":["careteam"]}},"/patients/{patient_id}/care-team-challenges/points/summary":{"get":{"operationId":"app.api.careteam.api.get_patient_care_team_challenge_points_summary","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientCareTeamChallengePointsSummaryResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get care team challenge points summary","tags":["careteam"]}},"/patients/{patient_id}/cio/attributes":{"get":{"operationId":"app.api.patient.get_patient_cio_attributes","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientCioAttributesResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get customerio attributes patient. See also: https://customer.io/docs/api/app/#operation/getPersonAttributes","tags":["patient"]}},"/patients/{patient_id}/cio/subscription_preferences":{"get":{"operationId":"app.api.patient.get_patient_cio_subscription_preferences","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientCioSubscriptionPreferencesResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get customerio subscription preferences for the patient. See also: https://customer.io/docs/api/app/#operation/getPersonSubscriptionPreferences","tags":["patient"]}},"/patients/{patient_id}/clinical_summary":{"get":{"operationId":"app.api.patient_reports.sections.clinical_summary.get_clinical_summary_statements","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"starting date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"ending date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"disaggregated","required":true,"schema":{"description":"indicate whether to use aggregated or disaggregated meal items.","example":"false","type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummaryStatementResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the patient's clinical summary","tags":["patient_report"]}},"/patients/{patient_id}/clinician-guidance":{"get":{"operationId":"app.api.clinician_guidance.get_patient_clinician_guidance","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"clinic_id","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinicianGuidanceListResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get clinician guidance for a patient (own clinic + optional shared)","tags":["clinician_guidance"]},"put":{"operationId":"app.api.clinician_guidance.put_patient_clinician_guidance","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinicianGuidanceSaveRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinicianGuidanceOwnClinicResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Create a new clinician guidance item for the caller's clinic","tags":["clinician_guidance"]}},"/patients/{patient_id}/clinician-guidance/renew":{"post":{"operationId":"app.api.clinician_guidance.post_patient_clinician_guidance_renew","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinicianGuidanceRenewRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinicianGuidanceOwnClinicResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Renew one clinician guidance item as a new confirmed revision","tags":["clinician_guidance"]}},"/patients/{patient_id}/clinician-guidance/{revision_id}":{"get":{"operationId":"app.api.clinician_guidance.get_patient_clinician_guidance_revision","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"revision_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinicianGuidanceRevisionResponse"}}},"description":"Own-clinic shape when editable/admin; shared anonymous shape otherwise","x-body-name":"response"}},"summary":"Get one clinician guidance revision","tags":["clinician_guidance"]},"put":{"operationId":"app.api.clinician_guidance.put_patient_clinician_guidance_revision","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"revision_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinicianGuidanceUpdateRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinicianGuidanceOwnClinicResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Update (supersede) one clinician guidance revision","tags":["clinician_guidance"]}},"/patients/{patient_id}/clinician_links":{"get":{"operationId":"app.api.clinician_link.get_clinician_link","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ClinicianLinkResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get list of links from clinician, most recent max 3 links are returned.","tags":["clinician link"]}},"/patients/{patient_id}/clinician_tip":{"get":{"operationId":"app.api.clinician_tip.get_clinician_tip","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinicianTipResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get tip from clinician","tags":["clinician tip"]}},"/patients/{patient_id}/clinician_tips":{"get":{"operationId":"app.api.clinician_tip.get_clinician_tips","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"date_since in format YYYY-MM-DD","example":"2020-07-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"date_until in format YYYY-MM-DD","example":"2020-07-21","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinicianTipResponses"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get tips from clinician between a range of dates","tags":["clinician tip"]}},"/patients/{patient_id}/clinicians":{"get":{"operationId":"app.api.patient.get_clinicians","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ClinicianResponse"},"type":"array"},"x-body-name":"ClinicianResponses"}},"description":"successful operation","x-body-name":"response"}},"summary":"Get list of clinicians this patient belongs to","tags":["patient"]}},"/patients/{patient_id}/clinics":{"get":{"operationId":"app.api.patient.get_clinics","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ClinicResponse"},"type":"array"},"x-body-name":"ClinicResponses"}},"description":"successful operation","x-body-name":"response"}},"summary":"Get list of clinics this patient belongs to","tags":["patient"]}},"/patients/{patient_id}/cliniko/appointment-types":{"get":{"operationId":"app.api.cliniko_booking.get_appointment_types","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"province_code","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinikoAppointmentTypesResponse"}}},"description":"successful operation"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinikoBookingErrorResponse"}}},"description":"bad request"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinikoBookingErrorResponse"}}},"description":"Cliniko unavailable"}},"summary":"List bookable Cliniko appointment types","tags":["cliniko-booking"]}},"/patients/{patient_id}/cliniko/appointments":{"get":{"operationId":"app.api.cliniko_booking.get_appointments","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"status","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinikoAppointmentsResponse"}}},"description":"successful operation"}},"summary":"List patient Cliniko appointments","tags":["cliniko-booking"]},"post":{"operationId":"app.api.cliniko_booking.create_appointment","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateClinikoAppointmentRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinikoAppointmentResponse"}}},"description":"idempotent replay returned existing appointment"},"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinikoAppointmentResponse"}}},"description":"appointment created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinikoBookingErrorResponse"}}},"description":"validation error"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinikoBookingErrorResponse"}}},"description":"slot conflict"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinikoBookingErrorResponse"}}},"description":"Cliniko unavailable"}},"summary":"Book a Cliniko appointment","tags":["cliniko-booking"]}},"/patients/{patient_id}/cliniko/appointments/{appointment_id}":{"delete":{"operationId":"app.api.cliniko_booking.cancel_appointment","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"appointment_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelClinikoAppointmentRequest"}}},"required":false,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinikoAppointmentResponse"}}},"description":"appointment cancelled"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinikoBookingErrorResponse"}}},"description":"validation error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinikoBookingErrorResponse"}}},"description":"Cliniko unavailable"}},"summary":"Cancel a Cliniko appointment","tags":["cliniko-booking"]},"get":{"operationId":"app.api.cliniko_booking.get_appointment","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"appointment_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinikoAppointmentResponse"}}},"description":"successful operation"}},"summary":"Get a single Cliniko appointment","tags":["cliniko-booking"]},"patch":{"operationId":"app.api.cliniko_booking.update_appointment","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"appointment_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateClinikoAppointmentRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinikoAppointmentResponse"}}},"description":"appointment updated"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinikoBookingErrorResponse"}}},"description":"validation error"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinikoBookingErrorResponse"}}},"description":"slot conflict"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinikoBookingErrorResponse"}}},"description":"Cliniko unavailable"}},"summary":"Reschedule a Cliniko appointment","tags":["cliniko-booking"]}},"/patients/{patient_id}/cliniko/availability":{"get":{"operationId":"app.api.cliniko_booking.get_availability","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"appointment_type_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"province_code","required":true,"schema":{"type":"string"}},{"description":"Practitioner ID from /cliniko/practitioners[].id. Required whenever any_practitioner=false.","in":"query","name":"practitioner_id","required":false,"schema":{"type":"integer"}},{"description":"Set true to return merged availability across all bookable practitioners. When true, practitioner_id must be omitted.","in":"query","name":"any_practitioner","required":false,"schema":{"default":false,"type":"boolean"}},{"in":"query","name":"from_date","required":true,"schema":{"format":"date","type":"string"}},{"in":"query","name":"to_date","required":true,"schema":{"format":"date","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinikoAvailabilityResponse"}}},"description":"successful operation"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinikoBookingErrorResponse"}}},"description":"bad request"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinikoBookingErrorResponse"}}},"description":"Cliniko unavailable"}},"summary":"Check Cliniko appointment availability","tags":["cliniko-booking"]}},"/patients/{patient_id}/cliniko/practitioners":{"get":{"operationId":"app.api.cliniko_booking.get_practitioners","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"province_code","required":true,"schema":{"type":"string"}},{"in":"query","name":"appointment_type_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinikoPractitionersResponse"}}},"description":"successful operation"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinikoBookingErrorResponse"}}},"description":"bad request"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinikoBookingErrorResponse"}}},"description":"Cliniko unavailable"}},"summary":"List bookable Cliniko practitioners","tags":["cliniko-booking"]}},"/patients/{patient_id}/cliniko/provinces":{"get":{"operationId":"app.api.cliniko_booking.get_provinces","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinikoProvincesResponse"}}},"description":"successful operation"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClinikoBookingErrorResponse"}}},"description":"Cliniko unavailable"}},"summary":"List bookable provinces for Cliniko booking","tags":["cliniko-booking"]}},"/patients/{patient_id}/connected-applications":{"get":{"operationId":"app.api.partner_oauth.connections.list_connected_applications","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"include_revoked","required":false,"schema":{"default":true,"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PartnerOAuthConnection"},"type":"array"}}},"description":"Connections"},"403":{"description":"Not authorized for this patient"}},"security":[{"bearerAuth":[]}],"summary":"List the patient's partner application connections","tags":["partner-oauth"]}},"/patients/{patient_id}/connected-applications/{grant_id}":{"delete":{"description":"Invalidates the grant plus every outstanding authorization code, access token and refresh token derived from it. Effective immediately.\n","operationId":"app.api.partner_oauth.connections.revoke_connected_application","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"grant_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerOAuthConnection"}}},"description":"Connection revoked"},"403":{"description":"Not authorized for this patient"},"404":{"description":"Connection not found"}},"security":[{"bearerAuth":[]}],"summary":"Revoke a partner application connection","tags":["partner-oauth"]}},"/patients/{patient_id}/daily_consumptions":{"get":{"description":"If some days' reports are missing in the database, those dates will be missing in response. At least either date_since or date_until needs to be provided.","operationId":"app.api.daily_consumption.query_daily_consumption","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","schema":{"type":"string"}},{"in":"query","name":"date_until","schema":{"type":"string"}},{"in":"query","name":"size","schema":{"type":"integer"}},{"in":"query","name":"order_by","schema":{"enum":["asc","desc"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DailyConsumptionQueryResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get patient's daily water and meal consumption data for multiple dates within search query, max of 31 days.","tags":["daily consumption"]}},"/patients/{patient_id}/daily_usage_report":{"get":{"operationId":"app.api.patient_reports.patient_usage_summary.generate_patient_daily_usage_report","parameters":[{"in":"query","name":"report_date","required":false,"schema":{"type":"string"}},{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DailyReportResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Generate daily usage report data for a patient","tags":["patient"]}},"/patients/{patient_id}/data_reviewer_group":{"get":{"operationId":"app.api.data_reviewer.get_patient_data_reviewer_groups","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DataReviewerGroupResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a list of all data reviewer groups assigned to the patient","tags":["data review"]}},"/patients/{patient_id}/diet_restriction":{"post":{"operationId":"app.api.diet_restriction.post_patient_diet_restriction","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePatientDietRestrictionRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientDietRestrictionResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Add or update a diet restriction for a patient","tags":["diet restrictions"]}},"/patients/{patient_id}/diet_restriction/{patient_diet_restriction_id}":{"delete":{"operationId":"app.api.diet_restriction.delete_patient_diet_restriction","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_diet_restriction_id","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"successful operation"}},"summary":"Delete a diet restriction for a patient","tags":["diet restrictions"]},"put":{"operationId":"app.api.diet_restriction.put_patient_diet_restriction","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_diet_restriction_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutPatientDietRestrictionRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientDietRestrictionResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Update a diet restriction for a patient","tags":["diet restrictions"]}},"/patients/{patient_id}/diet_restrictions":{"get":{"operationId":"app.api.diet_restriction.get_patient_diet_restrictions","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientDietRestrictionResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get diet restrictions for a patient","tags":["diet restrictions"]},"post":{"deprecated":true,"operationId":"app.api.diet_restriction.get_patient_diet_restrictions_deprecated","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientDietRestrictionResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get diet restrictions for a patient","tags":["diet restrictions"]}},"/patients/{patient_id}/emotion":{"get":{"operationId":"app.api.emotion.get_emotions","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":false,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-03-02","type":"string"}},{"in":"query","name":"date_until","required":false,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-04-15","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/EmotionResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Query the patient history of emotions","tags":["emotion"]},"post":{"operationId":"app.api.emotion.post_emotion","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePatientEmotionRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"description":"successful operation","x-body-name":"response"}},"summary":"Post patient's emotion of the date","tags":["emotion"]}},"/patients/{patient_id}/emotion/{emotion_id}":{"delete":{"operationId":"app.api.emotion.delete_emotion","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"emotion_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Delete patient's emotion by id","tags":["emotion"]},"get":{"operationId":"app.api.emotion.get_emotion","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"emotion_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmotionResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get patient's emotion by id","tags":["emotion"]},"put":{"operationId":"app.api.emotion.put_emotion","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"emotion_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePatientEmotionRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"description":"successful operation","x-body-name":"response"}},"summary":"Put patient's emotion by id","tags":["emotion"]}},"/patients/{patient_id}/emotion_question":{"get":{"operationId":"app.api.emotion.get_emotion_question","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmotionQuestionResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get emotion question and options for the patient","tags":["emotion"]}},"/patients/{patient_id}/emotional_health":{"post":{"operationId":"app.api.emotional_health.post_patient_emotional_health","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePatientEmotionalHealthRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientEmotionalHealthResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Post a new emotional health activity","tags":["emotional_health"]}},"/patients/{patient_id}/emotional_health/{patient_emotional_health_id}":{"delete":{"operationId":"app.api.emotional_health.delete_patient_emotional_health","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_emotional_health_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation"},"404":{"description":"patient or emotional health entry not found"}},"summary":"Deletes an existing emotional health activity","tags":["emotional_health"]},"get":{"operationId":"app.api.emotional_health.get_patient_emotional_health","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_emotional_health_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientEmotionalHealthResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Gets an existing emotional health activity","tags":["emotional_health"]},"put":{"operationId":"app.api.emotional_health.put_patient_emotional_health","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_emotional_health_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutPatientEmotionalHealthRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientEmotionalHealthResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Modifies an existing emotional_health activity","tags":["emotional_health"]}},"/patients/{patient_id}/emotional_health_data":{"get":{"operationId":"app.api.emotional_health.get_patient_emotional_health_data","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":false,"schema":{"type":"string"}},{"in":"query","name":"date_until","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientEmotionalHealthResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a list of emotional health of a patient","tags":["emotional_health"]}},"/patients/{patient_id}/exercise":{"post":{"operationId":"app.api.exercise.post_patient_exercise","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePatientExerciseRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientExerciseResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Post a new exercise activity","tags":["exercise"]}},"/patients/{patient_id}/exercises":{"get":{"operationId":"app.api.exercise.get_patient_exercises","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":false,"schema":{"type":"string"}},{"in":"query","name":"date_until","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientExerciseResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a list of exercises of a patient","tags":["exercise"]}},"/patients/{patient_id}/exercises/bulk":{"put":{"operationId":"app.api.exercise.put_patient_exercises_bulk","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutPatientExercisesBulkRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientExerciseResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Modifies a list of exercises","tags":["exercise"]}},"/patients/{patient_id}/exercises/{patient_exercise_id}":{"delete":{"operationId":"app.api.exercise.delete_patient_exercise","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_exercise_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation"},"404":{"description":"patient or exercise entry not found"}},"summary":"Deletes an existing exercise activity","tags":["exercise"]},"get":{"operationId":"app.api.exercise.get_patient_exercise","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_exercise_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientExerciseResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Gets an existing exercise activity","tags":["exercise"]},"put":{"operationId":"app.api.exercise.put_patient_exercise","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_exercise_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutPatientExerciseRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientExerciseResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Modifies an existing exercise activity","tags":["exercise"]}},"/patients/{patient_id}/food":{"get":{"operationId":"app.api.food.food_search.get_patient_food_query","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"food_name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the recent food of the patient from the server","tags":["food"]}},"/patients/{patient_id}/food/suggested_addons":{"get":{"operationId":"app.api.food.food_lookup.get_patient_food_suggested_addons","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"food_name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FoodAddonResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the recent food of the patient from the server","tags":["food"]}},"/patients/{patient_id}/food_suggestion":{"get":{"operationId":"app.api.food.food_suggestion.get_food_suggestion","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date","required":true,"schema":{"description":"reference date (today's date) in format YYYY-MM-DD","example":"2019-01-02","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodSuggestionResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get food suggestion based on the reference date's food consumption. This API only considers the given date's consumption data, and it returns 404 NOT FOUND when there's no meal consumption or no suggestion to give.","tags":["substitution suggestion"]}},"/patients/{patient_id}/foods/favorite":{"delete":{"operationId":"app.api.food.food_favorite.delete_favorite","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"food_name","required":false,"schema":{"type":"string"}},{"in":"query","name":"favorite_id","required":false,"schema":{"nullable":true,"type":"number"}}],"responses":{"204":{"description":"successful operation"}},"summary":"Unset favorite food of the patient","tags":["food"]},"get":{"operationId":"app.api.food.food_favorite.get_favorite","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FavoriteFoodResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get favorite food of the patient from the server","tags":["food"]},"post":{"operationId":"app.api.food.food_favorite.post_favorite","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFavoriteRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FavoriteItemResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Create a new favorite","tags":["food"]},"put":{"operationId":"app.api.food.food_favorite.put_favorite","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"food_name","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFavoriteRequest"}}},"required":false,"x-body-name":"body"},"responses":{"200":{"description":"successful operation"}},"summary":"Set favorite food of the patient","tags":["food"]}},"/patients/{patient_id}/foods/favorites":{"get":{"operationId":"app.api.food.food_favorite.get_favorites","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FavoriteItemResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"},"204":{"description":"no favorites found"}},"summary":"Get favorite food of the patient from the server","tags":["food"]}},"/patients/{patient_id}/foods/recent":{"get":{"operationId":"app.api.food.food_recent.get_recent","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"description":"time in format hh:mm:ss","example":"17:30:00","in":"query","name":"time","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecentFoodResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the recent food of the patient from the server","tags":["food"]}},"/patients/{patient_id}/foods/recent_addons":{"get":{"operationId":"app.api.food.food_recent.get_patient_recent_addons","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"description":"time in format hh:mm:ss","example":"17:30:00","in":"query","name":"time","required":false,"schema":{"type":"string"}},{"description":"food name","example":"coffee","in":"query","name":"food_name","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecentAddonResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the recent addons of the patient from the server. Includes regular and custom.","tags":["food"]}},"/patients/{patient_id}/foods/recent_meal_items":{"get":{"operationId":"app.api.food.food_recent.get_recent_meal_items","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"description":"time in format hh:mm:ss","example":"17:30:00","in":"query","name":"time","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecentMealItemResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the recent meal items of the patient from the server","tags":["food"]}},"/patients/{patient_id}/foods/{food_name}":{"get":{"deprecated":true,"operationId":"app.api.food.food_search.get_patient_food","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"food_name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FoodResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"[DEPRECATED] Get the recent food of the patient from the server","tags":["food"]}},"/patients/{patient_id}/ghg_equivalent":{"get":{"operationId":"app.api.metrics.ghg_equivalent.get_patient_ghg_equivalent","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"starting date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"ending date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GhgEquivalentDataResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the patient's ghg equivalent data","tags":["patient_report"]}},"/patients/{patient_id}/ghg_equivalent/graph":{"get":{"operationId":"app.api.metrics.ghg_equivalent.get_patient_ghg_equivalent_graph","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"starting date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"ending date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}}],"responses":{"200":{"content":{"image/png":{"schema":{"format":"binary","type":"string"}}},"description":"successful operation"}},"summary":"Get the patient's ghg equivalent emission key data point in an image format","tags":["patient_report"]}},"/patients/{patient_id}/ghp/module_state/{module_id}":{"put":{"operationId":"app.guided_health_program.ghp_api.put_patient_guided_health_module_state","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"module_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePatientGuidedHealthModuleStateRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientGuidedHealthModuleStateResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Post/Update patient's guided health program module state","tags":["guided health"]}},"/patients/{patient_id}/ghp/module_states":{"delete":{"operationId":"app.guided_health_program.ghp_api.delete_patient_guided_health_module_states","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"successful operation"}},"summary":"Delete all of patient's guided health program module states","tags":["guided health"]},"get":{"operationId":"app.guided_health_program.ghp_api.get_patient_guided_health_module_states","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientGuidedHealthModuleStateResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get all of patient's guided health program module states","tags":["guided health"]}},"/patients/{patient_id}/goals":{"get":{"operationId":"app.api.goal.get_goals","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/GoalProgressResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the patient's goals and progress for specific calendar date","tags":["goal"]},"post":{"operationId":"app.api.goal.post_goals","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGoalRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalProgressResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Create a new goal of the patient","tags":["goal"]},"put":{"operationId":"app.api.goal.put_goals","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGoalsRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalProgressResponseList"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Update the goals of the patient","tags":["goal"]}},"/patients/{patient_id}/goals/extended_weekly_report":{"get":{"operationId":"app.api.goal.get_goals_extended_weekly_report","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"reference date (today's date) in format YYYY-MM-DD","example":"2020-08-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"reference date (today's date) in format YYYY-MM-DD","example":"2020-09-02","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/GoalExtendedWeeklyReportResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the goal report of the patient for this week and last week.","tags":["patient_report"]}},"/patients/{patient_id}/goals/extended_weekly_report/csv":{"get":{"operationId":"app.api.goal.get_goals_extended_weekly_report_csv","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"reference date (today's date) in format YYYY-MM-DD","example":"2020-08-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"reference date (today's date) in format YYYY-MM-DD","example":"2020-09-02","type":"string"}}],"responses":{"200":{"content":{"text/csv":{"schema":{"type":"string"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the goal report of the patient for this week and last week.","tags":["patient_report"]}},"/patients/{patient_id}/goals/progress_report":{"get":{"operationId":"app.api.goal.get_goals_progress_report","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"reference date (today's date) in format YYYY-MM-DD","example":"2020-08-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"reference date (today's date) in format YYYY-MM-DD","example":"2020-09-02","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/GoalExtendedWeeklyReportResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the goal report of the patient for this week and last week.","tags":["patient_report"]}},"/patients/{patient_id}/goals/recent-frequency-breakdown":{"get":{"operationId":"app.api.goal.get_recent_frequency_breakdown","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalRecentFrequencyBreakdownResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Returns the recent frequency breakdown for the patient, for use by the mobile app to suggest goals. Note: currently only returns cc_* nutrients.","tags":["goal"]}},"/patients/{patient_id}/goals/weekly_report":{"get":{"operationId":"app.api.goal.get_goals_weekly_report","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date","required":true,"schema":{"description":"reference date (today's date) in format YYYY-MM-DD","example":"2019-01-02","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/GoalWeeklyReportResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the goal report of the patient for this week and last week.","tags":["patient_report"]}},"/patients/{patient_id}/goals/{goal_id}":{"delete":{"operationId":"app.api.goal.delete_goal","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"goal_id","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"successful operation"}},"summary":"Delete the goal of the patient","tags":["goal"]},"get":{"operationId":"app.api.goal.get_goal","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"goal_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalProgressResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the goal of the patient","tags":["goal"]},"put":{"operationId":"app.api.goal.put_goal","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"goal_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGoalRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalProgressResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Update the goal of the patient","tags":["goal"]}},"/patients/{patient_id}/goals/{goal_id}/log-progress":{"post":{"operationId":"app.api.goal.post_goal_log_progress","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"goal_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalLogProgressRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalProgressResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Log progress towards the goal of the patient","tags":["goal"]}},"/patients/{patient_id}/goals/{goal_id}/log-progress/{progress_log_id}":{"delete":{"operationId":"app.api.goal.post_goal_log_progress_delete","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"goal_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"progress_log_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalProgressResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Removes the progress log entry","tags":["goal"]}},"/patients/{patient_id}/health-targets":{"get":{"operationId":"app.api.patient_health_targets.get_patient_health_targets","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"include_archived","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientHealthTargetResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the patient's health targets","tags":["health_targets"]},"post":{"operationId":"app.api.patient_health_targets.post_patient_health_targets","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientHealthTargetRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientHealthTargetResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Creates or updates a patient's health target","tags":["health_targets"]}},"/patients/{patient_id}/health-targets/all/details":{"get":{"operationId":"app.api.patient_health_targets.get_patient_health_targets_details","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"pinned_only","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"date_since","required":false,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"date_until","required":false,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientHealthTargetDetailsResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the patient's health targets with details","tags":["health_targets"]}},"/patients/{patient_id}/health-targets/bulk":{"post":{"operationId":"app.api.patient_health_targets.post_patient_health_targets_bulk","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientHealthTargetRequest"},"type":"array"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientHealthTargetResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Creates or updates multiple patient's health targets","tags":["health_targets"]}},"/patients/{patient_id}/health-targets/pinned/details":{"get":{"operationId":"app.api.patient_health_targets.get_patient_pinned_health_targets_details","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":false,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"date_until","required":false,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientHealthTargetDetailsResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the patient's pinned health targets with details","tags":["health_targets"]}},"/patients/{patient_id}/health-targets/target-name/{category}/{target_name}":{"get":{"operationId":"app.api.patient_health_targets.get_patient_health_target_by_target_name","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"category","required":true,"schema":{"type":"string"}},{"in":"path","name":"target_name","required":true,"schema":{"type":"string"}},{"in":"query","name":"target_period","required":false,"schema":{"type":"string"}},{"in":"query","name":"target_aggregator","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientHealthTargetResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the patient's active health target by target name","tags":["health_targets"]}},"/patients/{patient_id}/health-targets/target-name/{category}/{target_name}/details":{"get":{"operationId":"app.api.patient_health_targets.get_patient_health_target_details_by_target_name","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"category","required":true,"schema":{"type":"string"}},{"in":"path","name":"target_name","required":true,"schema":{"type":"string"}},{"in":"query","name":"date_since","required":false,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"date_until","required":false,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"target_period","required":false,"schema":{"type":"string"}},{"in":"query","name":"target_aggregator","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientHealthTargetDetailsResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the patient's active health target with details by target name","tags":["health_targets"]}},"/patients/{patient_id}/health-targets/{health_target_id}":{"get":{"operationId":"app.api.patient_health_targets.get_patient_health_target","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"health_target_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientHealthTargetResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the patient's active health target by id","tags":["health_targets"]},"post":{"operationId":"app.api.patient_health_targets.post_patient_health_target","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"health_target_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientHealthTargetRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientHealthTargetResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Update the patient's active health target by id","tags":["health_targets"]}},"/patients/{patient_id}/health-targets/{health_target_id}/details":{"get":{"operationId":"app.api.patient_health_targets.get_patient_health_target_details","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"health_target_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":false,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"date_until","required":false,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientHealthTargetDetailsResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the patient's health target with details","tags":["health_targets"]}},"/patients/{patient_id}/health-targets/{health_target_id}/history":{"get":{"operationId":"app.api.patient_health_targets.get_patient_health_target_history","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"health_target_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientHealthTargetResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the history of a health target","tags":["health_targets"]}},"/patients/{patient_id}/health_data/bulk":{"put":{"operationId":"app.api.health_data.put_patient_health_data_bulk","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutPatientBulkHealthDataRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"description":"successful operation"},"404":{"description":"patient or health data type not found"}},"summary":"Modifies a list of health data","tags":["health_data"]}},"/patients/{patient_id}/health_data_table":{"get":{"operationId":"app.api.health_data_table.get_patient_health_data","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"category","required":true,"schema":{"type":"string"}},{"in":"query","name":"field","required":false,"schema":{"items":{"type":"string"},"type":"array"}},{"in":"query","name":"grouper","required":false,"schema":{"type":"string"}},{"in":"query","name":"aggregation_fn","required":false,"schema":{"items":{"type":"string"},"type":"array"}},{"in":"query","name":"filter","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientHealthDataTableResponse"}}},"description":"successful operation"}},"summary":"Generates an ApiTable report of health data for a patient","tags":["reporting"]}},"/patients/{patient_id}/insights/daily-summary":{"get":{"operationId":"app.api.patient_insights.api.get_patient_insights_daily_summary","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date","required":false,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"force_rebuild","required":false,"schema":{"description":"force the rebuild of the daily summary","example":"false","type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientInsightsDailySummaryResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Gets a summary of a patient's daily insights","tags":["insights"]}},"/patients/{patient_id}/insights/weekly-cover-summary":{"get":{"operationId":"app.api.patient_insights.api.get_patient_insights_weekly_cover_summary","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2025-01-01","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2025-01-07","type":"string"}},{"in":"query","name":"force_rebuild","required":false,"schema":{"description":"force the rebuild of the weekly cover summary","example":"false","type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientInsightsWeeklyCoverSummaryResponse"}}},"description":"successful operation","x-body-name":"response"},"400":{"description":"invalid request"},"404":{"description":"no report exists for the selected date range"}},"summary":"Gets the AI-generated weekly cover summary for a patient's report window","tags":["insights"]}},"/patients/{patient_id}/invitation_history":{"get":{"operationId":"app.api.patient.get_patient_invitation_history","parameters":[{"description":"patient id","in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/EmailHistoryResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get currently logged in patient info","tags":["patient"]}},"/patients/{patient_id}/join-clinic/by-invitation-code":{"post":{"operationId":"app.api.patient.post_patient_join_clinic_by_invitation_code","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"invitation_code","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientJoinClinicByInvitationCodeResponse"}}},"description":"successful operation"}},"summary":"Join clinic by invitation code","tags":["patient"]}},"/patients/{patient_id}/meal-plans":{"get":{"operationId":"app.api.meal_plan.get_meal_plans","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MealPlanSummaryResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"List meal plans for the patient","tags":["meal-plan"]},"post":{"operationId":"app.api.meal_plan.post_meal_plan","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMealPlanRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealPlanResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Create a new meal plan for the patient","tags":["meal-plan"]}},"/patients/{patient_id}/meal-plans/tdee-calculate":{"post":{"operationId":"app.api.meal_plan.post_tdee_calculate","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdeeCalculateRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdeeCalculateResponse"}}},"description":"successful operation"}},"summary":"Calculate TDEE for a patient","tags":["meal-plan"]}},"/patients/{patient_id}/meal-plans/{meal_plan_id}":{"delete":{"operationId":"app.api.meal_plan.delete_meal_plan","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_plan_id","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"successful operation"}},"summary":"Soft-delete a meal plan","tags":["meal-plan"]},"get":{"operationId":"app.api.meal_plan.get_meal_plan","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_plan_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealPlanDetailResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a specific meal plan with days and slots","tags":["meal-plan"]}},"/patients/{patient_id}/meal-plans/{meal_plan_id}/confirm-ingredient-swap":{"post":{"operationId":"app.api.meal_plan.post_confirm_ingredient_swap","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_plan_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmIngredientSwapRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealPlanSlotResponse"}}},"description":"successful operation"},"400":{"description":"invalid request"},"404":{"description":"meal plan or slot not found"}},"summary":"Confirm an ingredient swap in a meal plan slot","tags":["meal-plan"]}},"/patients/{patient_id}/meal-plans/{meal_plan_id}/duplicate":{"post":{"operationId":"app.api.meal_plan.post_duplicate_meal_plan","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_plan_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealPlanResponse"}}},"description":"successful operation"},"404":{"description":"meal plan not found"}},"summary":"Duplicate a meal plan as a new draft","tags":["meal-plan"]}},"/patients/{patient_id}/meal-plans/{meal_plan_id}/email":{"post":{"operationId":"app.api.meal_plan.post_email_meal_plan","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_plan_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailMealPlanRequest"}}},"required":false,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"message":{"type":"string"}},"type":"object"}}},"description":"successful operation"},"400":{"description":"meal plan is not in a valid status for emailing"},"404":{"description":"meal plan not found"}},"summary":"Email a meal plan to the patient","tags":["meal-plan"]}},"/patients/{patient_id}/meal-plans/{meal_plan_id}/finalize":{"post":{"operationId":"app.api.meal_plan.post_finalize_meal_plan","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_plan_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealPlanDetailResponse"}}},"description":"successful operation"},"400":{"description":"meal plan is not in generated status"},"404":{"description":"meal plan not found"}},"summary":"Finalize a generated meal plan","tags":["meal-plan"]}},"/patients/{patient_id}/meal-plans/{meal_plan_id}/generate":{"post":{"operationId":"app.api.meal_plan.post_generate_meal_plan","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_plan_id","required":true,"schema":{"type":"integer"}}],"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskResultResponse"}}},"description":"Generation started"},"400":{"description":"meal plan is not in draft status"},"404":{"description":"meal plan not found"}},"summary":"Generate meal plan content using AI","tags":["meal-plan"]}},"/patients/{patient_id}/meal-plans/{meal_plan_id}/grocery-list":{"post":{"operationId":"app.api.meal_plan.post_grocery_list","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_plan_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroceryListResponse"}}},"description":"successful operation"},"400":{"description":"meal plan is not in generated or finalized status"},"404":{"description":"meal plan not found"}},"summary":"Generate a grocery list for a meal plan","tags":["meal-plan"]}},"/patients/{patient_id}/meal-plans/{meal_plan_id}/pdf":{"post":{"operationId":"app.api.meal_plan.post_meal_plan_pdf","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_plan_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/pdf":{"schema":{"format":"binary","type":"string"}}},"description":"successful operation"},"400":{"description":"meal plan is not in a valid status for PDF generation"},"404":{"description":"meal plan not found"}},"summary":"Generate a PDF for a meal plan","tags":["meal-plan"]}},"/patients/{patient_id}/meal-plans/{meal_plan_id}/slots/{slot_id}/instructions":{"get":{"operationId":"app.api.meal_plan.get_slot_instructions","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_plan_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"slot_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlotInstructionsResponse"}}},"description":"successful operation"},"404":{"description":"meal plan or slot not found"}},"summary":"Get recipe instructions for a meal plan slot","tags":["meal-plan"]}},"/patients/{patient_id}/meal-plans/{meal_plan_id}/slots/{slot_id}/note":{"post":{"operationId":"app.api.meal_plan.post_slot_note","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_plan_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"slot_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"note":{"type":"string"}},"required":["note"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"successful operation"},"400":{"description":"plan is not in generated status"},"404":{"description":"meal plan or slot not found"}},"summary":"Add or update a clinician note on a meal plan slot","tags":["meal-plan"]}},"/patients/{patient_id}/meal-plans/{meal_plan_id}/swap":{"post":{"operationId":"app.api.meal_plan.post_swap_recipe","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_plan_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwapRecipeRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwapRecipeResponse"}}},"description":"successful operation"},"404":{"description":"meal plan not found"}},"summary":"Swap a recipe in a meal plan slot","tags":["meal-plan"]}},"/patients/{patient_id}/meal-plans/{meal_plan_id}/swap-confirm":{"post":{"operationId":"app.api.meal_plan.post_swap_confirm","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_plan_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwapConfirmRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwapRecipeResponse"}}},"description":"successful operation"},"404":{"description":"meal plan or slot not found"}},"summary":"Confirm a recipe swap in a meal plan slot","tags":["meal-plan"]}},"/patients/{patient_id}/meal-plans/{meal_plan_id}/swap-ingredient":{"post":{"operationId":"app.api.meal_plan.post_swap_ingredient","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_plan_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwapIngredientRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwapIngredientResponse"}}},"description":"successful operation"},"400":{"description":"invalid request"},"404":{"description":"meal plan or slot not found"}},"summary":"Get ingredient swap suggestions for a meal plan slot","tags":["meal-plan"]}},"/patients/{patient_id}/meal-plans/{meal_plan_id}/swap-suggestions":{"post":{"operationId":"app.api.meal_plan.post_swap_suggestions","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_plan_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwapSuggestionsRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwapSuggestionsResponse"}}},"description":"successful operation"},"400":{"description":"no recipes found"},"404":{"description":"meal plan or slot not found"}},"summary":"Get swap recipe suggestions for a meal plan slot","tags":["meal-plan"]}},"/patients/{patient_id}/meal-reminder-preferences":{"get":{"operationId":"app.api.patient.get_meal_reminder_preferences","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealReminderPreferencesResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the patient's MNT meal-reminder preference and effective scheduling state","tags":["patient"]},"patch":{"operationId":"app.api.patient.patch_meal_reminder_preferences","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchMealReminderPreferencesRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealReminderPreferencesResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Persist the patient's MNT meal-reminder preference","tags":["patient"]}},"/patients/{patient_id}/meal-suggestions/{meal_id}":{"get":{"operationId":"app.api.meal_suggestions.api.get_meal_suggestion","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"force_rebuild","required":false,"schema":{"description":"force the rebuild of the meal suggestion","example":"false","type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealSuggestionResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get meal suggestions for a meal","tags":["meal-suggestions"]}},"/patients/{patient_id}/meal_date_period_filters":{"get":{"operationId":"app.api.subscription.api.get_patient_meal_date_period_filters","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"reference_date","required":false,"schema":{"type":"string"}},{"in":"query","name":"period_name","required":false,"schema":{"type":"string"}},{"in":"query","name":"target_n_dates","required":false,"schema":{"type":"integer"}},{"description":"maximum number of days since the reference date from which to draw the distinct dates","in":"query","name":"max_window_size","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MealDateRangeResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get list of rdis for the patient","tags":["patient"]}},"/patients/{patient_id}/meal_items/barcode/{barcode}":{"get":{"operationId":"app.api.meal.get_meal_item_by_barcode","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"barcode","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealItemResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the most recent meal item for a barcode","tags":["meal"]}},"/patients/{patient_id}/meal_photos_zip":{"post":{"operationId":"app.api.meal_photo.post_original_photos_zip","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"meal_photo_ids":{"items":{"type":"integer"},"type":"array"}},"required":["meal_photo_ids"],"type":"object"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/zip":{"schema":{"format":"binary","type":"string"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get patient meal images","tags":["meal"]}},"/patients/{patient_id}/meals":{"get":{"operationId":"app.api.meal.get_meals","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"include_deleted","required":false,"schema":{"description":"include deleted meals","type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MealResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Query the user's meal","tags":["meal"]},"post":{"operationId":"app.api.meal.post_meals","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"create_queue","required":false,"schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMealRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Create a new meal","tags":["meal"]}},"/patients/{patient_id}/meals/bulk":{"post":{"operationId":"app.api.meal.post_meals_bulk","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"create_queue","required":false,"schema":{"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CreateMealRequest"},"type":"array"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MealResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Create multiple meals","tags":["meal"]}},"/patients/{patient_id}/meals/substitution-suggestions":{"get":{"operationId":"app.api.meal.get_patient_meal_substitution_suggestions","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"meal_id","required":false,"schema":{"type":"integer"}},{"in":"query","name":"meal_item_id","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealSubstitutionSuggestionsResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Gets substitution suggestions, possibly for a meal or a meal item.","tags":["meal"]}},"/patients/{patient_id}/meals/{meal_id}":{"delete":{"operationId":"app.api.meal.delete_meal","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_id","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"successful operation"}},"summary":"Delete the meal and all meal items of to this meal","tags":["meal"]},"get":{"operationId":"app.api.meal.get_meal","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"include_archived","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a meal information","tags":["meal"]},"put":{"operationId":"app.api.meal.put_meal","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMealRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Update the meal","tags":["meal"]}},"/patients/{patient_id}/meals/{meal_id}/auditor-url":{"post":{"operationId":"app.api.meal.get_meal_auditor_url","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"url":{"type":"string"}},"type":"object"}}},"description":"successful operation","x-body-name":"response"}},"summary":"TEMPORARY METHOD - returns a URL showing this meal in the auditor","tags":["meal"]}},"/patients/{patient_id}/meals/{meal_id}/change-logs":{"get":{"operationId":"app.api.meal.get_meal_change_logs","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealChangeLogResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Gets change logs for the meal and all meal items of this meal","tags":["meal"]}},"/patients/{patient_id}/meals/{meal_id}/disaggregated_meal":{"get":{"operationId":"app.api.disaggregated_meal_items.get_disaggregated_meal","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisaggregatedMealResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the meal with the add-ons split from meal items","tags":["meal"]}},"/patients/{patient_id}/meals/{meal_id}/meal_edit_reprocess":{"post":{"operationId":"app.api.meal.post_meal_edit_reprocess","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientMealEditReprocessRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Reprocess a meal based on the patient's meal edits","tags":["meal"]}},"/patients/{patient_id}/meals/{meal_id}/meal_items":{"post":{"operationId":"app.api.meal.post_meal_items","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CreateMealItemRequest"},"type":"array"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/MealItemResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Create a new meal item for the meal","tags":["meal"]}},"/patients/{patient_id}/meals/{meal_id}/meal_items/{meal_item_id}":{"delete":{"operationId":"app.api.meal.delete_meal_item","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_item_id","required":true,"schema":{"type":"integer"}},{"in":"header","name":"X-Rx-Change-Context","required":false,"schema":{"nullable":true,"type":"string"}}],"responses":{"204":{"description":"successful operation"}},"summary":"Delete a meal item","tags":["meal"]},"get":{"operationId":"app.api.meal.get_meal_item","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_item_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealItemResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the meal item's info","tags":["meal"]},"put":{"operationId":"app.api.meal.put_meal_item","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_item_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMealItemRequest"}}},"description":"meal item","required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealItemResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Update an existing meal item in a meal","tags":["meal"]}},"/patients/{patient_id}/meals/{meal_id}/meal_items/{meal_item_id}/complete":{"get":{"operationId":"app.api.meal.get_complete_meal_item","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_item_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealItemResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the meal item's complete info","tags":["meal"]}},"/patients/{patient_id}/meals/{meal_id}/meal_items/{meal_item_id}/refresh":{"post":{"operationId":"app.api.meal.post_refresh_meal_item","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"meal_item_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealItemResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"refresh (recalculate) the nutrients for a meal item","tags":["meal"]}},"/patients/{patient_id}/meals_since_last_report":{"get":{"operationId":"app.api.meal.get_meals_since_last_report","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Query the user's meal dates since the last report","tags":["meal"]}},"/patients/{patient_id}/meals_table":{"get":{"operationId":"app.api.meal.get_meals_table","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"filter","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"type":"number"}},{"in":"query","name":"offset","schema":{"type":"string"}},{"in":"query","name":"order","schema":{"type":"string"}},{"in":"query","name":"nutrition_response_level","required":false,"schema":{"enum":["basic","complete"],"type":"string"}},{"in":"query","name":"disaggregate_meal_items","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"has_more":{"type":"boolean"},"next":{"type":"string"},"rows":{"items":{"$ref":"#/components/schemas/MealResponse"},"type":"array"}}}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a table response of meals for a patient","tags":["meal"]}},"/patients/{patient_id}/medications":{"get":{"operationId":"app.api.medication.get_patient_medications","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":false,"schema":{"type":"string"}},{"in":"query","name":"date_until","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientMedicationResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"get a list of medications of a patient","tags":["medication"]},"post":{"operationId":"app.api.medication.post_patient_medication","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePatientMedicationRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientMedicationResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Post a new medication","tags":["medication"]}},"/patients/{patient_id}/medications/{patient_medication_id}":{"delete":{"operationId":"app.api.medication.delete_patient_medication","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_medication_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation"},"404":{"description":"patient or medication entry not found"}},"summary":"Deletes an existing medication activity","tags":["medication"]},"get":{"operationId":"app.api.medication.get_patient_medication","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_medication_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientMedicationResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"gets an existing medication activity","tags":["medication"]},"put":{"operationId":"app.api.medication.put_patient_medication","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_medication_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutPatientMedicationRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientMedicationResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Modifies an existing medication activity","tags":["medication"]}},"/patients/{patient_id}/mindfulness":{"post":{"operationId":"app.api.mindfulness.post_patient_mindfulness","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePatientMindfulnessRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientMindfulnessResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Post a new mindfulness activity","tags":["mindfulness"]}},"/patients/{patient_id}/mindfulness/{patient_mindfulness_id}":{"delete":{"operationId":"app.api.mindfulness.delete_patient_mindfulness","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_mindfulness_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation"},"404":{"description":"patient or mindfulness entry not found"}},"summary":"Deletes an existing mindfulness activity","tags":["mindfulness"]},"get":{"operationId":"app.api.mindfulness.get_patient_mindfulness","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_mindfulness_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientMindfulnessResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Gets an existing mindfulness activity","tags":["mindfulness"]},"put":{"operationId":"app.api.mindfulness.put_patient_mindfulness","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_mindfulness_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutPatientMindfulnessRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientMindfulnessResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Modifies an existing mindfulness activity","tags":["mindfulness"]}},"/patients/{patient_id}/mindfulness_data":{"get":{"operationId":"app.api.mindfulness.get_patient_mindfulness_data","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":false,"schema":{"type":"string"}},{"in":"query","name":"date_until","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientMindfulnessResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a list of mindfulness of a patient","tags":["mindfulness"]}},"/patients/{patient_id}/motivation":{"post":{"operationId":"app.api.motivation.post_patient_motivation","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePatientMotivationRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientMotivationResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Add or update a diet restriction for a patient","tags":["motivations"]}},"/patients/{patient_id}/motivation/{patient_motivation_id}":{"delete":{"operationId":"app.api.motivation.delete_patient_motivation","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_motivation_id","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"successful operation"}},"summary":"Delete a diet restriction for a patient","tags":["motivations"]},"put":{"operationId":"app.api.motivation.put_patient_motivation","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_motivation_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutPatientMotivationRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientMotivationResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Update a motivation for a patient","tags":["motivations"]}},"/patients/{patient_id}/motivations":{"get":{"operationId":"app.api.motivation.get_patient_motivations","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientMotivationResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get list of motivations for a patient","tags":["motivations"]},"post":{"operationId":"app.api.motivation.post_patient_motivations","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CreatePatientMotivationRequest"},"type":"array"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientMotivationResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Sets list of motivations for a patient","tags":["motivations"]}},"/patients/{patient_id}/nft-summary":{"get":{"operationId":"app.api.nft_summary.api.get_nft_summary","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"image_url","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NFTSummaryResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get NFT summary for a meal","tags":["nft-summary"]}},"/patients/{patient_id}/nutrition-plan":{"get":{"operationId":"app.api.nutrition_plan.get_nutrition_plan","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"plan_date","required":false,"schema":{"description":"Plan date YYYY-MM-DD","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NutritionPlanResponse"}}},"description":"successful operation"}},"summary":"Get deterministic nutrition plan structure and active metric values","tags":["nutrition-plan"]}},"/patients/{patient_id}/nutrition-plan/active-metrics":{"get":{"operationId":"app.api.nutrition_plan.get_nutrition_plan_active_metrics","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NutritionPlanActiveMetricsResponse"}}},"description":"successful operation"}},"summary":"Get active nutrition plan metrics","tags":["nutrition-plan"]},"put":{"operationId":"app.api.nutrition_plan.put_nutrition_plan_active_metrics","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NutritionPlanReplaceActiveMetricsRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NutritionPlanActiveMetricsResponse"}}},"description":"successful operation"}},"summary":"Replace active nutrition plan metrics","tags":["nutrition-plan"]}},"/patients/{patient_id}/nutrition-plan/active-metrics/defaults":{"post":{"operationId":"app.api.nutrition_plan.post_nutrition_plan_active_metric_defaults","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NutritionPlanActiveMetricsResponse"}}},"description":"successful operation"}},"summary":"Reset active metrics to the current default nutrition plan set","tags":["nutrition-plan"]}},"/patients/{patient_id}/nutrition-plan/content":{"get":{"operationId":"app.api.nutrition_plan.get_nutrition_plan_content","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"plan_date","required":false,"schema":{"description":"Plan date YYYY-MM-DD","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NutritionPlanGeneratedContentResponse"}}},"description":"successful operation"}},"summary":"Get cached generated nutrition plan content","tags":["nutrition-plan"]}},"/patients/{patient_id}/nutrition-plan/content/debug":{"get":{"operationId":"app.api.nutrition_plan.get_nutrition_plan_content_debug","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"plan_date","required":false,"schema":{"description":"Plan date YYYY-MM-DD","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NutritionPlanGeneratedContentDebugResponse"}}},"description":"successful operation"}},"summary":"Get generated nutrition plan content debug events","tags":["nutrition-plan"]}},"/patients/{patient_id}/nutrition-plan/content/rebuild":{"post":{"operationId":"app.api.nutrition_plan.post_nutrition_plan_content_rebuild","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NutritionPlanContentRebuildRequest"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NutritionPlanContentRebuildResponse"}}},"description":"successful operation"}},"summary":"Queue a rebuild of generated nutrition plan content","tags":["nutrition-plan"]}},"/patients/{patient_id}/patient_frequency_statement_items":{"get":{"operationId":"app.api.patient_reports.statements.get_patient_frequency_statement_items","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"starting date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"ending date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"disaggregated","required":true,"schema":{"description":"indicate whether to use aggregated or disaggregated meal items.","example":"false","type":"boolean"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Get the patient's summary metrics for the star plot graph","tags":["patient_report"]}},"/patients/{patient_id}/patient_nutrients_report":{"get":{"operationId":"app.api.patient_nutrients_report.patient_nutrients_report","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"date_since in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"date_until in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"view_by","required":true,"schema":{"enum":["day","weekday_weekend","meal_name"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientNutrientsReportResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the patient's nutrients report for the clinician view","tags":["patient_report"]}},"/patients/{patient_id}/patient_potassium_report":{"get":{"operationId":"app.api.patient_reports.sections.potassium.get_patient_potassium_report","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"starting date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"ending date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"disaggregated","required":true,"schema":{"description":"indicate whether to use aggregated or disaggregated meal items.","example":"false","type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientNutrientResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the patient's potassium details","tags":["patient_report"]}},"/patients/{patient_id}/patient_potassium_report/graph":{"get":{"operationId":"app.api.patient_reports.sections.potassium.get_patient_potassium_graph","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"starting date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"ending date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"disaggregated","required":true,"schema":{"description":"indicate whether to use aggregated or disaggregated meal items.","example":"false","type":"boolean"}}],"responses":{"200":{"content":{"image/png":{"schema":{"format":"binary","type":"string"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the patient's potassium graph","tags":["patient_report"]}},"/patients/{patient_id}/patient_rdi":{"get":{"operationId":"app.api.reference_daily_intake.get_patient_rdi","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"type":"string"}},{"in":"query","name":"use_insufficient_meal_filter","required":false,"schema":{"description":"whether days with insufficient number of meals should be excluded from the meals. Added 2024-04-01","example":"true","type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientRdiResponse"},"x-body-name":"PatientRdiResponse"}},"description":"successful operation","x-body-name":"response"}},"summary":"Get list of rdis for the patient","tags":["patient"]}},"/patients/{patient_id}/patient_star_plot_summary":{"get":{"operationId":"app.api.patient_reports.sections.star_plot.get_patient_star_plot_summary","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"starting date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"ending date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"disaggregated","required":true,"schema":{"description":"indicate whether to use aggregated or disaggregated meal items.","example":"false","type":"boolean"}},{"in":"query","name":"daily_avg_method","required":true,"schema":{"description":"indicate whether to avg by day, or carry out calcs across set of meals. Default is False.","example":"false","type":"boolean"}},{"in":"query","name":"include_statements","required":false,"schema":{"description":"indicate whether statements should be included in the response. Default is false.","example":"false","type":"boolean"}},{"in":"query","name":"n_frequency_items","required":false,"schema":{"description":"maximum number of frequency items to include per category. Default is 3.","example":"3","type":"integer"}},{"in":"query","name":"include_non_ranked_items","required":false,"schema":{"description":"indicate whether frequency items should include non-ranked. Default is true.","example":"false","type":"boolean"}},{"in":"query","name":"include_custom_items","required":false,"schema":{"description":"indicate whether to include custom items in the calculation","example":"false","type":"boolean"}},{"in":"query","name":"enforce_unique_base_food","required":false,"schema":{"description":"indicate whether enforce only one food item for each unique base food","example":"false","type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientStarPlotResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the patient's summary metrics for the star plot graph","tags":["patient_report"]}},"/patients/{patient_id}/patient_star_plot_summary/graph":{"get":{"operationId":"app.api.patient_reports.sections.star_plot.get_patient_star_plot","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"starting date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"ending date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"disaggregated","required":true,"schema":{"description":"indicate whether to use aggregated or disaggregated meal items","example":"true","type":"boolean"}},{"in":"query","name":"daily_avg_method","required":true,"schema":{"description":"indicate whether to avg by day, or carry out calcs across set of meals","example":"false","type":"boolean"}},{"in":"query","name":"include_custom_items","required":false,"schema":{"description":"indicate whether to include custom items in the calculation","example":"false","type":"boolean"}},{"in":"query","name":"enforce_unique_base_food","required":false,"schema":{"description":"indicate whether enforce only one food item for each unique base food","example":"false","type":"boolean"}}],"responses":{"200":{"content":{"image/png":{"schema":{"format":"binary","type":"string"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the patient's summary metrics as a star plot graph","tags":["patient_report"]}},"/patients/{patient_id}/patient_summary":{"get":{"operationId":"app.api.patient_summary.patient_summary","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date","required":true,"schema":{"description":"reference date (today's date) in format YYYY-MM-DD","example":"2019-01-02","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientSummaryResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the patient's summary for the clinician view","tags":["patient_report"]}},"/patients/{patient_id}/rdi":{"get":{"operationId":"app.api.reference_daily_intake.get_rdi","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RdiResponse"},"type":"array"},"x-body-name":"RdiResponses"}},"description":"successful operation","x-body-name":"response"}},"summary":"Get list of rdis for the patient","tags":["patient"]}},"/patients/{patient_id}/recipe_scan":{"post":{"operationId":"app.api.recipe.recipe_scan","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRecipeScanRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipeResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Create recipes","tags":["recipes"]}},"/patients/{patient_id}/recipes":{"post":{"operationId":"app.api.recipe.post_recipe","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRecipeRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipeResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Create recipes","tags":["recipes"]}},"/patients/{patient_id}/recipes/generate-custom-suggestions":{"post":{"operationId":"app.api.recipe.generate_patient_recipe_custom_suggestions","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"context","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipeGenerateCustomSuggestionsRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RecipeSuggestionResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Generate recipe suggestions for a patient","tags":["recipes"]}},"/patients/{patient_id}/recipes/lists":{"get":{"operationId":"app.api.recipe.get_all_patient_recipe_lists","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientRecipeListResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get all recipe lists saved by a patient","tags":["recipes"]},"post":{"operationId":"app.api.recipe.post_patient_recipe_list","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePatientRecipeListRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientRecipeListResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Add a recipe list","tags":["recipes"]}},"/patients/{patient_id}/recipes/lists/{recipe_list_id_or_type}":{"delete":{"operationId":"app.api.recipe.delete_patient_recipe_list","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"recipe_list_id_or_type","required":true,"schema":{"description":"Singletion type or integer id","type":"string"}}],"responses":{"204":{"description":"successful operation"}},"summary":"Delete a recipe list","tags":["recipes"]},"get":{"operationId":"app.api.recipe.get_patient_recipe_list","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"recipe_list_id_or_type","required":true,"schema":{"description":"Singletion type or integer id","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientRecipeListResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a recipe list saved by a patient","tags":["recipes"]},"post":{"operationId":"app.api.recipe.post_patient_recipe_list_email","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"clinician_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"recipe_list_id_or_type","required":true,"schema":{"description":"Singletion type or integer id","type":"string"}},{"in":"query","name":"recipe_item_ids","required":false,"schema":{"items":{"type":"integer"},"type":"array"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Email a recipe list to patient","tags":["recipes"]}},"/patients/{patient_id}/recipes/lists/{recipe_list_id_or_type}/items":{"get":{"operationId":"app.api.recipe.get_all_patient_recipe_list_items","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"recipe_list_id_or_type","required":true,"schema":{"description":"Singletion type or integer id","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientRecipeListItemResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get all recipes from a recipe list","tags":["recipes"]},"post":{"operationId":"app.api.recipe.post_patient_recipe_list_item","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"recipe_list_id_or_type","required":true,"schema":{"description":"Singletion type or integer id","type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePatientRecipeListItemRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientRecipeListItemResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Add a recipe to a recipe list","tags":["recipes"]}},"/patients/{patient_id}/recipes/lists/{recipe_list_id_or_type}/items/{recipe_id}":{"delete":{"operationId":"app.api.recipe.delete_patient_recipe_list_item","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"recipe_list_id_or_type","required":true,"schema":{"description":"Singletion type or integer id","type":"string"}},{"in":"path","name":"recipe_id","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"successful operation"}},"summary":"Remove a recipe from a recipe list","tags":["recipes"]},"put":{"operationId":"app.api.recipe.put_patient_recipe_list_item","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"recipe_list_id_or_type","required":true,"schema":{"description":"Singletion type or integer id","type":"string"}},{"in":"path","name":"recipe_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutPatientRecipeListItemRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientRecipeListItemResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Update a recipe list item from a recipe list","tags":["recipes"]}},"/patients/{patient_id}/recipes/suggestions":{"get":{"operationId":"app.api.recipe.get_patient_recipe_suggestions","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"force_update","required":false,"schema":{"type":"boolean"}},{"description":"Maximum number of recipes to return. Defaults to 20 and is capped at 100.","in":"query","name":"limit","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RecipeSuggestionResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a list of recipes suggestions for a patient","tags":["recipes"]}},"/patients/{patient_id}/recipes/suggestions/debug/edamam-results":{"get":{"operationId":"app.api.recipe.get_patient_recipe_suggestions_debug_edamam_results","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation","x-body-name":"response"}},"summary":"Gets the Edamam results for a patient's recipe suggestions","tags":["recipes"]}},"/patients/{patient_id}/recipes/suggestions/debug/openai-results":{"get":{"operationId":"app.api.recipe.get_patient_recipe_suggestions_debug_openai_results","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation","x-body-name":"response"}},"summary":"Gets the raw OpenAI results for a patient's recipe suggestions","tags":["recipes"]}},"/patients/{patient_id}/recipes/{recipe_id}":{"delete":{"operationId":"app.api.recipe.delete_recipe","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"recipe_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation"},"404":{"description":"recipe not found"}},"summary":"Delete a recipe","tags":["recipes"]},"get":{"operationId":"app.api.recipe.get_recipe","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"recipe_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipeResponse"}}},"description":"successful operation","x-body-name":"response"},"404":{"description":"recipe not found"}},"summary":"Get a recipe","tags":["recipes"]},"put":{"operationId":"app.api.recipe.put_recipe","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"recipe_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRecipeRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipeResponse"}}},"description":"successful operation","x-body-name":"response"},"404":{"description":"recipe not found"}},"summary":"Update a recipe","tags":["recipes"]}},"/patients/{patient_id}/recipes/{recipe_id}/copy":{"post":{"operationId":"app.api.recipe.copy_recipe","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"recipe_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipeResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Copy a public recipe as a patient-owned private recipe","tags":["recipes"]}},"/patients/{patient_id}/recipes/{recipe_id}/image-upload":{"post":{"operationId":"app.api.recipe.create_patient_recipe_image_upload","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"recipe_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"ext","required":true,"schema":{"enum":["jpg","jpeg","png","webp"],"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipeImageUploadResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Create a signed image upload for a patient-owned recipe","tags":["recipes"]}},"/patients/{patient_id}/shopping/item_collections":{"get":{"operationId":"app.api.shopping.get_patient_shopping_item_collections","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientShoppingItemCollectionResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get shopping item collections for a patient","tags":["shopping"]},"post":{"operationId":"app.api.shopping.post_patient_shopping_item_collections","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePatientShoppingItemCollectionRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientShoppingItemCollectionResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Create a shopping item collection","tags":["shopping"]}},"/patients/{patient_id}/shopping/item_collections/{collection_id}":{"delete":{"operationId":"app.api.shopping.delete_patient_shopping_item_collection","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"collection_id","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"successful operation"}},"summary":"Delete a shopping item collection and its items","tags":["shopping"]},"get":{"operationId":"app.api.shopping.get_patient_shopping_item_collection","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"collection_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientShoppingItemCollectionResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a shopping item collection","tags":["shopping"]}},"/patients/{patient_id}/shopping/item_collections/{collection_id}/items":{"get":{"operationId":"app.api.shopping.get_patient_shopping_items","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"collection_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientShoppingItemResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get shopping items in a collection","tags":["shopping"]},"post":{"operationId":"app.api.shopping.post_patient_shopping_items","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"collection_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CreatePatientShoppingItemRequest"},{"items":{"$ref":"#/components/schemas/CreatePatientShoppingItemRequest"},"minItems":1,"type":"array"}]}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/PatientShoppingItemResponse"},{"items":{"$ref":"#/components/schemas/PatientShoppingItemResponse"},"type":"array"}]}}},"description":"successful operation","x-body-name":"response"}},"summary":"Add or accumulate a shopping item in a collection","tags":["shopping"]}},"/patients/{patient_id}/shopping/item_suggestions":{"get":{"operationId":"app.api.shopping.get_patient_shopping_item_suggestions","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"description":"Number of suggestions to return (default 10, max 50).","in":"query","name":"limit","required":false,"schema":{"maximum":50,"minimum":1,"type":"integer"}},{"description":"Force regeneration of shopping list suggestions.","in":"query","name":"force_rebuild","required":false,"schema":{"type":"boolean"}},{"description":"Filter the type of suggestions to return. Defaults to `standalone`.\nSet to `swap` to fetch replacement suggestions tied to active cart items.\n","in":"query","name":"kind","required":false,"schema":{"enum":["standalone","swap"],"type":"string"}},{"description":"Optional collection id to direct suggestions into when accepted.","in":"query","name":"collection_id","required":false,"schema":{"type":"integer"}},{"description":"Optional collection name to direct suggestions into when accepted.","in":"query","name":"collection_name","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientShoppingItemSuggestionResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get shopping item suggestions for a patient","tags":["shopping"]}},"/patients/{patient_id}/shopping/item_suggestions/apply":{"post":{"operationId":"app.api.shopping.post_patient_apply_shopping_item_suggestions","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"description":"Number of suggestions to accept (default 10, max 50).","in":"query","name":"limit","required":false,"schema":{"maximum":50,"minimum":1,"type":"integer"}},{"description":"Optional collection id to accept the suggestions into.","in":"query","name":"collection_id","required":false,"schema":{"type":"integer"}},{"description":"Optional collection name to accept the suggestions into.","in":"query","name":"collection_name","required":false,"schema":{"type":"string"}},{"description":"Attempt regeneration if suggestions are insufficient.","in":"query","name":"force_rebuild","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientShoppingItemResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Accept the most recent shopping item suggestions into a collection","tags":["shopping"]}},"/patients/{patient_id}/shopping/item_suggestions/insight":{"get":{"operationId":"app.api.shopping.get_patient_shopping_item_insight","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"description":"ISO date (YYYY-MM-DD) to fetch a specific shopping list insight. Defaults to the latest available.","in":"query","name":"suggestion_date","required":false,"schema":{"format":"date","type":"string"}},{"description":"Regenerate the current day's insight. Historical dates cannot be rebuilt.","in":"query","name":"force_rebuild","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShoppingListInsightResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the latest shopping list insight markdown for a patient","tags":["shopping"]}},"/patients/{patient_id}/shopping/item_suggestions/{suggestion_id}/accept":{"post":{"operationId":"app.api.shopping.post_patient_shopping_item_suggestion_accept","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"suggestion_id","required":true,"schema":{"type":"integer"}},{"description":"Comma-separated list of suggestion IDs to accept in bulk.","explode":false,"in":"query","name":"suggestion_ids","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"},{"description":"Optional collection id to accept the suggestions into.","in":"query","name":"collection_id","required":false,"schema":{"type":"integer"}},{"description":"Optional collection name to accept the suggestions into.","in":"query","name":"collection_name","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/PatientShoppingItemResponse"},{"items":{"$ref":"#/components/schemas/PatientShoppingItemResponse"},"type":"array"}]}}},"description":"successful operation","x-body-name":"response"}},"summary":"Accept a shopping item suggestion","tags":["shopping"]}},"/patients/{patient_id}/shopping/item_suggestions/{suggestion_id}/dismiss":{"post":{"operationId":"app.api.shopping.post_patient_shopping_item_suggestion_dismiss","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"suggestion_id","required":true,"schema":{"type":"integer"}},{"description":"Comma-separated list of suggestion IDs to dismiss in bulk.","explode":false,"in":"query","name":"suggestion_ids","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"}],"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/PatientShoppingItemSuggestionResponse"},{"items":{"$ref":"#/components/schemas/PatientShoppingItemSuggestionResponse"},"type":"array"}]}}},"description":"successful operation","x-body-name":"response"}},"summary":"Dismiss a shopping item suggestion","tags":["shopping"]}},"/patients/{patient_id}/shopping/items/{item_id}":{"delete":{"operationId":"app.api.shopping.delete_patient_shopping_item","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"item_id","required":true,"schema":{"type":"integer"}},{"description":"Comma-separated list of shopping item IDs to delete in bulk.","explode":false,"in":"query","name":"item_ids","required":false,"schema":{"items":{"type":"integer"},"type":"array"},"style":"form"}],"responses":{"204":{"description":"successful operation"}},"summary":"Delete a shopping item","tags":["shopping"]},"get":{"operationId":"app.api.shopping.get_patient_shopping_item","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"item_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientShoppingItemResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a shopping item","tags":["shopping"]},"put":{"operationId":"app.api.shopping.put_patient_shopping_item","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"item_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePatientShoppingItemRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientShoppingItemResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Update a shopping item","tags":["shopping"]}},"/patients/{patient_id}/shopping/tips":{"get":{"operationId":"app.api.shopping.get_patient_shopping_tips","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"tips_date","required":false,"schema":{"type":"string"}},{"in":"query","name":"force_rebuild","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShoppingListTipsResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get shopping tips for a patient","tags":["shopping"]}},"/patients/{patient_id}/sleep":{"post":{"operationId":"app.api.sleep.post_patient_sleep","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePatientSleepRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientSleepResponse"}}},"description":"successful operation","x-body-name":"response"},"404":{"description":"patient or sleep entry not found"}},"summary":"Post a new sleep log","tags":["sleep"]}},"/patients/{patient_id}/sleep/{patient_sleep_id}":{"delete":{"operationId":"app.api.sleep.delete_patient_sleep","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_sleep_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation"},"404":{"description":"patient or sleep entry not found"}},"summary":"Deletes an existing sleep log","tags":["sleep"]},"get":{"operationId":"app.api.sleep.get_patient_sleep","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_sleep_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientSleepResponse"}}},"description":"successful operation","x-body-name":"response"},"404":{"description":"patient or sleep entry not found"}},"summary":"Gets an existing sleep log","tags":["sleep"]},"put":{"operationId":"app.api.sleep.put_patient_sleep","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_sleep_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutPatientSleepRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientSleepResponse"}}},"description":"successful operation","x-body-name":"response"},"404":{"description":"patient or sleep entry not found"}},"summary":"Modifies an existing sleep log","tags":["sleep"]}},"/patients/{patient_id}/sleep_data":{"get":{"operationId":"app.api.sleep.get_patient_sleep_data","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":false,"schema":{"type":"string"}},{"in":"query","name":"date_until","required":false,"schema":{"type":"string"}},{"in":"query","name":"sleep_day_group_time_start_delta","required":false,"schema":{"type":"integer"}},{"in":"query","name":"sleep_day_group_time_end_delta","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientSleepDataResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"},"404":{"description":"patient onot found"}},"summary":"Get a list of sleep logs of a patient","tags":["sleep"]}},"/patients/{patient_id}/stats":{"get":{"operationId":"app.api.patient_stats.get_patient_stats","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientStatsResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get minimal all-time patient meal stats.","tags":["patient"]}},"/patients/{patient_id}/steps_data":{"get":{"operationId":"app.api.steps.get_patient_steps_data","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":false,"schema":{"type":"string"}},{"in":"query","name":"date_until","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientStepsDataResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a list of steps, grouped by date","tags":["steps"]}},"/patients/{patient_id}/streaks":{"get":{"operationId":"app.api.patient_streaks.get_patient_streaks","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientStreakResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get all relevant streaks for the patient (\"any_activity\", and - once implemented - \"goals\", \"water\", etc).","tags":["streak"]}},"/patients/{patient_id}/stress":{"post":{"operationId":"app.api.stress.post_patient_stress","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePatientStressRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientStressResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Post a new stress activity","tags":["stress"]}},"/patients/{patient_id}/stress/{patient_stress_id}":{"delete":{"operationId":"app.api.stress.delete_patient_stress","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_stress_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation"},"404":{"description":"patient or stress entry not found"}},"summary":"Deletes an existing stress activity","tags":["stress"]},"get":{"operationId":"app.api.stress.get_patient_stress","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_stress_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientStressResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Gets an existing stress activity","tags":["stress"]},"put":{"operationId":"app.api.stress.put_patient_stress","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_stress_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PutPatientStressRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientStressResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Modifies an existing stress activity","tags":["stress"]}},"/patients/{patient_id}/stress_data":{"get":{"operationId":"app.api.stress.get_patient_stress_data","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":false,"schema":{"type":"string"}},{"in":"query","name":"date_until","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientStressResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a list of stress of a patient","tags":["stress"]}},"/patients/{patient_id}/subscription/{patient_subscription_id}/days_logged":{"get":{"operationId":"app.api.subscription.api.get_n_days_logged","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_subscription_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Get list of subscriptions for the patient","tags":["subscription"]}},"/patients/{patient_id}/subscriptions":{"get":{"operationId":"app.api.subscription.api.get_patient_subscriptions","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"active_only","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientSubscriptionResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get list of subscriptions for the patient","tags":["subscription"]},"post":{"operationId":"app.api.subscription.api.post_patient_subscriptions","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"start_date","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientSubscriptionResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Create a new subscription","tags":["subscription"]}},"/patients/{patient_id}/summary_statements":{"get":{"operationId":"app.api.patient_reports.sections.summary_statement.get_patient_summary_statements","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"starting date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"ending date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"disaggregated","required":true,"schema":{"description":"indicate whether to use aggregated or disaggregated meal items.","example":"false","type":"boolean"}},{"in":"query","name":"report_filter","required":true,"schema":{"description":"indicate whether to filter statements based on report criteria","example":"false","type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SummaryStatementResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get the patient's summary statements","tags":["patient_report"]}},"/patients/{patient_id}/supplement":{"post":{"operationId":"app.api.supplement.post_patient_supplement","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePatientSupplementRequest"}}},"required":true,"x-body-name":"body"},"responses":{"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientSupplementResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Post a supplement to a patient","tags":["supplement"]}},"/patients/{patient_id}/supplement/{patient_supplement_id}":{"delete":{"operationId":"app.api.supplement.delete_patient_supplement","parameters":[{"in":"path","name":"patient_supplement_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Delete supplement for the patient","tags":["supplement"]},"get":{"operationId":"app.api.supplement.get_patient_supplement","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_supplement_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientSupplementResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get list of supplements for the patient","tags":["supplement"]},"patch":{"operationId":"app.api.supplement.patch_patient_supplement","parameters":[{"in":"path","name":"patient_supplement_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchPatientSupplementRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientSupplementResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Edit a supplement for the patient","tags":["supplement"]}},"/patients/{patient_id}/supplements":{"get":{"operationId":"app.api.supplement.get_patient_supplements","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientSupplementResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get list of subscriptions for the patient","tags":["subscription"]}},"/patients/{patient_id}/support-help/search":{"get":{"operationId":"app.api.support_help.search_patient_support_help","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"q","required":true,"schema":{"description":"Support search query","type":"string"}},{"in":"query","name":"platform","required":false,"schema":{"enum":["ios","android","web"],"type":"string"}},{"in":"query","name":"app_version","required":false,"schema":{"description":"App version X.Y.Z","type":"string"}},{"in":"query","name":"locale","required":false,"schema":{"type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"maximum":10,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportHelpSearchResponse"}}},"description":"successful operation"}},"summary":"Search published support help topics for the patient app variant","tags":["support-help"]}},"/patients/{patient_id}/support-help/topics/{topic_id}":{"get":{"operationId":"app.api.support_help.get_patient_support_help_topic","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"topic_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"platform","required":false,"schema":{"enum":["ios","android","web"],"type":"string"}},{"in":"query","name":"app_version","required":false,"schema":{"description":"App version X.Y.Z","type":"string"}},{"in":"query","name":"locale","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportHelpSearchResponse"}}},"description":"successful operation"},"404":{"description":"topic not found for this consumer"}},"summary":"Get one published support help topic for the patient app variant","tags":["support-help"]}},"/patients/{patient_id}/test_subscription_email":{"post":{"deprecated":true,"operationId":"app.api.subscription.api.post_test_subscription_email","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"n_subscriptions","required":true,"schema":{"type":"integer"}},{"in":"query","name":"reference_date","required":true,"schema":{"type":"string"}},{"in":"query","name":"start_date","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Test subscription email for the user","tags":["test"]}},"/patients/{patient_id}/water":{"get":{"operationId":"app.api.water.get_water","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaterResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get patient's water consumption of the date","tags":["water"]},"put":{"operationId":"app.api.water.put_water","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"cups","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaterResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Put patient's water consumption of the date","tags":["water"]}},"/patients/{patient_id}/waters":{"get":{"operationId":"app.api.water.get_waters","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WaterResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Query the patient's meal consumption for water","tags":["water"]}},"/patients/{patient_id}/weekly-report-runs/{run_id}/retry":{"post":{"operationId":"app.api.weekly_report.retry_weekly_report","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"run_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeeklyReportRetryResponse"}}},"description":"successful operation"},"404":{"description":"report run not found"},"409":{"description":"report run is not retryable"}},"summary":"Idempotently retry a failed weekly report run","tags":["weekly_reports"]}},"/patients/{patient_id}/weekly-reports":{"get":{"operationId":"app.api.weekly_report.get_weekly_report_history","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"limit","required":false,"schema":{"default":20,"maximum":50,"minimum":1,"type":"integer"}},{"in":"query","name":"cursor","required":false,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeeklyReportHistoryResponse"}}},"description":"successful operation"}},"summary":"Get newest-first ready weekly report history","tags":["weekly_reports"]}},"/patients/{patient_id}/weekly-reports/status":{"get":{"description":"The current run is v2. latest_ready_report is the newest ready weekly nutrition report across supported schema versions, can be older than the current run, and must be routed using schema_version.","operationId":"app.api.weekly_report.get_weekly_report_status","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeeklyReportStatusResponse"}}},"description":"successful operation"}},"summary":"Get the patient's current weekly report status","tags":["weekly_reports"]}},"/patients/{patient_id}/weekly-reports/{report_id}":{"get":{"operationId":"app.api.weekly_report.get_weekly_report_detail","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"report_id","required":true,"schema":{"format":"uuid","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeeklyReportDetailResponse"}}},"description":"successful operation"},"404":{"description":"report not found"},"426":{"description":"app update required for this report schema"}},"summary":"Get one immutable weekly report","tags":["weekly_reports"]}},"/patients/{patient_id}/weights":{"get":{"operationId":"app.api.weight.get_patient_weights","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":false,"schema":{"type":"string"}},{"in":"query","name":"date_until","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientWeightListResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get up to 100 most recent weights of a patient in descending timestamp order","tags":["weight"]},"post":{"operationId":"app.api.weight.post_patient_weight","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePatientWeightRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientWeightResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Post a new weight entry","tags":["weight"]}},"/patients/{patient_id}/weights/{patient_weight_id}":{"delete":{"operationId":"app.api.weight.delete_patient_weight","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_weight_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation"},"404":{"description":"patient or weight entry not found"}},"summary":"Deletes an existing weight entry","tags":["weight"]},"get":{"operationId":"app.api.weight.get_patient_weight","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_weight_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientWeightResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Gets an existing weight entry","tags":["weight"]},"put":{"operationId":"app.api.weight.put_patient_weight","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_weight_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePatientWeightRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientWeightResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Modifies an existing weight entry","tags":["weight"]}},"/patients_for_testing":{"post":{"operationId":"app.api.patient.patients_for_testing","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientsForTestingRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientResponse"}}},"description":"successful operation","x-body-name":"response"}},"security":[],"summary":"Endpoint for the new patient.","tags":["patients onboarding"]}},"/recipes/instructions":{"get":{"operationId":"app.api.recipe.get_recipe_instruction","parameters":[{"in":"query","name":"recipe_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipeInstructionResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get recipes instructions","tags":["recipes"]}},"/recipes/search":{"get":{"operationId":"app.api.recipe.search_recipes","parameters":[{"description":"Freeform search text for recipes.","in":"query","name":"name","required":false,"schema":{"example":"Quinoa Salad","nullable":true,"type":"string"}},{"description":"Optional JSON-encoded Edamam filters (diet/health/etc).","in":"query","name":"filters","required":false,"schema":{"nullable":true,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/RecipeResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a list of recipes related to the search","tags":["recipes"]}},"/reporting/afternoon_dietetic_stats_email":{"get":{"operationId":"app.api.reporting.get_afternoon_dietetic_stats_email","parameters":[{"in":"query","name":"user_id","required":true,"schema":{"description":"user id to receive the email","type":"integer"}},{"in":"query","name":"reference_datetime","required":false,"schema":{"description":"YYYY-MM-DD HH:MM:SS in UTC","type":"string"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Get current email admin report","tags":["admin"]}},"/reporting/clinician/{clinician_id}/food_reports/draft":{"get":{"operationId":"app.api.patient_reports.api.get_clinician_food_reports_draft","parameters":[{"in":"path","name":"clinician_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":false,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"}},{"in":"query","name":"date_until","required":false,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-12","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientReportResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a list of the draft patients reports for review","tags":["reporting"]}},"/reporting/custom_meal_items/active":{"get":{"operationId":"app.api.reporting.get_custom_items","parameters":[{"in":"query","name":"date_since","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-12","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get all custom items between two dates","tags":["admin"]}},"/reporting/custom_meal_items/mpq":{"get":{"operationId":"app.api.reporting.get_custom_items_mpq","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get all custom items tied specifically to an MPQ","tags":["admin"]}},"/reporting/custom_meal_items/recent_by_name":{"get":{"operationId":"app.api.reporting.get_custom_items_by_name","parameters":[{"in":"query","name":"food_name","required":false,"schema":{"description":"filter results by food name","type":"string"}},{"in":"query","name":"date_since","required":false,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MealItemCustomResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get all custom items, grouped by name","tags":["admin"]}},"/reporting/custom_report_sections_export":{"get":{"operationId":"app.api.reports.report_metrics.get_custom_report_sections_export","parameters":[{"in":"query","name":"patient_ids","required":true,"schema":{"items":{"type":"integer"},"type":"array"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Patient section export report (MIND, Med, DASH, Diet Quality).","tags":["reporting"]}},"/reporting/custom_report_sections_export/csv":{"get":{"operationId":"app.api.reports.report_metrics.get_custom_report_sections_export_csv","parameters":[{"in":"query","name":"patient_ids","required":true,"schema":{"items":{"type":"integer"},"type":"array"}}],"responses":{"200":{"content":{"text/csv":{"schema":{"type":"string"}}},"description":"successful operation","x-body-name":"response"},"404":{"description":"not found"}},"summary":"Patient section export report (MIND, Med, DASH, Diet Quality).","tags":["reporting"]}},"/reporting/daily_admin_stats_email":{"get":{"operationId":"app.api.reporting.get_daily_admin_stats_email","parameters":[{"in":"query","name":"user_id","required":true,"schema":{"description":"user id to receive the email","type":"integer"}},{"in":"query","name":"reference_date","required":false,"schema":{"description":"YYYY-MM-DD","type":"string"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Get current email admin report","tags":["admin"]}},"/reporting/daily_patient_reports":{"post":{"operationId":"app.api.patient_reports.patient_report.post_daily_patient_reports","parameters":[{"in":"query","name":"report_date","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-12","type":"string"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Create a new daily report for all active patients that logged a meal","tags":["reporting"]}},"/reporting/daily_patient_reports/patient/{patient_id}":{"post":{"operationId":"app.api.patient_reports.patient_report.post_daily_patient_report","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"description":"patient id","example":"122","type":"integer"}},{"in":"query","name":"report_date","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-12","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DailyReportResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Create a new daily report for an active patient if they logged a meal","tags":["reporting"]}},"/reporting/data_reviewer/{data_reviewer_id}/patient/{patient_id}/meal_report":{"get":{"operationId":"app.api.reports.data_reviewer_meal_report.get_data_reviewer_patient_meal_report","parameters":[{"in":"path","name":"data_reviewer_id","required":true,"schema":{"description":"patient id","example":"232","type":"integer"}},{"in":"path","name":"patient_id","required":true,"schema":{"description":"patient id","example":"232","type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"}},{"in":"query","name":"disaggregated","required":false,"schema":{"description":"indicate whether to use aggregated or disaggregated meal items.","example":"false","type":"boolean"}}],"responses":{"200":{"content":{"application/pdf":{"schema":{"format":"binary","type":"string"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get meal report for a patient","tags":["reporting"]}},"/reporting/fat_analysis":{"get":{"operationId":"app.api.patient_reports.patient_email_report.fats_report","parameters":[{"in":"query","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-12","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FatResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Print foods that are highest in healthy vs unhealthy fats","tags":["reporting"]}},"/reporting/generate_pdf":{"post":{"operationId":"app.api.pdf.generate_pdf","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"description":"zip file containing report data","format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"x-body-name":"body"},"responses":{"200":{"content":{"application/pdf":{"schema":{"format":"binary","type":"string"}}},"description":"successful operation","x-body-name":"response"}},"summary":"generate pdf report from html zip file","tags":["reporting"]}},"/reporting/get_archived_meal_item_report":{"get":{"operationId":"app.api.reporting.get_archived_meal_item_report","parameters":[{"in":"query","name":"user_id","required":true,"schema":{"description":"user id to receive the email","type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"YYYY-MM-DD","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"YYYY-MM-DD","type":"string"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Get current archived email report","tags":["admin"]}},"/reporting/hospital/{hospital_id}/clinic/{clinic_id}/food_reports":{"get":{"operationId":"app.api.patient_reports.api.get_food_reports","parameters":[{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2022-05-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2022-05-12","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientReportDataResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Retrieve all food reports in a clinic for a specified time period","tags":["reporting"]}},"/reporting/hospital/{hospital_id}/clinic/{clinic_id}/patient/{patient_id}/patient_report":{"get":{"operationId":"app.api.patient_reports.patient_report.get_patient_reports","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-12","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientReportResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a list of the patient reports from the date range provided","tags":["reporting"]}},"/reporting/hospital/{hospital_id}/clinic/{clinic_id}/patient/{patient_id}/patient_report/{patient_report_id}":{"delete":{"operationId":"app.api.patient_reports.patient_report.delete_patient_report","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_report_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"successful operation"}},"summary":"Delete patient report with patient_report_id","tags":["reporting"]},"get":{"operationId":"app.api.patient_reports.patient_report.get_patient_report","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_report_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientReportResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get patient report with patient_report_id","tags":["reporting"]},"put":{"operationId":"app.api.patient_reports.patient_report.put_patient_report","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_report_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePatientReportRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientReportResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Update patient report with patient_report_id","tags":["reporting"]}},"/reporting/hospital/{hospital_id}/clinic/{clinic_id}/patient/{patient_id}/patient_report/{patient_report_id}/report_data":{"get":{"operationId":"app.api.patient_reports.patient_report.get_patient_report_data","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"clinic_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_report_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientReportDataResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"get patient report data","tags":["reporting"]}},"/reporting/labeling_report/data":{"get":{"operationId":"app.api.reports.labeling.get_labeling_report_data","parameters":[{"in":"query","name":"reference_date","required":true,"schema":{"description":"patient local time w/timezone in format date in format YYYY-MM-DD HH:MM:SS.fZ","type":"string"}},{"in":"query","name":"threshold_min","required":true,"schema":{"description":"minimum processing time in seconds","type":"number"}}],"responses":{"200":{"content":{"text/csv":{"schema":{"type":"string"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get quality assurance data","tags":["admin"]}},"/reporting/meal_photos_zip":{"post":{"operationId":"app.api.meal_photo.post_meal_photos_by_id_zip","requestBody":{"content":{"application/json":{"schema":{"properties":{"meal_photo_ids":{"items":{"type":"integer"},"type":"array"}},"required":["meal_photo_ids"],"type":"object"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/zip":{"schema":{"format":"binary","type":"string"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get meal images indicated.","tags":["reporting"]}},"/reporting/missing_food_photo_report":{"get":{"operationId":"app.api.reporting.get_missing_food_photo_report","parameters":[{"in":"query","name":"user_id","required":true,"schema":{"description":"user id to receive the email","type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"YYYY-MM-DD","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"YYYY-MM-DD","type":"string"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Get missing food photos","tags":["admin"]}},"/reporting/nlp_report_meal_id":{"post":{"operationId":"app.api.reports.spacy_daily_report.get_meal_item_info","parameters":[{"in":"query","name":"meal_ids","required":true,"schema":{"type":"string"}},{"in":"query","name":"user_id","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Report email for nlp","tags":["reporting"]}},"/reporting/nlp_reports_email":{"post":{"operationId":"app.api.reports.spacy_daily_report.nlp_reports_email","parameters":[{"in":"query","name":"start_date","required":false,"schema":{"type":"string"}},{"in":"query","name":"end_date","required":false,"schema":{"type":"string"}},{"in":"query","name":"user_id","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Report email for nlp","tags":["nlp"]}},"/reporting/patient-report-table":{"get":{"operationId":"app.api.patient_reports.api.get_patient_report_table","parameters":[{"in":"query","name":"filter","required":false,"schema":{"type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"type":"number"}},{"in":"query","name":"offset","required":false,"schema":{"type":"string"}},{"in":"query","name":"order","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"has_more":{"type":"boolean"},"next":{"type":"string"},"rows":{"items":{"$ref":"#/components/schemas/PatientReportTableRow"},"type":"array"}}}}},"description":"successful operation"}},"summary":"Query the patients detailed usage between the specified dates","tags":["reporting"]}},"/reporting/patient/{patient_id}/fasting_report":{"get":{"operationId":"app.api.meal_fasting.get_fasting_data","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-12","type":"string"}},{"in":"query","name":"ignore_fasting_entries","required":false,"schema":{"description":"whether meal items of \"fasting\" should be ignored","example":"true","type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FastingReportResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Query the patients detailed usage between the specified dates","tags":["reporting"]}},"/reporting/patient/{patient_id}/longevity_score":{"get":{"operationId":"app.api.metrics.longevity_score.get_longevity_score","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-12","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientLongevityResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Query the patients detailed usage between the specified dates","tags":["reporting"]}},"/reporting/patient/{patient_id}/patient_reports":{"get":{"operationId":"app.api.patient_reports.patient_report.get_patient_reports_by_patient_id","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-12","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientReportResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a list of all patient reports for a patient across all clinics from the date range provided","tags":["reporting"]}},"/reporting/patient/{patient_id}/pre_report_data_review":{"get":{"operationId":"app.api.patient_reports.pre_report.get_patient_pre_report_data_review","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"description":"patient id","example":"232","type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"}},{"in":"query","name":"nutrients","required":false,"schema":{"description":"nutrient to filter. leave blank for all nutrients","example":"fat_g","items":{"type":"string"},"type":"array"}},{"in":"query","name":"cc_columns","required":false,"schema":{"items":{"type":"string"},"type":"array"}}],"responses":{"200":{"content":{"application/pdf":{"schema":{"format":"binary","type":"string"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Send daily patient report for individual patient","tags":["reporting"]}},"/reporting/patient/{patient_id}/send_daily_report":{"get":{"operationId":"app.api.reporting.send_daily_report_email","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"description":"patient id","example":"232","type":"integer"}},{"in":"query","name":"report_date","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Send daily patient report for individual patient","tags":["reporting"]}},"/reporting/patient_invitation_report":{"post":{"operationId":"app.api.patient.post_patient_invitation_report","parameters":[{"in":"query","name":"date_since","required":true,"schema":{"type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Patient invitation report","tags":["reporting"]}},"/reporting/patient_outcome_tracking_report":{"get":{"operationId":"app.api.patient_reports.report_metrics.get_patient_outcome_tracking_report","parameters":[{"in":"query","name":"date_since","required":true,"schema":{"type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"type":"string"}},{"in":"query","name":"patient_ids","required":false,"schema":{"items":{"type":"integer"},"type":"array"}},{"in":"query","name":"report_ids","required":false,"schema":{"items":{"type":"integer"},"type":"array"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Patient report report.","tags":["reporting"]}},"/reporting/patient_report/{patient_report_id}":{"get":{"operationId":"app.api.patient_reports.api.get_patient_report","parameters":[{"in":"path","name":"patient_report_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientReportResponse"}}},"description":"successful operation"}},"summary":"Get a patient report by id","tags":["reporting"]}},"/reporting/patient_report/{patient_report_id}/patient_report_image/{patient_report_image_id}":{"get":{"operationId":"app.api.patient_reports.patient_report.get_patient_report_image_by_id","parameters":[{"in":"path","name":"patient_report_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_report_image_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Get user patient report plots contents by id","tags":["reporting"]}},"/reporting/patient_report/{patient_report_id}/pdf":{"get":{"operationId":"app.api.patient_reports.patient_report.get_patient_report_pdf","parameters":[{"in":"path","name":"patient_report_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/pdf":{"schema":{"format":"binary","type":"string"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Retrieve the patients report in PDF","tags":["reporting"]}},"/reporting/patient_report/{patient_report_id}/photo_by_name":{"get":{"operationId":"app.api.patient_reports.patient_report.get_patient_report_image_by_name","parameters":[{"in":"path","name":"patient_report_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"image_name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"image/png":{"schema":{"format":"binary","type":"string"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get patient report image with patient_report_id by image name","tags":["reporting"]}},"/reporting/patient_report/{patient_report_id}/refresh_pdf":{"post":{"operationId":"app.api.patient_reports.api.post_refresh_pdf","parameters":[{"in":"path","name":"patient_report_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Get patient report images with patient_report_id by report_section","tags":["reporting"]}},"/reporting/patient_report/{patient_report_id}/regenerate":{"post":{"operationId":"app.api.patient_reports.api.post_regenerate","parameters":[{"in":"path","name":"patient_report_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"filter_meal_dates","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"as_background_task","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Get patient report images with patient_report_id by report_section","tags":["reporting"]}},"/reporting/patient_report/{patient_report_id}/report_data":{"get":{"operationId":"app.api.patient_reports.patient_report.get_report_data","parameters":[{"in":"path","name":"patient_report_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/xlsx":{"schema":{"format":"binary","type":"string"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get patient report data","tags":["reporting"]}},"/reporting/patient_report/{patient_report_id}/report_html":{"get":{"operationId":"app.api.patient_reports.patient_report.get_patient_report_html","parameters":[{"in":"path","name":"patient_report_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"text/plain":{"schema":{"type":"string"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get patient report html with patient_report_id by report_section","tags":["reporting"]}},"/reporting/patient_report/{patient_report_id}/report_images":{"get":{"operationId":"app.api.patient_reports.patient_report.get_patient_report_photo_history","parameters":[{"in":"path","name":"patient_report_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientReportImageResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get patient report images with patient_report_id by report_section","tags":["reporting"]}},"/reporting/patient_report_auto_generation":{"post":{"operationId":"app.api.subscription.report.post_patient_report_auto_generation","parameters":[{"in":"query","name":"reference_date","required":true,"schema":{"type":"string"}},{"in":"query","name":"days_in_advance","required":false,"schema":{"type":"integer"}},{"in":"query","name":"queue_for_generation","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"report_dates_only","required":false,"schema":{"type":"boolean"}},{"description":"list of patient_ids to ignore","in":"query","name":"patient_ids_to_ignore","required":false,"schema":{"items":{"type":"integer"},"type":"array"}},{"in":"query","name":"send_email_report","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Generate all reports to be generated for the reference date. Reference date normally would be be today + 1 (days in advance) by default. Use report_dates_only to consider ONLY report dates.","tags":["reporting"]}},"/reporting/patient_report_metrics":{"post":{"operationId":"app.api.patient.post_patient_report_metrics","parameters":[{"in":"query","name":"date_since","required":true,"schema":{"type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Get currently logged in patient info","tags":["reporting"]}},"/reporting/patient_reports/active":{"get":{"operationId":"app.api.patient_reports.patient_report.get_active_patients_reports","responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientReportResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get all active patient reports","tags":["reporting"]}},"/reporting/patient_reports/send_all_daily_reports":{"get":{"operationId":"app.api.reporting.send_daily_report_emails","parameters":[{"in":"query","name":"report_date","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Send daily patient report","tags":["reporting"]}},"/reporting/patients/{patient_id}/aggregated_daily_nutrient_summary":{"get":{"operationId":"app.api.subscription.report.get_patient_aggregated_daily_nutrient_summary","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"description":"user id to receive the email","type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Get summary of patient nutrient intake, aggregated by date","tags":["admin"]}},"/reporting/patients/{patient_id}/daily_meal_item_issue_data":{"get":{"operationId":"app.api.subscription.report.get_patient_daily_meal_item_issue_data","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"description":"user id to receive the email","type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Get current email admin report","tags":["admin"]}},"/reporting/patients/{patient_id}/food_reports/secure_links":{"get":{"operationId":"app.api.patient_reports.api.get_patient_rxfood_report_secure_links","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientReportSecureLinkResponse"},"type":"array"}}},"description":"successful operation"}},"summary":"Return secure report links","tags":["reporting"]}},"/reporting/patients/{patient_id}/food_reports/{patient_report_id}/secure_link":{"get":{"operationId":"app.api.patient_reports.api.get_patient_rxfood_report_secure_link","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_report_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientReportSecureLinkResponse"}}},"description":"successful operation"}},"summary":"Returns a secure link for a patient report","tags":["reporting"]}},"/reporting/patients/{patient_id}/mobile_nutrition_insights":{"get":{"operationId":"app.api.patient_reports.api.get_patient_mobile_nutrition_insights","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"range_selector","required":false,"schema":{"description":"Optional server-side date range selection. If set, date_since/date_until are ignored. auto=latest N meal-days (all history), latest_subscription=current subscription window, newest_reportable_subscription=newest reportable subscription window.","enum":["auto","latest_subscription","newest_reportable_subscription"],"type":"string"}},{"in":"query","name":"days_with_meals","required":false,"schema":{"default":3,"description":"Only used when range_selector=auto. Number of latest meal-days to include (capped at 30).","minimum":1,"type":"integer"}},{"in":"query","name":"min_meals_per_day","required":false,"schema":{"default":1,"description":"Only used when range_selector=auto. Minimum number of reportable meals required for a date to count as a meal-day.","minimum":1,"type":"integer"}},{"in":"query","name":"date_since","required":false,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"}},{"in":"query","name":"date_until","required":false,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-12","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientReportDataResponse"}}},"description":"successful operation","x-body-name":"response"},"400":{"description":"invalid request (missing required parameters or invalid range_selector)"},"404":{"description":"no report exists for the selected range_selector"}},"summary":"Gets the PatientReportDataResponse used to show nutrition insights in the mobile app.","tags":["reporting"]}},"/reporting/patients/{patient_id}/nutrition_details_table":{"get":{"operationId":"app.api.patient_reports.api.get_patient_nutrition_details_table","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"group_by","schema":{"type":"string"}},{"in":"query","name":"filter","schema":{"type":"string"}},{"in":"query","name":"limit","schema":{"type":"number"}},{"in":"query","name":"offset","schema":{"type":"string"}},{"in":"query","name":"order","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"group_by":{"items":{"type":"string"},"type":"array"},"has_more":{"type":"boolean"},"next":{"type":"string"},"rows":{"items":{"$ref":"#/components/schemas/PatientNutritionDetailsTableRow"},"type":"array"}}}}},"description":"successful operation"}},"summary":"Generates an ApiTable report of nutrition details for a patient","tags":["reporting"]}},"/reporting/patients/{patient_id}/patient_report/{patient_report_id}/send_patient_public_report_link":{"get":{"operationId":"app.api.patient_reports.api.get_send_patient_public_report_link","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_report_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"to_patient","required":true,"schema":{"type":"boolean"}},{"in":"query","name":"to_admin","required":true,"schema":{"type":"boolean"}},{"in":"query","name":"is_demo","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Query the patients detailed usage between the specified dates","tags":["reporting"]}},"/reporting/qa_report/data":{"get":{"operationId":"app.api.reports.quality_assurance.get_qa_report_data","parameters":[{"in":"query","name":"min_meal_id","required":true,"schema":{"description":"lower bound (inclusive) of meal ids","type":"integer"}},{"in":"query","name":"max_meal_id","required":true,"schema":{"description":"upper bound (inclusive) of meal ids","type":"integer"}},{"description":"array of clinic ids","in":"query","name":"clinic_ids","required":false,"schema":{"items":{"type":"integer"},"type":"array"}}],"responses":{"200":{"content":{"text/csv":{"schema":{"type":"string"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get quality assurance data","tags":["admin"]}},"/reporting/qa_report/data_from_dates":{"get":{"operationId":"app.api.reports.quality_assurance.get_qa_report_data_from_dates","parameters":[{"in":"query","name":"date_since","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-12","type":"string"}},{"description":"array of clinic ids","in":"query","name":"clinic_ids","required":false,"schema":{"items":{"type":"integer"},"type":"array"}}],"responses":{"200":{"content":{"text/csv":{"schema":{"type":"string"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get quality assurance data","tags":["admin"]}},"/reporting/queue/meal_photos_zip":{"get":{"operationId":"app.api.meal_photo.get_queue_photos_zip","parameters":[{"in":"query","name":"reference_date","required":true,"schema":{"type":"string"}},{"in":"query","name":"hi_res","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/zip":{"schema":{"format":"binary","type":"string"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get patient meal images for queues on the given date. Max 50 photos returned.","tags":["reporting"]}},"/reporting/registered_non_logging_patients":{"get":{"operationId":"app.api.patient.get_registered_non_logging_patients","parameters":[{"in":"query","name":"reference_date","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"}},{"in":"query","name":"days_since_registration","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a list of patients who are registered but not active (ie no meals)","tags":["reporting"]}},"/reporting/report_engine_section_mappings":{"get":{"operationId":"app.api.patient_reports.api.get_report_engine_section_mappings","parameters":[{"in":"query","name":"sections","required":true,"schema":{"items":{"description":"list of report sections","example":"summary,carbs_by_period,calories_by_period,meal_frequency,average_plate_serv,carb_variability_table,diabetes_food_dump,GI_food_list,glycemic_index_frequency,macronutrient_distribution,micronutrient_summary_table,average_grains_frequency,average_fats_frequency,average_proteins_frequency,average_ultra_processed_frequency,average_beverage_frequency,average_water_frequency,supplements,for_additional_food_text,follow_up,carb_variability_table","type":"string"},"type":"array"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Return list of updated report sections from V1 to latest version of the report engine","tags":["reporting"]}},"/reporting/report_metrics/data":{"get":{"operationId":"app.api.reports.report_metrics.get_report_metrics_data","parameters":[{"in":"query","name":"date_since","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-12","type":"string"}},{"description":"232,323,643","in":"query","name":"patient_ids","required":true,"schema":{"items":{"type":"integer"},"type":"array"}}],"responses":{"200":{"content":{"text/csv":{"schema":{"type":"string"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Patient Report metrics to summarize reports","tags":["admin"]}},"/reporting/subscription_report":{"post":{"operationId":"app.api.subscription.report.post_subscription_report","parameters":[{"in":"query","name":"reference_date","required":true,"schema":{"type":"string"}},{"in":"query","name":"date_since","required":false,"schema":{"type":"string"}},{"in":"query","name":"date_until","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Get report on subscriptions due a report. Reference date is report_date minus one. Date since default is 21 days prior and date until 7 days after.","tags":["reporting"]}},"/reporting/user/{user_id}/patient_report/{patient_report_id}/secure_download":{"get":{"operationId":"app.api.patient_reports.api.get_rxfood_report_secure_download","parameters":[{"in":"path","name":"user_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_report_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"secure_payload","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation"}},"security":[],"summary":"Get currently secure copy of patient rxfood report. Time restricted.","tags":["reporting"]}},"/reporting/user/{user_id}/patient_report_prescription/{patient_report_id}/secure_download":{"get":{"operationId":"app.api.patient_reports.api.get_public_patient_prescription_report","parameters":[{"in":"path","name":"user_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"patient_report_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"secure_payload","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation"}},"security":[],"summary":"Get currently secure copy of patient rxfood report. Time restricted.","tags":["reporting"]}},"/reporting/weekly_custom_report_sections_export/csv":{"get":{"operationId":"app.api.reports.report_metrics.get_weekly_custom_report_sections_export_csv","parameters":[{"in":"query","name":"patient_ids","required":true,"schema":{"items":{"type":"integer"},"type":"array"}},{"in":"query","name":"date_since","required":true,"schema":{"type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"text/csv":{"schema":{"type":"string"}}},"description":"successful operation","x-body-name":"response"},"404":{"description":"not found"}},"summary":"Patient section export weekly report (MIND, Med, DASH, Diet Quality).","tags":["reporting"]}},"/reporting/{patient_id}/detailed_patient_usage_log":{"get":{"operationId":"app.api.patient_reports.detailed_patient_usage_log.get_detailed_patient_usage_log","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-12","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedPatientUsageLogResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Query the patients detailed usage between the specified dates","tags":["reporting"]}},"/subscriptions/active":{"get":{"operationId":"app.api.patient_reports.automation.get_reportable_subscriptions_by_type","parameters":[{"in":"query","name":"expiration_date","required":true,"schema":{"description":"calendar date in format YYYY-MM-DD","example":"2020-05-02","type":"string"}},{"in":"query","name":"subscription_type","required":true,"schema":{"enum":["single","weekly","monthly"],"nullable":false,"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientSubscriptionResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get all active subscriptions","tags":["reporting"]}},"/support/meal_trace/{meal_photo_queue_id}/diagnose":{"post":{"operationId":"app.api.support.meal_trace.diagnose_meal_trace","parameters":[{"in":"path","name":"meal_photo_queue_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportMealTraceDiagnosis"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Run an LLM diagnosis over a meal photo queue's pipeline trace","tags":["support meal trace"]}},"/tasks/{task_id}/result":{"get":{"operationId":"app.api.task.get_task_result","parameters":[{"in":"path","name":"task_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskResultResponse"}}},"description":"successful operation","x-body-name":"response"}},"security":[],"summary":"Get the status of a task","tags":["tasks"]}},"/telemetry/event/{name}/{key_b64}":{"put":{"operationId":"app.api.telemetry_event.put_telemetry_event","parameters":[{"in":"path","name":"name","required":true,"schema":{"type":"string"}},{"in":"path","name":"key_b64","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemetryEventRequest"}}},"required":true,"x-body-name":"body"},"responses":{"204":{"description":"successful operation"}},"summary":"Update metric","tags":["telemetry"]}},"/telemetry/event/{name}/{key_b64}/inc":{"post":{"operationId":"app.api.telemetry_event.post_telemetry_event_inc","parameters":[{"in":"path","name":"name","required":true,"schema":{"type":"string"}},{"in":"path","name":"key_b64","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemetryEventRequest"}}},"required":true,"x-body-name":"body"},"responses":{"204":{"description":"successful operation"}},"summary":"Update metric","tags":["telemetry"]}},"/testing/clinic_patient_invitation_report":{"post":{"operationId":"app.api.patient.post_test_clinic_patient_invitation_report","parameters":[{"in":"query","name":"hospital_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"clinic_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"date_since","required":true,"schema":{"description":"reference calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}},{"in":"query","name":"date_until","required":true,"schema":{"description":"reference calendar date in format YYYY-MM-DD","example":"2019-01-02","type":"string"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Review test versions of email templates","tags":["testing"]}},"/testing/email_templates":{"post":{"operationId":"app.util.testing.email_templates.get_all_templates","parameters":[{"in":"query","name":"hospital_id","required":false,"schema":{"type":"integer"}},{"in":"query","name":"clinic_id","required":false,"schema":{"type":"integer"}},{"in":"query","name":"number_of_subscriptions","required":false,"schema":{"type":"integer"}},{"in":"query","name":"clinician_emails_only","required":false,"schema":{"type":"boolean"}},{"in":"query","name":"locale","required":false,"schema":{"description":"locale - en and fr supported","example":"en","type":"string"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Review test versions of email templates","tags":["testing"]}},"/testing/rdi":{"post":{"operationId":"app.api.subscription.report.get_patient_rdi_day","parameters":[{"in":"query","name":"reference_date","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Review test versions of email templates","tags":["testing"]}},"/testing/{patient_id}/audio":{"post":{"operationId":"app.util.testing.meal_photo_queue.post_meal_audio","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMealAudioRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"description":"successful operation"}},"summary":"Add meal audio for testing purposes.","tags":["testing"]}},"/testing/{patient_id}/mpq":{"post":{"operationId":"app.util.testing.meal_photo_queue.post_meal_photo_queue","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMealPhotoQueueRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"description":"successful operation"}},"summary":"Add meal photo queue for testing purposes.","tags":["testing"]}},"/testing/{patient_id}/photo":{"post":{"operationId":"app.util.testing.meal_photo_queue.post_meal_photo","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMealPhotoRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"description":"successful operation"}},"summary":"Add meal photo for testing purposes.","tags":["testing"]}},"/translation/translate/{scope}":{"get":{"operationId":"app.api.translation.get_translation","parameters":[{"in":"path","name":"scope","required":true,"schema":{"type":"string"}},{"in":"query","name":"key","required":true,"schema":{"type":"string"}},{"in":"query","name":"lang","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranslatedStringResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Translate text","tags":["translations"]}},"/usda_nutritions/test_warning_email":{"post":{"operationId":"app.api.nutrition.test_nutrition_warning_email","parameters":[{"in":"query","name":"user_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation"}},"summary":"Test warning email","tags":["nutrition"]}},"/usda_nutritions/{nutrition_source_id}":{"get":{"operationId":"app.api.nutrition.get_usda_nutrition","parameters":[{"in":"path","name":"nutrition_source_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsdaNutritionResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get usda nutrition info by nutrition_source_id","tags":["nutrition"]}},"/user-surveys/form":{"post":{"operationId":"app.api.user_survey.post_user_survey_form","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserSurveyFormRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"description":"successful operation"}},"summary":"Post a user survey form","tags":["user-surveys"]}},"/user-surveys/user/{user_id}/forms/{survey_type}":{"get":{"operationId":"app.api.user_survey.get_user_survey_form","parameters":[{"in":"path","name":"user_id","required":true,"schema":{"type":"integer"}},{"in":"path","name":"survey_type","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSurveyFormResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a user survey form","tags":["user-surveys"]}},"/user-surveys/user/{user_id}/responses":{"get":{"operationId":"app.api.user_survey.get_user_survey_responses","parameters":[{"in":"path","name":"user_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"survey_type","required":false,"schema":{"type":"string"}},{"in":"query","name":"before_time","required":false,"schema":{"type":"string"}},{"in":"query","name":"related_activity_type","required":false,"schema":{"type":"string"}},{"in":"query","name":"related_activity_id","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/UserSurveyResponseResponse"},"type":"array"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a user survey response","tags":["user-surveys"]},"post":{"operationId":"app.api.user_survey.post_user_survey_response","parameters":[{"in":"path","name":"user_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserSurveyResponseRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"description":"successful operation"}},"summary":"Post a user survey response","tags":["user-surveys"]}},"/user/{user_email}/privacy/disclaimer":{"get":{"operationId":"app.util.privacy.get_user_privacy_disclaimer","parameters":[{"in":"path","name":"user_email","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPrivacyResponse"}}},"description":"successful operation","x-body-name":"response"}},"security":[],"summary":"Privacy disclaimer","tags":["privacy"]}},"/user/{user_id}/support_request":{"post":{"operationId":"app.api.user.post_user_support_request","parameters":[{"in":"path","name":"user_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSupportRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSupportResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Help Request","tags":["support"]}},"/users/current":{"get":{"operationId":"app.api.user.get_current_user","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get currently logged in user. This is for restricted use case, do NOT use this for current patient or clinician information.","tags":["user"]}},"/users/current/external_oauth_authorization":{"get":{"operationId":"app.api.external_oauth.get_authorization_url","parameters":[{"in":"query","name":"provider_name","required":false,"schema":{"type":"string"}},{"in":"query","name":"provider_endpoint","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalOauthTokenFlowAuthorization"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get a URL that authorizes a new third-party OAuth flow","tags":["oauth"]}},"/users/request_password_reset_email":{"post":{"operationId":"app.api.user.request_password_reset_email","parameters":[{"in":"query","name":"email","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation"},"404":{"description":"email is not found in the system"}},"security":[],"summary":"Request password reset email link. The unique link for password reset will be sent to user's email. The link will expire in 7 days or after used for resetting password.","tags":["user"]}},"/users/reset_password_by_token":{"post":{"operationId":"app.api.user.reset_password_by_token","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResetPasswordByTokenRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"description":"successful operation"}},"security":[],"summary":"Request password reset for specific user using the unique token","tags":["user"]}},"/users/{user_id}":{"get":{"operationId":"app.api.user.get_user","parameters":[{"in":"path","name":"user_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Get user information by user_id. Do NOT use this api to fetch current user, use /users/current instead.","tags":["admin"]},"patch":{"operationId":"app.api.user.patch_user","parameters":[{"in":"path","name":"user_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdateRequest"}}},"description":"User information to put. Only non-null provided field will be updated in the server.","required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"patch user information","tags":["user"]},"put":{"deprecated":true,"operationId":"app.api.user.put_user","parameters":[{"in":"path","name":"user_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdateRequest"}}},"description":"User information to put. If a field was provided will null value, then it will be overwritten to null.","required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}},"description":"successful operation","x-body-name":"response"}},"summary":"Put user information.","tags":["user"]}},"/users/{user_id}/fcm_registration_token":{"post":{"operationId":"app.api.user.post_fcm_registration_token","parameters":[{"in":"path","name":"user_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserUpdateFcmRegistrationTokenRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"description":"successful operation"}},"summary":"Update user device's FCM registration token","tags":["user"]}},"/users/{user_id}/test_push":{"post":{"operationId":"app.api.user.test_push","parameters":[{"in":"path","name":"user_id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserTestPushRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"description":"successful operation"}},"summary":"Test push notification for the user","tags":["user"]}},"/webhooks/cgm/{patient_id}/data/refetch":{"post":{"operationId":"app.api.cgm.api.post_webhook_cgm_data_refetch","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation"}},"security":[],"summary":"Trigger a refetch of CGM data for a patient. Note: will always return a success.","tags":["webhook"]}},"/webhooks/clinic-invitation/get-by-token":{"get":{"operationId":"app.api.webhooks.clinic_invitation_info_webhook","parameters":[{"in":"query","name":"token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientClinicInvitationInfoResponse"}}},"description":"successful operation","x-body-name":"response"}},"security":[],"summary":"Called by signup to display the clinic information based on the invitation token","tags":["webhook"]}},"/webhooks/clinic-invitation/patient-response":{"put":{"operationId":"app.api.webhooks.patient_clinic_invitation_response_webhook","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientClinicInvitationResponseRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"description":"successful operation"}},"security":[],"summary":"Called by signup when the patient accepts or rejects the clinic invitation","tags":["webhook"]}},"/webhooks/clinician-signup-form":{"post":{"description":"Creates a clinic and clinicians. Default clinic feature flags are merged into\nclinic.flags_raw for every request, based on clinic.clinic_type (wellness vs\ndiabetes/obesity presets); explicit flags in the request body override defaults.\nWhen create_hospital query parameter is true, also creates a new hospital using\nthe clinic name. In that case, hospital_id in the request body becomes optional.\n","operationId":"app.api.webhooks.clinician_signup_form_webhook","parameters":[{"description":"If true, creates a new hospital using the clinic name. When enabled,\nhospital_id in the request body becomes optional.\n","in":"query","name":"create_hospital","required":false,"schema":{"default":false,"type":"boolean"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateClinicAndCliniciansRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"description":"successful operation"}},"security":[],"summary":"Called by clinician signup form","tags":["webhook"]}},"/webhooks/eli-lilly/link/complete":{"post":{"description":"Called server-to-server by the signup application once the patient exists. Binds the link session to that patient, records consent, and registers the RxFood patient id with Eli Lilly as their externalUserId.\nA session can only ever bind to one patient. Retrying with the same patient_id is safe; a different one is rejected with 409.\n","operationId":"app.integrations.eli_lilly.link_endpoints.eli_lilly_link_complete_webhook","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EliLillyLinkCompleteRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EliLillyLinkCompleteResponse"}}},"description":"Patient linked and registered with Eli Lilly"},"400":{"description":"Malformed request"},"401":{"description":"Invalid or missing webhook credentials"},"409":{"description":"Link session is already bound to a different patient"},"410":{"description":"Link session expired"},"501":{"description":"Eli Lilly account linking is not enabled"},"502":{"description":"Registration delivery was ambiguous; retry with the same patient_id"}},"security":[],"summary":"Bind a patient to an Eli Lilly link session and register it back","tags":["webhook"]}},"/webhooks/eli-lilly/link/profile":{"post":{"description":"Called server-to-server by the signup application after the member accepts the consent bullets and enters their email. Retrieves the member's profile from Eli Lilly using the correlation ID, verifies the submitted email matches it, and returns an opaque link-session token plus prefill fields.\n`clinic_id` names which Eli Lilly environment the member came from. Their dev, qa and staging gateways run in parallel and each is provisioned as its own clinic under its own hospital, so the clinic is what resolves the gateway to call. Omitting it falls back to the configured clinic.\nReturns 422 when the emails differ; the member-facing wording lives in the signup application.\n","operationId":"app.integrations.eli_lilly.link_endpoints.eli_lilly_link_profile_webhook","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EliLillyLinkProfileRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EliLillyLinkProfileResponse"}}},"description":"Member verified; link session opened"},"400":{"description":"Malformed correlation ID or missing consent items"},"401":{"description":"Invalid or missing webhook credentials"},"410":{"description":"Correlation ID expired or unknown"},"422":{"description":"Submitted email does not match the Eli Lilly account"},"501":{"description":"Eli Lilly account linking is not enabled"},"502":{"description":"Eli Lilly unavailable"}},"security":[],"summary":"Verify an Eli Lilly member and open a link session","tags":["webhook"]}},"/webhooks/libreview/receive-measurements":{"post":{"operationId":"app.integrations.libreview.webhook_handlers.libreview_receive_measurements","responses":{"200":{"description":"successful operation"}},"security":[],"summary":"Receive measurement data from LibreView.","tags":["webhook"]}},"/webhooks/libreview/receive-notification":{"post":{"operationId":"app.integrations.libreview.webhook_handlers.libreview_receive_notification","responses":{"200":{"description":"successful operation"}},"security":[],"summary":"Receive a notification from LibreView that new data is available.","tags":["webhook"]}},"/webhooks/patient-signup-form":{"post":{"operationId":"app.api.webhooks.patient_signup_form_webhook","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePatientFromClinicianRequest"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientSignupWebhookResponse"}}},"description":"Patient created or attached"}},"security":[],"summary":"Called by Zapier when a self-service signup form on SquareSpace is submitted.","tags":["webhook"]}},"/webhooks/patients/{patient_id}/recipes/suggestions":{"post":{"operationId":"app.api.recipe.post_webhook_build_patient_recipe_suggestions_list","parameters":[{"in":"path","name":"patient_id","required":true,"schema":{"type":"integer"}},{"in":"query","name":"force","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"successful operation"}},"security":[],"summary":"Trigger a rebuild of the patient's recipe suggestions.","tags":["webhook"]}},"/webhooks/sendgrid":{"post":{"operationId":"app.api.webhooks.sendgrid_events_webhook","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendgridEmailEvent"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"description":"successful operation"}},"security":[],"summary":"Tracks email events from sendgrid.","tags":["webhook"]}},"/webhooks/twilio-sms":{"post":{"operationId":"app.api.webhooks.twilio_sms_webhook","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/TwilioSmsEvent"}}},"required":true,"x-body-name":"body"},"responses":{"200":{"content":{"application/xml":{"schema":{"$ref":"#/components/schemas/TwimlResponse"}}},"description":"TwiML response"}},"security":[],"summary":"Tracks SMS events from Twilio.","tags":["webhook"]}}},"security":[{"bearerAuth":[]}],"servers":[{"url":"/api"}]}
