{"openapi":"3.1.0","info":{"title":"MediTrail API","version":"0.1.0"},"paths":{"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Health Health Get"}}}}}}},"/account":{"get":{"summary":"Get Account","operationId":"get_account_account_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountRead"}}}}}}},"/account/onboarding":{"get":{"summary":"Get Onboarding","operationId":"get_onboarding_account_onboarding_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingRead"}}}}}}},"/account/onboarding/self-profile":{"put":{"summary":"Put Self Profile","description":"Create the account's `self` profile, or reuse it when onboarding resumes.","operationId":"put_self_profile_account_onboarding_self_profile_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelfProfileUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profiles":{"get":{"summary":"List Profiles","operationId":"list_profiles_profiles_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ProfileRead"},"type":"array","title":"Response List Profiles Profiles Get"}}}}}},"post":{"summary":"Create Profile","operationId":"create_profile_profiles_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profiles/{profile_id}":{"get":{"summary":"Get Profile","operationId":"get_profile_profiles__profile_id__get","parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","title":"Profile Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profiles/{profile_id}/aliases":{"get":{"summary":"Get Profile Aliases","operationId":"get_profile_aliases_profiles__profile_id__aliases_get","parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","title":"Profile Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProfileAliasRead"},"title":"Response Get Profile Aliases Profiles  Profile Id  Aliases Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Put Profile Aliases","operationId":"put_profile_aliases_profiles__profile_id__aliases_put","parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","title":"Profile Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileAliasesUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProfileAliasRead"},"title":"Response Put Profile Aliases Profiles  Profile Id  Aliases Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profiles/{profile_id}/health-context":{"post":{"summary":"Create Profile Health Context","operationId":"create_profile_health_context_profiles__profile_id__health_context_post","parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","title":"Profile Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileHealthContextCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileHealthContextRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"Get Profile Health Context","description":"Return the latest reported age and weight so a resumed session can show them.","operationId":"get_profile_health_context_profiles__profile_id__health_context_get","parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","title":"Profile Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileHealthContextSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profiles/{profile_id}/attested-conditions":{"put":{"summary":"Declare Attested Conditions","operationId":"declare_attested_conditions_profiles__profile_id__attested_conditions_put","parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","title":"Profile Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttestedMemoryUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttestedMemoryRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profiles/{profile_id}/attested-medications":{"put":{"summary":"Declare Attested Medications","operationId":"declare_attested_medications_profiles__profile_id__attested_medications_put","parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","title":"Profile Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttestedMemoryUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttestedMemoryRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingestions/direct-file":{"post":{"summary":"Upload Direct File","operationId":"upload_direct_file_ingestions_direct_file_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_direct_file_ingestions_direct_file_post"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestionUploadResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingestions/camera":{"post":{"summary":"Upload Camera Capture","operationId":"upload_camera_capture_ingestions_camera_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_camera_capture_ingestions_camera_post"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IngestionUploadResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingestions/{ingestion_id}/assignment/{profile_id}":{"post":{"summary":"Assign Ingestion","operationId":"assign_ingestion_ingestions__ingestion_id__assignment__profile_id__post","parameters":[{"name":"ingestion_id","in":"path","required":true,"schema":{"type":"string","title":"Ingestion Id"}},{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","title":"Profile Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MedicalRecordRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profiles/{profile_id}/records":{"get":{"summary":"List Records","operationId":"list_records_profiles__profile_id__records_get","parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","title":"Profile Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MedicalRecordRead"},"title":"Response List Records Profiles  Profile Id  Records Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/records/{record_id}":{"get":{"summary":"Get Record","operationId":"get_record_records__record_id__get","parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"string","title":"Record Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MedicalRecordRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ingestions/{ingestion_id}/extraction":{"get":{"summary":"Get Ingestion Extraction","operationId":"get_ingestion_extraction_ingestions__ingestion_id__extraction_get","parameters":[{"name":"ingestion_id","in":"path","required":true,"schema":{"type":"string","title":"Ingestion Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractionRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/records/{record_id}/extraction":{"get":{"summary":"Get Record Extraction","operationId":"get_record_extraction_records__record_id__extraction_get","parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"string","title":"Record Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractionRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/records/{record_id}/review":{"patch":{"summary":"Review Record Extraction","operationId":"review_record_extraction_records__record_id__review_patch","parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"string","title":"Record Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordReviewRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractionRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/extraction/jobs/{job_id}":{"get":{"summary":"Get Extraction Job","operationId":"get_extraction_job_extraction_jobs__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractionJobRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/extraction/jobs/{job_id}/run":{"post":{"summary":"Run Job","operationId":"run_job_extraction_jobs__job_id__run_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractionJobRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/extraction/jobs/{job_id}/retry":{"post":{"summary":"Retry Job","operationId":"retry_job_extraction_jobs__job_id__retry_post","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractionJobRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profiles/{profile_id}/memory":{"get":{"summary":"Get Memory","operationId":"get_memory_profiles__profile_id__memory_get","parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","title":"Profile Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemoryRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/appointments":{"post":{"summary":"Create Appointment","operationId":"create_appointment_appointments_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profiles/{profile_id}/appointments":{"get":{"summary":"List Appointments","operationId":"list_appointments_profiles__profile_id__appointments_get","parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","title":"Profile Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AppointmentRead"},"title":"Response List Appointments Profiles  Profile Id  Appointments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/appointments/{appointment_id}/checklist/generate":{"post":{"summary":"Generate Appointment Checklist","operationId":"generate_appointment_checklist_appointments__appointment_id__checklist_generate_post","parameters":[{"name":"appointment_id","in":"path","required":true,"schema":{"type":"string","title":"Appointment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ChecklistItemRead"},"title":"Response Generate Appointment Checklist Appointments  Appointment Id  Checklist Generate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/appointments/{appointment_id}/checklist":{"get":{"summary":"Get Appointment Checklist","operationId":"get_appointment_checklist_appointments__appointment_id__checklist_get","parameters":[{"name":"appointment_id","in":"path","required":true,"schema":{"type":"string","title":"Appointment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ChecklistItemRead"},"title":"Response Get Appointment Checklist Appointments  Appointment Id  Checklist Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/appointments/{appointment_id}/review":{"post":{"summary":"Create Appointment Review","operationId":"create_appointment_review_appointments__appointment_id__review_post","parameters":[{"name":"appointment_id","in":"path","required":true,"schema":{"type":"string","title":"Appointment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentReviewCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentReviewRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AccountRead":{"properties":{"id":{"type":"string","title":"Id"},"onboarding_status":{"type":"string","title":"Onboarding Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","onboarding_status","created_at","updated_at"],"title":"AccountRead"},"AppointmentCreate":{"properties":{"profile_id":{"type":"string","title":"Profile Id"},"scheduled_for":{"type":"string","format":"date-time","title":"Scheduled For"},"clinician_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Clinician Name"},"location":{"anyOf":[{"type":"string","maxLength":240},{"type":"null"}],"title":"Location"},"reason":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Reason"}},"type":"object","required":["profile_id","scheduled_for"],"title":"AppointmentCreate"},"AppointmentRead":{"properties":{"id":{"type":"string","title":"Id"},"profile_id":{"type":"string","title":"Profile Id"},"scheduled_for":{"type":"string","format":"date-time","title":"Scheduled For"},"clinician_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Clinician Name"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","profile_id","scheduled_for","clinician_name","location","reason","status","created_at"],"title":"AppointmentRead"},"AppointmentReviewCreate":{"properties":{"stars":{"type":"integer","maximum":5.0,"minimum":1.0,"title":"Stars"}},"type":"object","required":["stars"],"title":"AppointmentReviewCreate"},"AppointmentReviewRead":{"properties":{"id":{"type":"string","title":"Id"},"appointment_id":{"type":"string","title":"Appointment Id"},"stars":{"type":"integer","title":"Stars"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","appointment_id","stars","created_at"],"title":"AppointmentReviewRead"},"AttestedEntry":{"properties":{"title":{"type":"string","maxLength":240,"minLength":1,"title":"Title"},"details":{"additionalProperties":true,"type":"object","title":"Details"}},"type":"object","required":["title"],"title":"AttestedEntry"},"AttestedMemoryRead":{"properties":{"category":{"type":"string","title":"Category"},"declared_at":{"type":"string","format":"date-time","title":"Declared At"},"facts":{"items":{"$ref":"#/components/schemas/MemoryFactRead"},"type":"array","title":"Facts"}},"type":"object","required":["category","declared_at","facts"],"title":"AttestedMemoryRead"},"AttestedMemoryUpdate":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/AttestedEntry"},"type":"array","maxItems":100,"title":"Entries"}},"type":"object","title":"AttestedMemoryUpdate","description":"The complete current set. An empty list declares that there are none."},"Body_upload_camera_capture_ingestions_camera_post":{"properties":{"uploads":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Uploads"},"provisional_profile_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provisional Profile Id"},"display_filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Filename"},"user_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Context"}},"type":"object","required":["uploads"],"title":"Body_upload_camera_capture_ingestions_camera_post"},"Body_upload_direct_file_ingestions_direct_file_post":{"properties":{"uploads":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Uploads"},"provisional_profile_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provisional Profile Id"},"display_filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Filename"},"user_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Context"}},"type":"object","required":["uploads"],"title":"Body_upload_direct_file_ingestions_direct_file_post"},"ChecklistItemRead":{"properties":{"id":{"type":"string","title":"Id"},"appointment_id":{"type":"string","title":"Appointment Id"},"question":{"type":"string","title":"Question"},"source_fact_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Fact Id"},"is_generic":{"type":"boolean","title":"Is Generic"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","appointment_id","question","source_fact_id","is_generic","created_at"],"title":"ChecklistItemRead"},"DocumentMetadataCandidateRead":{"properties":{"id":{"type":"string","title":"Id"},"record_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Record Id"},"attempt_id":{"type":"string","title":"Attempt Id"},"metadata_type":{"type":"string","title":"Metadata Type"},"original_value":{"additionalProperties":true,"type":"object","title":"Original Value"},"submitted_value":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Submitted Value"},"confidence":{"type":"number","title":"Confidence"},"review_status":{"type":"string","title":"Review Status"}},"type":"object","required":["id","record_id","attempt_id","metadata_type","original_value","submitted_value","confidence","review_status"],"title":"DocumentMetadataCandidateRead"},"ExtractionAttemptRead":{"properties":{"id":{"type":"string","title":"Id"},"job_id":{"type":"string","title":"Job Id"},"attempt_number":{"type":"integer","title":"Attempt Number"},"status":{"type":"string","title":"Status"},"internal_phase":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Internal Phase"},"provider":{"type":"string","title":"Provider"},"provider_components":{"additionalProperties":true,"type":"object","title":"Provider Components"},"processing_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processing Method"},"routing_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Routing Reason"},"failure_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Code"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"}},"type":"object","required":["id","job_id","attempt_number","status","internal_phase","provider","provider_components","processing_method","routing_reason","failure_code","started_at","finished_at"],"title":"ExtractionAttemptRead"},"ExtractionJobRead":{"properties":{"id":{"type":"string","title":"Id"},"ingestion_id":{"type":"string","title":"Ingestion Id"},"status":{"type":"string","title":"Status"},"current_phase":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Phase"},"failure_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Code"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"}},"type":"object","required":["id","ingestion_id","status","current_phase","failure_code","created_at","started_at","finished_at"],"title":"ExtractionJobRead"},"ExtractionRead":{"properties":{"ingestion":{"$ref":"#/components/schemas/IngestionRead"},"record":{"anyOf":[{"$ref":"#/components/schemas/MedicalRecordRead"},{"type":"null"}]},"jobs":{"items":{"$ref":"#/components/schemas/ExtractionJobRead"},"type":"array","title":"Jobs"},"attempts":{"items":{"$ref":"#/components/schemas/ExtractionAttemptRead"},"type":"array","title":"Attempts"},"patient_evidence":{"items":{"$ref":"#/components/schemas/PatientEvidenceRead"},"type":"array","title":"Patient Evidence"},"metadata_candidates":{"items":{"$ref":"#/components/schemas/DocumentMetadataCandidateRead"},"type":"array","title":"Metadata Candidates"},"observations":{"items":{"$ref":"#/components/schemas/MetricObservationRead"},"type":"array","title":"Observations"},"memory_candidates":{"items":{"$ref":"#/components/schemas/MemoryCandidateRead"},"type":"array","title":"Memory Candidates"},"source_references":{"items":{"$ref":"#/components/schemas/SourceReferenceRead"},"type":"array","title":"Source References"},"assignment_history":{"items":{"$ref":"#/components/schemas/IngestionAssignmentRead"},"type":"array","title":"Assignment History"}},"type":"object","required":["ingestion","record","jobs","attempts","patient_evidence","metadata_candidates","observations","memory_candidates","source_references","assignment_history"],"title":"ExtractionRead"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"IngestionAssignmentRead":{"properties":{"id":{"type":"string","title":"Id"},"attempt_id":{"type":"string","title":"Attempt Id"},"profile_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Id"},"method":{"type":"string","title":"Method"},"match_version":{"type":"string","title":"Match Version"},"evidence_ids":{"items":{"type":"string"},"type":"array","title":"Evidence Ids"},"candidate_profile_ids":{"items":{"type":"string"},"type":"array","title":"Candidate Profile Ids"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","attempt_id","profile_id","method","match_version","evidence_ids","candidate_profile_ids","created_at"],"title":"IngestionAssignmentRead"},"IngestionPartRead":{"properties":{"id":{"type":"string","title":"Id"},"ingestion_id":{"type":"string","title":"Ingestion Id"},"ordinal":{"type":"integer","title":"Ordinal"},"original_filename":{"type":"string","title":"Original Filename"},"detected_mime_type":{"type":"string","title":"Detected Mime Type"},"size_bytes":{"type":"integer","title":"Size Bytes"},"received_at":{"type":"string","format":"date-time","title":"Received At"}},"type":"object","required":["id","ingestion_id","ordinal","original_filename","detected_mime_type","size_bytes","received_at"],"title":"IngestionPartRead"},"IngestionRead":{"properties":{"id":{"type":"string","title":"Id"},"provisional_profile_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provisional Profile Id"},"resolved_profile_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolved Profile Id"},"source_channel":{"type":"string","title":"Source Channel"},"user_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Context"},"display_filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Filename"},"upload_state":{"type":"string","title":"Upload State"},"assignment_state":{"type":"string","title":"Assignment State"},"extraction_state":{"type":"string","title":"Extraction State"},"review_state":{"type":"string","title":"Review State"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"resolved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Resolved At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","provisional_profile_id","resolved_profile_id","source_channel","user_context","display_filename","upload_state","assignment_state","extraction_state","review_state","completed_at","resolved_at","created_at","updated_at"],"title":"IngestionRead"},"IngestionUploadResult":{"properties":{"ingestion":{"$ref":"#/components/schemas/IngestionRead"},"parts":{"items":{"$ref":"#/components/schemas/IngestionPartRead"},"type":"array","title":"Parts"},"record":{"anyOf":[{"$ref":"#/components/schemas/MedicalRecordRead"},{"type":"null"}]},"extraction_job":{"anyOf":[{"$ref":"#/components/schemas/ExtractionJobRead"},{"type":"null"}]}},"type":"object","required":["ingestion","parts","record","extraction_job"],"title":"IngestionUploadResult"},"MedicalRecordRead":{"properties":{"id":{"type":"string","title":"Id"},"profile_id":{"type":"string","title":"Profile Id"},"ingestion_id":{"type":"string","title":"Ingestion Id"},"display_filename":{"type":"string","title":"Display Filename"},"record_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Record Type"},"record_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Record Date"},"issuer_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Issuer Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","profile_id","ingestion_id","display_filename","record_type","record_date","issuer_name","created_at","updated_at"],"title":"MedicalRecordRead"},"MemoryCandidateRead":{"properties":{"id":{"type":"string","title":"Id"},"record_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Record Id"},"attempt_id":{"type":"string","title":"Attempt Id"},"subtype":{"type":"string","title":"Subtype"},"label":{"type":"string","title":"Label"},"original_value":{"additionalProperties":true,"type":"object","title":"Original Value"},"submitted_value":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Submitted Value"},"exact_condition_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exact Condition Text"},"confidence":{"type":"number","title":"Confidence"},"review_status":{"type":"string","title":"Review Status"}},"type":"object","required":["id","record_id","attempt_id","subtype","label","original_value","submitted_value","exact_condition_text","confidence","review_status"],"title":"MemoryCandidateRead"},"MemoryFactRead":{"properties":{"id":{"type":"string","title":"Id"},"profile_id":{"type":"string","title":"Profile Id"},"source_record_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Record Id"},"source_candidate_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Candidate Id"},"source_reference_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Reference Id"},"provenance":{"type":"string","title":"Provenance"},"category":{"type":"string","title":"Category"},"title":{"type":"string","title":"Title"},"details":{"additionalProperties":true,"type":"object","title":"Details"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","profile_id","source_record_id","source_candidate_id","source_reference_id","provenance","category","title","details","is_active","created_at"],"title":"MemoryFactRead"},"MemoryRead":{"properties":{"profile":{"$ref":"#/components/schemas/ProfileRead"},"facts":{"items":{"$ref":"#/components/schemas/MemoryFactRead"},"type":"array","title":"Facts"}},"type":"object","required":["profile","facts"],"title":"MemoryRead"},"MetricObservationRead":{"properties":{"id":{"type":"string","title":"Id"},"record_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Record Id"},"profile_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Id"},"attempt_id":{"type":"string","title":"Attempt Id"},"metric_identity":{"type":"string","title":"Metric Identity"},"label":{"type":"string","title":"Label"},"original_value":{"additionalProperties":true,"type":"object","title":"Original Value"},"original_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Original Unit"},"normalized_value":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Normalized Value"},"normalized_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Normalized Unit"},"reference_range":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Reference Range"},"flag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Flag"},"observed_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Observed On"},"body_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body System"},"confidence":{"type":"number","title":"Confidence"},"quality_state":{"type":"string","title":"Quality State"},"is_active":{"type":"boolean","title":"Is Active"}},"type":"object","required":["id","record_id","profile_id","attempt_id","metric_identity","label","original_value","original_unit","normalized_value","normalized_unit","reference_range","flag","observed_on","body_system","confidence","quality_state","is_active"],"title":"MetricObservationRead"},"OnboardingRead":{"properties":{"status":{"type":"string","title":"Status"},"next_step":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Step"},"completed_steps":{"items":{"type":"string"},"type":"array","title":"Completed Steps"},"self_profile":{"anyOf":[{"$ref":"#/components/schemas/ProfileRead"},{"type":"null"}]}},"type":"object","required":["status","next_step","completed_steps","self_profile"],"title":"OnboardingRead"},"PatientEvidenceRead":{"properties":{"id":{"type":"string","title":"Id"},"ingestion_id":{"type":"string","title":"Ingestion Id"},"attempt_id":{"type":"string","title":"Attempt Id"},"extracted_name":{"type":"string","title":"Extracted Name"},"date_of_birth":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date Of Birth"},"patient_identifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Identifier"},"confidence":{"type":"number","title":"Confidence"}},"type":"object","required":["id","ingestion_id","attempt_id","extracted_name","date_of_birth","patient_identifier","confidence"],"title":"PatientEvidenceRead"},"ProfileAliasRead":{"properties":{"id":{"type":"string","title":"Id"},"profile_id":{"type":"string","title":"Profile Id"},"name":{"type":"string","title":"Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","profile_id","name","created_at"],"title":"ProfileAliasRead"},"ProfileAliasesUpdate":{"properties":{"aliases":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Aliases"}},"additionalProperties":false,"type":"object","required":["aliases"],"title":"ProfileAliasesUpdate"},"ProfileCreate":{"properties":{"display_name":{"type":"string","maxLength":160,"minLength":1,"title":"Display Name"},"relationship":{"type":"string","maxLength":80,"minLength":1,"title":"Relationship","default":"self"},"sex":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Sex"}},"type":"object","required":["display_name"],"title":"ProfileCreate"},"ProfileHealthContextCreate":{"properties":{"reported_age":{"anyOf":[{"type":"integer","maximum":130.0,"minimum":0.0},{"type":"null"}],"title":"Reported Age"},"age_reported_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Age Reported At"},"entered_weight":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Entered Weight"},"weight_unit":{"anyOf":[{"type":"string","enum":["kg","lb"]},{"type":"null"}],"title":"Weight Unit"},"weight_reported_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Weight Reported At"}},"type":"object","title":"ProfileHealthContextCreate"},"ProfileHealthContextRead":{"properties":{"id":{"type":"string","title":"Id"},"profile_id":{"type":"string","title":"Profile Id"},"reported_age":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Reported Age"},"age_reported_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Age Reported At"},"entered_weight":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Entered Weight"},"weight_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Weight Unit"},"normalized_weight_kg":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Normalized Weight Kg"},"weight_reported_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Weight Reported At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","profile_id","reported_age","age_reported_at","entered_weight","weight_unit","normalized_weight_kg","weight_reported_at","created_at"],"title":"ProfileHealthContextRead"},"ProfileHealthContextSummary":{"properties":{"profile_id":{"type":"string","title":"Profile Id"},"reported_age":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Reported Age"},"age_reported_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Age Reported At"},"age_refresh_due":{"type":"boolean","title":"Age Refresh Due"},"entered_weight":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Entered Weight"},"weight_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Weight Unit"},"normalized_weight_kg":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Normalized Weight Kg"},"weight_reported_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Weight Reported At"},"weight_refresh_due":{"type":"boolean","title":"Weight Refresh Due"}},"type":"object","required":["profile_id","reported_age","age_reported_at","age_refresh_due","entered_weight","weight_unit","normalized_weight_kg","weight_reported_at","weight_refresh_due"],"title":"ProfileHealthContextSummary","description":"The latest reported age and weight, with a non-blocking refresh prompt."},"ProfileRead":{"properties":{"id":{"type":"string","title":"Id"},"display_name":{"type":"string","title":"Display Name"},"relationship":{"type":"string","title":"Relationship"},"sex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sex"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","display_name","relationship","sex","created_at","updated_at"],"title":"ProfileRead"},"RecordReviewRequest":{"properties":{"decisions":{"items":{"$ref":"#/components/schemas/ReviewCandidateDecision"},"type":"array","minItems":1,"title":"Decisions"}},"type":"object","required":["decisions"],"title":"RecordReviewRequest"},"ReviewCandidateDecision":{"properties":{"candidate_type":{"type":"string","enum":["metadata","memory"],"title":"Candidate Type"},"candidate_id":{"type":"string","title":"Candidate Id"},"action":{"type":"string","enum":["confirm","edit","ignore"],"title":"Action"},"value":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Value"}},"type":"object","required":["candidate_type","candidate_id","action"],"title":"ReviewCandidateDecision"},"SelfProfileUpdate":{"properties":{"display_name":{"type":"string","maxLength":160,"minLength":1,"title":"Display Name"},"sex":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Sex"}},"type":"object","required":["display_name"],"title":"SelfProfileUpdate"},"SourceReferenceRead":{"properties":{"id":{"type":"string","title":"Id"},"part_id":{"type":"string","title":"Part Id"},"patient_evidence_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Evidence Id"},"metadata_candidate_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metadata Candidate Id"},"metric_observation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metric Observation Id"},"memory_candidate_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Memory Candidate Id"},"logical_page":{"type":"integer","title":"Logical Page"},"native_word_ids":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Native Word Ids"},"textract_block_ids":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Textract Block Ids"},"text_span":{"type":"string","title":"Text Span"},"bounding_polygon":{"items":{},"type":"array","title":"Bounding Polygon"}},"type":"object","required":["id","part_id","patient_evidence_id","metadata_candidate_id","metric_observation_id","memory_candidate_id","logical_page","native_word_ids","textract_block_ids","text_span","bounding_polygon"],"title":"SourceReferenceRead"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}